Abstract:
A mutual authentication method with which a base station and a subscriber station can mutually authentication with each other is proposed. In this method, dynamic keys are employed, and SS and BS individually input random numbers to the Diffie-Hellman Public Key Distribution System (DH-PKDS for short) to generate a set of public keys and a set of common secret keys as the strong data connection for authentication (DCA for short) between the two stations. An addition function (ADR) which is more secure than that of an exclusive OR function in key transmission is used as a data carrier. SS and BS authenticate each other by using the identity certification keys. Plaintext is encrypted by a two-dimensional stream cipher method so that ciphertext can be more securely, also efficiently, transmitted. Further, dynamic keys and all other security parameters transmitted through wireless channels are only used once to further improve system security.

Description:
FIELD OF THE INVENTION 
       [0001]    The present invention relates to a communication method in wireless communication environment, and particularly to a wireless communication method with dynamic keys for mutual authentication. 
       BACKGROUND OF THE INVENTION 
       [0002]    The wireless communication mainly comprises the cell phone communication and the wireless network communication. However, in an environment using 802.16e PKMv1, there is no data connection (common basic data) before SS (Subscriber Station) end and BS (Base Station) end commence the wireless communication, which is different from the data connection of IMSI and Ki on the SIM card in a cell phone or the data connection between SS and AAA (Authentication-Authorization-Accounting) in PKMv2 of IEEE 802.16e. Currently, all the data connections between SS end and BS end should be established by transmitting data through wireless communication. If the data in wireless communication is not protected by excellent security mechanism in the beginning, the data connection established between SS end and BS end will not be secure, and the security of the whole wireless communication system will be vulnerable accordingly. 
         [0003]    Take the current IEEE 802.16e PKMv1 as an example for illustration. The wireless communication in IEEE 802.16e PKMv1 will execute the following steps: 
         [0000]    
       
         
               
               
             
           
               
                   
                   
               
             
             
               
                   
                   PART  : (PKM Authorization) 
               
               
                   
                   Message 1: 
               
               
                   
                   SS→BS: Cert(Manufacturer(SS)) 
               
               
                   
                   Message 2: 
               
               
                   
                   SS→BS: Cert(SS) | Capabilities | SAID 
               
               
                   
                   Message 3: 
               
               
                   
                   BS→SS: RSA-Encrypt(PubKey(SS),AK) | Lifetime | SeqNo 
               
               
                   
                 | SAIDList 
               
               
                   
                   PART  : (Privacy and key management) 
               
               
                   
                   Message 1: 
               
               
                   
                   BS→SS: SeqNo | SAID | HMAC(1) 
               
               
                   
                   Message 2: 
               
               
                   
                   SS→BS: SeqNo | SAID | HMAC(2) 
               
               
                   
                   Message 3: 
               
               
                   
                   BS→SS: SeqNo | SAID | OldTEK | NewTEK | HMAC(3) 
               
               
                   
                   
               
             
          
         
       
     
         [0004]    In the above process of PKMv1 wireless communication, there are at least three security vulnerabilities described as follows: (1) In PART I (PKM authorization) wireless communication, because the data connection has not been established between SS and BS, and there is no authentication function from SS to BS in the transmitted data of Message 3, it is easy for a hacker to act as a fake BS and transmit a fake Message 3 to the SS. Furthermore, owing to the absence of the authentication function, the SS may receive the fake message anyway, and the SS will retrieve incorrect AK and then cause the failure of authentication of HAMC(1)˜HAMC(3) in the following PART II wireless communication; (2) Now that there are six wireless transmissions between SS and BS since SS sends out message to request the wireless communication until it retrieves TEKs, the hacker can easily interfere with the wireless communication between SS and BS, and further intercept information or affect the wireless communication. Thus, reduction of times of wireless transmission between SS and BS is also one of the methods for improving security; and (3) Because the protection by PubKey(SS) is not very strict and secure, the hacker can retrieve PubKey(SS) of SS from Cert(SS) in Message 2 of PART I, and further retrieve AK sent by BS from Message 3 of PART I, or even retrieve multiple RSA-Encrypt(PubKey(SS),AK) from Message 3 of PART I in the multiple wireless connection requests submitted by the same SS, and further retrieve PubKey(SS) by analyzing these multiple RSA-Encrypt(PubKey(SS), AKs). After the hacker retrieved the Authentication Key (AK), all the transmitted data between SS and BS in PART II are dangerous, because &lt;a&gt; the hacker can easily retrieve OldTEK and NewTEK, and all the following data transmission will be easily cracked by the hacker, consequently losing the security at all; and &lt;b&gt; the hacker may act as a fake SS to communicate with BS, and may also act as a fake BS to communicate with SS, so that the communication data transmitted between BS and SS will be completely retrieved by the hacker, and then the personal data of SS may be stolen, which may cause severe damage to SS. 
         [0005]    In order to improve the intrinsic security defects of IEEE 802.16e PKMv1 in wireless communication, the process of wireless communication has been improved as follows: 
         [0000]    
       
         
               
             
           
               
                   
               
             
             
               
                   PART  : (PKM Authorization) 
               
               
                   Message 1: 
               
               
                   SS→BS: Cert(Manufacturer(SS)) 
               
               
                   Message 2: 
               
               
                   SS→BS: SS-Random | Cert(SS) | Capabilities | SAID 
               
               
                   Message 3: 
               
               
                   BS→SS: SS-Random | BS-Random | 
               
               
                   RSA-Encrypt(PubKey(SS),pre_AK) | 
               
               
                   Lifetime | SeqNo | SAIDList | Cert(BS) | Sig(BS) 
               
               
                   PART  : (Privacy and key management) 
               
               
                   Message 1: 
               
               
                   BS→SS: SS-Random | BS-Random | SeqNo12 | SAID | HAMC(1) 
               
               
                   Message 2: 
               
               
                   SS→BS: SS-Random | BS-Random | SeqNo12 | SAID | HMAC(2) 
               
               
                   Message 3: 
               
               
                   BS→SS: SS-Random | BS-Random | SeqNo12 | SAID | OldTEK | 
               
               
                 NewTEK | HMAC(3) 
               
               
                   
               
             
          
         
       
     
         [0006]    This improvement method mainly adds the following in the process of wireless communication: (1) adding the random parameters, SS-Random and BS-Random; (2) replacing AK with Pre_AK and sending Pre_AK to SS from BS, and SS then generates AK based on a formula (described later), thus preventing from directly transmitting encrypted AK in a packet/message; (3) adding the random parameters, SS-Random and BS-Random, in the formula generating AK and TEK so as to provide these formulas with random characteristic, which may increase the difficulty for the hacker&#39;s cracking. However, in the entire process of wireless communication, the mutual authentication mechanism is not been established. All the random parameters only give randomness to the generation of AK and TEK. Nevertheless, SS-Random and BS-Random are directly retrieved from the wireless packets/messages without any encryption protection, so that the hacker will easily retrieve both of them from the intercepted packets/messages. Therefore, this method substantially is not very helpful to the security; and (4) Since the variables required for the formula generating AK and TEK, including pre_AK, SS-Random, BS-Random, SS-MAC-Addr, BS-MAC-Addr and pre-TEK, etc., can be all retrieved directly or indirectly by the hacker in the process of wireless communication for authentication, the system security will not be significantly improved. In fact, such a modification provides only limited improvement to the intrinsic security defects of wireless communication for the entire IEEE 802.16e PKMv1, the modification cannot be construed as a successful example and need to be greatly improved. 
         [0007]    As described above, the basic requirement for a secured wireless communication system is that each wireless communication steps should be authenticated, and the parameters for each wireless communication steps should be abandoned once used, but it is difficult to achieve this requirement under the environment of IEEE 802.16e PKMv1. 
         [0008]    The present invention integrates Diffie-Hellman public key distribution system (Diffie-Hellman PKDS for short), Identity Certification Key, Data Carriers and Mutual Authentication mechanism, etc., so as to establish a securely dynamic key system between SS end and BS end. With the operation of this system mechanism, even under the environment of IEEE 802.16e PKMv1, any wireless communication between SS end and BS end should be able to have mutual authentication, and all the keys and parameters used shall be exposed in the wireless packet/message only once, which greatly enhances the security of wireless communication. 
       SUMMARY OF THE INVENTION 
       [0009]    In view of the defects for the above-mentioned wireless communication method, the Inventor provides a method with dynamic keys for mutual authentication in wireless communication, so that each two-way wireless communication between SS and BS has to pass the authentication mechanism, and the data in wireless communication can be further processed only after passing the authentication, so as to achieve the purpose of enhancing the security of wireless communication. 
         [0010]    To this end, the wireless communication method according to the present invention includes: a method with dynamic keys for mutual authentication in wireless communication. An authentication message comprises: an OP_code as the head of the transmitted message, a nonce of SS (N SS ), a set of SS random numbers as the SS&#39;s private keys. The set of private keys are inputted into a Diffie-Hellman PKDS function to generate a set of SS public keys, and the SS will transmit a wireless communication authentication request message that contains the set of SS public keys to a BS. The HMAC(PubKey(SS)) is involved for the integrity of the transmitted message. The BS on receiving the authentication request message from SS retrieves the PubKey(SS) from the Cert(SS) contained in the massage. BS determines whether the HMAC(PubKey(SS)) sent by SS and HMAC(PubKey(SS)) calculated inside the BS are equal or not? If not, BS discards the fake message. Otherwise, BS further compares the N SS  sent by SS and the nonce of BS (i.e., N BS ) immediately. If N BS −N SS  is greater than 30 seconds, then BS discards the suspected replay attack message. Otherwise BS randomly selects a set of BS random numbers as the private keys of BS corresponding to the SS, and input the private keys into a Diffie-Hellman PKDS function to generate a set of BS public keys. Next the BS employs the set of SS public keys transmitted by the SS and the BS private keys to calculate and generate a set of Common Secret Keys, CSK 1 , CSK 2  and CSK 3  and further calculates and generates a set of BS&#39;s first identity certification keys, i.e., Cerfun(PubKey(SS), CSK 1 , CSK 2 ), from the retrieved set of Common Secret Key. After that the BS transmits an authentication-success message that contains the BS&#39;s first identity certification key to the SS, and subsequently, the BS independently calculates and generates a set of BS Authentication Keys (AKs), a set of BS Traffic Encryption Keys (TEKs) and a set of BS New Traffic Encryption Keys (NTEKs). 
         [0011]    The SS receiving a packet/message from the BS retrieves the OP_code from the packet/message. From the OP-code, the SS can realize that this is an authentication-success message containing the identity certification key. Next, the SS employs the SS private keys and the set of BS public keys transmitted by BS to calculate and generate a set of Common Secret Keys, i.e., CSK 1 , CSK 2 , CSK 3 . The SS further calculates and generates a set of SS&#39;s first identity certification keys, i.e., Cerfun(PubKey(SS), CSK 1 , CSK 2 ), from the retrieved set of Common Secret Keys, and compares the calculated set of SS&#39;s first identity certification keys with the BS&#39;s identity certification keys transmitted by the BS to see if they are equal or not. If yes, the SS will independently calculate and generate a set of SS Authentication keys (AKs), a set of SS Traffic Encryption Keys (TEKs), and a set of SS New Traffic Encryption Keys (NTEKs). The SS transmits a data transmission request message that contains the SS&#39;s second identity certification key, i.e., Cerfun(AK 1 , AK 2 , AK 3 ), to the BS. The BS on receiving the request message checks to see whether the SS&#39;s second identity certification key transmitted by the SS is equal to the set of BS&#39;s second identity certification keys calculated and generated inside the BS. If they are equal, the BS will return a permit data transmission message containing the BS&#39;s third identity certification key, i.e., Cerfun(AK 4 , AKS, AK 6 ), to the SS. The SS on receiving the permit data transmission message from the BS authenticates the BS by checking to see whether the BS&#39;s third identity certification key transmitted by the BS and the SS&#39;s third identity certification key calculated and generated inside the SS are equal or not. If yes, the SS will encrypt a plaintext data into a ciphertext, and transmit the ciphertext and the SS authentication code, i.e., EXOR(TEKm, NTEKm), calculated and generated with the set of SS Traffic Encrypt Keys (TEKs) and the set of SS New Traffic Encrypt Keys (NTEKs), to the BS. The BS on receiving the ciphertext and the SS authentication code from the SS checks to see whether the SS authentication code, i.e., EXOR(TEKm, NTEKm), received from the SS and the BS authentication code, i.e., EXOR(TEKm, NTEKm), calculated and generated with the set of BS authentication keys (TEKs) and the set of BS New Traffic Encrypt Keys (NTEKs) generated inside the BS are equal or not. If yes, the ciphertext will be decrypted into a plaintext data. Thus, the method with dynamic keys for mutual authentication in wireless communication according to the present invention can enhance the security of wireless communication. 
     
    
     
       BRIEF DESCRIPTION OF DRAWINGS 
         [0012]      FIG. 1  shows a flow diagram of an embodiment according to the present invention; 
           [0013]      FIG. 2  is a flow diagram continuing from  FIG. 1 ; 
           [0014]      FIG. 3  is a flow diagram continuing from  FIG. 2 ; 
           [0015]      FIG. 4  is a flow diagram continuing from  FIG. 3 ; 
           [0016]      FIG. 5  is a flow diagram continuing from  FIG. 4 ; and 
           [0017]      FIG. 6  is an OP_code function lookup table of an embodiment according to the present invention. 
       
    
    
     DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS 
       [0018]    In order to fully understand the object, features and functions of the present invention are described below in details with the following embodiments which refer to the accompany drawings as follows: 
         [0019]    Please refer to  FIG. 1  to  FIG. 5 , which are respectively a flow diagram of an embodiment according to the present invention, a flow diagram continuing from  FIG. 1 , a flow diagram continuing from  FIG. 2 , a flow diagram continuing from  FIG. 3  and a flow diagram continuing from  FIG. 4 . 
         [0020]    The operation of the proposed method consists of 10 steps, in which Step 1 through Step 4 are the authentication phase. Step 5 through Step 8 belong to the pre_data transmission phase, and the last two steps constitute the data transmission phase. 
         [0021]    The authentication phase: This phase is involved to exchange keys for authentication, and set up data connection for authentication (DCA for short) for SS and BS. 
         [0022]    Step 1: SS first self-produces three random numbers, SR1, SR2, and SR3, as its private keys, with which it generates three public keys P SR1 , P SR2  and P SR3  where P BRi =g BRi  mod P, 1≦i≦3. It then sends an authentication-request message, i.e., message 1, with OP_code=1 to BS. The format of the authentication-request message (message 1) is: 
         [0000]        OP _code| N   SS |Cert (SS)| P   SR1   |P   SR2   |P   SR3 |HMAC PubKey (SS)) 
         [0023]    Step 2: BS on receiving the message retrieves the PubKey(SS) from Cert(SS) determines whether the HMAC(PubKey(SS)) sent by SS and HMAC(PubKey(SS)) calculated inside the BS are equal or not. If not, BS discards the fake message. Otherwise, BS further compares the N SS  sent by SS and the nonce of BS (i.e., N BS ) immediately. If N BS −N SS  is greater than 30 seconds, then BS discards the replay attack message. Otherwise BS randomly selects three random numbers BR1, BR2, and BR3 from its pre-produced internal random number table as its private keys, and retrieves the three corresponding public keys P BR1 , P BR2  and P BR3 , which are calculated beforehand, also from the table where P BRi =g BRi  mod P,1≦i≦3. After that, it generates the three common secret keys CSK 1 , CSK 2  and CSK 3  where 
         [0000]    
       
         
           
             
               CSKi 
               = 
               
                 
                   P 
                   SRi 
                   BRi 
                 
                  
                 mod 
                  
                 
                     
                 
                  
                 P 
               
             
             , 
             
               1 
               ≤ 
               i 
               ≤ 
               3 
             
             , 
           
         
       
     
         [0000]    and the identity certification key Cerfun(PubKey(SS),CSK 1 ,CSK 2 ). The PubKey(SS) and the three common secrete keys are employed as the DCA between SS and BS. 
         [0024]    Step 3: BS selects another three random numbers as pre_AK1, pre_AK2, and pre_AK3 from its internal random number table, and sends an authentication/key reply message, i.e., message 2, with OP_code=2 to SS. The format of the authentication/key reply message (message 2) is: 
         [0000]    
       
         
               
             
           
               
                   
               
             
             
               
                 OP_code | P BR1  | P BR2  | P BR3  | Cerfun (PubKey (SS), CSK 1, CSK 2) | 
               
               
                 ADR (CSK 1,pre_AK 1) | ADR (CSK 2,pre_AK 2) | ADR 
               
               
                 (CSK 3,pre_AK 3) 
               
               
                   
               
             
          
         
       
     
         [0025]    Meanwhile, BS produces 
         [0000]    
       
         
               
             
           
               
                   
               
             
             
               
                    (1) six AKs, i.e., AK1 ~ AK6, by using HMAC-SHA algorithm 
               
               
                 where 
               
               
                  AK1 = HMAC − SHA(CSK1,pre_AK1 | CSK 2 | pre_AK 2 | PubKey (SS) | BS_MAC_Addr ) 
               
               
                  AK2 = HMAC − SHA(CSK2,pre_AK2 | CSK3 | pre_AK3 | PubKey(SS)|SS_MAC_Addr) 
               
               
                  AK3 = HMAC − SHA(CSK3,pre_AK3 | CSK1 | pre_AK1 | PubKey(SS)|BS_MAC_Addr) 
               
               
                  AK 4 = HMAC − SHA(CSK 1,CSK 2 | CSK 3 | pre_AK 1 | PubKey (SS)|SS_MAC_Addr ) 
               
               
                  AK 5 = HMAC − SHA(CSK 2,CSK 3 | CSK 1 | pre_AK 2 | PubKey (SS)|BS_MAC_Addr ) 
               
               
                  AK 6 = HMAC − SHA(CSK 3,CSK 1 | CSK 2 | pre_AK 3 | PubKey (SS)|SS_MAC_Addr ) 
               
               
                    (2) 243 TEKs, i.e., TEK1 ~ TEK243, where 
               
               
                   TEK (i−1)×81+(j−1)×9+k  = (AK i  ⊕ TAK j ) + TCK k ,4 ≦ i ≦ 6,1 ≦ j,k ≦ 9 
               
               
                    in which 
               
               
                    TAK ( i − 1 ) × 3 + j  = AKi + pre_AKj ,1 ≦ i , j ≦ 3 , and 
               
               
                    TCK ( i − 1 ) × 3 + j  = CSKi + pre_AKj ,1 ≦ i , j ≦ 3 . 
               
               
                    (3) 243 NTEKs, i.e., NTEK1 ~ NTEK243,, where 
               
               
                   NTEK (i−1)×81+(j−1)×9+k  = (AK i  ⊕ NTAK j ) + (NTCK k  ⊕ AK 6),1 ≦ i ≦ 3,1 ≦ j,k ≦ 9. 
               
               
                    is which 
               
               
                     NTAK i  = AK 4 ⊕ TAK i ,1 ≦ i ≦ 9, and 
               
               
                     NTCK j  = AK 5 ⊕ TCK j ,1 ≦ j ≦ 9. 
               
               
                   
               
             
          
         
       
     
         [0026]    Here, the 6AKs, 243TEKs, 9TAKs, 9TCKs, 243NTEKs, 9NTAKs, and 9NTCKs are together called TEK-key group. 
         [0027]    Step 4: SS on receiving of the message retrieves P BR1 , P BR2  and P B           from the message, and calculates CSKi, 
         [0000]    
       
         
           
             
               CSKi 
               = 
               
                 
                   P 
                   BRi 
                   SRi 
                 
                  
                 
                     
                 
                  
                 mod 
                  
                 
                     
                 
                  
                 P 
               
             
             , 
             
               1 
               ≤ 
               i 
               ≤ 
               3 
             
             , 
           
         
       
     
         [0000]    and the identity certification key Cerfun(PubKey(SS),CSK 1 ,CSK 2 ). SS authenticates BS by comparing the retrieved Cerfun (PubKey(SS), CSK 1 , CSK 2 ) and the calculated one. If they are not equal, SS discards the fake message and waits for an authentication/key reply message issued by a valid BS. Otherwise, it recovers pre-AKi by invoking the reverse function of the data carriers ADR (CSKi, pre_AKi),i=1,2,3. With the identity certification key, we can not only defend the forgery BS attacks, but also well protect PubKey(SS). The forgery BS attacks that the PKMv1 suffers are then solved. 
         [0028]    The pre_data transmission phase: This phase is involved to establish the links between SS and BS and between BS and the correspondent node (CN for short). 
         [0029]    Step 5: SS produces the corresponding TEK-key group by using the same functions defined above. SS further sends a data-transmission-request message, i.e., message 3, with OP_code =3 to BS. The format of the data transmission request message (message 3) is: 
         [0000]    
       
         
               
             
           
               
                   
               
             
             
               
                 OP_Code | Cerfun (AK 1,AK 2,AK 3) 
               
               
                   
               
             
          
         
       
     
         [0030]    Step 6: BS on receipt of the message authenticates the message by comparing Cerfun(AK 1 ,AK 2 ,AK 3 ) calculated and the one retrieved from the message. If they are not equal, BS discards the fake message and waits for a data-transmission-request message issued by the valid SS. Otherwise it proceeds to the next step. 
         [0031]    Step 7: If CN is now on line and can be contacted by BS, BS sends a data-transmission-reply message, i.e., message 4, with OP_code=4 to SS. The format of the data-transmission-reply message (message 4) is: 
         [0000]    
       
         
               
             
           
               
                   
               
             
             
               
                 OP_Code | Cerfun (AK 4,AK 5,AK 6) 
               
               
                   
               
             
          
         
       
     
         [0032]    If the CN is now off line, BS sends an Transmission-request-failure message, i.e., message 4, with OP_code=5 to SS. The message format reuses the one shown above. 
         [0033]    Step 8: The SS on receipt of the message authenticates the message with the same process mentioned in step 6 with Cerfun(AK 1 ,AK 2 ,AK 3 ) replaced by Cerfun(AK 4 ,AK 5 ,AK 6 ). If the authentication fails, SS discards the fake message and waits for a message issued by the valid BS. If the authentication successes and OP_code=5, then SS terminates the communication. If the authentication successes and OP_code=4, then SS proceeds to the next step. 
         [0034]    The Data Transmission Phase: This phase is involved to transmit data messages. 
         [0035]    Step 9: If the plaintext of q bits in length can be partitioned into n I-bit segments, e.g., plaintext 0 ˜plaintext n−1 , i.e., 
         [0000]    
       
         
           
             
               Plaintext 
               = 
               
                 
                   plaintext 
                   0 
                 
                 + 
                 
                   plaintext 
                   1 
                 
                 + 
                 … 
                 + 
                 
                   plaintext 
                   
                     n 
                     - 
                     1 
                   
                 
               
             
             , 
             
               n 
               ≥ 
               1 
             
           
         
       
       
         
           where 
         
       
       
         
           
             n 
             = 
             
               
                 ⌈ 
                 
                   q 
                   l 
                 
                 ⌉ 
               
               . 
             
           
         
       
     
         [0000]    The encryption process is 
         [0000]      ciphertext i =(plaintext i ⊕NTEK j )+TEK j , 0 ≦i≦n− 1,  j= ( i+m ) mod 243, 0 ≦m≦ 242
 
         [0000]      and 
         [0000]      Ciphertext=ciphertext 0 +ciphertext 1 + . . . +ciphertext n−1   ,n≧ 1 
         [0036]    SS sends the ciphertext as a data message to BS. The format of a data message from SS to BS is: 
         [0000]    
       
         
               
             
           
               
                   
               
             
             
               
                 OP_Code | RHSEXOR(AK6,m)|EXOR(TEKm,NTEKm)|Ciphertext 
               
               
                   
               
             
          
         
       
     
         [0037]    Step 10: BS authenticates the message by comparing the self-calculated value of the traffic certification key EXOR (TEKm, NTEKm), and the value retrieved from the message. If they are not equal, BS discards the fake message and waits for the message issued by the valid SS. Otherwise it decrypts the ciphertext with the following process. 
         [0000]    
       
         
           
             
               pla 
                
               
                   
               
                
               int 
                
               
                   
               
                
               exti 
             
             = 
             
               { 
               
                 
                   
                     
                       
                         
                           
                             
                               
                                 ( 
                                 
                                   
                                     ciphertext 
                                     i 
                                   
                                   - 
                                   
                                     TEK 
                                     j 
                                   
                                 
                                 ) 
                               
                               ⊕ 
                               
                                 NTEK 
                                 j 
                               
                             
                             , 
                           
                         
                         
                           
                             
                               if 
                                
                               
                                   
                               
                                
                               
                                 ciphertext 
                                 i 
                               
                             
                             ≥ 
                             
                               TEK 
                               j 
                             
                           
                         
                       
                       
                         
                           
                             
                               
                                 ( 
                                 
                                   
                                     ciphertext 
                                     i 
                                   
                                   + 
                                   
                                     
                                       TEK 
                                       j 
                                     
                                     _ 
                                   
                                   + 
                                   1 
                                 
                                 ) 
                               
                               ⊕ 
                               
                                 NTEK 
                                 j 
                               
                             
                             , 
                           
                         
                         
                           
                             
                               if 
                                
                               
                                   
                               
                                
                               
                                 ciphertext 
                                 i 
                               
                             
                             &lt; 
                             
                               TEK 
                               j 
                             
                           
                         
                       
                       
                         
                           
                             
                               
                                 where 
                                  
                                 
                                     
                                 
                                  
                                 0 
                               
                               ≤ 
                               i 
                               ≤ 
                               
                                 n 
                                 - 
                                 1 
                               
                             
                             , 
                           
                         
                         
                           
                             
                               j 
                               = 
                               
                                 
                                   ( 
                                   
                                     i 
                                     + 
                                     m 
                                   
                                   ) 
                                 
                                  
                                 
                                     
                                 
                                  
                                 mod 
                                  
                                 
                                     
                                 
                                  
                                 243 
                               
                             
                             , 
                             
                               0 
                               ≤ 
                               m 
                               ≤ 
                               242 
                             
                             , 
                           
                         
                       
                     
                      
                     
                       
 
                     
                      
                     
                         
                     
                      
                     and 
                      
                     
                       
 
                     
                      
                     Plaintext 
                   
                   = 
                   
                     
                       plaintext 
                       0 
                     
                     + 
                     
                       plaintext 
                       1 
                     
                     + 
                     … 
                     + 
                     
                       plaintext 
                       
                         n 
                         - 
                         1 
                       
                     
                   
                 
                 , 
                 
                   n 
                   ≥ 
                   1 
                 
               
             
           
         
       
     
         [0038]    In the above description, when BS sends an authentication-success message(step 2) to SS and SS sends the ciphertext to the BS, BS and SS employ an Adder function as the data carrier. 
         [0039]    The ciphertext transmitted between SS and BS is encrypted by a two dimension stream cipher technique, implying two different types of encryption operations are performed on the same plaintext and each different plaintext bytes are encrypted with different random codes. The cipher operation technique combining both features is called the two dimension stream cipher technique. 
         [0040]    The present invention establishes a wireless communication system with mutual authentication between SS and BS in a wireless communication environment. To this end, the present invention has the following sub-functions, which are described individually as follows: 
         [0041]    Sub-function (1): Encryption/Decryption Functions 
         [0042]    1. Diffie-Hellman PKDS function: 
         [0043]    DH(p,g,x)=g x  mod p, where p is a strong prime number, g is the primitive root of p, x is a random parameter, DH(p,g,x), p and x are of same size, such as 512, 1024 or 2048 bits. 
         [0044]    2. HMAC(key), generating a Hash-based Message Authentication Code, is a hash function performed on a secret key to generate a message authentication code. 
         [0045]    3. Exclusive OR function: 
         [0046]    EXOR(x,y)=x y ∘   
         [0047]      4 . Right-Hand-Side Exclusive OR function: 
         [0048]    RHS_EXOR(x,y)=RHS(x) y where RHS(x) is the right-hand-side of x and length of RHS(x) is equal to length of y ∘   
         [0049]    5. Adder function: 
         [0050]    ADR(x,y)=x+y where “+” is a binary adder which discards the carry of the most significant bits of x+y ∘   
         [0051]    6. Certification function(Identity Authentication function): 
         [0052]    Cerfun(x,y,z)=(x y)+z ∘   
         [0053]    7. Decryption: 
         [0000]    
       
         
               
               
             
           
               
                   
                   
               
             
             
               
                   
                 &lt;a&gt;y=x EXOR(x,y) 
               
               
                   
                 &lt;b&gt;y=RHS(x) RHS_EXOR(x,y) 
               
               
                   
                 &lt;c&gt;IADR(x,ADR(x,y))=y 
               
               
                   
                   y=ADR(x,y)−x, if ADR(x,y) x 
               
               
                   
                   y=ADR(x,y)+  x  +1, if ADR(x,y)&lt;x 
               
               
                   
                 &lt;d&gt;ICerfun(x,y,z)=x 
               
               
                   
                   x=(Cerfun(x,y,z)−z) y, if Cerfun(x,y,z) z 
               
               
                   
                   x=(Cerfun(x,y,x)+  Z  +1) y, if Cerfun(x,y,x)&lt;z 
               
               
                   
                   
               
             
          
         
       
     
         [0054]    Sub-function (2): Data Carriers 
         [0055]    When SS and BS have the common connection data, such as the Common Secret Keys owned by both SS and BS, it may be feasible to use the following method for securely carrying the random parameter RN from SS to BS, or carrying from BS to SS without the RN being stolen by hackers. 
         [0056]    (1) Encryption: ADR(CSK,RN) 
         [0057]    Decryption: RN=ADR(CSK,RN)−CSK, if ADR(CSK,RN) CSK 
         [0058]    RN=ADR(CSK,RN)+  CSK +1, if ADR(CSK,RN)&lt;CSK 
         [0059]    (2) Method: Encrypting data into a ciphertext at the sender end, wirelessly transmitting the ciphertext to the recipient end, and then decrypting the ciphertext at the recipient end so as to securely delivering the random parameter RN through wireless channel to the recipient. Here ADR( )is the data carrier. 
         [0060]    Sub-function (3): Mutual Authentication 
         [0061]    In order to establish the mutual authentication mechanism between SS and BS, firstly SS and BS should have at least two connection data, such as CSK 1  and CSK 2 , so that both of the following methods can complete the mutual authentication. 
         [0062]    Method 1: Transmitting encrypted authentication data, such as EXOR(CSK 1 , CSK 2 ) or ADR(CSK 1 , CSK 2 ) 
         [0063]    Because only SS and BS know CSK 1  and CSK 2 , only SS and BS can complete the authentication. The hacker cannot complete the authentication process. However, the disadvantage of this method is that, CSK 1  and CSK 2  can be relatively easier to be cracked by hackers compared to the cracking of EXOR( ) and ADR( ) 
         [0064]    Method 2: Using Identity certification function Cerfun(CSK 1 , CSK 2 , CSK 3 ) 
         [0065]    The advantage of this method is using three random parameters CSK 1 , CSK 2  and CSK 3  to generate an identity certification code Cerfun(CSK 1 , CSK 2 , CSK 3 ), so this method has excellent security. Its disadvantage is that, the sender and the recipient have to commit the three random parameters CSK 1 , CSK 2 , CSK 3  as the connection data between the sender and the recipient before the authentication of wireless communication can be proceeded. 
         [0066]    Sub-function (4): OP_code Table 
         [0067]    OP_code is a 4-bit control code, and the content of this code is shown in  FIG. 6 , which is an OP_code function lookup table of an embodiment of the present invention. 
         [0068]    As describe above, the present invention fully complies with the three requirements for Patent right: innovation, progressivity and industrial availability. As for innovation and progressivity, the present invention integrates Diffie-Hellman PKDS, data carrier and mutual authentication mechanism, and establish a securely dynamic keys exchange system between SS and BS, such that, in a wireless communication environment, any wireless communication between SS and BS can achieve the mutual authentication, and all the keys and parameters used in wireless transmission are exposed only once, so as to enhance the security of wireless communication. As for the industrial availability, the product derived from the present invention should sufficiently satisfy the current market requirement. 
         [0069]    The present invention has been disclosed in the above context with preferred embodiments. However, it should be appreciated by the skilled in the art that these embodiments are only used to describe the present invention, and should not be interpreted as limiting the scope of the present invention. It should be noted that the equivalent variation and replacement to the embodiments should all be encompassed within the scope of the present invention. Thus, the protection scope of the present invention should only be defined by the appended claims.