WO2022116092A1 - 一种WiFi安全认证方法及通信装置 - Google Patents

一种WiFi安全认证方法及通信装置 Download PDF

Info

Publication number
WO2022116092A1
WO2022116092A1 PCT/CN2020/133644 CN2020133644W WO2022116092A1 WO 2022116092 A1 WO2022116092 A1 WO 2022116092A1 CN 2020133644 W CN2020133644 W CN 2020133644W WO 2022116092 A1 WO2022116092 A1 WO 2022116092A1
Authority
WO
WIPO (PCT)
Prior art keywords
user equipment
parameter
key
random number
random
Prior art date
Application number
PCT/CN2020/133644
Other languages
English (en)
French (fr)
Inventor
田军
杨艳江
田联炳
刘凯
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN202080107500.9A priority Critical patent/CN116530117A/zh
Priority to PCT/CN2020/133644 priority patent/WO2022116092A1/zh
Priority to EP20963939.2A priority patent/EP4250791A4/en
Publication of WO2022116092A1 publication Critical patent/WO2022116092A1/zh
Priority to US18/327,906 priority patent/US20230308875A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • H04W12/069Authentication using certificates or pre-shared keys
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/04Key management, e.g. using generic bootstrapping architecture [GBA]
    • H04W12/041Key generation or derivation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/04Key management, e.g. using generic bootstrapping architecture [GBA]
    • H04W12/043Key management, e.g. using generic bootstrapping architecture [GBA] using a trusted network node as an anchor
    • H04W12/0431Key distribution or pre-distribution; Key agreement
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/08Access security
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/083Network architectures or network communication protocols for network security for authentication of entities using passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0869Network architectures or network communication protocols for network security for authentication of entities for achieving mutual authentication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1441Countermeasures against malicious traffic
    • H04L63/1458Denial of Service
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/12Detection or prevention of fraud
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/02Hierarchically pre-organised networks, e.g. paging networks, cellular networks, WLAN [Wireless Local Area Network] or WLL [Wireless Local Loop]
    • H04W84/10Small scale networks; Flat hierarchical networks
    • H04W84/12WLAN [Wireless Local Area Networks]

Definitions

  • the present application relates to the field of communication technologies, and in particular, to a WiFi security authentication method and a communication device.
  • the Wireless Fidelity (WiFi) security protocol enables mutual authentication between the user equipment (Supplicant) and the access point (Access Point, AP), and generates a session key to protect the subsequent communication between the user equipment and the AP.
  • the AP also transmits the session multicast key, that is, the key used to encrypt broadcast communication with all connected user equipments, to the user equipment.
  • the present application provides a WiFi security authentication method and a communication device, which are used to solve the problem that the existing authentication method for user equipment to access an AP has a relatively high risk of password leakage, resulting in low network security.
  • the present application provides a WiFi security authentication method, which is applied to an access point AP.
  • the method includes: receiving a first access request from a user equipment, where the first access request carries a first parameter, so The first parameter is a parameter generated by the user equipment according to the generator of the set cyclic group and the first random number; the second random number is generated, and according to the second random number and the generator of the set cyclic group Generate a second parameter, and send the second parameter to the user equipment, so that the user equipment generates a first pairing master key according to the second parameter, wherein the second random number is not greater than all The positive integer of the order of the set cyclic group; according to the second random number, the first parameter, the second parameter and the first target random key, a second paired master key is generated, wherein the The first target random key is the random key newly allocated to the user equipment; according to the first pairing master key and the second pairing master key, perform a four-way handshake authentication process with the user equipment .
  • the AP performs a four-way handshake authentication process with the user equipment using the pairing master key generated by the random key newly allocated to the user equipment, which can support different user equipments using different keys for authentication, and can support
  • the AP assigns keys to the user equipment multiple times, so that the user equipment can use the random key newly allocated by the AP for authentication each time the user equipment accesses, thereby reducing the security risks caused by key leakage and improving security through key update.
  • the AP generates the pairing master key according to the parameter information sent by the user equipment, its own parameter information, and the latest random key allocated to the user equipment by the AP, which can improve the complexity and efficiency of the pairing master key. The difficulty of cracking is improved, thereby improving the security of authentication.
  • the parameters used in generating the paired master key are obtained by calculating the generator and random number of the cyclic group. Based on the algorithm characteristics of the cyclic group, after calculating the generator and random number to obtain the calculation result, then The process of inferring the random number from the calculation result is very complicated, so this parameter generation method can ensure the security of the relevant random number, and the relevant random number is a necessary parameter when generating the paired master key, so this parameter generation method can ensure the security of the relevant random number. The method can further reduce the risk of leakage of the pairing master key.
  • the method further includes: during the four-way handshake authentication process with the user equipment, if it is determined that the second pairing master key is different from the first pairing master key, Then, according to the second random number, the first parameter, the second parameter and the second target random key, a third paired master key is generated, wherein the second target random key is The random key allocated to the user equipment before the first target random key; and according to the third pairing master key, a four-way handshake authentication process is performed with the user equipment.
  • the method retains the opportunity for the user equipment to use the latest key and the previous old key, thereby maintaining the synchronization of the random keys of the AP and the user equipment, and avoiding the problem of authentication failure caused by inconsistent update keys.
  • the method further includes: after a successful four-way handshake authentication process with the user equipment, assigning a new random key to the user equipment, and saving the new random key .
  • the first access request further includes the identifier of the user equipment; after receiving the first access request from the user equipment, a second parameter is generated according to the second random number
  • the method further includes: generating a verification label Token according to the identifier of the user equipment, and sending the Token to the user equipment; receiving a second access request from the user equipment, and determining the first access request from the user equipment.
  • the second access request carries the Token.
  • the AP verifies the user equipment through the Token label, and then executes the key authentication process after the verification is passed, which can avoid resource consumption of the AP by malicious request messages and effectively prevent DoS attacks.
  • generating the second paired master key according to the second random number, the first parameter, the second parameter and the first target random key includes: according to the The second random number and the first parameter generate a third parameter; according to the first parameter, the second parameter, the third parameter, the identifier of the user equipment, the identifier of the AP, and the third parameter
  • a target random key, the second paired master key is obtained by calculating the set key derivation function.
  • the AP generates a pairing master key for access authentication according to various information such as random numbers, parameters and its own identification generated by itself, as well as parameters generated by the user equipment and the identification of the user equipment.
  • the complexity and cracking difficulty of the pairing master key are improved, and key leakage is reduced, thereby improving the security of the access authentication process.
  • the method before receiving the first access request from the user equipment, the method further includes: performing a password-based identity authentication and key exchange PAKE process with the user equipment according to the set password, The set password is used to access the AP; after the PAKE process is successfully performed with the user equipment, an initial random key is allocated to the user equipment; or, an access authorization from the user equipment is received
  • the access authorization request is used to request access to the AP; authorize the user equipment, and allocate an initial random key to the user equipment after the authorization is passed; and save the initial random key.
  • the AP when the user equipment accesses the AP for the first time, the AP can use the PAKE process based on the set password to assign an initial random key to the user equipment, or the AP can provide the user equipment according to the user's access authorization request.
  • the device assigns the initial random key, which can adapt to the scenario that the user equipment cannot use the random key assigned by the AP when the user equipment accesses the AP for the first time.
  • the receiving the first access request from the user equipment includes: receiving the first access request from the user equipment forwarded by the primary user equipment; wherein the primary user equipment It is the user equipment that first accesses the AP, or the set user equipment.
  • the AP when the AP receives the message of the user equipment, it is implemented in the way of forwarding by the primary user equipment.
  • the security risk caused by the direct interaction between the AP and multiple user equipment can be reduced, and it is convenient for the access to the Multiple user equipments of the AP are managed.
  • the present application provides a WiFi security authentication method, which is applied to user equipment.
  • the method includes: generating a first random number, and generating a first random number according to the first random number and the generator of the set cyclic group.
  • the second parameter is a parameter generated by the AP according to the generator of the set cyclic group and a second random number; according to the first random number, the first random number parameters, the second parameter and the third target random key to generate the first paired master key, wherein the third target random key is the stored random key newly allocated by the AP;
  • the first pairing master key and the second pairing master key are used to perform a four-way handshake authentication process with the AP.
  • the user equipment generates a pairing master key using the random key newly distributed by the AP, and then uses the pairing master key to perform a four-way handshake authentication process with the AP, so that different user equipments can use different encryption keys distributed by the AP.
  • the key is used for authentication, and a different random key can be used for authentication in each access. Therefore, the security risk caused by key leakage can be reduced and the security can be improved by updating the key.
  • the user equipment generates the pairing master key according to the parameter information sent by the AP, its own parameter information and the latest random key allocated by the AP to itself, which can improve the complexity of the pairing master key and the cracking It is difficult to improve the authentication security.
  • the parameters used in generating the paired master key are obtained by calculating the generator and random number of the cyclic group. Based on the algorithm characteristics of the cyclic group, after calculating the generator and random number to obtain the calculation result, then The process of inferring the random number from the calculation result is very complicated, so this parameter generation method can ensure the security of the relevant random number, and the relevant random number is a necessary parameter when generating the paired master key, so this parameter generation method can ensure the security of the relevant random number. The method can further reduce the risk of leakage of the pairing master key.
  • the method further includes: after a successful four-way handshake authentication process with the AP, receiving a new random key distributed by the user equipment, and saving the new random key .
  • the user equipment After the user equipment successfully performs the four-way handshake authentication process with the AP, it receives a new random key distributed by the AP, and can use the new random key for authentication when accessing the AP next time, so that The leak of the key in the current authentication process will not affect the next authentication process, so the security threat caused by the leak of the key can be reduced, thereby improving the security of the authentication process.
  • the first access request further includes the identifier of the user equipment; after sending the first access request to the AP and before receiving the second parameter from the AP, the The method further includes: receiving a Token from the AP; and sending a second access request to the AP, where the second access request carries the Token.
  • the user equipment when the user equipment requests to access the AP, it uses the Token label for verification, so that the AP performs the key authentication process after passing the verification of the Token label, which can avoid the consumption of resources of the AP by malicious request messages , effectively preventing Dos attacks.
  • generating the first paired master key according to the first random number, the first parameter, the second parameter and the third target random key includes: according to the The first random number and the second parameter generate a third parameter; according to the first parameter, the second parameter, the third parameter, the identifier of the user equipment, the identifier of the AP, and the third parameter Three-target random key, the first paired master key is obtained by calculating the set key derivation function.
  • the user equipment generates a pairing master key for access authentication according to various information such as random numbers, parameters and self-identification generated by itself, as well as parameters generated by the AP and the identity of the AP, which can improve the The complexity and cracking difficulty of the paired master key can reduce key leakage, thereby improving the security of the access authentication process.
  • the method before generating the first random number, further includes: performing a PAKE process with the AP according to the set password; receiving an initial random key distributed by the AP, and setting the The password is used to access the AP; or, an access authorization request is sent to the AP, where the access authorization request is used to request access to the AP; and an initial random key allocated by the AP is received.
  • the user equipment when it accesses the AP for the first time, it requests to allocate an initial random key to the AP based on the PAKE process of setting the password, or requests to allocate the initial random key to the AP through the access authorization request, which can adapt to the user A scenario where a device cannot use the random key assigned by the AP when it first accesses the AP.
  • the sending the first access request to the AP includes: forwarding the first access request to the AP through the primary user equipment; wherein the primary user equipment is the first to receive the first access request.
  • the user equipment when the user equipment sends a message to the AP, it is implemented in the way of forwarding by the main user equipment.
  • the security risk caused by the direct interaction between multiple user equipments and the AP can be reduced, and it is convenient for accessing the Multiple user equipments of the AP are managed.
  • the present application provides a communication device, including a transceiver module and a processing module: the transceiver module is configured to receive a first access request from a user equipment, where the first access request carries a first parameter, and the The first parameter is a parameter generated by the user equipment according to the generator of the set cyclic group and the first random number; the processing module cooperates with the transceiver module to generate a second random number, and according to the first random number Two random numbers and the generator of the set cyclic group generate a second parameter, and send the second parameter to the user equipment, so that the user equipment generates a first pairing master key according to the second parameter , wherein the second random number is a positive integer not greater than the order of the set cyclic group; according to the second random number, the first parameter, the second parameter and the first target random password generate a second pairing master key; perform a four-way handshake authentication process with the user equipment according to the first pairing master key and the second pairing master key.
  • the processing module cooperates with the transceiver module, and is further configured to: in the process of performing a four-way handshake authentication process with the user equipment, if it is determined that the second pairing master key is the same as the If the first pairing master key is different, a third pairing master key is generated according to the second random number, the first parameter, the second parameter and the second target random key, wherein the The second target random key is a random key allocated to the user equipment before the first target random key; according to the third pairing master key, a four-way handshake authentication process is performed with the user equipment .
  • the processing module cooperates with the transceiver module, and is further configured to: after the four-way handshake authentication process with the user equipment succeeds, assign a new random key to the user equipment, and save the new random key.
  • the first access request further includes the identifier of the user equipment; after the transceiver module receives the first access request from the user equipment, the processing module communicates with the user equipment.
  • the transceiver module cooperates, and before the second parameter is generated according to the second random number, the transceiver module cooperates with the processing module, and is further configured to: generate a verification label Token according to the identifier of the user equipment, and report to the user
  • the device sends the Token; receives a second access request from the user equipment, and determines that the second access request carries the Token.
  • the processing module cooperates with the transceiver module, and is specifically configured to: generate a third parameter according to the second random number and the first parameter;
  • the second parameter, the third parameter, the identifier of the user equipment, the identifier of the AP, and the first target random key, and the second pairing master key is obtained by calculating the set key derivation function .
  • the processing module before the transceiver module receives the first access request from the user equipment, the processing module cooperates with the transceiver module, and is further configured to: according to the set password, communicate with the user equipment Perform the PAKE process; after the PAKE process with the user equipment is successful, assign an initial random key to the user equipment; or, receive an access authorization request from the user equipment, and the access authorization request uses requesting access to the AP; authorizing the user equipment, and assigning an initial random key to the user equipment after the authorization is passed; saving the initial random key.
  • the transceiver module is specifically configured to: receive the first access request from the user equipment forwarded by the primary user equipment; wherein the primary user equipment is the first to access the The user equipment of the AP, or the set user equipment.
  • the present application provides a communication device, comprising a transceiver module and a processing module: the processing module is configured to generate a first random number, and generate a first random number according to the first random number and the generator of the set cyclic group The first parameter, wherein the first random number is a positive integer not greater than the order of the set cyclic group; the transceiver module is configured to send a first access request to the accessed AP, the first The access request carries the first parameter, so that the AP generates a second pairing master key according to the first parameter; receives the second parameter from the AP, the second parameter is the The generator of the set cyclic group and the parameters generated by the second random number; the processing module is also used for generating according to the first random number, the first parameter, the second parameter and the third target random key , generate the first pairing master key, wherein the third target random key is the stored random key newly distributed by the AP; the processing module cooperates with the transceiver module to The first pairing master key
  • the transceiver module is further configured to: after the four-way handshake authentication process with the AP succeeds, receive a new random key assigned by the user equipment, and save the new random key key.
  • the first access request further includes the identifier of the user equipment; after the transceiver module sends the first access request to the AP, the transceiver module receives data from the AP after the transceiver module sends the first access request to the AP.
  • the transceiver module is further configured to: receive the Token from the AP; send a second access request to the AP, where the second access request carries the Token.
  • the processing module is specifically configured to: generate a third parameter according to the first random number and the second parameter;
  • the three parameters, the identifier of the user equipment, the identifier of the AP, and the third target random key, are calculated through the set key derivation function to obtain the first pairing master key.
  • the processing module before the processing module generates the first random number, the processing module cooperates with the transceiver module, and is further configured to: perform a PAKE process with the AP according to the set password; The initial random key allocated by the AP; or, sending an access authorization request to the AP, where the access authorization request is used to request access to the AP; and receiving the initial random key allocated by the AP.
  • the transceiver module is specifically configured to: forward the first access request to the AP through the primary user equipment; wherein the primary user equipment is the first access request to the AP.
  • the primary user equipment is the first access request to the AP.
  • User equipment or set user equipment.
  • the present application provides a communication apparatus, including a transceiver and a processor: the transceiver is configured to receive a first access request from a user equipment, where the first access request carries a first parameter, so The first parameter is a parameter generated by the user equipment according to the generator of the set cyclic group and the first random number; the processor is coupled to the transceiver and cooperates with the transceiver to generate the first parameter.
  • the user equipment Generate a first paired master key with two parameters, wherein the second random number is a positive integer not greater than the order of the set cyclic group; according to the second random number, the first parameter, the The second parameter and the first target random key are used to generate a second paired master key; according to the first paired master key and the second paired master key, four-way handshake authentication is performed with the user equipment process.
  • the processor cooperates with the transceiver, and is further configured to: in the process of performing a four-way handshake authentication process with the user equipment, if it is determined that the second pairing master key is the same as the If the first pairing master key is different, a third pairing master key is generated according to the second random number, the first parameter, the second parameter and the second target random key, wherein the The second target random key is a random key allocated to the user equipment before the first target random key; according to the third pairing master key, a four-way handshake authentication process is performed with the user equipment .
  • the processor cooperates with the transceiver, and is further configured to: after the four-way handshake authentication process with the user equipment succeeds, assign a new random key to the user equipment, and save the new random key.
  • the first access request further includes the identifier of the user equipment; after the transceiver receives the first access request from the user equipment, the processor communicates with the user equipment.
  • the transceiver cooperates, before the second parameter is generated according to the second random number, the transceiver cooperates with the processor, and is further configured to: generate a verification label Token according to the identifier of the user equipment, and report to the user
  • the device sends the Token; receives a second access request from the user equipment, and determines that the second access request carries the Token.
  • the processor cooperates with the transceiver, and is specifically configured to: generate a third parameter according to the second random number and the first parameter;
  • the second parameter, the third parameter, the identifier of the user equipment, the identifier of the AP, and the first target random key, and the second pairing master key is obtained by calculating the set key derivation function .
  • the processor before the transceiver receives the first access request from the user equipment, the processor cooperates with the transceiver, and is further configured to: according to a set password, communicate with the user equipment Perform the PAKE process; after the PAKE process with the user equipment is successful, assign an initial random key to the user equipment; or, receive an access authorization request from the user equipment, and the access authorization request uses requesting access to the AP; authorizing the user equipment, and assigning an initial random key to the user equipment after the authorization is passed; saving the initial random key.
  • the transceiver is specifically configured to: receive the first access request from the user equipment forwarded by the primary user equipment; wherein the primary user equipment is the first to access the The user equipment of the AP, or the set user equipment.
  • the communication apparatus further includes a memory, coupled to the processor, for storing a program, the program being provided to the processor for execution.
  • the present application provides a communication device, including a transceiver and a processor: the processor is configured to generate a first random number, and generate a first random number according to the first random number and the generator of the set cyclic group. a parameter, wherein the first random number is a positive integer not greater than the order of the set cyclic group; the transceiver, coupled to the processor, is configured to send the first access to the AP.
  • the first access request carries the first parameter, so that the AP generates a second pairing master key according to the first parameter; receives the second parameter from the AP, the second The parameter is a parameter generated by the AP according to the generator of the set cyclic group and the second random number; the processor is further configured to generate according to the first random number, the first parameter, and the second parameter and a third target random key to generate the first paired master key, wherein the third target random key is the stored random key newly allocated by the AP; the processor and the transceiver The cooperation is further configured to perform a four-way handshake authentication process with the AP according to the first pairing master key and the second pairing master key.
  • the transceiver is further configured to: after the four-way handshake authentication process with the AP succeeds, receive a new random key assigned by the user equipment, and save the new random key key.
  • the first access request further includes the identifier of the user equipment; after the transceiver sends the first access request to the AP, after the transceiver receives the first access request from the AP Before the second parameter of , the transceiver is further configured to: receive the Token from the AP; send a second access request to the AP, where the second access request carries the Token.
  • the processor is specifically configured to: generate a third parameter according to the first random number and the second parameter;
  • the three parameters, the identifier of the user equipment, the identifier of the AP, and the third target random key, are calculated through the set key derivation function to obtain the first pairing master key.
  • the processor before the processor generates the first random number, the processor cooperates with the transceiver, and is further configured to: perform a PAKE process with the AP according to the set password; The initial random key allocated by the AP; or, sending an access authorization request to the AP, where the access authorization request is used to request access to the AP; and receiving the initial random key allocated by the AP.
  • the transceiver is specifically configured to: forward the first access request to the AP through the primary user equipment; wherein the primary user equipment is the first access request to the AP.
  • User equipment or set user equipment.
  • the communication apparatus further includes a memory, coupled to the processor, for storing a program, the program being provided to the processor for execution.
  • an embodiment of the present application provides a communication system, including the communication device described in the third aspect or any possible design of the third aspect and the fourth aspect or any possible design of the fourth aspect.
  • the communication device or, includes the communication device described in the fifth aspect or any possible design of the fifth aspect and the communication device described in the sixth aspect or any possible design of the sixth aspect.
  • an embodiment of the present application provides a computer storage medium, where a computer program is stored in the computer storage medium, and when the computer program is executed on a communication device, the communication device is made to execute the above-mentioned first aspect or the first aspect.
  • the method described in any possible design, or the communication device is caused to perform the method described in the second aspect or any possible design of the second aspect.
  • an embodiment of the present application provides a computer program product that, when the computer program product runs on a communication device, enables the communication device to execute the method described in the first aspect or any possible design of the first aspect , or, the communication device is caused to perform the method described in the second aspect or any possible design of the second aspect.
  • an embodiment of the present application provides a chip, where the chip is configured to read a computer program stored in a memory, execute the method described in the first aspect or any possible design of the first aspect, or execute The method described in the above second aspect or any possible design of the second aspect.
  • an embodiment of the present application provides a chip system, where the chip system includes a processor, configured to support a communication device to implement the method described in the first aspect or any possible design of the first aspect, or, The method described in the second aspect above or any possible design of the second aspect is implemented.
  • the chip system further includes a memory for storing necessary programs and data of the computer device.
  • the system-on-chip consists of chips, or includes chips and other discrete devices.
  • 1 is a schematic diagram of an authentication method in a WiFi security protocol
  • FIG. 2 is a schematic diagram of an authentication method in a WPA3 protocol
  • FIG. 3 is a schematic diagram of an authentication system provided by an embodiment of the present application.
  • 4a is a schematic diagram of a WiFi security authentication method provided by an embodiment of the application.
  • FIG. 4b is an exemplary schematic diagram of a WiFi security authentication method provided by an embodiment of the present application.
  • 5a is a schematic diagram of a WiFi security authentication method provided by an embodiment of the application.
  • FIG. 5b is an exemplary schematic diagram of a WiFi security authentication method provided by an embodiment of the present application.
  • 6a is a schematic flowchart of a WiFi security authentication method provided by an embodiment of the present application.
  • FIG. 6b is an exemplary schematic diagram of a WiFi security authentication method provided by an embodiment of the present application.
  • FIG. 7a is a schematic diagram of a method for an active device to access an AP for the first time according to an embodiment of the present application
  • FIG. 7b is an exemplary schematic diagram of a method for an active device to access an AP for the first time according to an embodiment of the present application
  • 8a is a schematic diagram of a method for a non-active device to access an AP for the first time according to an embodiment of the present application
  • FIG. 8b is an exemplary schematic diagram of a method for a non-active device to access an AP for the first time according to an embodiment of the present application
  • FIG. 9 is a schematic diagram of a communication device provided by an embodiment of the present application.
  • FIG. 10 is a schematic diagram of a communication device according to an embodiment of the present application.
  • FIG. 11 is a schematic diagram of a communication system provided by an embodiment of the present application.
  • Access Point also known as wireless access point or hotspot, etc., is a device used to connect user equipment to a wireless network; AP can realize communication between wireless network and wired network, It is the core equipment for forming a wireless local area network.
  • the AP can be an access point in a wireless fidelity WiFi system, or it can be a module or unit that completes some functions of the access point.
  • it can be a centralized unit (Central Unit, CU) or a distributed unit (Distributed Unit).
  • Unit, DU can also be a router, a bridge, a wireless gateway, and the like. This application does not limit the specific technology and specific device form adopted by the AP.
  • the AP is a device that supports a WiFi security protocol
  • the WiFi security protocol includes Wired Equivalent Privacy (WEP), Wired Equivalent Privacy 2.0 (WEP2), Wireless Fidelity Secure Access Protocol (WiFi Protected Access, WPA), Wi-Fi Secure Access Protocol 2.0 (WPA2), Wi-Fi Secure Access Protocol 3.0 (WPA3) and other WiFi security protocols.
  • WEP Wired Equivalent Privacy
  • WEP2 Wired Equivalent Privacy 2.0
  • WPA Wireless Fidelity Secure Access Protocol
  • WPA2 Wi-Fi Secure Access Protocol 2.0
  • WPA3 Wi-Fi Secure Access Protocol 3.0
  • UE User Equipment
  • UE User Equipment
  • MS Mobile Station
  • MT Mobile Terminal
  • IoT IoT devices
  • the user equipment includes a handheld device with a wireless connection function, a vehicle-mounted device, and the like.
  • user equipment can be: mobile phone (Mobile Phone), tablet computer, notebook computer, PDA, Mobile Internet Device (MID), wearable device (such as smart watch, smart bracelet, pedometer, etc.) , vehicles, in-vehicle equipment (for example, cars, bicycles, electric vehicles, airplanes, ships, trains, high-speed rail, etc.), virtual reality (Virtual Reality, VR) equipment, augmented reality (Augmented Reality, AR) equipment, Industrial Control (Industrial Control) ), wireless terminals in smart home equipment (for example, refrigerators, TVs, air conditioners, electricity meters, etc.), intelligent robots, workshop equipment, wireless terminals in self-driving (Self Driving), wireless terminals in remote surgery (Remote Medical Surgery) Terminals, wireless terminals in Smart Grid, wireless terminals in Transportation Safety, wireless terminals in Smart City, or wireless terminals in Smart Home, flight equipment ( For example, intelligent robots, hot air balloons, drones, airplanes), etc.
  • in-vehicle equipment for example, cars, bicycles, electric
  • Cyclic group In cryptography or mathematics, a group represents an algebraic structure with binary operations that satisfy closure, associativity, identity elements, and inverse elements, and can also be called an operation set. If each element (element) of a group is a power of a fixed element of the group, then the group is called a cyclic group, and the fixed element is a generator of the cyclic group. Cyclic groups can be divided into two types: no-order cyclic groups and ordered cyclic groups.
  • At least one item (a) of a, b, or c may represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, and c may be single or multiple .
  • the terms "first” and “second” are only used for descriptive purposes, and should not be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as “first” or “second” may expressly or implicitly include one or more of that feature.
  • an embodiment of the present application provides a WiFi security authentication method.
  • a user equipment adopts a one-device-one-key authentication method when accessing an AP, that is, different user equipments respectively use different keys as shared keys. Password for authentication and access to the AP after the authentication is passed. In this way, the leakage of the password (or key) of one user equipment will not affect the authentication process between other user equipments and the AP, which improves the security of the network to a certain extent.
  • the WiFi security authentication method provided by the embodiment of the present application, on the basis that the user equipment uses the authentication method of one device and one key to access the AP, the authentication method of one key at a time is further adopted. Specifically, in the case where different user equipments use different keys for authentication, each time the AP successfully authenticates the user equipment, a new authentication key is generated for the user equipment, and the user equipment accesses the user equipment next time. The AP uses the new authentication key for authentication.
  • FIG. 1 is a schematic diagram of an authentication method in a traditional WiFi security protocol.
  • the WiFi security protocols of WPA2 and previous versions of WPA2 when the user equipment accesses the AP, the user equipment and the AP first agree on the security suite used in the authentication process through association. Then the user equipment and the AP use the shared password pw to calculate the Pairwise Master Key (PMK) respectively, and then use the calculated PMK to perform a four-way handshake process for identity authentication.
  • PMK Pairwise Master Key
  • the PMK includes a paired temporary key (Pairwise Transient Key, PTK), and the PTK is used to encrypt unicast information, and the PTK includes three parts, which are respectively a key confirmation key (Key Confirmation Key, KCK), key encryption Key (Key Encryption Key, KEK) and temporary key (Transient Key, TK).
  • KCK and KEK are used to protect the privacy and integrity of the transmitted message in the four-way handshake process
  • TK is the real session key, which is used to protect the subsequent communication between the user equipment and the AP.
  • the AP also transmits the Group Transient Key (GTK) to the user equipment through the third message in the four-way handshake process.
  • GTK Group Transient Key
  • PMK is calculated according to the shared password of user equipment and AP and the media access control (Media Access Control, MAC) address of both sides.
  • the length of the shared password is small and the entropy value is very low. If an attacker can intercept the messages in the four-way handshake process, the shared password can be obtained by brute force cracking, threatening network security. Therefore, the security of the authentication process specified by the above protocol is very low.
  • FIG. 2 is a schematic diagram of an authentication method in the WPA3 protocol.
  • the latest WiFi security protocol namely the WPA3 protocol
  • SAE Simultaneous Authentication of Equals
  • the SAE is implemented on an elliptic curve, and the implementation method can use a hash-to-curve algorithm.
  • SAE is a password-based authentication and key exchange (Password Authenticated Key Exchange, PAKE) method, which can enable both parties to achieve mutual authentication by using a shared low-entropy password and generate a high-entropy PMK, which can avoid The brute force password cracking, therefore, improves the security of the authentication process to a certain extent.
  • PAKE Password Authenticated Key Exchange
  • the SAE state machine at the receiving end has a counter, which counts the SAE request (Commit) messages sent by the sending end. When the number of messages reaches a certain threshold, the state machine will trigger a The rejection message is sent to the sender of the SAE request message, and the rejection message carries an anti-clogging label (anti-Clogging Token). When the sender sends the SAE request message again, it must carry the anti-clogging label. The tag is associated with the sender's MAC address. The receiving end verifies the anti-blocking label, and starts the key exchange only after the verification is passed, so as to reject the SAE request message with the fake MAC address from the attacker. However, under this mechanism, attackers can consume AP resources by sending SAE request messages using forged MAC addresses, resulting in the failure of APs to provide authentication services normally.
  • the WP3 protocol is allowed to downgrade to the WPA2 protocol in the transition mode. Therefore, attackers can use this feature to attack, downgrade the WPA3 protocol to the WPA2 version, and then obtain the password through brute force cracking.
  • the Diffie-Hellman (DH) key exchange protocol is further used to Generate a PMK with high entropy value, thereby reducing the risk of password (or key) leakage and ensuring the forward security of the authentication process.
  • FIG. 3 is a schematic diagram of an authentication system provided by an embodiment of the present application.
  • the authentication system includes an access point (AP) 301 and at least one user equipment (eg, user equipment 302 , user equipment 303 and user equipment 304 shown in FIG. 3 ).
  • AP access point
  • user equipment eg, user equipment 302 , user equipment 303 and user equipment 304 shown in FIG. 3
  • each user equipment and the AP respectively execute the WiFi security authentication method provided by this application, perform mutual authentication, and generate a key to protect the communication security between the two, thereby ensuring that the user equipment can safely use network resources through the AP.
  • both the AP and the user equipment may have multiple transmit antennas and multiple receive antennas, and the AP may use, for example, a wireless local area network (Wireless Local Area Network, WLAN) technology, WiFi communication technology, etc. to communicate with at least one user. devices to communicate.
  • WLAN Wireless Local Area Network
  • WiFi communication technology etc.
  • APs there may also be multiple APs in the authentication system, and one AP may provide authentication and network services for multiple user equipments.
  • This embodiment of the present application does not limit the number of APs and the number of user equipments included in the authentication system.
  • the AP in FIG. 3 and each user equipment in the at least one user equipment may implement the technical solutions provided by the embodiments of the present application.
  • WiFi security protocols are usually divided into personal WiFi security protocols and enterprise WiFi security protocols.
  • Personal WiFi security protocols are mainly used in environments with relatively low security requirements, such as home environments; enterprise WiFi security protocols are mainly used in environments with relatively high security requirements.
  • the authentication system shown in FIG. 3 can be applied to the personal WiFi security protocol or the enterprise WiFi security protocol.
  • the WiFi security authentication method provided by the embodiment of the present application is used to improve the security of the authentication process based on the personal version WiFi security protocol between the user equipment and the AP.
  • the WiFi security authentication method provided by the present application will be described below with reference to specific embodiments.
  • the WiFi security authentication method may be applicable to the authentication system shown in FIG. 3 .
  • FIG. 4a is a schematic diagram of a WiFi security authentication method provided by an embodiment of the present application. As shown in Figure 4a, the WiFi security authentication method includes:
  • the first random number is a positive integer not greater than the order of the set cyclic group.
  • the user equipment when the user equipment accesses the AP, it can use the random key newly allocated by the AP to generate a PMK and perform a four-way handshake authentication process.
  • the random key allocated by the AP to the user equipment is randomly generated, and the AP can store at least one random key allocated for each user. Among the at least one random key stored by the AP, the user equipment corresponding to each random key is determined.
  • the random key is a high-entropy key with a length higher than a set value or a complexity higher than a set standard.
  • the random key can be used as a random password in the authentication process. Therefore, the random key in this embodiment of the present application can also be called a random password.
  • the user equipment can access the AP in a specific way when the user equipment accesses the AP for the first time. After the user equipment accesses the AP for the first time, the AP needs to allocate a random key to the user equipment. In this way, when the user equipment accesses the AP again after obtaining the random key allocated by the AP, the Access the AP by performing authentication with the random key assigned by the AP.
  • a PAKE process is performed with the AP based on the set password corresponding to the AP to establish a secure channel. Then, the AP allocates an initial random key to the user equipment, and the user equipment receives and saves the initial random key allocated by the AP. When the user equipment accesses the AP next time, the stored initial random key is used to perform a four-way handshake authentication process with the AP.
  • the user equipment and the AP may continue to perform the association and four-way handshake process specified by the WiFi security protocol to complete the process.
  • the PAKE process may be a process specified in a key-based identity authentication and key exchange protocol in a WiFi security protocol, such as an SAE process.
  • a set password corresponding to the AP is determined and sent to the AP, where the set password is used to access the AP.
  • the AP verifies the set password, and establishes a connection with the user equipment after the verification is passed.
  • the AP allocates an initial random key to the user equipment, and the user equipment receives the initial random key allocated by the AP and saves it. , and the initial random key is used to perform a four-way handshake authentication process when accessing the AP next time.
  • the set password may be a factory password of the AP, or a password set by a user.
  • the set password may be a factory password of the router, and is transmitted to the user using the router together with the router.
  • the factory password can be written in a secret envelope and sent to the user, or the factory password can be set in the Quick Response (QR) two-dimensional code attached to the router, or the user can obtain the factory password through a short message. password.
  • QR Quick Response
  • the user equipment when the user equipment accesses the AP for the first time, it sends an access authorization request to the AP, where the access authorization request is used to request to access the AP. If the AP allows the user equipment to access, the AP authorizes the user equipment, and allocates an initial random key to the user equipment after authorization. The user equipment receives and saves the initial random key distributed by the AP, and uses the random key to perform a four-way handshake authentication process when accessing the AP next time.
  • the set cyclic group used may be an elliptic curve cyclic group, an integer cyclic group, or the like.
  • the adopted set cyclic group is an elliptic curve cyclic group
  • the user equipment obtains the first parameter by performing a dot product operation on the first random number and the generator of the elliptic curve cyclic group
  • the adopted set cyclic group is an integer cyclic group
  • the user equipment obtains the first parameter by performing an exponential operation on the first random number and the generator of the integer cyclic group.
  • G is set as an elliptic curve cyclic group whose order is a prime number q
  • U ⁇ G is set as the generator of G.
  • the first random number x is private information of the user equipment and will not be announced to the public.
  • the user equipment generates a first parameter X according to the x, and transmits the X to the AP,
  • the AP can use the information related to the x for authentication in the subsequent authentication process, and it is not easy to cause the leakage of the x.
  • the process of obtaining the x from the X is very complicated. Therefore, even if the X leaks, it is not easy to obtain the x from the X.
  • S402 The user equipment sends a first access request to the AP, where the first access request carries the first parameter.
  • the user equipment after determining the first parameter X, the user equipment sends a first access request to the AP, where the first access request carries the first parameter and may also carry the user equipment's information. logo.
  • S403 The AP generates a second random number, and generates a second parameter according to the second random number and the generator of the set cyclic group.
  • the second random number is a positive integer not greater than the order of the set cyclic group.
  • the AP when the AP generates the second parameter, the same set cyclic group and the same calculation method as the user equipment are used to calculate the difference between the second random number and the set cyclic group.
  • the generator performs correlation calculation to obtain the second parameter.
  • the first parameter y is the private information of the AP and will not be announced to the public.
  • the AP generates a second parameter Y according to the y and transmits the Y to the user equipment, so that the The user equipment uses the information related to the y for authentication in the subsequent authentication process, and the leakage of the y is not easily caused.
  • the process of deriving the y from the Y is very complicated. Therefore, even if the Y leaks, it is not easy to obtain the y from the Y.
  • the AP after determining the second parameter Y, the AP sends the Y to the user equipment.
  • S405 The user equipment performs an association process with the AP.
  • the user equipment generates a first pairing master key according to the first random number, the first parameter, the second parameter and the third target random key, wherein the third target random key
  • the key is the stored random key newly distributed by the AP.
  • the first paired master key is obtained by calculating the key derivation function set as follows:
  • PMK 1 KDF(Z ⁇ k dev1 ,id dev ⁇ id AP ⁇ X ⁇ Y)
  • PMK 1 is the first pairing master key
  • KDF( ) is the set standard key derivation function
  • Z is the third parameter
  • k dev1 is the latest random key stored in the user equipment, That is, the third target random key
  • id dev is the identifier of the user equipment
  • id AP is the identifier of the AP
  • X is the first parameter
  • Y is the second parameter
  • the parameter Y used is generated according to the unpublished information y of the AP, and it is difficult to derive the y according to the Y. Therefore, By sending the Y to the user equipment, the AP can not only enable the user equipment to use the information related to the y for authentication, but also avoid the leakage of the y. Therefore, the security is relatively better. high.
  • the AP generates a second pairing master key according to the second random number, the first parameter, the second parameter and the first target random key, wherein the first target random key
  • the key is a random key newly assigned to the user equipment.
  • PMK 2 KDF(Z ⁇ k dev2 ,id dev ⁇ id AP ⁇ X ⁇ Y)
  • PMK 2 is the second pairing master key
  • KDF( ) is the set standard key derivation function
  • Z is the third parameter
  • k dev2 is the latest value allocated by the AP to the user equipment Random key, that is, the first target random key
  • id dev is the identifier of the user equipment
  • id AP is the identifier of the AP
  • X is the first parameter
  • Y is the second parameter
  • " symbol represents the character concatenation operation.
  • the AP when the AP generates the pairing master key, the parameter X used is generated according to the unpublished information x of the user equipment, and it is difficult to derive the x according to the X. Therefore, By sending the X to the AP, the user equipment not only enables the AP to use the information related to the x for authentication, but also avoids the leakage of the x, so the security is relatively higher.
  • S408 The user equipment and the AP respectively perform a four-way handshake authentication process with the opposite end according to the pairing master key generated by themselves.
  • the user equipment and the AP cooperate with the opposite end to perform a four-way handshake process according to the pairing master key generated by themselves.
  • a four-way handshake process according to the pairing master key generated by themselves.
  • Step S409 After the AP successfully performs the four-way handshake authentication process with the user equipment, it allocates a new random key to the user equipment, and saves the new random key.
  • the AP uses the random key to authenticate the user equipment.
  • the key allocated by the AP to the user equipment may be a relatively complex key with high entropy value, such as It can be a key whose length exceeds the set value.
  • Step S410 The AP sends the new random key to the user equipment.
  • Step S411 the user equipment saves the new random key.
  • the user equipment After receiving the new random key, the user equipment stores the new random key, and uses the new random key for authentication when accessing the AP next time.
  • high-entropy information (for example, the third parameter Z) is generated according to the DH key exchange protocol to generate a high-entropy PMK, which improves the key information. security.
  • the AP allocates a new random key to the user equipment for the next access. Therefore, the user equipment can use a different random key each time.
  • the key is accessed to the AP, the leakage of the key this time will not affect the next access, which greatly reduces the security impact caused by the leakage of the key.
  • the leakage of the key occurs, the user equipment will not be able to function normally next time Using the network, it is easy to detect key compromises that occur and respond in a timely manner.
  • step numbers of the flowcharts described in the embodiments of the present application are only an example of the execution flow, and do not constitute a restriction on the sequence of execution of the steps, and there is no sequence between the embodiments of the present application. There is no strict order of execution between the steps of a dependency. For example, when the above steps S406 and S407 are performed, either one of the steps may be performed first, or both steps may be performed simultaneously.
  • FIG. 4b is an exemplary schematic diagram of a WiFi security authentication method provided by an embodiment of the present application.
  • G is set as an elliptic curve cyclic group whose order is set as a prime number q
  • the parameter U ⁇ G is set as the generator of G.
  • the master key PMK KDF(Z ⁇ k dev ,id dev ⁇ id AP ⁇ X ⁇ Y), wherein, the id AP is the identification of the AP, the “
  • the two parties calculate and obtain the pairing master key PMK respectively, use the calculated PMK to execute the four-way handshake authentication process specified by the four-way handshake protocol.
  • the four-way handshake authentication process specified by the four-way handshake protocol.
  • Both parties perform the four-way handshake authentication process, and after the authentication is successfully completed, the user equipment accesses the AP, and the AP assigns a new random key to the user equipment the user equipment receives the new random key After the key update is performed, the Save as new k dev . Therefore, when accessing the AP next time, the new random key is used to perform the above procedure with the AP for access authentication.
  • the AP and the user equipment first generate the parameter Z with high confidentiality according to the DH key exchange protocol, and then generate the PMK with high entropy value according to the parameter Z and the random key, which improves the security of the key information,
  • the user equipment can use a different random key to generate a PMK each time to access the AP. The leakage of the key this time will not affect the next access, which greatly reduces the security impact caused by the leakage of the key.
  • the difficulty in realizing the one-time key lies in the key synchronization between the AP and the user equipment, that is, although the AP has generated a new random key for the user equipment, and the AP itself also stores the new random key.
  • the user equipment may not update the key, for example, the new random key sent by the AP to the user equipment is intercepted, and the user equipment fails to be sent to the user equipment successfully.
  • the AP allocates a new random key to the user equipment
  • the user equipment if the user equipment receives the new random key, it updates the stored random key. key, and returns the feedback information of the updated random key to the AP, and the AP updates the saved random key to the new random key after receiving the feedback information; otherwise, the AP does not
  • the stored random key is updated to keep the random keys of the AP and the user equipment consistent, and the new random key can be sent to the user equipment again. If the feedback information from the user equipment is not received after sending the new random key for many times, it may be considered that an abnormality has occurred, and an error reporting process is performed.
  • step S408 during the four-way handshake authentication process between the AP and the user equipment, if the AP determines that the second pairing master key generated by itself is the same as the If the first pairing master keys generated by the user equipment are different, it is determined that the authentication fails, and a second target random key is selected from the stored at least one random key, and the second target random key is the one in the first random key.
  • a random key allocated before the target random key that is, the old random key allocated to the user equipment; the AP according to the second random number, the first parameter, the second parameter and the first random key
  • Two target random keys, the third paired master key is obtained by calculating the key derivation function set as follows:
  • PMK 3 KDF(Z ⁇ k dev3 ,id dev ⁇ id AP ⁇ X ⁇ Y)
  • PMK 3 is the third pairing master key
  • KDF() is the set standard key derivation function
  • Z is the third parameter
  • k dev3 is the latest random key stored by the AP before
  • the random key assigned to the user equipment that is, the second target random key
  • id dev is the identifier of the user equipment
  • id AP is the identifier of the AP
  • X is the first parameter
  • Y is the The second parameter
  • " symbol represents the character concatenation operation.
  • the AP performs a four-way handshake authentication process with the user equipment again according to the calculated third pairing master key.
  • the AP when the AP fails to authenticate the user equipment using the latest random key allocated to the user equipment, it may be that the user equipment fails to update the random key successfully, and the AP uses the newly allocated random key.
  • the previously distributed random key is authenticated again, and the opportunity to use the latest random key and the last old random key can be reserved for each user equipment, thereby ensuring the random key used by the AP and the user equipment. synchronicity.
  • FIG. 5a is a schematic diagram of a WiFi security authentication method provided by an embodiment of the present application. As shown in Figure 5a, the method includes:
  • the user equipment and the AP respectively perform a four-way handshake authentication process with the opposite end according to the pairing master key generated by themselves, including the following steps S508a-S508e:
  • S508a The AP sends the first message (Msg1) of the four-way handshake protocol to the user equipment, where the Msg1 carries a third random number (Anonce) generated by the AP.
  • the AP After the AP generates the second pairing master key, it performs corresponding calculations according to the four-way handshake process specified in the protocol, and sends the Msg1 to the user equipment, where the Msg1 carries the first pair generated by the AP. Three random numbers.
  • S508b The user equipment sends the second message (Msg2) of the four-way handshake protocol to the AP, where the Msg2 carries a fourth random number (Snonce) generated by the user equipment.
  • the user equipment After receiving the Msg 1, the user equipment performs corresponding calculations according to the four-way handshake process specified in the protocol, and sends the Msg 2 to the user equipment. Specifically, the user equipment generates a fourth random number, and calculates and obtains a first temporary pairing key according to information such as the first pairing master key, the third random number, and the fourth random number.
  • the user equipment sends the fourth random number and related indication information to the AP, where the related indication information is used to indicate the related information of the first pairing temporary key generated by the user equipment.
  • S508c The AP verifies the first pairing master key, and if the verification fails, re-verifies the first target key according to the second target random key previously allocated to the user equipment by the first target key A pair of master keys for verification.
  • the AP After the AP receives the Msg 2, according to the fourth random number, the third random number carried by the Msg 2 and the second pairing master key calculated by itself, communicate with the user.
  • the device performs similar calculations to obtain the corresponding second pairing temporary key.
  • the AP determines whether the first pairing master key generated by the user equipment is correct according to whether the relevant information of the second pairing temporary key is the same as the relevant information of the first pairing temporary key generated by the user equipment , if they are the same, it is determined that the verification is passed, and step S508d is executed; otherwise, the AP uses a second random key assigned to the user equipment before the first target key, and according to the key set above Deduction function, calculate the third paired master key again, and perform a similar calculation with the user equipment according to the fourth random number, the third random number and the third paired master key to obtain the corresponding the third pairing temporary key, and then verify the first pairing temporary key according to the third pairing temporary key. If the verification is passed, step S508d is executed, and it is determined that the user equipment fails to update the random key successfully after the last connection of the user equipment. Otherwise, the AP determines that an abnormality has occurred, and can perform error reporting processing and the like.
  • S508d The AP sends the third message (Msg3) of the four-way handshake protocol to the user equipment, where the Msg3 carries the multicast temporary key.
  • S508e The user equipment sends the fourth message (Msg4) of the four-way handshake protocol to the AP.
  • the user equipment After confirming that the PMK authentication is correct, the user equipment sends confirmation information to the AP to confirm that the authentication is successful.
  • the user equipment stores the new random key.
  • the attacker can always use this random key to perform the above WiFi security authentication method with the AP (deliberately do not use the updated key), while the The AP will always think that the attacker is a legitimate user device, but the key update has been unsuccessful. In this case, the key theft cannot be ended until the next time the legitimate user equipment uses the network.
  • the AP when a certain user equipment accesses, the AP records the number of times that the user equipment continuously uses the old key for access authentication, and when the number of times is greater than a preset value, the access authentication is performed. Exception handling, such as terminating the authority of the user device, etc.
  • the AP saves the newly distributed random key and the newly distributed random key previously distributed, and can use any of the random keys to perform corresponding authentication on the user equipment.
  • the user equipment uses the newly allocated random key to authenticate with the AP.
  • the random key may be the latest distribution of the AP, or the random key previously distributed by the AP before the latest distribution. Therefore, The above solution preserves the opportunity for the user equipment to use the latest key and the last old key, and can maintain the synchronization between the random key of the user equipment and the random key of the AP.
  • FIG. 5b is an exemplary schematic diagram of a WiFi security authentication method provided by an embodiment of the present application.
  • the WiFi security authentication method shown in FIG. 5a For an implementation manner of the WiFi security authentication method shown in FIG. 5a, reference may be made to the method shown in FIG. 5b. Specifically, when the user equipment accesses the AP, the user equipment and the AP first execute the DH key exchange protocol and generate a PMK, and then the two parties perform an improved four-way handshake authentication process using the respectively calculated PMK.
  • the specific implementation process for the user equipment and the AP to execute the DH key exchange protocol and generate the PMK may refer to the corresponding process shown in FIG. 4b, which will not be repeated here.
  • the user equipment and the AP When the user equipment and the AP perform the improved four-way handshake authentication process, first the AP performs corresponding calculations according to the method specified in the four-way handshake protocol, and sends the four-way handshake protocol carrying the random number Anonce to the user equipment. After receiving the Msg1, the user equipment also performs corresponding calculation according to the method specified in the four-way handshake protocol, and sends to the user equipment a message Msg2 of the four-way handshake protocol carrying the random number Snonce.
  • the AP determines that the Msg2 is correct, it continues to perform the subsequent four-way handshake authentication process with the user equipment according to the method specified in the four-way handshake protocol, and after the process is completed and the authentication is successful, the AP Allocate a new random key to the user equipment, and update the key after the user equipment receives the new random key, so that the new random key is used when accessing the AP next time Perform the above process with the AP to perform access authentication.
  • the AP reserves the opportunity for the user equipment to use the latest key and the last old key, so it can maintain the synchronization between the random key of the user equipment and the random key of the AP, and prevent the user equipment from failing to update the password successfully. Authentication failure caused by the key.
  • the authentication process is performed. There may be the risk of being attacked by Dos. Therefore, on the basis of the above embodiments, in the WiFi security authentication method provided by the embodiments of the present application, an anti-Dos mechanism is further added to solve the Dos attack that may be caused by the process of executing the PAKE protocol, thereby further improving the authentication process security.
  • the AP after the AP receives the first access request from the user equipment and before generating the second parameter according to the second random number, the AP generates a verification label Token according to the identifier of the user equipment, The Token is sent to the user equipment, and after receiving the Token from the AP, the user equipment sends a second access request carrying the Token to the AP. The AP receives the second access request, and determines that the second access request carries the Token. After the AP verifies the Token and passes the verification, other procedures are performed, and if the verification fails, the AP does not respond to the second access request.
  • FIG. 6a is a schematic flowchart of a WiFi security authentication method provided by an embodiment of the present application. As shown in Figure 6a, the method includes:
  • S601 When the user equipment determines to access the AP, generate a first random number, and generate a first parameter according to the first random number and the generator of the set cyclic group.
  • the first random number is a positive integer not greater than the order of the set cyclic group.
  • S602 The user equipment sends a first access request to the AP, where the first access request carries the first parameter.
  • the execution manner of the steps S601 and S602 is the same as the execution manner of the steps S401 and S402 in the above-mentioned first embodiment, and will not be repeated here.
  • S603 The AP generates a verification label Token according to the identifier of the user equipment.
  • the AP When the AP receives the first access request of the user equipment, it does not immediately process the request, but uses the set password or set key and the identifier of the user equipment to generate an anti-Dos verification label Token, and send it. to the user equipment.
  • S604 The AP sends the Token to the user equipment.
  • S605 The user equipment sends a second access request to the AP, where the second access request carries the Token.
  • the user equipment If the user equipment receives the Token, it sends an access request, that is, the second access request, to the AP again, where the second access request carries the Token and may also carry the the first parameter and the identifier of the user equipment.
  • S606 The AP verifies the Token, and after the verification is passed, generates a second random number, and generates a second parameter according to the second random number and the generator of the set cyclic group.
  • the first random number is a positive integer not greater than the order of the set cyclic group.
  • the AP determines that the Token carried in the second access request is consistent with the Token sent to the user equipment by itself, it determines that the verification is passed; otherwise, it determines that the verification fails, and does not respond to the second access ask.
  • S607 The AP sends the second parameter to the user equipment.
  • S608-S614 The user equipment and the AP execute an association process, an authentication process, and a new random key distribution process in sequence.
  • the AP uses the Token to verify the access request of the user equipment, and only responds to the access request when the verification passes, and calculates the relevant parameters, which can avoid frequent access when being attacked. It can resist the Dos attack and improve the security of the authentication process.
  • FIG. 6b is an exemplary schematic diagram of a WiFi security authentication method provided by an embodiment of the present application.
  • the WiFi security authentication method shown in FIG. 6a when the user equipment accesses the AP, the user equipment and the AP first execute the DH key exchange protocol and generate a PMK, and then the two parties use the PMK calculated by each other to perform an improved four-way handshake authentication process.
  • the AP generates a Token according to the additional key k as a label against Dos attacks.
  • the user equipment After receiving the Token, the user equipment needs to send the connection request to the AP again and carry the Token.
  • the AP further processes the connection request after passing the verification of the received Token, and continues the process of executing the DH key exchange protocol with the user equipment.
  • the authentication process when the user equipment accesses the AP can resist DoS attacks and improve security.
  • the WiFi security authentication methods provided by the above embodiments may be collectively referred to as a device authentication process or a device authentication protocol.
  • the WiFi security authentication method provided by the above embodiments of the present application is mainly applied in an environment where a personal version of the WiFi security protocol is adopted, such as a home environment.
  • the user equipments that access the AP are generally relatively fixed, and the number of user equipments is not very large.
  • one of the multiple user equipments that access the AP is used.
  • the user equipment is set as the primary user equipment, and other user equipments are set as non-primary user equipments (also called common equipment).
  • the primary user equipment is responsible for authorizing the non-primary user equipment and assisting the non-primary user equipment to access the AP.
  • the primary user equipment uses the set password for authentication when first accessing the AP, and uses the WiFi security authentication methods provided in the foregoing embodiments for authentication when subsequently accessing the AP; the non-primary user equipment first accesses the AP for authentication
  • the access authorization request is used for authentication when the AP is used, and the WiFi security authentication methods provided in the above embodiments are used for authentication when the access is later.
  • the information exchange between the non-primary user equipment and the AP needs to pass all The primary user equipment forwarding is implemented.
  • the primary user equipment may be the first user equipment that successfully accesses the AP.
  • an AP is newly deployed in a home environment. After the AP is started, the first user equipment connected to the AP is the primary user equipment, and other user equipments connected to the AP subsequently are all non-primary user equipments. called ordinary equipment.
  • the primary user equipment when the primary user equipment accesses the AP for the first time, it uses the set password corresponding to the AP (for example, the factory password of the AP) for authentication, and then accesses the AP, and obtains the assigned password from the AP. Initial random password to use when accessing the AP next time.
  • the set password corresponding to the AP for example, the factory password of the AP
  • FIG. 7a is a schematic diagram of a method for a primary user equipment to access an AP for the first time according to an embodiment of the present application. As shown in Figure 7a, the method includes:
  • S701 The primary user equipment determines a set password corresponding to the AP to be accessed.
  • S702 The primary user equipment and the AP execute the process of the PAKE protocol, establish a secure channel, and send the set password to the AP.
  • the primary user equipment when the primary user equipment sends the set password to the AP, it simultaneously sends the identity of the primary user equipment to the AP.
  • the step S702 is an optional step.
  • the AP After the AP successfully verifies the set password, it confirms that the authentication is passed, and allows the primary user equipment to access the network.
  • the random key allocated by the AP to the primary user equipment is a high-entropy key.
  • the AP After successfully verifying the received set password, the AP establishes device account information corresponding to the primary user equipment for saving the random key corresponding to the primary user equipment.
  • the device account information includes the identification id mst of the primary user equipment and a random key kmst allocated to the primary user equipment, that is, the first random key allocated to the primary user equipment.
  • DEV-ACCT device-account
  • DEV-ACCT DEV-ACCTV ⁇ id mst , k mst , k' mst ⁇
  • the record item indicates that the stored k mst and k' mst are the random keys of the primary user equipment, wherein the id mst is the identifier of the primary user equipment, and the k mst is the latest allocation of the AP to the
  • the random key of the primary user equipment which may also be referred to as a new key
  • the k' mst is the random key that the AP assigned to the primary user equipment before the k mst , which may also be referred to as the old key .
  • the value of the k' mst is null.
  • the identifier of the user equipment is bound and stored with the random key assigned to the user equipment by the AP, and the AP can query the user equipment from the stored at least one set of account data according to the identifier. the random key.
  • the identifier of the user equipment is the identity authentication information that can uniquely determine the user equipment, and may be, for example, the MAC address of the user equipment.
  • the AP sets the set password to be invalid, and other user equipment reuses the set password When the password is used for access authentication, the AP will not pass the authentication.
  • S704 The AP sends the initial random key to the primary user equipment.
  • the primary user equipment After receiving the initial random key distributed by the AP, the primary user equipment saves the initial random key. When the primary user equipment accesses the AP next time, it no longer uses the set password for authentication according to the above process, but uses the initial random key for authentication.
  • the user is allowed to switch the primary user equipment from the user equipment that first connects to the AP to other user equipment according to actual needs.
  • the AP determines to replace the primary user equipment according to the user's instruction, it can reset the system, activate the set password, and delete the stored account information of the primary user equipment; and use the set password to authenticate the user equipment. It is determined to be the new primary user equipment, and the account information of the new primary user equipment is regenerated.
  • FIG. 7b is an exemplary schematic diagram of a method for a primary user equipment to access an AP for the first time according to an embodiment of the present application.
  • the AP securely saves a factory password w when it leaves the factory.
  • the user equipment accesses the AP, according to the acquired w and the AP executes the procedure specified in the PAKE protocol to establish a secure channel; or the user equipment directly transmits the w to the AP for verification.
  • the methods for the primary user equipment to access the AP may also be referred to as a primary device determination process or a primary device determination protocol.
  • the non-primary user equipment needs to access the AP to use the network, it needs to send an access authorization request to the primary user equipment, and the primary user equipment sends the access authorization request to the AP, and the AP passes the access authorization request. After the request, an initial random key is allocated to the non-primary user equipment, and forwarded to the non-primary user equipment through the primary user equipment. The non-master user equipment saves the assigned initial random key for use when accessing the AP next time.
  • FIG. 8a is a schematic diagram of a method for a non-active device to access an AP for the first time according to an embodiment of the present application. As shown in Figure 8a, the method includes:
  • S801 The primary user equipment establishes a connection with the AP.
  • S802 The non-primary user equipment sends an access authorization request to the primary user equipment.
  • the non-primary user equipment When the non-primary user equipment determines to access the AP, it sends the access authorization request to the primary user equipment, where the access authorization request carries the identifier of the non-primary user equipment.
  • S803 The primary user equipment forwards the received access authorization request to the AP.
  • the primary user equipment After receiving the access authorization request, the primary user equipment forwards the access authorization request to the AP if the authorization is determined. Wherein, the primary user equipment may determine whether to authorize according to the user's instruction.
  • the AP If the AP allows the non-primary user equipment to access, the AP generates and saves an initial random key corresponding to the non-primary user equipment.
  • the random key allocated by the AP to the non-primary user equipment is a high-entropy key.
  • the AP After allocating a random key to the non-primary user equipment, the AP establishes device account information corresponding to the non-primary user equipment.
  • the device account information includes the identification id T of the non-primary user equipment and a random key k T allocated to the non-primary user equipment, that is, the first random key allocated to the primary user equipment.
  • DEV-ACCT DEV-ACCTV ⁇ id T , k T , k' T ⁇
  • the record item indicates that the stored k T and k' T are the random keys of the non-primary user equipment, wherein the id T is the identifier of the non-primary user equipment, and the k T is the latest allocation of the AP to all the non-primary user equipment.
  • the random key of the non-primary user equipment may also be referred to as a new key
  • the k' T is the random key allocated by the AP to the non-primary user equipment before the k T , which may also be referred to as a new key. old key.
  • the value of k' T is null.
  • the AP sends the initial random key to the primary user equipment, and instructs the primary user equipment to forward the initial random key to the non-primary user equipment.
  • S806 The primary user equipment sends the received initial random key to the non-primary user equipment.
  • the non-primary user equipment After receiving the initial random key distributed by the AP, the non-primary user equipment saves the initial random key. When the non-primary user equipment accesses the AP next time, the initial random key is used for authentication.
  • the information interaction between the non-primary user equipment and the AP is completed through the forwarding of the primary user equipment, which can avoid The direct interaction between the AP and some user equipments, thereby reducing the number of times of using the low-entropy password (that is, the set password) and reducing the risk of password leakage.
  • FIG. 8b is an exemplary schematic diagram of a method for a non-primary user equipment to access an AP for the first time according to an embodiment of the present application.
  • the primary user equipment connects to the AP through the device authentication protocol shown in FIG. 7b and establishes a secure communication channel
  • the subsequent user equipments connected to the AP are all non-primary user equipment, and the non-primary user equipment accesses all
  • the AP first requests authorization from the primary user equipment; if the primary user equipment determines the authorization, it sends an authorization request to the AP.
  • the authorization request carries the identifier of the non-primary user equipment, such as the MAC address of the non-primary user equipment.
  • the AP generates a random password k T for the non-primary user equipment, and may also generate an identifier id T of the non-primary user equipment (for example, in the case where the identifier used is not the MAC address of the device), and assigns the The k T and id T are sent to the primary user equipment, and are forwarded by the primary user equipment to the non-primary user equipment.
  • the methods for accessing the AP by the non-primary user equipment provided in the above examples may also be referred to as a device authorization process or a device authorization protocol.
  • the methods provided in the embodiments of the present application are introduced from the perspective of the AP and the user equipment as execution subjects.
  • the AP and the user equipment may include hardware structures and/or software modules, and implement the above functions in the form of hardware structures, software modules, or hardware structures plus software modules. Whether one of the above functions is performed in the form of a hardware structure, a software module, or a hardware structure plus a software module depends on the specific application and design constraints of the technical solution.
  • the present application further provides a communication apparatus for implementing the functions of the AP or the user equipment provided by the embodiments of the present application.
  • FIG. 9 shows an apparatus 900 provided by the present application.
  • the apparatus 900 may be an AP, or a chip or a chip system in the AP; or, the apparatus 900 may be a user equipment or a chip in the user equipment or system-on-chip.
  • the communication apparatus may also be a terminal device, a network device, an electronic device, or a structure such as a chip or an integrated circuit that can execute the WiFi security authentication method provided by the present application.
  • the apparatus 900 includes a transceiver 901 and at least one processor 902 .
  • the processor 902 is coupled with the transceiver 901, and the coupling in this embodiment of the present application is an indirect coupling or communication connection between devices, units, or modules, which may be electrical, mechanical, or other forms, for Information exchange between devices, units or modules.
  • the transceiver 901 can be a circuit, a bus, a communication interface, or any other module that can be used for information interaction, and can be used to receive or send information.
  • the communication apparatus may further include a memory 903 coupled with the transceiver 901 and the processor 902 for storing program instructions.
  • the processor 902 is configured to call the program instructions stored in the memory 903, so that the apparatus 900 executes the steps performed by the AP or the user equipment in the WiFi security authentication method provided in the embodiment of the present application, thereby realizing the authentication of the user equipment accessing the AP .
  • the transceiver 901 is used for receiving and transmitting radio frequency signals, and is coupled to the receiver and the transmitter of the communication device 900 .
  • the transceiver 901 communicates with a communication network and other communication devices through radio frequency signals, such as an Ethernet (Ethernet), a radio access network (Radio Access Technology, RAN), a wireless local area network (Wireless Local Area Networks, WLAN) and the like.
  • the communication protocol supported by the transceiver 901 includes at least a WiFi protocol, and may also include: 2G/3G, Long Term Evolution (Long Term Evolution, LTE), 5G New Radio (New Radio, NR) and the like.
  • the memory 903 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices, or other non-volatile solid-state storage devices.
  • the memory 902 may store an operating system (hereinafter referred to as a system), such as an embedded operating system such as ANDROID, IOS, WINDOWS, or LINUX.
  • the memory 903 may be used to store the implementation programs of the embodiments of the present application.
  • the memory 903 can also store a network communication program, which can be used to communicate with one or more additional devices, one or more user devices, and one or more network devices.
  • the processor 902 may be a general-purpose central processing unit (Central Processing Unit, CPU), a microprocessor, an application-specific integrated circuit (Application-Specific Integrated Circuit, ASIC), or one or more programs for controlling the solution of the present application. implemented integrated circuits.
  • CPU Central Processing Unit
  • ASIC Application-Specific Integrated Circuit
  • the communication apparatus 900 may further include an output device 904 and an input device 905 .
  • the output device 904 is in communication with the processor 902 and can display information in a variety of ways.
  • the output device 904 may be a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display device, a Cathode Ray Tube (CRT) display device, or a projector (projector) Wait.
  • Input device 905 is in communication with processor 902 and can receive user input in a variety of ways.
  • the input device 905 may be a mouse, a keyboard, a touch screen device, a sensor device, or the like.
  • the memory 903 can also store a user interface program, which can display the content of the application program vividly through a graphical operation interface out, and receive user control operations on the application through input controls such as menus, dialog boxes, and buttons.
  • a user interface program which can display the content of the application program vividly through a graphical operation interface out, and receive user control operations on the application through input controls such as menus, dialog boxes, and buttons.
  • one or more software modules may be stored in the memory of the communication apparatus 900, which may be used to provide access authentication request, authentication key calculation, access authentication For functions such as response, reference may be made to the foregoing method embodiments.
  • the communication apparatus 900 shown in FIG. 9 is implemented as the user equipment shown in FIG. 3
  • one or more software modules may be stored in the memory of the communication apparatus 900, which may be used to generate random keys for the user equipment, and calculate the authentication key.
  • user equipment access authentication and other functions, for details refer to the above method embodiments.
  • the transceiver 901 is configured to receive a first access request from a user equipment, where the first access request carries a first parameter, the first The parameter is a parameter generated by the user equipment according to the generator of the set cyclic group and the first random number; the processor 902 is coupled to the transceiver 901 and cooperates with the transceiver 901 to generate the first random number.
  • the user equipment Generate a first paired master key with two parameters, wherein the second random number is a positive integer not greater than the order of the set cyclic group; according to the second random number, the first parameter, the The second parameter and the first target random key are used to generate a second paired master key; according to the first paired master key and the second paired master key, four-way handshake authentication is performed with the user equipment process.
  • the processor 902 cooperates with the transceiver 901 and is further configured to: in the process of performing a four-way handshake authentication process with the user equipment, if the second pairing master key is determined Different from the first paired master key, a third paired master key is generated according to the second random number, the first parameter, the second parameter and the second target random key, wherein , the second target random key is a random key allocated to the user equipment before the first target random key; according to the third pairing master key, a four-way handshake is performed with the user equipment Certification process.
  • the processor 902 cooperates with the transceiver 901, and is further configured to: after the four-way handshake authentication process with the user equipment succeeds, assign a new random password to the user equipment key and save the new random key.
  • the first access request further includes the identifier of the user equipment; after the transceiver 901 receives the first access request from the user equipment, the processor 902 communicates with the user equipment.
  • the transceiver 901 cooperates, and before generating the second parameter according to the second random number, the transceiver 901 cooperates with the processor 902, and is further configured to: generate a verification label Token according to the identifier of the user equipment, and send the Token to the user equipment;
  • a second access request from the user equipment is received, and it is determined that the second access request carries the Token.
  • the processor 902 cooperates with the transceiver 901, and is specifically configured to: generate a third parameter according to the second random number and the first parameter; according to the first parameter, The second parameter, the third parameter, the identifier of the user equipment, the identifier of the AP, and the first target random key are calculated through the set key derivation function to obtain the second pairing master. key.
  • the processor 902 before the transceiver 901 receives the first access request from the user equipment, the processor 902 cooperates with the transceiver 901, and is further configured to: according to the set password, communicate with the The user equipment performs the PAKE process; after the PAKE process is successfully performed with the user equipment, an initial random key is allocated to the user equipment; or, receiving an access authorization request from the user equipment, the access authorization The authorization request is used for requesting access to the AP; authorizing the user equipment, and assigning an initial random key to the user equipment after the authorization is passed; and saving the initial random key.
  • the transceiver 901 is specifically configured to: receive the first access request from the user equipment forwarded by the primary user equipment; wherein the primary user equipment is the first access request The user equipment of the AP, or the set user equipment.
  • the processor 902 when the communication apparatus 900 is implemented as user equipment, the processor 902 is configured to generate a first random number, and generate a first random number according to the first random number and the generator of the set cyclic group a parameter; the transceiver 901, coupled to the processor 902, is configured to send a first access request to the AP that is accessed, where the first access request carries the first parameter, so that the AP Generate a second pairing master key according to the first parameter; receive a second parameter from the AP, where the second parameter is generated by the AP according to the generator of the set cyclic group and the second random number parameter; the processor 902 is further configured to generate the first paired master key according to the first random number, the first parameter, the second parameter and the third target random key, wherein the The third target random key is the stored random key newly allocated by the AP; the processor 902 cooperates with the transceiver 901, and is further configured to Pair the master key, and perform a four-way handshake authentication process with the AP.
  • the transceiver 901 is further configured to: after the four-way handshake authentication process with the AP succeeds, receive a new random key distributed by the user equipment, and save the new random key random key.
  • the first access request further includes the identifier of the user equipment; after the transceiver 901 sends the first access request to the AP, after the transceiver 901 receives the Before setting the second parameter of the AP, the transceiver 901 is further configured to: receive a Token from the AP; and send a second access request to the AP, where the second access request carries the Token.
  • the processor is specifically configured to: generate a third parameter according to the first random number and the second parameter;
  • the three parameters, the identifier of the user equipment, the identifier of the AP, and the third target random key, are calculated through the set key derivation function to obtain the first pairing master key.
  • the processor 902 before the processor 902 generates the first random number, the processor 902 cooperates with the transceiver 901 and is further configured to: perform a PAKE process with the AP according to the set password ; Receive the initial random key distributed by the AP; or, send an access authorization request to the AP, where the access authorization request is used to request access to the AP; and receive the initial random key distributed by the AP.
  • the transceiver 901 is specifically configured to: forward the first access request to the AP through the primary user equipment; wherein the primary user equipment is the first to access the AP user equipment, or set user equipment.
  • the communication apparatus further includes a memory, coupled to the processor, for storing a program, the program being provided to the processor for execution.
  • FIG. 9 is only an implementation manner of the embodiment of the present application.
  • the communication apparatus 900 may further include more or less components, which is not limited here.
  • the present application further provides a communication apparatus for implementing the functions of the AP or the user equipment provided by the embodiments of the present application.
  • FIG. 10 shows an apparatus 1000 provided by the present application.
  • the apparatus 1000 may be an AP, or a chip or a chip system in the AP; or, the apparatus 1000 may be a user equipment or a chip in the user equipment or system-on-chip.
  • the communication device 1000 includes a transceiver module 1001 and a processing module 1002 .
  • the transceiver module 1001 is used for receiving data sent by an external device and for sending data to the external device.
  • the transceiver module 1001 cooperates with the processing module 1002 to perform the steps performed by the AP in the WiFi security authentication method provided in the embodiment of the present application, so as to realize access authentication.
  • the transceiver module 1001 cooperates with the processing module 1002 to perform the steps performed by the user equipment in the WiFi security authentication method provided in the embodiments of the present application to implement access authentication.
  • the division of modules in the embodiments of the present application is schematic, and is only a logical function division. In actual implementation, there may be other division methods.
  • the functional modules in the various embodiments of the present application may be integrated into one processing unit. In the device, for example, it can be integrated in the processor 902 of the communication device 900 as shown in FIG. 9 , or it can exist physically alone, or two or more modules can be integrated into one module.
  • the above-mentioned integrated modules can be implemented in the form of hardware, and can also be implemented in the form of software function modules.
  • an embodiment of the present application further provides a communication system 1100 , including a communication apparatus 1101 and a communication apparatus 1102 .
  • the communication device 1101 is configured to execute the steps performed by the AP in the WiFi security authentication method provided by the embodiment of the present application
  • the communication device 1102 is configured to execute the steps performed by the user equipment in the WiFi security authentication method provided by the embodiment of the present application. steps performed.
  • the communication system 1100 may further include a communication device 1103, and the communication device 1101 is configured to perform the steps performed by the AP in the WiFi security authentication method provided in the embodiments of the present application.
  • 1102 is configured to perform the steps performed by the primary user equipment in the WiFi security authentication method provided by the embodiment of the present application
  • the communication device 1103 is configured to perform the steps performed by the non-primary user equipment in the WiFi security authentication method provided by the embodiment of the present application A step of.
  • the embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored in the computer storage medium, and when the computer program is executed on a communication device, the communication device can execute the WiFi security authentication method.
  • the embodiments of the present application further provide a computer program product that, when the computer program product runs on a communication device, enables the communication device to execute the WiFi security authentication method provided by the above embodiments.
  • the embodiments of the present application further provide a chip, which is used to read a computer program stored in a memory and execute the WiFi security authentication method provided by the above embodiments.
  • embodiments of the present application further provide a chip system, where the chip system includes a processor for supporting a communication device to implement the WiFi security authentication method provided by the above embodiments.
  • the chip system further includes a memory for storing necessary programs and data of the computer device.
  • the system-on-chip consists of chips, or includes chips and other discrete devices.
  • the embodiments of the present application may be provided as a method, a system, or a computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
  • computer-usable storage media including, but not limited to, disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory result in an article of manufacture comprising instruction means, the instructions
  • the apparatus implements the functions specified in the flow or flows of the flowcharts and/or the block or blocks of the block diagrams.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本申请公开了一种WiFi安全认证方法及通信装置,该方法中,接入点AP接收来自用户设备的第一接入请求,第一接入请求携带第一参数,第一参数为用户设备根据设定循环群的生成元和第一随机数生成的参数;AP生成第二随机数,根据第二随机数和设定循环群的生成元生成第二参数,向用户设备发送第二参数,以使所述用户设备根据所述第二参数生成第一配对主密钥;AP根据第二随机数、第一参数、第二参数和第一目标随机密钥,生成第二配对主密钥,其中,所述第一目标随机密钥为最新分配给所述用户设备的随机密钥;并根据第一配对主密钥和第二配对主密钥,与用户设备进行四路握手认证流程。所述方法能降低密钥泄露造成的安全隐患,提高网络安全性。

Description

一种WiFi安全认证方法及通信装置 技术领域
本申请涉及通信技术领域,尤其涉及一种WiFi安全认证方法及通信装置。
背景技术
无线保真(Wireless Fidelity,WiFi)安全协议使用户设备(Supplicant)和接入点(Access Point,AP)之间能够进行相互认证,并生成会话(session)密钥来保护后续用户设备和AP之间的通信,同时,AP也会把会话的群播密钥,即用于加密与所有在连用户设备的广播通信的密钥传递给用户设备。
根据目前的WiFi安全协议,连接同一个AP的所有用户设备共享口令,口令泄露的风险较大,且一个用户设备遭遇攻击导致口令泄露后会影响所有用户设备与AP间的网络安全。因此,现有用户设备接入AP的认证方法中,存在口令泄露风险较大,导致网络安全性低的问题。
发明内容
本申请提供一种WiFi安全认证方法及通信装置,用于解决现有用户设备接入AP的认证方法存在的口令泄露风险较大,导致网络安全性低的问题。
第一方面,本申请提供一种WiFi安全认证方法,应用于接入点AP,所述方法包括:接收来自用户设备的第一接入请求,所述第一接入请求携带第一参数,所述第一参数为所述用户设备根据设定循环群的生成元和第一随机数生成的参数;生成第二随机数,并根据所述第二随机数和所述设定循环群的生成元生成第二参数,并向所述用户设备发送所述第二参数,以使所述用户设备根据所述第二参数生成第一配对主密钥,其中,所述第二随机数为不大于所述设定循环群的阶数的正整数;根据所述第二随机数、所述第一参数、所述第二参数和第一目标随机密钥,生成第二配对主密钥,其中,所述第一目标随机密钥为最新分配给所述用户设备的随机密钥;根据所述第一配对主密钥和所述第二配对主密钥,与所述用户设备进行四路握手认证流程。
在该方法中,AP利用最新分配给用户设备的随机密钥生成的配对主密钥,与所述用户设备进行四路握手认证流程,能够支持不同用户设备采用不同密钥进行认证,并能支持AP多次为用户设备分配密钥,因此能使用户设备每次接入时采用AP最新分配的随机密钥进行认证,进而通过密钥更新来降低密钥泄露造成的安全隐患,提高安全性。同时,所述AP根据所述用户设备发送的参数信息、自身的参数信息以及自身为所述用户设备分配的最新随机密钥,来生成配对主密钥,能够提高配对主密钥的复杂度及破解难度,进而提高认证安全性。其中,生成配对主密钥时所用的参数是对循环群的生成元和随机数进行计算得到的,基于循环群的算法特性,对所述生成元和随机数进行计算得到计算结果后,再根据所述计算结果倒推得到所述随机数的过程十分复杂,因此该参数生成方法能够保证相关随机数的安全性,而所述相关随机数在生成配对主密钥时是必需的参数,因此该方法能进一步降低配对主密钥泄露的风险。
在一种可能的设计中,所述方法还包括:在与所述用户设备进行四路握手认证流程过 程中,若确定所述第二配对主密钥与所述第一配对主密钥不同,则根据所述第二随机数、所述第一参数、所述第二参数和所述第二目标随机密钥,生成第三配对主密钥,其中,所述第二目标随机密钥为在所述第一目标随机密钥前分配给所述用户设备的随机密钥;根据所述第三配对主密钥,与所述用户设备进行四路握手认证流程。
在该方法中,AP使用最新分配给用户的随机密钥对所述用户设备进行认证失败时,能够确定所述用户设备可能为成功获取到所述AP最新分配的随机密钥,则所述AP可以采用最新分配的随机密钥之前分配给所述用户设备的随机密钥,对所述用户设备进行认证。因此,该方法为用户设备保留了使用最新密钥和之前的旧密钥的机会,进而保持AP与用户设备的随机密钥的同步性,避免更新密钥不一致导致的认证失败问题。
在一种可能的设计中,所述方法还包括:在与所述用户设备进行四路握手认证流程成功之后,为所述用户设备分配新的随机密钥,并保存所述新的随机密钥。
在该方法中,AP与用户设备进行四路握手认证流程成功后,为所述用户设备分配新的随机密钥,能使用户设备在下一次接入所述AP时采用新的随机密钥进行认证,这样本次认证流程中密钥的泄露不会对下一次认证流程产生影响,因此能够降低密钥泄露造成的安全威胁,进而提高认证流程的安全性。
在一种可能的设计中,所述第一接入请求中还包含所述用户设备的标识;在接收来自用户设备的第一接入请求之后、在根据所述第二随机数生成第二参数之前,所述方法还包括:根据所述用户设备的标识,生成验证标签Token,并向所述用户设备发送所述Token;接收来自所述用户设备的第二接入请求,并确定所述第二接入请求携带所述Token。
在该方法中,AP通过Token标签对用户设备进行验证并在验证通过后再执行密钥认证流程,能够避免恶意请求消息对所述AP的资源的消耗,有效阻止Dos攻击。
在一种可能的设计中,根据所述第二随机数、所述第一参数、所述第二参数和所述第一目标随机密钥,生成第二配对主密钥,包括:根据所述第二随机数和所述第一参数生成第三参数;根据所述第一参数、所述第二参数、所述第三参数、所述用户设备的标识、所述AP的标识及所述第一目标随机密钥,通过设定的密钥推演函数计算得到所述第二配对主密钥。
在该方法中,AP根据自身生成的随机数、参数和自身标识,以及用户设备生成的参数和所述用户设备的标识等多种信息,生成用于进行接入认证的配对主密钥,能够提高所述配对主密钥的复杂度及破解难度,减少密钥泄露,因此能提高接入认证流程的安全性。
在一种可能的设计中,在接收来自用户设备的第一接入请求之前,所述方法还包括:根据设定口令,与所述用户设备进行基于口令的身份认证和密钥交换PAKE流程,所述设定口令用于接入所述AP;在与所述用户设备进行所述PAKE流程成功之后,为所述用户设备分配初始随机密钥;或者,接收来自所述用户设备的接入授权请求,所述接入授权请求用于请求接入所述AP;对所述用户设备进行授权,授权通过后为所述用户设备分配初始随机密钥;保存所述初始随机密钥。
在该方法中,用户设备初次接入AP时,AP可以采用基于设定口令的PAKE流程为所述用户设备分配初始的随机密钥,或者,AP可以根据用户的接入授权请求为所述用户设备分配初始的随机密钥,能够适应用户设备在初次接入AP时无法使用所述AP分配的随机密钥的场景。
在一种可能的设计中,所述接收来自用户设备的第一接入请求,包括:接收主用户设 备转发的来自所述用户设备的所述第一接入请求;其中,所述主用户设备为最先接入所述AP的用户设备,或者为设定的用户设备。
在该方法中,AP接收用户设备的消息时,以主用户设备转发的方式实现,在多设备场景下,能够减少AP与多个用户设备直接交互引起的安全风险,且便于对接入所述AP的多个用户设备进行管理。
第二方面,本申请提供一种WiFi安全认证方法,应用于用户设备,所述方法包括:生成第一随机数,并根据所述第一随机数和所述设定循环群的生成元生成第一参数,其中,所述第一随机数为不大于所述设定循环群的阶数的正整数;向接入的AP发送第一接入请求,所述第一接入请求携带所述第一参数,以使所述AP根据所述第一参数生成第二配对主密钥;
接收来自所述AP的第二参数,所述第二参数为所述AP根据所述设定循环群的生成元和第二随机数生成的参数;根据所述第一随机数、所述第一参数、所述第二参数和第三目标随机密钥,生成所述第一配对主密钥,其中,所述第三目标随机密钥为保存的所述AP最新分配的随机密钥;根据所述第一配对主密钥和所述第二配对主密钥,与所述AP进行四路握手认证流程。
在该方法中,用户设备利用AP最新分配的随机密钥生成配对主密钥,再利用该配对主密钥与所述AP进行四路握手认证流程,这样不同用户设备能够采用AP分配的不同密钥进行认证,并能在每次接入时采用不同的随机密钥进行认证,因此能够通过密钥更新来降低密钥泄露造成的安全隐患,提高安全性。同时,所述用户设备根据所述AP发送的参数信息、自身的参数信息以及所述AP为自身分配的最新随机密钥,来生成配对主密钥,能够提高配对主密钥的复杂度及破解难度,进而提高认证安全性。其中,生成配对主密钥时所用的参数是对循环群的生成元和随机数进行计算得到的,基于循环群的算法特性,对所述生成元和随机数进行计算得到计算结果后,再根据所述计算结果倒推得到所述随机数的过程十分复杂,因此该参数生成方法能够保证相关随机数的安全性,而所述相关随机数在生成配对主密钥时是必需的参数,因此该方法能进一步降低配对主密钥泄露的风险。
在一种可能的设计中,所述方法还包括:在与所述AP进行四路握手认证流程成功之后,接收所述用户设备分配的新的随机密钥,并保存所述新的随机密钥。
在该方法中,用户设备与AP进行四路握手认证流程成功后,接收所述AP分配的新的随机密钥,则在下一次接入所述AP时能够采用新的随机密钥进行认证,这样本次认证流程中密钥的泄露不会对下一次认证流程产生影响,因此能够降低密钥泄露造成的安全威胁,进而提高认证流程的安全性。
在一种可能的设计中,所述第一接入请求中还包含所述用户设备的标识;在向AP发送第一接入请求之后、在接收来自所述AP的第二参数之前,所述方法还包括:接收来自所述AP的Token;向所述AP发送第二接入请求,所述第二接入请求携带所述Token。
在该方法中,用户设备请求接入AP时,通过Token标签进行验证,从而使AP对所述Token标签验证通过后再执行密钥认证流程,能够避免恶意请求消息对所述AP的资源的消耗,有效阻止Dos攻击。
在一种可能的设计中,根据所述第一随机数、所述第一参数、所述第二参数和第三目标随机密钥,生成所述第一配对主密钥,包括:根据所述第一随机数和所述第二参数生成第三参数;根据所述第一参数、所述第二参数、所述第三参数、所述用户设备的标识、所 述AP的标识及所述第三目标随机密钥,通过设定的密钥推演函数计算得到所述第一配对主密钥。
在该方法中,用户设备根据自身生成的随机数、参数和自身标识,以及AP生成的参数和所述AP的标识等多种信息,生成用于进行接入认证的配对主密钥,能够提高所述配对主密钥的复杂度及破解难度,减少密钥泄露,因此能提高接入认证流程的安全性。
在一种可能的设计中,在生成第一随机数之前,所述方法还包括:根据设定口令,与所述AP进行PAKE流程;接收所述AP分配的初始随机密钥,所述设定口令用于接入所述AP;或者,向所述AP发送接入授权请求,所述接入授权请求用于请求接入所述AP;接收所述AP分配的初始随机密钥。
在该方法中,用户设备初次接入AP时,基于设定口令的PAKE流程向AP请求分配初始的随机密钥,或者,通过接入授权请求向AP请求分配初始的随机密钥,能够适应用户设备在初次接入AP时无法使用所述AP分配的随机密钥的场景。
在一种可能的设计中,所述向AP发送第一接入请求,包括:通过主用户设备转发向所述AP发送所述第一接入请求;其中,所述主用户设备为最先接入所述AP的用户设备,或者为设定的用户设备。
在该方法中,用户设备向AP发送消息时,以主用户设备转发的方式实现,在多设备场景下,能够减少多个用户设备与AP直接交互引起的安全风险,且便于对接入所述AP的多个用户设备进行管理。
第三方面,本申请提供一种通信装置,包括收发模块和处理模块:所述收发模块,用于接收来自用户设备的第一接入请求,所述第一接入请求携带第一参数,所述第一参数为所述用户设备根据设定循环群的生成元和第一随机数生成的参数;所述处理模块与所述收发模块协作,用于生成第二随机数,并根据所述第二随机数和所述设定循环群的生成元生成第二参数,并向所述用户设备发送所述第二参数,以使所述用户设备根据所述第二参数生成第一配对主密钥,其中,所述第二随机数为不大于所述设定循环群的阶数的正整数;根据所述第二随机数、所述第一参数、所述第二参数和第一目标随机密钥,生成第二配对主密钥;根据所述第一配对主密钥和所述第二配对主密钥,与所述用户设备进行四路握手认证流程。
在一种可能的设计中,所述处理模块与所述收发模块协作,还用于:在与所述用户设备进行四路握手认证流程过程中,若确定所述第二配对主密钥与所述第一配对主密钥不同,则根据所述第二随机数、所述第一参数、所述第二参数和所述第二目标随机密钥,生成第三配对主密钥,其中,所述第二目标随机密钥为在所述第一目标随机密钥前分配给所述用户设备的随机密钥;根据所述第三配对主密钥,与所述用户设备进行四路握手认证流程。
在一种可能的设计中,所述处理模块与所述收发模块协作,还用于:在与所述用户设备进行四路握手认证流程成功之后,为所述用户设备分配新的随机密钥,并保存所述新的随机密钥。
在一种可能的设计中,所述第一接入请求中还包含所述用户设备的标识;在所述收发模块接收来自用户设备的第一接入请求之后、在所述处理模块与所述收发模块协作,根据所述第二随机数生成第二参数之前,所述收发模块与所述处理模块协作,还用于:根据所述用户设备的标识,生成验证标签Token,并向所述用户设备发送所述Token;接收来自所述用户设备的第二接入请求,并确定所述第二接入请求携带所述Token。
在一种可能的设计中,所述处理模块与所述收发模块协作,具体用于:根据所述第二随机数和所述第一参数生成第三参数;根据所述第一参数、所述第二参数、所述第三参数、所述用户设备的标识、所述AP的标识及所述第一目标随机密钥,通过设定的密钥推演函数计算得到所述第二配对主密钥。
在一种可能的设计中,在所述收发模块接收来自用户设备的第一接入请求之前,所述处理模块与所述收发模块协作,还用于:根据设定口令,与所述用户设备进行PAKE流程;在与所述用户设备进行所述PAKE流程成功之后,为所述用户设备分配初始随机密钥;或者,接收来自所述用户设备的接入授权请求,所述接入授权请求用于请求接入所述AP;对所述用户设备进行授权,授权通过后为所述用户设备分配初始随机密钥;保存所述初始随机密钥。
在一种可能的设计中,所述收发模块具体用于:接收主用户设备转发的来自所述用户设备的所述第一接入请求;其中,所述主用户设备为最先接入所述AP的用户设备,或者为设定的用户设备。
第四方面,本申请提供一种通信装置,包括收发模块和处理模块:所述处理模块用于生成第一随机数,并根据所述第一随机数和所述设定循环群的生成元生成第一参数,其中,所述第一随机数为不大于所述设定循环群的阶数的正整数;所述收发模块用于向接入的AP发送第一接入请求,所述第一接入请求携带所述第一参数,以使所述AP根据所述第一参数生成第二配对主密钥;接收来自所述AP的第二参数,所述第二参数为所述AP根据所述设定循环群的生成元和第二随机数生成的参数;所述处理模块还用于根据所述第一随机数、所述第一参数、所述第二参数和第三目标随机密钥,生成所述第一配对主密钥,其中,所述第三目标随机密钥为保存的所述AP最新分配的随机密钥;所述处理模块与所述收发模块协作,用于根据所述第一配对主密钥和所述第二配对主密钥,与所述AP进行四路握手认证流程。
在一种可能的设计中,所述收发模块还用于:在与所述AP进行四路握手认证流程成功之后,接收所述用户设备分配的新的随机密钥,并保存所述新的随机密钥。
在一种可能的设计中,所述第一接入请求中还包含所述用户设备的标识;在所述收发模块向AP发送第一接入请求之后、在所述收发模块接收来自所述AP的第二参数之前,所述收发模块还用于:接收来自所述AP的Token;向所述AP发送第二接入请求,所述第二接入请求携带所述Token。
在一种可能的设计中,所述处理模块具体用于:根据所述第一随机数和所述第二参数生成第三参数;根据所述第一参数、所述第二参数、所述第三参数、所述用户设备的标识、所述AP的标识及所述第三目标随机密钥,通过设定的密钥推演函数计算得到所述第一配对主密钥。
在一种可能的设计中,在所述处理模块生成第一随机数之前,所述处理模块与所述收发模块协作,还用于:根据设定口令,与所述AP进行PAKE流程;接收所述AP分配的初始随机密钥;或者,向所述AP发送接入授权请求,所述接入授权请求用于请求接入所述AP;接收所述AP分配的初始随机密钥。
在一种可能的设计中,所述收发模块具体用于:通过主用户设备转发向所述AP发送所述第一接入请求;其中,所述主用户设备为最先接入所述AP的用户设备,或者为设定的用户设备。
第五方面,本申请提供一种通信装置,包括收发器和处理器:所述收发器,用于接收来自用户设备的第一接入请求,所述第一接入请求携带第一参数,所述第一参数为所述用户设备根据设定循环群的生成元和第一随机数生成的参数;所述处理器,与所述收发器耦合,并与所述收发器协作,用于生成第二随机数,并根据所述第二随机数和所述设定循环群的生成元生成第二参数,并向所述用户设备发送所述第二参数,以使所述用户设备根据所述第二参数生成第一配对主密钥,其中,所述第二随机数为不大于所述设定循环群的阶数的正整数;根据所述第二随机数、所述第一参数、所述第二参数和所述第一目标随机密钥,生成第二配对主密钥;根据所述第一配对主密钥和所述第二配对主密钥,与所述用户设备进行四路握手认证流程。
在一种可能的设计中,所述处理器与所述收发器协作,还用于:在与所述用户设备进行四路握手认证流程过程中,若确定所述第二配对主密钥与所述第一配对主密钥不同,则根据所述第二随机数、所述第一参数、所述第二参数和所述第二目标随机密钥,生成第三配对主密钥,其中,所述第二目标随机密钥为在所述第一目标随机密钥前分配给所述用户设备的随机密钥;根据所述第三配对主密钥,与所述用户设备进行四路握手认证流程。
在一种可能的设计中,所述处理器与所述收发器协作,还用于:在与所述用户设备进行四路握手认证流程成功之后,为所述用户设备分配新的随机密钥,并保存所述新的随机密钥。
在一种可能的设计中,所述第一接入请求中还包含所述用户设备的标识;在所述收发器接收来自用户设备的第一接入请求之后、在所述处理器与所述收发器协作,根据所述第二随机数生成第二参数之前,所述收发器与所述处理器协作,还用于:根据所述用户设备的标识,生成验证标签Token,并向所述用户设备发送所述Token;接收来自所述用户设备的第二接入请求,并确定所述第二接入请求携带所述Token。
在一种可能的设计中,所述处理器与所述收发器协作,具体用于:根据所述第二随机数和所述第一参数生成第三参数;根据所述第一参数、所述第二参数、所述第三参数、所述用户设备的标识、所述AP的标识及所述第一目标随机密钥,通过设定的密钥推演函数计算得到所述第二配对主密钥。
在一种可能的设计中,在所述收发器接收来自用户设备的第一接入请求之前,所述处理器与所述收发器协作,还用于:根据设定口令,与所述用户设备进行PAKE流程;在与所述用户设备进行所述PAKE流程成功之后,为所述用户设备分配初始随机密钥;或者,接收来自所述用户设备的接入授权请求,所述接入授权请求用于请求接入所述AP;对所述用户设备进行授权,授权通过后为所述用户设备分配初始随机密钥;保存所述初始随机密钥。
在一种可能的设计中,所述收发器具体用于:接收主用户设备转发的来自所述用户设备的所述第一接入请求;其中,所述主用户设备为最先接入所述AP的用户设备,或者为设定的用户设备。
在一种可能的设计中,所述通信装置还包括存储器,耦合至所述处理器,用于存储程序,所述程序用于提供给所述处理器执行。
第六方面,本申请提供一种通信装置,包括收发器和处理器:所述处理器用于生成第一随机数,并根据所述第一随机数和所述设定循环群的生成元生成第一参数,其中,所述第一随机数为不大于所述设定循环群的阶数的正整数;所述收发器,耦合至所述处理器, 用于向接入的AP发送第一接入请求,所述第一接入请求携带所述第一参数,以使所述AP根据所述第一参数生成第二配对主密钥;接收来自所述AP的第二参数,所述第二参数为所述AP根据所述设定循环群的生成元和第二随机数生成的参数;所述处理器还用于根据所述第一随机数、所述第一参数、所述第二参数和第三目标随机密钥,生成所述第一配对主密钥,其中,所述第三目标随机密钥为保存的所述AP最新分配的随机密钥;所述处理器与所述收发器协作,还用于根据所述第一配对主密钥和所述第二配对主密钥,与所述AP进行四路握手认证流程。
在一种可能的设计中,所述收发器还用于:在与所述AP进行四路握手认证流程成功之后,接收所述用户设备分配的新的随机密钥,并保存所述新的随机密钥。
在一种可能的设计中,所述第一接入请求中还包含所述用户设备的标识;在所述收发器向AP发送第一接入请求之后、在所述收发器接收来自所述AP的第二参数之前,所述收发器还用于:接收来自所述AP的Token;向所述AP发送第二接入请求,所述第二接入请求携带所述Token。
在一种可能的设计中,所述处理器具体用于:根据所述第一随机数和所述第二参数生成第三参数;根据所述第一参数、所述第二参数、所述第三参数、所述用户设备的标识、所述AP的标识及所述第三目标随机密钥,通过设定的密钥推演函数计算得到所述第一配对主密钥。
在一种可能的设计中,在所述处理器生成第一随机数之前,所述处理器与所述收发器协作,还用于:根据设定口令,与所述AP进行PAKE流程;接收所述AP分配的初始随机密钥;或者,向所述AP发送接入授权请求,所述接入授权请求用于请求接入所述AP;接收所述AP分配的初始随机密钥。
在一种可能的设计中,所述收发器具体用于:通过主用户设备转发向所述AP发送所述第一接入请求;其中,所述主用户设备为最先接入所述AP的用户设备,或者为设定的用户设备。
在一种可能的设计中,所述通信装置还包括存储器,耦合至所述处理器,用于存储程序,所述程序用于提供给所述处理器执行。
第七方面,本申请实施例提供一种通信***,包括上述第三方面或第三方面的任一可能的设计所述的通信装置以及第四方面或第四方面的任一可能的设计所述的通信装置,或者,包括上述第五方面或第五方面的任一可能的设计所述的通信装置以及第六方面或第六方面的任一可能的设计所述的通信装置。
第八方面,本申请实施例提供一种计算机存储介质,所述计算机存储介质存储有计算机程序,当所述计算机程序在通信装置上运行时,使得通信装置执行上述第一方面或第一方面的任一可能的设计所描述的方法,或者,使得通信装置执行上述第二方面或第二方面的任一可能的设计所描述的方法。
第九方面,本申请实施例提供一种计算机程序产品,当所述计算机程序产品在通信装置上运行时,使得通信装置执行上述第一方面或第一方面的任一可能的设计所描述的方法,或者,使得通信装置执行上述第二方面或第二方面的任一可能的设计所描述的方法。
第十方面,本申请实施例提供一种芯片,所述芯片用于读取存储器中存储的计算机程序,执行上述第一方面或第一方面的任一可能的设计所描述的方法,或者,执行上述第二方面或第二方面的任一可能的设计所描述的方法。
第十一方面,本申请实施例提供一种芯片***,所述芯片***包括处理器,用于支持通信装置实现上述第一方面或第一方面的任一可能的设计所描述的方法,或者,实现上述第二方面或第二方面的任一可能的设计所描述的方法。
在一种可能的设计中,所述芯片***还包括存储器,所述存储器用于存储所述计算机装置必要的程序和数据。
在一种可能的设计中,所述芯片***由芯片构成,或者包含芯片和其他分立器件。
上述第三方面到第十一方面的有益效果,请参见上述第一方面和/或第二方面的有益效果的描述,这里不再重复赘述。
附图说明
图1为一种WiFi安全协议中的认证方法示意图;
图2为一种WPA3协议中的认证方法示意图;
图3为本申请实施例提供的一种认证***的示意图;
图4a为本申请实施例提供的一种WiFi安全认证方法的示意图;
图4b为本申请实施例提供的一种WiFi安全认证方法的示例性示意图;
图5a为本申请实施例提供的一种WiFi安全认证方法的示意图;
图5b为本申请实施例提供的一种WiFi安全认证方法的示例性示意图;
图6a为本申请实施例提供的一种WiFi安全认证方法的流程示意图;
图6b为本申请实施例提供的一种WiFi安全认证方法的示例性示意图;
图7a为本申请实施例提供的一种主用设备初次接入AP的方法示意图;
图7b为本申请实施例提供的一种主用设备初次接入AP的方法的示例性示意图;
图8a为本申请实施例提供的一种非主用设备初次接入AP的方法示意图;
图8b为本申请实施例提供的一种非主用设备初次接入AP的方法的示例性示意图;
图9为本申请实施例提供的一种通信装置的示意图;
图10为本申请实施例提供的一种通信装置的示意图;
图11为本申请实施例提供的一种通信***的示意图。
具体实施方式
为了使本申请实施例的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施例作进一步地详细描述。为了便于理解,示例性的给出了与本申请相关概念的说明以供参考,如下所示:
1)、接入点(Access Point,AP):也称为无线接入点或热点等,是用于将用户设备接入无线网络的设备;AP能够实现无线网和有线网之间的通信,是组建无线局域网的核心设备。
AP可以为无线保真WiFi***中的接入点等,也可以是完成接入点部分功能的模块或单元,例如,可以是集中式单元(CentralUnit,CU),也可以是分布式单元(Distributed Unit,DU);还也可以是路由器、网桥、无线网关等。本申请对AP所采用的具体技术和具体设备形态不做限定。
本申请实施例中,AP为支持WiFi安全协议的设备,所述WiFi安全协议包括有线等 效保密协议(Wired Equivalent Privacy,WEP)、有线等效保密协议2.0(WEP2)、无线保真安全接入协议(WiFi Protected Access,WPA)、无线保真安全接入协议2.0(WPA2)、无线保真安全接入协议3.0(WPA3)等多种WiFi安全协议。
2)、用户设备(User Equipment,UE):又可称之为终端、移动台(Mobile Station,MS)、移动终端(Mobile Terminal,MT)等,是一种向用户提供数据或网络连通性的设备,也可以是物联网设备。例如,用户设备包括具有无线连接功能的手持式设备、车载设备等。目前,用户设备可以是:手机(Mobile Phone)、平板电脑、笔记本电脑、掌上电脑、移动互联网设备(Mobile Internet Device,MID)、可穿戴设备(例如智能手表、智能手环、计步器等),车辆、车载设备(例如,汽车、自行车、电动车、飞机、船舶、火车、高铁等)、虚拟现实(Virtual Reality,VR)设备、增强现实(Augmented Reality,AR)设备、工业控制(Industrial Control)中的无线终端、智能家居设备(例如,冰箱、电视、空调、电表等)、智能机器人、车间设备、无人驾驶(Self Driving)中的无线终端、远程手术(Remote Medical Surgery)中的无线终端、智能电网(Smart Grid)中的无线终端、运输安全(Transportation Safety)中的无线终端、智慧城市(Smart City)中的无线终端,或智慧家庭(Smart Home)中的无线终端、飞行设备(例如,智能机器人、热气球、无人机、飞机)等。
3)循环群:在密码学或数学中,群表示一个拥有满足封闭性、满足结合律、有单位元、有逆元的二元运算的代数结构,也可以称为运算集合。若一个群的每一个元(元素)都是这个群的某一个固定元的乘方,则称这个群为循环群,该固定元为该循环群的一个生成元。循环群可分为无阶循环群和有阶循环群两种类型。
需要说明的是,本申请实施例中的术语“***”和“网络”可被互换使用。“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A、B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a、b、或c中的至少一项(个),可以表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。
基于目前的WiFi安全协议,连接同一个AP的所有用户设备共享口令,即所有用户设备采用相同的口令进行认证从而接入所述AP。这种情况下,同一口令在不同的接入过程中重复多次使用,极大的增加了口令泄露的风险,因此网络通信的安全性很低。
鉴于此,本申请实施例提供一种WiFi安全认证方法,所述方法中,用户设备在接入AP时采用一设备一密钥的认证方式,即不同的用户设备分别采用不同的密钥作为共享口令进行认证并在认证通过后接入所述AP。这样,一个用户设备的口令(或密钥)泄露不会影响其它的用户设备与所述AP的认证流程,一定程度上提升了网络的安全性。
但是,在上述一设备一密钥的方式中,一个用户设备的密钥泄露后,攻击者还是可以利用该用户设备的密钥使用AP提供的网络,并且这种密钥泄露不容易被检测到。因此, 本申请实施例提供的WiFi安全认证方法中,在用户设备采用一设备一密钥的认证方式接入AP的基础上,进一步采用一次一密钥的认证方式。具体的,在不同的用户设备分别采用不同的密钥进行认证的情况下,在每次AP对用户设备认证成功后,为该用户设备生成新的认证密钥,所述用户设备在下一次接入所述AP时利用所述新的认证密钥进行认证。
下面对本申请实施例提供的方案进行详细说明。
下面首先对本申请提供的WiFi安全认证方法相关的一些WiFi安全协议进行介绍。
图1为一种传统的WiFi安全协议中的认证方法示意图。如图1所示,WPA2及WPA2之前版本的WiFi安全协议中,用户设备接入AP时,用户设备和AP首先通过关联(Association)约定认证流程所使用的安全套件。然后用户设备和AP分别利用共享的口令pw计算配对主密钥(Pairwise Master Key,PMK),再使用计算得到的PMK执行四路握手流程,进行身份认证。所述PMK包括配对临时密钥(Pairwise Transient Key,PTK),PTK用于加密单播信息,所述PTK包括三个部分,分别为密钥确认密钥(Key Confirmation Key,KCK)、密钥加密密钥(Key Encryption Key,KEK)和临时密钥(Transient Key,TK)。其中,KCK和KEK用于在四路握手流程中保护传输的消息的私密性和完整性,而TK是真正的会话密钥,用于保护后续用户设备和AP之间的通信。在四路握手流程中,AP还通过四路握手流程中的第三条消息,把群播临时密钥(Group Transient Key,GTK)传递给用户设备。其中,图1中所示的四路握手流程中,传输的消息中的r为计数器值,取值为正整数。
上述图1所示的认证方法中,所述PMK是根据用户设备与AP的共享口令及双方的媒体存取控制(Media Access Control,MAC)地址计算得到的。而所述共享口令的长度较小,熵值很低,攻击者如果能够截取四路握手流程中的消息,就可以通过暴力破解的方式得到所述共享口令,威胁网络安全。因此,上述协议规定的认证流程的安全性很低。
图2为一种WPA3协议中的认证方法示意图。如图2所示,为了解决上述WPA2及之前版本的协议中可对共享口令进行暴力破解的问题,最新的WiFi安全协议即WPA3协议中,在执行上述图1所示的传统安全协议流程之前,先执行对等实体同等验证(Simultaneous Authentication of Equals,SAE)流程来生成高熵值的PMK,生成该高熵值的PMK后再执行关联和四路握手流程。其中,SAE实现于椭圆曲线上,其实现方式可采用哈希到曲线(hash-to-curve)算法。
SAE是一种基于口令的身份认证和密钥交换(Password Authenticated Key Exchange,PAKE)方法,可以使通信双方通过使用共享的低熵值口令而实现相互身份认证并生成高熵值的PMK,能够避免口令的暴力破解,因此,一定程度上提高了认证流程的安全性。
上述各认证方法的具体流程可参照相关WiFi安全协议中的规定,例如802.11i等标准的规定,此处不再详述。
相比之前版本的协议中的认证方法,上述WPA3协议的认证方法虽然能提高一定的安全性,但是也存在以下问题:
1)SAE的防堵塞(anti-clogging)机制不能有效阻止拒绝服务(Denial of Service,Dos)攻击。
用户设备和AP执行SAE流程的过程中,接收端的SAE状态机有计数器,对发送端发送的SAE请求(Commit)消息进行计数,在消息数量达到某个门限值时,状态机就会触发一个拒绝消息发送给SAE请求消息的发送端,该拒绝消息中携带有防堵塞标签 (anti-Clogging Token),当发送端再次发送SAE请求消息时,必须携带上所述防堵塞标签,所述防堵塞标签与发送端的MAC地址相关联。接收端对该防堵塞标签进行验证,并在验证通过后才启动密钥交换,以此来拒绝来自攻击者的带有虚假MAC地址的SAE请求消息。但是,该机制下,攻击者能通过使用伪造的MAC地址发SAE请求消息来消耗AP的资源,导致AP无法正常提供认证服务。
2)为了兼容之前版本的协议,WP3协议中允许在过渡(Transition)模式下降级到WPA2协议。因此,攻击者可以利用这一特性进行攻击,使WPA3协议降级到WPA2版本,再通过暴力破解得到口令。
3)SAE实现的哈希到曲线算法无法抵制时序攻击(Timing Attack)及基于缓存(Cache-Based)的侧信道攻击。因此,攻击者能够对AP或用户设备实施侧信道攻击,从而获取口令。
基于以上问题,本申请提供的WiFi安全认证方法中,在采用一设备一密钥和一次一密钥的基础上,进一步采用迪菲-赫尔曼(Diffie-Hellman,DH)密钥交换协议来生成高熵值的PMK,从而降低口令(或密钥)泄露的风险,保证认证流程的前向安全性。
接下来对本申请提供的WiFi安全认证方法适用的场景进行介绍。
图3为本申请实施例提供的一种认证***的示意图。如图3所示,所述认证***包括接入点(AP)301及至少一个用户设备(例如图3中所示的用户设备302、用户设备303和用户设备304)。其中,各用户设备分别与AP执行本申请提供的WiFi安全认证方法,进行相互认证并生成保护两者之间通信安全的密钥,从而保证所述用户设备安全地通过所述AP使用网络资源。
可选的,所述AP和用户设备均可以具有多个发射天线和多个接收天线,并且所述AP可以采用例如无线局域网(Wireless Local Area Network,WLAN)技术、WiFi通信技术等与至少一个用户设备进行通信。
应理解,该认证***中也可以存在多个AP,且一个AP可以为多个用户设备提供认证及网络服务。本申请实施例对认证***中包括的AP的数量以及用户设备的数量均不作限定。图3中的AP以及至少一个用户设备中的每个用户设备都可以实施本申请实施例所提供的技术方案。
WiFi安全协议通常分为个人版WiFi安全协议和企业版WiFi安全协议两种,个人版WiFi安全协议主要应用于安全性要求相对较低的环境中,例如家庭环境等;企业版WiFi安全协议主要应用于安全性要求相对高的环境中。上述图3所示的认证***可以应用到所述个人版WiFi安全协议或企业版WiFi安全协议中。
进一步的,本申请实施例提供的WiFi安全认证方法,用于提高用户设备与AP之间基于个人版WiFi安全协议的认证流程的安全性。
需要说明的是,本申请所描述的***架构以及应用场景是为了更加清楚的说明本申请的技术方案,并不构成对本申请提供的技术方案的限定,本领域普通技术人员可知,随着***架构的演变和新业务场景的出现,本申请提供的技术方案对于类似的技术问题,同样适用。
下面结合具体实施例对本申请提供的WiFi安全认证方法进行说明,所述WiFi安全认证方法可以适用图3所示的认证***。
实施例一
图4a为本申请实施例提供的一种WiFi安全认证方法的示意图。如图4a所示,所述WiFi安全认证方法包括:
S401:用户设备在需要接入AP时,生成第一随机数,并根据所述第一随机数和所述设定循环群的生成元生成第一参数。
其中,所述第一随机数为不大于所述设定循环群的阶数的正整数。
本申请实施例中,用户设备在接入AP时,可以采用所述AP最新分配的随机密钥生成PMK并进行四路握手认证流程。
所述四路握手认证流程的具体流程可参照相关WiFi安全协议中的规定,此处不再详述。
本申请实施例中,所述AP为用户设备分配的随机密钥是随机生成的,并且所述AP可以保存为每个用户分配的至少一个随机密钥。其中,所述AP保存的至少一个随机密钥中,各随机密钥对应的用户设备是确定的。
本申请实施例中,所述随机密钥为长度高于设定值或复杂度高于设定标准的高熵密钥。其中,所述随机密钥在认证流程中可以作为随机口令使用,因此,本申请实施例中随机密钥也可以称为随机口令。
需要说明的是,每个用户设备在首次接入AP时,鉴于之前AP并未为所述用户设备分配随机密钥,因此,该用户设备首次接入AP时可以采用特定方式接入,在该用户设备首次接入AP之后,所述AP需要为该用户设备分配随机密钥,这样,在所述用户设备获取到所述AP分配的随机密钥之后再次接入所述AP时,再采用根据AP分配的随机密钥进行认证的方式接入所述AP。
作为一种可选的实施方式,用户设备首次接入AP时,基于所述AP对应的设定口令与所述AP执行PAKE流程,建立安全通道。然后所述AP为所述用户设备分配一个初始随机密钥,所述用户设备接收所述AP分配的所述初始随机密钥并保存。所述用户设备在下次接入所述AP时,采用已保存的所述初始随机密钥与所述AP进行四路握手认证流程。
可选的,所述用户设备与所述AP基于所述设定口令执行所述PAKE流程之后,所述用户设备与所述AP可以继续执行WiFi安全协议规定的关联和四路握手流程,完成所述用户设备首次接入所述AP的完整认证流程。
本申请实施例中,所述PAKE流程可以为WiFi安全协议中的基于密钥的身份认证和密钥交换协议规定的流程,例如可以为SAE流程等。
作为另一种可选的实施方式,用户设备首次接入AP时,确定所述AP对应的设定口令,并发送给所述AP,所述设定口令用于接入所述AP。所述AP对所述设定口令进行验证,并在验证通过后与所述用户设备建立连接。所述用户设备根据所述设定口令接入所述AP后,所述AP为所述用户设备分配一个初始随机密钥,所述用户设备接收所述AP分配的所述初始随机密钥并保存,在下次接入所述AP时采用所述初始随机密钥进行四路握手认证流程。
本申请实施例中,所述设定口令可以为所述AP的出厂口令,或者为用户设定的口令。例如,所述AP为家庭环境中的路由器时,所述设定口令可以为所述路由器的出厂口令,并随所述路由器一起传送给使用所述路由器的用户。其中,所述出厂口令可以写入秘密信封传送给用户,或者所述出厂口令可以设置于所述路由器附带的快速反应(Quick Response, QR)二维码中,或者用户可以通过短信获取所述出厂口令。
作为又一种可选的实施方式,用户设备首次接入AP时,向所述AP发送接入授权请求,所述接入授权请求用于请求接入所述AP。所述AP若允许所述用户设备接入,则对所述用户设备进行授权,并在授权后为所述用户设备分配一个初始随机密钥。所述用户设备接收所述AP分配的所述初始随机密钥并保存,在下次接入所述AP时采用所述随机密钥进行四路握手认证流程。
示例性的,本申请实施例中,所述用户设备生成所述第一参数时,采用的所述设定循环群可以为椭圆曲线循环群、整数循环群等。其中,在采用的设定循环群为椭圆曲线循环群时,所述用户设备通过对所述第一随机数和所述椭圆曲线循环群的生成元进行点乘运算,得到所述第一参数;在采用的设定循环群为整数循环群时,所述用户设备通过对所述第一随机数和所述整数循环群的生成元进行指数运算,得到所述第一参数。
在本申请一些实施例中,设定G为一个阶为素数q的椭圆曲线循环群,设定U∈G并为G的生成元。用户设备接入AP时,若所述AP之前已为所述用户设备分配随机密钥,即用户设备存储有AP分配的随机密钥,则所述用户设备首先随机生成第一随机数
Figure PCTCN2020133644-appb-000001
并计算第一参数X=U x,其中,所述
Figure PCTCN2020133644-appb-000002
表示取值范围1~q-1,即,所述第一随机数x的范围为1≤x≤q-1,所述U x表示基于所述第一随机数和所述生成元的点乘运算。
上述方式中,所述第一随机数x为所述用户设备的私有信息,不会对外公布,所述用户设备通过根据所述x生成第一参数X,将所述X传递给所述AP,能够使所述AP在后续认证流程中使用与所述x相关的信息进行认证,并且不容易造成所述x的泄露。其中,基于上述椭圆曲线循环群算法特性,根据所述X倒推得到所述x的过程十分复杂,因此,即便所述X泄露,也不容易根据所述X得到所述x。
S402:所述用户设备向所述AP发送第一接入请求,所述第一接入请求携带所述第一参数。
上述步骤中,所述用户设备确定所述第一参数X后,向所述AP发送第一接入请求,所述第一接入请求携带所述第一参数,还可以携带所述用户设备的标识。
S403:所述AP生成第二随机数,并根据所述第二随机数和所述设定循环群的生成元生成第二参数。
其中,所述第二随机数为不大于所述设定循环群的阶数的正整数。
本申请实施例中,所述AP生成所述第二参数时,采用与所述用户设备相同的设定循环群及相同的计算方式,对所述第二随机数和所述设定循环群的生成元进行相关计算,得到所述第二参数。
在本申请一些实施例中,所述AP接收所述第一接入请求后,基于所述椭圆曲线循环群,首先随机生成第二随机数
Figure PCTCN2020133644-appb-000003
并计算第二参数Y=U y,其中,所述
Figure PCTCN2020133644-appb-000004
表示取值范围1~q-1,即,所述第二随机数y的范围为1≤y≤q-1,所述U y表示基于所述第二随机数和所述生成元的点乘运算。
上述方式中,所述第一参数y为所述AP的私有信息,不会对外公布,所述AP通过根据所述y生成第二参数Y,将所述Y传递给所述用户设备,能够使所述用户设备在后续认证流程中使用与所述y相关的信息进行认证,并且不容易造成所述y的泄露。其中,基于上述椭圆曲线循环群算法特性,根据所述Y倒推得到所述y的过程十分复杂,因此,即便所述Y泄露,也不容易根据所述Y得到所述y。
S404:所述AP向所述用户设备发送所述第二参数。
上述步骤中,所述AP确定所述第二参数Y后,向所述用户设备发送所述Y。
S405:所述用户设备与所述AP执行关联流程。
具体实施时,采用相关WiFi安全协议中规定的方式,此处不再详述。
S406:所述用户设备根据所述第一随机数、所述第一参数、所述第二参数和第三目标随机密钥,生成第一配对主密钥,其中,所述第三目标随机密钥为保存的所述AP最新分配的随机密钥。
所述用户设备接收到所述AP发送的第二参数后,根据所述第二随机数x和所述第二参数Y生成第三参数Z=Y x,其中,所述Y x为基于所述Y和所述x的点乘运算。所述用户设备生成所述第三参数后,根据所述第一随机数、所述第一参数、所述第二参数、所述第三参数、所述用户设备的标识、所述AP的标识及所述第一目标随机密钥,通过如下设定的密钥推演函数计算得到所述第一配对主密钥:
PMK 1=KDF(Z‖k dev1,id dev‖id AP‖X‖Y)
其中,PMK 1为所述第一配对主密钥,KDF()为设定的标准密钥推演函数,Z为所述第三参数,k dev1为所述用户设备存储的最新的随机密钥,即所述第三目标随机密钥,id dev为所述用户设备的标识,id AP为所述AP的标识,X为所述第一参数,Y为所述第二参数,“||”符号表征字符连接运算。
上述方式中,所述用户设备生成配对主密钥时,用到的参数Y是根据所述AP的未***息y生成的,而根据所述Y是很难推导得到所述y的,因此,所述AP既能通过发送所述Y给所述用户设备,既能使所述用户设备采用与所述y相关的信息进行认证,又能同时避免所述y的泄露,因此,安全性相对更高。
S407:所述AP根据所述第二随机数、所述第一参数、所述第二参数和所述第一目标随机密钥,生成第二配对主密钥,其中,所述第一目标随机密钥为最新分配给所述用户设备的随机密钥。
所述AP接收到所述用户设备发送的第一接入请求后,根据所述第一随机数y和所述第一参数X生成第三参数Z=X y,其中,所述X y为基于所述X和所述y的点乘运算。所述AP生成所述第三参数后,根据所述第二随机数、所述第一参数、所述第二参数、所述第三参数、所述用户设备的标识、所述AP的标识及所述第一目标随机密钥,通过如下设定的密钥推演函数计算得到所述第二配对主密钥:
PMK 2=KDF(Z‖k dev2,id dev‖id AP‖X‖Y)
其中,PMK 2为所述第二配对主密钥,KDF()为设定的标准密钥推演函数,Z为所述第三参数,k dev2为所述AP分配给所述用户设备的最新的随机密钥,即所述第一目标随机密钥,id dev为所述用户设备的标识,id AP为所述AP的标识,X为所述第一参数,Y为所述第二参数,“||”符号表征字符连接运算。
上述方式中,所述AP生成配对主密钥时,用到的参数X是根据所述用户设备的未***息x生成的,而根据所述X是很难推导得到所述x的,因此,所述用户设备通过发送所述X给所述AP,既能使所述AP采用与所述x相关的信息进行认证,又能同时避免所述x的泄露,因此,安全性相对更高。
S408:所述用户设备和所述AP分别根据自身生成的配对主密钥,与对端进行四路握手认证流程。
所述用户设备和所述AP分别根据自身生成的配对主密钥,与对端配合执行四路握手流程。具体实施时,可参照上述图1所示的方法,及相关WiFi安全协议中规定的方法,此处不再赘述。
步骤S409:所述AP在与所述用户设备进行四路握手认证流程成功之后,为所述用户设备分配新的随机密钥,并保存所述新的随机密钥。
在所述用户设备下次接入所述AP时,所述AP采用所述随机密钥对所述用户设备进行认证。其中,所述用户设备采用所述随机密钥接入所述AP时,无需用户手动输入,因此,所述AP为所述用户设备分配的密钥可以是比较复杂的高熵值密钥,例如可以为长度超过设定值的密钥。
步骤S410:所述AP向所述用户设备发送所述新的随机密钥。
步骤S411:所述用户设备保存所述新的随机密钥。
所述用户设备接收所述新的随机密钥后,存储所述新的随机密钥,并在下次接入所述AP时采用所述新的随机密钥进行认证。
上述实施例中,所述用户设备与所述AP进行接入认证时,根据DH密钥交换协议生成高熵值信息(例如第三参数Z)来生成高熵值的PMK,提高了密钥信息的安全性。在所述用户设备每次接入所述AP后,所述AP为所述用户设备分配新的随机密钥,用于下次接入,因此,所述用户设备每次能够采用不同的随机密钥接入所述AP,本次密钥的泄露不会影响下次的接入,大大降低了密钥泄露造成的安全影响,同时,如果发生密钥泄露,则所述用户设备下次无法正常使用网络,因此很容易检测到发生的密钥泄露情况,进而及时做出应对。
需要说明的是,本申请实施例中所描述的各个流程图的步骤编号仅为执行流程的一种示例,并不构成对步骤执行的先后顺序的限制,本申请实施例中相互之间没有时序依赖关系的步骤之间没有严格的执行顺序。例如,上述步骤S406与步骤S407执行时,可以是其中任一步骤先执行,也可以是两个步骤同时执行。
图4b为本申请实施例提供的一种WiFi安全认证方法的示例性示意图。
示例性的,上述图4a所示的WiFi安全认证方法的一种实现方式可参照图4b所示的方法。具体的,设定G为一个阶为设定素数q的椭圆曲线循环群,设定参数U∈G并为G的生成元。用户设备接入AP时,先随机选取一个不小于1且不大于所述q的随机数x,即
Figure PCTCN2020133644-appb-000005
然后对所述x和所述U进行点乘运算,计算得到参数X=U x。再将所述X和所述用户设备自身的标识id dev发送到所述AP。
所述AP接收到所述用户设备发送的所述x和id dev后,采用与所述用户设备相同的方法,也随机选取一个不小于1且不大于所述q的随机数y,即
Figure PCTCN2020133644-appb-000006
然后对所述y和所述U进行点乘运算,计算得到参数Y=U y。再将所述Y发送到所述用户设备,至此所述AP和所述用户设备完成双方间的随机DH密钥交换协议。
所述用户设备接收到所述AP发送的Y后,对所述x和Y进行点乘运算,计算得到参数Z=Y x,并利用所述AP最新分配给自身的随机密钥k dev计算配对主密钥PMK=KDF(Z‖k dev,id dev‖id AP‖X‖Y),其中,所述id AP为所述AP的标识,“||”符号表征字符连接运算,所述KDF()为设定的标准密钥推演函数,例如可以为相关WiFi安全协议中规定的密钥推演算法,或者新定义的密钥推演算法,此处不做具体限定。
与此同时,所述AP采用与所述用户设备相同的方法,对所述y和X进行点乘运算, 计算得到参数Z=X y,并利用自身最新分配给所述用户设备的随机密钥k dev计算配对主密钥PMK=KDF(Z‖k dev,id dev‖id AP‖X‖Y)。
双方分别计算得到配对主密钥PMK后,利用各自计算的PMK执行四路握手协议规定的四路握手认证流程,具体实施时可参照图1所示的流程,或WiFi安全协议规定的四路握手认证流程,此处不再详述。
双方执行所述四路握手认证流程,成功完成认证后,所述用户设备接入到所述AP,所述AP为所述用户设备分配一个新的随机密钥
Figure PCTCN2020133644-appb-000007
所述用户设备接收到所述新的随机密钥
Figure PCTCN2020133644-appb-000008
后进行密钥更新,将所述
Figure PCTCN2020133644-appb-000009
保存为新的k dev。从而在下次接入所述AP时,采用所述新的随机密钥与所述AP执行上述流程进行接入认证。
上述示例中,AP和用户设备先根据DH密钥交换协议生成保密性较高的参数Z,进而根据该参数Z和随机密钥来生成高熵值的PMK,提高了密钥信息的安全性,同时所述用户设备每次能够采用不同的随机密钥生成PMK来接入所述AP,本次密钥的泄露不会影响下次的接入,大大降低了密钥泄露造成的安全影响。
上述实施例一中,实现一次一密钥的难点在于AP和用户设备间的密钥同步,即虽然AP已经为用户设备生成新的随机密钥,并且所述AP自身也存储了所述新的随机密钥,但所述用户设备有可能没有更新密钥,例如所述AP发送给所述用户设备的新的随机密钥被拦截,未能成功发送给所述用户设备的情况等。
为了解决上述问题,作为一种可选的实施方式,所述AP在为所述用户设备分配新的随机密钥后,所述用户设备若接收到新的随机密钥,则更新存储的随机密钥,并向所述AP返回已更新随机密钥的反馈信息,所述AP接收到所述反馈信息后再将保存的随机密钥更新为所述新的随机密钥;否则,所述AP不更新保存的随机密钥,从而保持所述AP与所述用户设备的随机密钥是一致的,并且可以再次向所述用户设备发送所述新的随机密钥。若多次发送所述新的随机密钥后仍未收到所述用户设备的反馈信息,则可以认为发生异常,进行报错处理等。
作为另一种可选的实施方式,在上述步骤S408中,在所述AP与所述用户设备进行四路握手认证流程失过程中,所述AP若确定自身生成的第二配对主密钥与所述用户设备生成的第一配对主密钥不同,则确定认证失败,并在保存的至少一个随机密钥中选择第二目标随机密钥,所述第二目标随机密钥为在所述第一目标随机密钥前分配的随机密钥,即分配给用户设备的旧的随机密钥;所述AP根据所述第二随机数、所述第一参数、所述第二参数和所述第二目标随机密钥,通过如下设定的密钥推演函数计算得到所述第三配对主密钥:
PMK 3=KDF(Z‖k dev3,id dev‖id AP‖X‖Y)
其中,PMK 3为所述第三配对主密钥,KDF()为设定的标准密钥推演函数,Z为所述第三参数,k dev3为所述AP在保存的最新的随机密钥之前分配给所述用户设备的随机密钥,即所述第二目标随机密钥,id dev为所述用户设备的标识,id AP为所述AP的标识,X为所述第一参数,Y为所述第二参数,“||”符号表征字符连接运算。
所述AP根据计算得到的所述第三配对主密钥,再次与所述用户设备进行四路握手认证流程。
该方法中,所述AP采用最新分配给用户设备的随机密钥对用户设备进行认证失败时, 可能是所述用户设备未能成功更新随机密钥,则所述AP采用最新分配的随机密钥之前一个分配的随机密钥再次进行认证,能够为每个用户设备保留使用最新的随机密钥和上一次旧的随机密钥的机会,从而保证所述AP与所述用户设备使用的随机密钥的同步性。
下面结合具体实施例对上述方法进行说明。
实施例二
图5a为本申请实施例提供的一种WiFi安全认证方法的示意图。如图5a所示,所述方法包括:
S501~S507:PMK生成流程,各步骤分别与上述实施例一中的步骤S401~S407相同,此处不再重述。
上述步骤执行完毕后,所述用户设备和所述AP分别根据自身生成的配对主密钥,与对端进行四路握手认证流程,包括如下步骤S508a~S508e:
S508a:所述AP向所述用户设备发送四路握手协议的第一条消息(Msg1),所述Msg1携带所述AP生成的第三随机数(Anonce)。
所述AP生成第二配对主密钥后,根据协议规定的四路握手流程,进行相应计算,并向所述用户设备发送所述Msg1,其中,所述Msg1携带所述AP生成的所述第三随机数。
S508b:所述用户设备向所述AP发送四路握手协议的第二条消息(Msg2),所述Msg2携带所述用户设备生成的第四随机数(Snonce)。
所述用户设备接收所述Msg 1后,根据协议规定的四路握手流程,进行相应计算,并向所述用户设备发送所述Msg 2。具体的,所述用户设备生成第四随机数,并根据所述第一配对主密钥、所述第三随机数和所述第四随机数等信息,计算得到第一配对临时密钥。
所述用户设备将所述第四随机数及相关指示信息发送到所述AP,其中,所述相关指示信息用于指示所述用户设备生成的第一配对临时密钥的相关信息。
S508c:所述AP对所述第一配对主密钥进行验证,若验证未通过,则根据所述第一目标密钥之前分配给所述用户设备的第二目标随机密钥再次对所述第一配对主密钥进行验证。
所述AP接收到所述Msg 2后,根据所述Msg 2携带的所述第四随机数、所述第三随机数及自身计算得到的所述第二配对主密钥,进行与所述用户设备类似的计算,得到对应的第二配对临时密钥。
所述AP根据所述第二配对临时密钥的相关信息与所述用户设备生成的第一配对临时密钥的相关信息是否相同,来确定所述用户设备生成的第一配对主密钥是否正确,若相同,则确定验证通过,并执行步骤S508d;否则,所述AP采用在所述第一目标密钥之前一个分配给所述用户设备的第二随机密钥,根据上述设定的密钥推演函数,再次计算得到第三配对主密钥,并根据所述第四随机数、所述第三随机数及所述第三配对主密钥,进行与所述用户设备类似的计算,得到对应的第三配对临时密钥,再根据所述第三配对临时密钥对所述第一配对临时密钥进行验证。若验证通过,则执行步骤S508d,并确定所述用户设备在上一次连接后,所述用户设备未能成功更新随机密钥。否则,所述AP确定发生异常,可进行报错处理等。
S508d:所述AP向所述用户设备发送四路握手协议的第三条消息(Msg3),所述Msg3携带群播临时密钥。
S508e:所述用户设备向所述AP发送四路握手协议的第四条消息(Msg4)。
所述用户设备确认PMK认证无误后,向所述AP发送确认信息,以确认认证成功。
S509:所述AP在与所述用户设备进行四路握手认证流程成功之后,为所述用户设备分配新的随机密钥,并保存所述新的随机密钥。
S510:所述AP向所述用户设备发送所述新的随机密钥。
S511所述用户设备保存所述新的随机密钥。
所述步骤S509~S511的执行可分别参照上述实施例一的步骤S409~S411,此处不再重述。
上述实施例中,如果攻击者获取到一个用户设备的随机密钥,则攻击者可以一直使用这个随机密钥去与AP执行上述WiFi安全认证方法(故意不使用更新的密钥),而所述AP会一直认为该攻击者为合法用户设备,只是密钥更新一直不成功。这种情况下,密钥盗用只有等到所述合法用户设备下次使用网络时才能被结束。
鉴于此,本申请实施例中,所述AP在某一用户设备接入时,记录所述用户设备连续使用旧密钥进行接入认证的次数,当所述次数大于预设值时,则进行异常处理,如终止该用户设备的权限等。
上述实施例中,所述AP保存最新分配的随机密钥和最新分配的前一次分配的随机密钥,能够采用其中任一随机密钥对所述用户设备进行相应认证。而用户设备采用最新分配到的随机密钥与AP进行认证,所述随机密钥可以是所述AP最新分配的,也可以是所述AP在最新分配的前一次分配的随机密钥,因此,上述方案为用户设备保留了使用最新密钥和上一次旧密钥的机会,并能保持用户设备的随机密钥与AP的随机密钥的同步性。
图5b为本申请实施例提供的一种WiFi安全认证方法的示例性示意图。
示例性的,上述图5a所示的WiFi安全认证方法的一种实现方式可参照图5b所示的方法。具体的,用户设备接入AP时,所述用户设备与所述AP首先执行DH密钥交换协议并生成PMK,然后双方利用各自计算的PMK执行改进的四路握手认证流程。
其中,所述用户设备与所述AP执行DH密钥交换协议并生成PMK的具体实施流程可参照图4b所示的对应流程,此处不再赘述。
所述用户设备与所述AP执行改进的四路握手认证流程时,首先所述AP按照四路握手协议规定的方法进行相应计算,并向所述用户设备发送携带随机数Anonce的四路握手协议的消息Msg1;所述用户设备收到所述Msg1后,也按照四路握手协议规定的方法进行相应计算,并向所述用户设备发送携带随机数Snonce的四路握手协议的消息Msg2。
所述AP接收到所述Msg2后,按照四路握手协议规定的方法验证所述Msg是否正确,若不正确,则所述AP利用分配给所述用户设备的旧随机密钥k' dev重新计算PMK=KDF(Z‖k' dev,id dev‖id AP‖X‖Y),并根据计算得到的PMK重新按照四路握手协议规定的方法推导PTK,然后再次验证所述Msg2是否正确。若验证所述Msg2正确,则可以设置k dev:=k' dev,表示在上一次认证流程中的密钥更新过程中,所述用户设备未能成功更新随机密钥,最新的随机密钥还是为上一次旧的密钥k' dev;否则,所述AP确定认证失败或发生异常,停止执行后续四路握手认证流程,并转入出错处理状态,如进行告警等。
至此,若所述AP确定所述Msg2正确后,按照四路握手协议规定的方法,与所述用户设备继续执行后续的四路握手认证流程,并在流程执行完毕,认证成功之后,所述AP为所述用户设备分配一个新的随机密钥,所述用户设备接收到所述新的随机密钥后进行密钥更新,从而在下次接入所述AP时,采用所述新的随机密钥与所述AP执行上述流程进 行接入认证。
上述示例中,AP为用户设备保留了使用最新密钥和上一次旧密钥的机会,因此能保持用户设备的随机密钥与AP的随机密钥的同步性,避免用户设备未能成功更新密钥导致的认证失败问题。
上述各实施例中,用户设备初次接入AP时,若所述用户设备与所述AP通过执行PAKE协议的流程,来保证所述用户设备与所述AP之间的通信信道安全,则认证过程中可能存在遭到Dos攻击的风险。因此,在上述各实施例基础上,本申请实施例提供的WiFi安全认证方法中,进一步增加抗Dos机制,来来解决因执行所述PAKE协议的流程可能导致的Dos攻击,进而进一步提升认证过程的安全性。
该方法中,所述AP在接收来自用户设备的第一接入请求之后、在根据所述第二随机数生成第二参数之前,所述AP根据所述用户设备的标识,生成验证标签Token,并向所述用户设备发送所述Token,所述用户设备接收来自所述AP的Token后,向所述AP发送携带所述Token的第二接入请求。所述AP接收所述第二接入请求,并确定所述第二接入请求携带所述Token。所述AP对所述Token进行验证通过后,再执行其它流程,若验证未通过,则不响应所述第二接入请求。
下面结合具体实施例进行说明。
实施例三
图6a为本申请实施例提供的一种WiFi安全认证方法的流程示意图。如图6a所示,所述方法包括:
S601:用户设备确定接入AP时,生成第一随机数,并根据所述第一随机数和所述设定循环群的生成元生成第一参数。
其中,所述第一随机数为不大于所述设定循环群的阶数的正整数。
S602:所述用户设备向所述AP发送第一接入请求,所述第一接入请求携带所述第一参数。
所述步骤S601、S602的执行方式与上述实施例一中步骤S401、S402的执行方式相同,此处不再重述。
S603:所述AP根据所述用户设备的标识,生成验证标签Token。
所述AP接收到所述用户设备的第一接入请求时,不立即处理请求,而是利用设定口令或设定密钥和所述用户设备的标识,生成抗Dos验证标签Token,并发送给所述用户设备。
S604:所述AP向所述用户设备发送所述Token。
S605:所述用户设备向所述AP发送第二接入请求,所述第二接入请求携带所述Token。
所述用户设备若接收到所述Token,则再次向所述AP发送接入请求,即所述第二接入请求,其中,所述第二接入请求携带所述Token,还可以携带所述第一参数和所述用户设备的标识。
S606:所述AP对所述Token进行验证,并在验证通过后,生成第二随机数,并根据所述第二随机数和所述设定循环群的生成元生成第二参数。
所述第一随机数为不大于所述设定循环群的阶数的正整数。
其中,所述AP若确定所述第二接入请求中携带的Token与自身发送给所述用户设备 的Token一致,则确定验证通过,否则,确定验证未通过,不响应所述第二接入请求。
S607:所述AP向所述用户设备发送所述第二参数。
S608~S614:所述用户设备与所述AP依次执行关联流程、认证流程及新的随机密钥的分配流程。
上述S607~S614中各步骤的执行可分别参照上述实施例一中的步骤S404~S411或实施例二中的步骤S504~S511,此处不再重述。
上述实施例中,所述AP通过利用Token对所述用户设备的接入请求进行验证,仅在验证通过时响应所述接入请求,进行相关参数的计算,能够来避免遭受攻击时频繁的接入请求导致的参数的多次重复计算及资源占用,因此能够抵抗Dos攻击,提高认证过程的安全性。
图6b为本申请实施例提供的一种WiFi安全认证方法的示例性示意图。
示例性的,上述图6a所示的WiFi安全认证方法的一种实现方式可参照图6b所示的方法。具体的,用户设备接入AP时,所述用户设备与所述AP首先执行DH密钥交换协议并生成PMK,然后双方利用各自计算的PMK执行改进的四路握手认证流程,其中,在执行DH密钥交换协议过程中,所述AP根据额外的密钥k生成Token来作为抗Dos攻击的标签。
具体的,在执行DH密钥交换协议过程中,所述AP接收到所述用户设备发送的连接请求(X,id dev)后,根据所述k和所述id dev生成所述Token=h(k,id dev),并将所述Token发送给所述用户设备,其中,所述h()为设定的Token生成算法,例如可以为相关Token验证协议中的算法,或者新定义的算法,此处不做具体限定。所述用户设备接收到所述Token后,需再一次向所述AP发送所述连接请求并携带所述Token。所述AP对接收到的所述Token验证通过后,才进一步处理所述连接请求,继续与所述用户设备执行DH密钥交换协议的流程。
其中,所述用户设备与所述AP执行的DH密钥交换协议流程中其它步骤、生成PMK及后续认证流程的具体实施方式可参照图5b所示的流程,此处不再赘述。
上述示例中,用户设备接入AP时进行认证的过程能够抵抗Dos攻击,提高安全性。
本申请实施例中,上述各实施例所提供的WiFi安全认证方法可以统称为设备认证流程或设备认证协议等。
本申请上述实施例提供的WiFi安全认证方法主要应用于采用个人版WiFi安全协议的环境中,例如家庭环境中。这种环境下,接入所述AP的用户设备一般比较固定,且用户设备的数量不会很大,为了便于管理,本申请实施例中,将接入AP的多个用户设备中的其中一个用户设备设置为主用户设备,将其它用户设备设置为非主用户设备(也称为普通设备)。其中,所述主用户设备负责授权给非主用户设备,及辅助所述非主用户设备接入所述AP。所述主用户设备初次接入所述AP时采用设定口令进行认证,后续接入所述AP时采用上述各实施例提供的WiFi安全认证方法进行认证;而非主用户设备初次接入所述AP时采用接入授权请求的方式进行认证,后接入时采用上述各实施例提供的WiFi安全认证方法进行认证,但是所述非主用户设备与所述AP之间的信息交互均需通过所述主用户设备转发实现。
下面结合具体实例进行说明。
实例一
在本申请一些实施例中,所述主用户设备可以为最先成功接入AP的用户设备。例如,在家庭环境中新部署一个AP,所述AP启动后,第一个连接所述AP的用户设备就是主用户设备,后续连接所述AP的其它用户设备均为非主用户设备,也可以称为普通设备。
其中,所述主用户设备初次接入所述AP时,使用所述AP对应的设定口令(例如所述AP的出厂口令)进行认证后接入所述AP,并从所述AP获取分配的初始随机口令,以在下次接入所述AP时使用。
图7a为本申请实施例提供的一种主用户设备初次接入AP的方法示意图。如图7a所示,所述方法包括:
S701:主用户设备确定接入的AP对应的设定口令。
S702:所述主用户设备与所述AP执行PAKE协议的流程,建立安全通道,并将所述设定口令发送到所述AP。
可选的,所述主用户设备向所述AP发送所述设定口令时,同时发送所述主用户设备的标识给所述AP。
所述步骤S702为可选步骤。
S703:所述AP对接收到的所述设定口令验证成功后,生成并保存所述主用户设备对应的初始随机口令。
其中,所述AP对所述设定口令验证成功后,确认认证通过,允许所述主用户设备接入网络。
本实施例中,所述AP为所述主用户设备分配的随机密钥为高熵值密钥。所述AP对接收到的所述设定口令验证成功后,建立所述主用户设备对应的设备账号信息,用于保存所述主用户设备对应的随机密钥。所述设备账号信息包括所述主用户设备的标识id mst和分配给所述主用户设备的随机密钥k mst,即分配给所述主用户设备的第一个随机密钥。
例如,所述AP生成所述随机密钥k mst后,在Linux***中的设备-账户(device-account,DEV-ACCT)文件中添加如下记录项:
DEV-ACCT=DEV-ACCTV{id mst,k mst,k' mst}
所述记录项表示存储的所述k mst和k' mst是主用户设备的随机密钥,其中,所述id mst为主用户设备的标识,所述k mst为所述AP最新分配给所述主用户设备的随机密钥,也可以称为新密钥,所述k' mst为所述AP在所述k mst之前分配给所述主用户设备的随机密钥,也可以称为旧密钥。当所述k mst为初始随机密钥时,所述k' mst取值为空。
上述方式中,将用户设备的标识与AP分配给所述用户设备的随机密钥绑定存储,所述AP可根据所述标识,从保存的至少一组账号数据中,查询到所述用户设备的随机密钥。
本申请实施例中,所述用户设备的标识为能够唯一确定所述用户设备的身份认证信息,例如可以为所述用户设备的MAC地址等。
在本申请一些实施例中,所述主用户设备采用所述设定口令进行认证并接入所述AP后,所述AP设置所述设定口令无效,则其它用户设备再利用所述设定口令进行接入认证时,所述AP不会认证通过。
S704:所述AP向所述主用户设备发送所述初始随机密钥。
S705:所述主用户设备保存所述初始随机密钥。
所述主用户设备接收到所述AP分配的所述初始随机密钥后,保存所述初始随机密钥。 所述主用户设备下次接入所述AP时,不再根据上述流程,利用设定口令进行认证,而是利用所述初始随机密钥进行认证。
在本申请一些实施例中,允许用户根据实际需求,将所述主用户设备从最先连接AP的用户设备切换为其它用户设备。所述AP根据用户指示确定更换主用户设备时,可重置***,激活所述设定口令,同时删除已存储的主用户设备的账号信息;并将采用所述设定口令进行认证的用户设备确定为新的主用户设备,重新生成所述新的主用户设备的账号信息。
图7b为本申请实施例提供的一种主用户设备初次接入AP的方法的示例性示意图。
示例性的,上述图7a所示的接入方法的一种实现方式可参照图7b所示的方法。具体的,AP在出厂时安全保存一个出厂口令w。用户设备接入所述AP时,根据获取到的所述w和所述AP执行PAKE协议规定的流程,建立安全通道;或者所述用户设备直接将所述w传送给所述AP进行验证。随后所述用户设备成为主用户设备(master supplicant),所述AP为所述主用户设备生成随机密钥k mst,并和所述主用户设备的标识id mst一起发送给所述主用户设备,同时,所述AP将所述k mst和id mst添加到账号文件DEV-ACCT=DEV-ACCTV{id mst,k mst,k' mst}中进行保存,并设置所述w无效。
本申请实施例中,上述各实例所提供的主用户设备接入AP的方法也可以称为主设备确定流程或主设备确定协议等。
实例二
本实施例中,非主用户设备如需接入AP使用网络,需向主用户设备发送接入授权请求,由所述主用户设备向所述AP发送所述接入授权请求,所述AP通过请求后为所述非主用户设备分配初始随机密钥,并通过所述主用户设备转发给所述非主用户设备。所述非主用户设备保存分配到的初始随机密钥,以在下次接入所述AP时使用。
图8a为本申请实施例提供的一种非主用设备初次接入AP的方法示意图。如图8a所示,所述方法包括:
S801:主用户设备与AP建立连接。
S802:非主用户设备向主用户设备发送接入授权请求。
非主用户设备确定接入AP时,向主用户设备发送所述接入授权请求,其中,所述接入授权请求携带所述非主用户设备的标识。
S803:所述主用户设备将接收到的所述接入授权请求转发给所述AP。
所述主用户设备接收到所述接入授权请求后,若确定授权,则将所述接入授权请求转发给所述AP。其中,所述主用户设备可以根据用户指示确定是否授权。
S804,所述AP若允许所述非主用户设备接入,则生成并保存所述非主用户设备对应的初始随机密钥。
本实施例中,所述AP为所述非主用户设备分配的随机密钥为高熵值密钥。所述AP为所述非主用户设备分配随机密钥后,建立所述非主用户设备对应的设备账号信息。所述设备账号信息包括所述非主用户设备的标识id T和分配给所述非主用户设备的随机密钥k T,即分配给所述主用户设备的第一个随机密钥。
例如,所述AP生成所述随机密钥k T后,在Linux***中的T-ACCT文件中添加如下记录项:
DEV-ACCT=DEV-ACCTV{id T,k T,k' T}
所述记录项表示存储的所述k T和k' T是非主用户设备的随机密钥,其中,所述id T为非主用户设备的标识,所述k T为所述AP最新分配给所述非主用户设备的随机密钥,也可以称为新密钥,所述k' T为所述AP在所述k T之前分配给所述非主用户设备的随机密钥,也可以称为旧密钥。当所述k T为初始随机密钥时,所述k' T取值为空。
S805,所述AP向所述主用户设备发送所述初始随机密钥,并指示所述主用户设备将所述初始随机密钥转发给所述非主用户设备。
S806:所述主用户设备将接收到的所述初始随机密钥发送给所述非主用户设备。
S807:所述非主用户设备保存所述初始随机密钥。
所述非主用户设备接收到所述AP分配的所述初始随机密钥后,保存所述初始随机密钥。所述非主用户设备下次接入所述AP时,利用所述初始随机密钥进行认证。
上述实施例中,通过将接入AP的用户设备分为主用户设备和非主用户设备,所述非主用户设备与所述AP的信息交互通过所述主用户设备的转发完成,能够避免所述AP与一些用户设备间的直接交互,从而减少低熵值口令(即所述设定口令)的使用次数,降低口令泄露的风险。
图8b为本申请实施例提供的一种非主用户设备初次接入AP的方法的示例性示意图。
示例性的,上述图8a所示的接入方法的一种实现方式可参照图8b所示的方法。具体的,主用户设备通过上述图7b所示的设备认证协议连接AP并建立安全通信信道道后,后续连接所述AP的用户设备均为非主用户设备,所述非主用户设备接入所述AP时,先向所述主用户设备请求授权;所述主用户设备若确定授权,则向所述AP发送授权请求。其中,所述授权请求携带所述非主用户设备的标识,如可以为所述非主用户设备的MAC地址等。然后所述AP为所述非主用户设备生成随机口令k T,也可以生成所述非主用户设备的标识id T(例如在使用的标识不是设备的MAC地址的情况下),并将所述k T和id T发送给主用户设备,由所述主用户设备转发给所述非主用户设备。同时,所述AP将所述k T和id T添加到账号文件DEV-ACCT=DEV-ACCTV{id T,k T,k' T}中进行保存。
本申请实施例中,上述各实例所提供的非主用户设备接入AP的方法也可以称为设备授权流程或设备授权协议等。
上述本申请提供的实施例中,从AP和用户设备作为执行主体的角度对本申请实施例提供的方法进行了介绍。为了实现上述本申请实施例提供的方法中的各功能,AP和用户设备可以包括硬件结构和/或软件模块,以硬件结构、软件模块、或硬件结构加软件模块的形式来实现上述各功能。上述各功能中的某个功能以硬件结构、软件模块、还是硬件结构加软件模块的方式来执行,取决于技术方案的特定应用和设计约束条件。
基于相同的构思,本申请还提供一种通信装置,用于实现本申请实施例提供的AP或用户设备的功能。图9所示为本申请提供的一种装置900,该装置900可以是AP,也可以是AP中的芯片或芯片***;或者,该装置900可以是用户设备,也可以是用户设备中的芯片或芯片***。
在本申请一些实施例中,所述通信装置还可以是能够执行本申请提供的WiFi安全认证方法的终端设备、网络设备、电子设备,或者芯片、集成电路等结构。
示例性的,所述装置900包括收发器901和至少一个处理器902。其中,所述处理器 902和所述收发器901耦合,本申请实施例中的耦合是装置、单元或模块之间的间接耦合或通信连接,可以是电性,机械或其它的形式,用于装置、单元或模块之间的信息交互。
具体的,所述收发器901可以是电路、总线、通信接口或者其它任意可以用于进行信息交互的模块,可用于接收或发送信息。
可选的,所述通信装置还可以包括存储器903,所述存储器903与所述收发器901和所述处理器902耦合,用于存储程序指令。
所述处理器902用于调用存储器903中存储的程序指令,使得装置900执行本申请实施例提供的WiFi安全认证方法中由AP或者用户设备所执行的步骤,从而实现用户设备接入AP的认证。
所述收发器901用于接收和发送射频信号,耦合于通信装置900的接收器和发射器。所述收发器901通过射频信号与通信网络和其它通信设备通信,如以太网(Ethernet),无线接入网(Radio Access Technology,RAN),无线局域网Wireless Local Area Networks,WLAN)等。具体实现中,所述收发器901支持的通信协议至少包括WiFi协议,还可以包括:2G/3G、长期演进(Long Term Evolution,LTE)、5G新无线(New Radio,NR)等等。
具体实现中,所述存储器903可包括高速随机存取的存储器,并且也可包括非易失性存储器,例如一个或多个磁盘存储设备、闪存设备或其他非易失性固态存储设备。所述存储器902可以存储操作***(下述简称***),例如ANDROID,IOS,WINDOWS,或者LINUX等嵌入式操作***。所述存储器903可用于存储本申请实施例的实现程序。所述存储器903还可以存储网络通信程序,该网络通信程序可用于与一个或多个附加设备,一个或多个用户设备,一个或多个网络设备进行通信。
所述处理器902可以是一个通用中央处理器(Central Processing Unit,CPU),微处理器,特定应用集成电路(Application-Specific Integrated Circuit,ASIC),或一个或多个用于控制本申请方案程序执行的集成电路。
在一些实施例中,所述通信装置900还可以包括输出设备904和输入设备905。输出设备904和处理器902通信,可以以多种方式来显示信息。例如,输出设备904可以是液晶显示器(Liquid Crystal Display,LCD),发光二级管(Light Emitting Diode,LED)显示设备,阴极射线管(Cathode Ray Tube,CRT)显示设备,或投影仪(projector)等。输入设备905和处理器902通信,可以以多种方式接收用户的输入。例如,输入设备905可以是鼠标、键盘、触摸屏设备或传感设备等。为了便于输出设备904和输入设备905的用户使用,在一些实施例中,所述存储器903还可以存储用户接口程序,该用户接口程序可以通过图形化的操作界面将应用程序的内容形象逼真的显示出来,并通过菜单、对话框以及按键等输入控件接收用户对应用程序的控制操作。
当图9所示的通信装置900实现为图3所示的AP时,通信装置900的存储器中可以存储一个或多个软件模块,可用于提供接入认证请求、认证密钥计算、接入认证响应等功能,具体可参考上述方法实施例。当图9所示的通信装置900实现为图3所示的用户设备时,通信装置900的存储器中可以存储一个或多个软件模块,可用于提供生成用户设备的随机密钥、认证密钥计算、用户设备接入认证等功能,具体可参考上述方法实施例。
在一个示例中,当该通信装置900实现为AP时,所述收发器901,用于接收来自用户设备的第一接入请求,所述第一接入请求携带第一参数,所述第一参数为所述用户设备根据设定循环群的生成元和第一随机数生成的参数;所述处理器902,与所述收发器901 耦合,并与所述收发器901协作,用于生成第二随机数,并根据所述第二随机数和所述设定循环群的生成元生成第二参数,并向所述用户设备发送所述第二参数,以使所述用户设备根据所述第二参数生成第一配对主密钥,其中,所述第二随机数为不大于所述设定循环群的阶数的正整数;根据所述第二随机数、所述第一参数、所述第二参数和所述第一目标随机密钥,生成第二配对主密钥;根据所述第一配对主密钥和所述第二配对主密钥,与所述用户设备进行四路握手认证流程。
在一种可能的设计中,所述处理器902与所述收发器901协作,还用于:在与所述用户设备进行四路握手认证流程过程中,若确定所述第二配对主密钥与所述第一配对主密钥不同,则根据所述第二随机数、所述第一参数、所述第二参数和所述第二目标随机密钥,生成第三配对主密钥,其中,所述第二目标随机密钥为在所述第一目标随机密钥前分配给所述用户设备的随机密钥;根据所述第三配对主密钥,与所述用户设备进行四路握手认证流程。
在一种可能的设计中,所述处理器902与所述收发器901协作,还用于:在与所述用户设备进行四路握手认证流程成功之后,为所述用户设备分配新的随机密钥,并保存所述新的随机密钥。
在一种可能的设计中,所述第一接入请求中还包含所述用户设备的标识;在所述收发器901接收来自用户设备的第一接入请求之后、在所述处理器902与所述收发器901协作,根据所述第二随机数生成第二参数之前,所述收发器901与所述处理器902协作,还用于:根据所述用户设备的标识,生成验证标签Token,并向所述用户设备发送所述Token;
接收来自所述用户设备的第二接入请求,并确定所述第二接入请求携带所述Token。
在一种可能的设计中,所述处理器902与所述收发器901协作,具体用于:根据所述第二随机数和所述第一参数生成第三参数;根据所述第一参数、所述第二参数、所述第三参数、所述用户设备的标识、所述AP的标识及所述第一目标随机密钥,通过设定的密钥推演函数计算得到所述第二配对主密钥。
在一种可能的设计中,在所述收发器901接收来自用户设备的第一接入请求之前,所述处理器902与所述收发器901协作,还用于:根据设定口令,与所述用户设备进行PAKE流程;在与所述用户设备进行所述PAKE流程成功之后,为所述用户设备分配初始随机密钥;或者,接收来自所述用户设备的接入授权请求,所述接入授权请求用于请求接入所述AP;对所述用户设备进行授权,授权通过后为所述用户设备分配初始随机密钥;保存所述初始随机密钥。
在一种可能的设计中,所述收发器901具体用于:接收主用户设备转发的来自所述用户设备的所述第一接入请求;其中,所述主用户设备为最先接入所述AP的用户设备,或者为设定的用户设备。
在另一个示例中,当该通信装置900实现为用户设备时,所述处理器902用于生成第一随机数,并根据所述第一随机数和所述设定循环群的生成元生成第一参数;所述收发器901,耦合至所述处理器902,用于向接入的AP发送第一接入请求,所述第一接入请求携带所述第一参数,以使所述AP根据所述第一参数生成第二配对主密钥;接收来自所述AP的第二参数,所述第二参数为所述AP根据所述设定循环群的生成元和第二随机数生成的参数;所述处理器902还用于根据所述第一随机数、所述第一参数、所述第二参数和第三目标随机密钥,生成所述第一配对主密钥,其中,所述第三目标随机密钥为保存的所述AP 最新分配的随机密钥;所述处理器902与所述收发器901协作,还用于根据所述第一配对主密钥和所述第二配对主密钥,与所述AP进行四路握手认证流程。
在一种可能的设计中,所述收发器901还用于:在与所述AP进行四路握手认证流程成功之后,接收所述用户设备分配的新的随机密钥,并保存所述新的随机密钥。
在一种可能的设计中,所述第一接入请求中还包含所述用户设备的标识;在所述收发器901向AP发送第一接入请求之后、在所述收发器901接收来自所述AP的第二参数之前,所述收发器901还用于:接收来自所述AP的Token;向所述AP发送第二接入请求,所述第二接入请求携带所述Token。
在一种可能的设计中,所述处理器具体用于:根据所述第一随机数和所述第二参数生成第三参数;根据所述第一参数、所述第二参数、所述第三参数、所述用户设备的标识、所述AP的标识及所述第三目标随机密钥,通过设定的密钥推演函数计算得到所述第一配对主密钥。
在一种可能的设计中,在所述处理器902生成第一随机数之前,所述处理器902与所述收发器901协作,还用于:根据设定口令,与所述AP进行PAKE流程;接收所述AP分配的初始随机密钥;或者,向所述AP发送接入授权请求,所述接入授权请求用于请求接入所述AP;接收所述AP分配的初始随机密钥。
在一种可能的设计中,所述收发器901具体用于:通过主用户设备转发向所述AP发送所述第一接入请求;其中,所述主用户设备为最先接入所述AP的用户设备,或者为设定的用户设备。
在一种可能的设计中,所述通信装置还包括存储器,耦合至所述处理器,用于存储程序,所述程序用于提供给所述处理器执行。
需要说明的,图9仅仅是本申请实施例的一种实现方式,实际应用中,通信装置900还可以包括更多或更少的部件,这里不作限制。
基于相同的构思,本申请还提供一种通信装置,用于实现本申请实施例提供的AP或用户设备的功能。图10所示为本申请提供的一种装置1000,该装置1000可以是AP,也可以是AP中的芯片或芯片***;或者,该装置1000可以是用户设备,也可以是用户设备中的芯片或芯片***。
具体的,所述通信装置1000包括收发模块1001和处理模块1002。其中,所述收发模块1001用于接收外部设备发送的数据和用于向外部设备发送数据。
所述装置1000作为AP时,所述收发模块1001与所述处理模块1002配合,可用于执行本申请实施例提供的WiFi安全认证方法中由AP所执行的步骤,以实现接入认证。
所述装置1000作为用户设备时,所述收发模块1001与所述处理模块1002配合,可用于执行本申请实施例提供的WiFi安全认证方法中由用户设备所执行的步骤,以实现接入认证。
本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,另外,在本申请各个实施例中的各功能模块可以集成在一个处理器中,例如可以集成在如图9所示的通信装置900的处理器902中,也可以是单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。
如图11所示,本申请实施例还提供了一种通信***1100,包括通信装置1101和通信装置1102。其中,所述通信装置1101用于执行本申请实施例提供的WiFi安全认证方法中由AP所执行的步骤,所述通信装置1102用于执行本申请实施例提供的WiFi安全认证方法中由用户设备所执行的步骤。
本申请一些实施例中,所述通信***1100还可以包括通信装置1103,则所述通信装置1101用于执行本申请实施例提供的WiFi安全认证方法中由AP所执行的步骤,所述通信装置1102用于执行本申请实施例提供的WiFi安全认证方法中由主用户设备所执行的步骤,所述通信装置1103用于执行本申请实施例提供的WiFi安全认证方法中由非主用户设备所执行的步骤。
基于以上实施例,本申请实施例还提供一种计算机可读存储介质,所述计算机存储介质存储有计算机程序,当所述计算机程序在通信装置上运行时,使得通信装置执行以上实施例提供的WiFi安全认证方法。
基于以上实施例,本申请实施例还提供一种计算机程序产品,当所述计算机程序产品在通信装置上运行时,使得通信装置执行以上实施例提供的WiFi安全认证方法。
基于以上实施例,本申请实施例还提供一种芯片,所述芯片用于读取存储器中存储的计算机程序,执行以上实施例提供的WiFi安全认证方法。
基于以上实施例,本申请实施例还提供一种芯片***,所述芯片***包括处理器,用于支持通信装置实现以上实施例提供的WiFi安全认证方法。
在一种可能的设计中,所述芯片***还包括存储器,所述存储器用于存储所述计算机装置必要的程序和数据。
在一种可能的设计中,所述芯片***由芯片构成,或者包含芯片和其他分立器件。
本领域内的技术人员应明白,本申请的实施例可提供为方法、***、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请的方法、设备(***)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机 或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的保护范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。

Claims (30)

  1. 一种WiFi安全认证方法,其特征在于,应用于接入点AP,包括:
    接收来自用户设备的第一接入请求,所述第一接入请求携带第一参数,所述第一参数为所述用户设备根据设定循环群的生成元和第一随机数生成的参数;
    生成第二随机数,并根据所述第二随机数和所述设定循环群的生成元生成第二参数,并向所述用户设备发送所述第二参数,以使所述用户设备根据所述第二参数生成第一配对主密钥,其中,所述第二随机数为不大于所述设定循环群的阶数的正整数;
    根据所述第二随机数、所述第一参数、所述第二参数和第一目标随机密钥,生成第二配对主密钥,其中,所述第一目标随机密钥为最新分配给所述用户设备的随机密钥;
    根据所述第一配对主密钥和所述第二配对主密钥,与所述用户设备进行四路握手认证流程。
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    在与所述用户设备进行四路握手认证流程过程中,若确定所述第二配对主密钥与所述第一配对主密钥不同,则根据所述第二随机数、所述第一参数、所述第二参数和所述第二目标随机密钥,生成第三配对主密钥,其中,所述第二目标随机密钥为在所述第一目标随机密钥前分配给所述用户设备的随机密钥;
    根据所述第三配对主密钥,与所述用户设备进行四路握手认证流程。
  3. 根据权利要求1或2所述的方法,其特征在于,所述方法还包括:
    在与所述用户设备进行四路握手认证流程成功之后,为所述用户设备分配新的随机密钥,并保存所述新的随机密钥。
  4. 根据权利要求1~3任一所述的方法,其特征在于,所述第一接入请求中还包含所述用户设备的标识;在接收来自用户设备的第一接入请求之后、在根据所述第二随机数生成第二参数之前,所述方法还包括:
    根据所述用户设备的标识,生成验证标签Token,并向所述用户设备发送所述Token;
    接收来自所述用户设备的第二接入请求,并确定所述第二接入请求携带所述Token。
  5. 根据权利要求1~4任一所述的方法,其特征在于,根据所述第二随机数、所述第一参数、所述第二参数和所述第一目标随机密钥,生成第二配对主密钥,包括:
    根据所述第二随机数和所述第一参数生成第三参数;
    根据所述第一参数、所述第二参数、所述第三参数、所述用户设备的标识、所述AP的标识及所述第一目标随机密钥,通过设定的密钥推演函数计算得到所述第二配对主密钥。
  6. 根据权利要求1~5任一所述的方法,其特征在于,在接收来自用户设备的第一接入请求之前,所述方法还包括:
    根据设定口令,与所述用户设备进行基于口令的身份认证和密钥交换PAKE流程;在与所述用户设备进行所述PAKE流程成功之后,为所述用户设备分配初始随机密钥;或者接收来自所述用户设备的接入授权请求,所述接入授权请求用于请求接入所述AP;对所述用户设备进行授权,授权通过后为所述用户设备分配初始随机密钥;
    保存所述初始随机密钥。
  7. 根据权利要求1~6任一所述的方法,其特征在于,所述接收来自用户设备的第一接入请求,包括:
    接收主用户设备转发的来自所述用户设备的所述第一接入请求;
    其中,所述主用户设备为最先接入所述AP的用户设备,或者为设定的用户设备。
  8. 一种WiFi安全认证方法,其特征在于,应用于用户设备,包括:
    生成第一随机数,并根据所述第一随机数和所述设定循环群的生成元生成第一参数,其中,所述第一随机数为不大于所述设定循环群的阶数的正整数;
    向接入的AP发送第一接入请求,所述第一接入请求携带所述第一参数,以使所述AP根据所述第一参数生成第二配对主密钥;
    接收来自所述AP的第二参数,所述第二参数为所述AP根据所述设定循环群的生成元和第二随机数生成的参数;
    根据所述第一随机数、所述第一参数、所述第二参数和第三目标随机密钥,生成所述第一配对主密钥,其中,所述第三目标随机密钥为保存的所述AP最新分配的随机密钥;
    根据所述第一配对主密钥和所述第二配对主密钥,与所述AP进行四路握手认证流程。
  9. 根据权利要求8所述的方法,其特征在于,所述方法还包括:
    在与所述AP进行四路握手认证流程成功之后,接收所述用户设备分配的新的随机密钥,并保存所述新的随机密钥。
  10. 根据权利要求8或9所述的方法,其特征在于,所述第一接入请求中还包含所述用户设备的标识;在向AP发送第一接入请求之后、在接收来自所述AP的第二参数之前,所述方法还包括:
    接收来自所述AP的Token;
    向所述AP发送第二接入请求,所述第二接入请求携带所述Token。
  11. 根据权利要求8~10任一所述的方法,其特征在于,根据所述第一随机数、所述第一参数、所述第二参数和第三目标随机密钥,生成所述第一配对主密钥,包括:
    根据所述第一随机数和所述第二参数生成第三参数;
    根据所述第一参数、所述第二参数、所述第三参数、所述用户设备的标识、所述AP的标识及所述第三目标随机密钥,通过设定的密钥推演函数计算得到所述第一配对主密钥。
  12. 根据权利要求8~11任一所述的方法,其特征在于,在生成第一随机数之前,所述方法还包括:
    根据设定口令,与所述AP进行PAKE流程;接收所述AP分配的初始随机密钥;或者
    向所述AP发送接入授权请求,所述接入授权请求用于请求接入所述AP;接收所述AP分配的初始随机密钥。
  13. 根据权利要求8~12任一所述的方法,其特征在于,所述向AP发送第一接入请求,包括:
    通过主用户设备转发向所述AP发送所述第一接入请求;
    其中,所述主用户设备为最先接入所述AP的用户设备,或者为设定的用户设备。
  14. 一种通信装置,其特征在于,包括收发器和处理器:
    所述收发器,用于接收来自用户设备的第一接入请求,所述第一接入请求携带第一参数,所述第一参数为所述用户设备根据设定循环群的生成元和第一随机数生成的参数;
    所述处理器,与所述收发器耦合,并与所述收发器协作,用于生成第二随机数,并根据所述第二随机数生成第二参数,并向所述用户设备发送所述第二参数,以使所述用户设 备根据所述第二参数生成第一配对主密钥,其中,所述第二随机数为不大于所述设定循环群的阶数的正整数;
    根据所述第二随机数、所述第一参数、所述第二参数和所述第一目标随机密钥,生成第二配对主密钥,其中,所述第一目标随机密钥为最新分配给所述用户设备的随机密钥;
    根据所述第一配对主密钥和所述第二配对主密钥,与所述用户设备进行四路握手认证流程。
  15. 根据权利要求14所述的通信装置,其特征在于,所述处理器与所述收发器协作,还用于:
    在与所述用户设备进行四路握手认证流程过程中,若确定所述第二配对主密钥与所述第一配对主密钥不同,则根据所述第二随机数、所述第一参数、所述第二参数和所述第二目标随机密钥,生成第三配对主密钥,其中,所述第二目标随机密钥为在所述第一目标随机密钥前分配给所述用户设备的随机密钥;
    根据所述第三配对主密钥,与所述用户设备进行四路握手认证流程。
  16. 根据权利要求14或15所述的通信装置,其特征在于,所述处理器与所述收发器协作,还用于:
    在与所述用户设备进行四路握手认证流程成功之后,为所述用户设备分配新的随机密钥,并保存所述新的随机密钥。
  17. 根据权利要求14~16任一所述的通信装置,其特征在于,所述第一接入请求中还包含所述用户设备的标识;在所述收发器接收来自用户设备的第一接入请求之后、在所述处理器与所述收发器协作,根据所述第二随机数生成第二参数之前,所述收发器与所述处理器协作,还用于:
    根据所述用户设备的标识,生成验证标签Token,并向所述用户设备发送所述Token;
    接收来自所述用户设备的第二接入请求,并确定所述第二接入请求携带所述Token。
  18. 根据权利要求14~17任一所述的通信装置,其特征在于,所述处理器与所述收发器协作,具体用于:
    根据所述第二随机数和所述第一参数生成第三参数;
    根据所述第一参数、所述第二参数、所述第三参数、所述用户设备的标识、所述AP的标识及所述第一目标随机密钥,通过设定的密钥推演函数计算得到所述第二配对主密钥。
  19. 根据权利要求14~18任一所述的通信装置,其特征在于,在所述收发器接收来自用户设备的第一接入请求之前,所述处理器与所述收发器协作,还用于:
    根据设定口令,与所述用户设备进行PAKE流程;在与所述用户设备进行所述PAKE流程成功之后,为所述用户设备分配初始随机密钥;或者
    接收来自所述用户设备的接入授权请求,所述接入授权请求用于请求接入所述AP;对所述用户设备进行授权,授权通过后为所述用户设备分配初始随机密钥;
    保存所述初始随机密钥。
  20. 根据权利要求14~19任一所述的通信装置,其特征在于,所述收发器具体用于:
    接收主用户设备转发的来自所述用户设备的所述第一接入请求;
    其中,所述主用户设备为最先接入所述AP的用户设备,或者为设定的用户设备。
  21. 一种通信装置,其特征在于,包括收发器和处理器:
    所述处理器用于生成第一随机数,并根据所述第一随机数生成第一参数,其中,所述 第一随机数为不大于所述设定循环群的阶数的正整数;
    所述收发器,耦合至所述处理器,用于向接入的AP发送第一接入请求,所述第一接入请求携带所述第一参数,以使所述AP根据所述第一参数生成第二配对主密钥;接收来自所述AP的第二参数,所述第二参数为所述AP根据所述设定循环群的生成元和第二随机数生成的参数;
    所述处理器还用于根据所述第一随机数、所述第一参数、所述第二参数和第三目标随机密钥,生成所述第一配对主密钥,其中,所述第三目标随机密钥为保存的所述AP最新分配的随机密钥;
    所述处理器与所述收发器协作,还用于根据所述第一配对主密钥和所述第二配对主密钥,与所述AP进行四路握手认证流程。
  22. 根据权利要求21所述的通信装置,其特征在于,所述收发器还用于:
    在与所述AP进行四路握手认证流程成功之后,接收所述用户设备分配的新的随机密钥,并保存所述新的随机密钥。
  23. 根据权利要求21或22所述的通信装置,其特征在于,所述第一接入请求中还包含所述用户设备的标识;在所述收发器向AP发送第一接入请求之后、在所述收发器接收来自所述AP的第二参数之前,所述收发器还用于:
    接收来自所述AP的Token;
    向所述AP发送第二接入请求,所述第二接入请求携带所述Token。
  24. 根据权利要求21~23任一所述的通信装置,其特征在于,所述处理器具体用于:
    根据所述第一随机数和所述第二参数生成第三参数;
    根据所述第一参数、所述第二参数、所述第三参数、所述用户设备的标识、所述AP的标识及所述第三目标随机密钥,通过设定的密钥推演函数计算得到所述第一配对主密钥。
  25. 根据权利要求21~24任一所述的通信装置,其特征在于,在所述处理器生成第一随机数之前,所述处理器与所述收发器协作,还用于:
    根据设定口令,与所述AP进行PAKE流程;接收所述AP分配的初始随机密钥;或者
    向所述AP发送接入授权请求,所述接入授权请求用于请求接入所述AP;接收所述AP分配的初始随机密钥。
  26. 根据权利要求21~25任一所述的通信装置,其特征在于,所述收发器具体用于:
    通过主用户设备转发向所述AP发送所述第一接入请求;
    其中,所述主用户设备为最先接入所述AP的用户设备,或者为设定的用户设备。
  27. 一种通信装置,其特征在于,包括收发模块和处理模块,所述收发模块与所述处理模块协作,用于实现如权利要求1~7任一所述的方法。
  28. 一种通信装置,其特征在于,包括收发模块和处理模块,所述收发模块与所述处理模块协作,用于实现如权利要求8~13任一所述的方法。
  29. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机可读程序,当所述计算机可读程序在通信装置上运行时,使得所述通信装置执行如权利要求1~7任一所述的方法,或执行如权利要求8~13任一所述的方法。
  30. 一种计算机程序产品,其特征在于,当所述计算机程序产品在通信装置上运行时,使得所述通信装置执行如权利要求1~7任一所述的方法,或执行如权利要求8~13任一所 述的方法。
PCT/CN2020/133644 2020-12-03 2020-12-03 一种WiFi安全认证方法及通信装置 WO2022116092A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
CN202080107500.9A CN116530117A (zh) 2020-12-03 2020-12-03 一种WiFi安全认证方法及通信装置
PCT/CN2020/133644 WO2022116092A1 (zh) 2020-12-03 2020-12-03 一种WiFi安全认证方法及通信装置
EP20963939.2A EP4250791A4 (en) 2020-12-03 2020-12-03 WIFI SECURITY AUTHENTICATION METHOD AND COMMUNICATION DEVICE
US18/327,906 US20230308875A1 (en) 2020-12-03 2023-06-02 Wi-fi security authentication method and communication apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/133644 WO2022116092A1 (zh) 2020-12-03 2020-12-03 一种WiFi安全认证方法及通信装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/327,906 Continuation US20230308875A1 (en) 2020-12-03 2023-06-02 Wi-fi security authentication method and communication apparatus

Publications (1)

Publication Number Publication Date
WO2022116092A1 true WO2022116092A1 (zh) 2022-06-09

Family

ID=81853745

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/133644 WO2022116092A1 (zh) 2020-12-03 2020-12-03 一种WiFi安全认证方法及通信装置

Country Status (4)

Country Link
US (1) US20230308875A1 (zh)
EP (1) EP4250791A4 (zh)
CN (1) CN116530117A (zh)
WO (1) WO2022116092A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115348574A (zh) * 2022-10-18 2022-11-15 浙江大华技术股份有限公司 无线终端的漫游方法、电子设备以及存储介质
CN116094852A (zh) * 2023-04-13 2023-05-09 深圳开鸿数字产业发展有限公司 设备的管理方法、管理装置、计算机设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160309384A1 (en) * 2013-12-27 2016-10-20 Huawei Technologies Co., Ltd. Offloading method, user equipment, base station, and access point
CN106792687A (zh) * 2016-12-14 2017-05-31 上海斐讯数据通信技术有限公司 移动终端wifi网络的连接方法及***
US20180020353A1 (en) * 2016-07-15 2018-01-18 Avago Technologies General Ip (Singapore) Pte. Ltd Enhanced secure provisioning for hotspots
CN110087240A (zh) * 2019-03-28 2019-08-02 中国科学院计算技术研究所 基于wpa2-psk模式的无线网络安全数据传输方法及***

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160309384A1 (en) * 2013-12-27 2016-10-20 Huawei Technologies Co., Ltd. Offloading method, user equipment, base station, and access point
US20180020353A1 (en) * 2016-07-15 2018-01-18 Avago Technologies General Ip (Singapore) Pte. Ltd Enhanced secure provisioning for hotspots
CN106792687A (zh) * 2016-12-14 2017-05-31 上海斐讯数据通信技术有限公司 移动终端wifi网络的连接方法及***
CN110087240A (zh) * 2019-03-28 2019-08-02 中国科学院计算技术研究所 基于wpa2-psk模式的无线网络安全数据传输方法及***

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
See also references of EP4250791A4 *
SHEN XIANG-XIU, LI YONG-ZHONG: "Research and Optimization of WiFi Router Security", COMMUNICATIONS TECHNOLOGY, vol. 51, no. 1, 10 January 2018 (2018-01-10), CN , pages 195 - 199, XP055937140, ISSN: 1002-0802, DOI: 10.3969/j.issn.1002-0802.2018.01.034 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115348574A (zh) * 2022-10-18 2022-11-15 浙江大华技术股份有限公司 无线终端的漫游方法、电子设备以及存储介质
CN115348574B (zh) * 2022-10-18 2023-02-10 浙江大华技术股份有限公司 无线终端的漫游方法、电子设备以及存储介质
CN116094852A (zh) * 2023-04-13 2023-05-09 深圳开鸿数字产业发展有限公司 设备的管理方法、管理装置、计算机设备及存储介质

Also Published As

Publication number Publication date
EP4250791A1 (en) 2023-09-27
US20230308875A1 (en) 2023-09-28
CN116530117A (zh) 2023-08-01
EP4250791A4 (en) 2023-09-27

Similar Documents

Publication Publication Date Title
US11496320B2 (en) Registration method and apparatus based on service-based architecture
CN111669276B (zh) 一种网络验证方法、装置及***
US10516654B2 (en) System, apparatus and method for key provisioning delegation
EP3700124B1 (en) Security authentication method, configuration method, and related device
WO2019041802A1 (zh) 基于服务化架构的发现方法及装置
US20230308875A1 (en) Wi-fi security authentication method and communication apparatus
CN104145465A (zh) 机器类型通信中基于群组的自举
EP2993933B1 (en) Wireless terminal configuration method, apparatus and wireless terminal
JP7237200B2 (ja) パラメータ送信方法及び装置
CN112449323B (zh) 一种通信方法、装置和***
US20230327857A1 (en) Communication Method and Apparatus
CN113364584B (zh) 一种物联网设备与雾节点认证***和方法
WO2023083170A1 (zh) 密钥生成方法、装置、终端设备及服务器
CN110831002B (zh) 一种密钥推演的方法、装置及计算存储介质
CN111836260B (zh) 一种认证信息处理方法、终端和网络设备
KR101785382B1 (ko) 클라이언트 인증 방법, 클라이언트의 동작 방법, 서버, 및 통신 소프트웨어
WO2017118269A1 (zh) 一种空口标识的保护方法及装置
WO2022109940A1 (zh) 应用于WiFi的安全认证的方法和装置
US20230099065A1 (en) Key obtaining method and related apparatus
WO2022109941A1 (zh) 应用于WiFi的安全认证的方法和装置
US20230164560A1 (en) Bluetooth node pairing method and related apparatus
US20240023175A1 (en) Pairing method and apparatus
WO2019001509A1 (zh) 一种网络鉴权方法及***

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20963939

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 202080107500.9

Country of ref document: CN

ENP Entry into the national phase

Ref document number: 2020963939

Country of ref document: EP

Effective date: 20230619

NENP Non-entry into the national phase

Ref country code: DE