WO2022109940A1 - 应用于WiFi的安全认证的方法和装置 - Google Patents

应用于WiFi的安全认证的方法和装置 Download PDF

Info

Publication number
WO2022109940A1
WO2022109940A1 PCT/CN2020/131854 CN2020131854W WO2022109940A1 WO 2022109940 A1 WO2022109940 A1 WO 2022109940A1 CN 2020131854 W CN2020131854 W CN 2020131854W WO 2022109940 A1 WO2022109940 A1 WO 2022109940A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
parameter
key
random number
password
Prior art date
Application number
PCT/CN2020/131854
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 EP20962831.2A priority Critical patent/EP4236407A4/en
Priority to CN202080107004.3A priority patent/CN116438822A/zh
Priority to PCT/CN2020/131854 priority patent/WO2022109940A1/zh
Publication of WO2022109940A1 publication Critical patent/WO2022109940A1/zh
Priority to US18/323,211 priority patent/US20230308874A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0819Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
    • H04L9/083Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s) involving central third party, e.g. key distribution center [KDC] or trusted third party [TTP]
    • H04L9/0833Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s) involving central third party, e.g. key distribution center [KDC] or trusted third party [TTP] involving conference or group key
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0863Generation of secret information including derivation or calculation of cryptographic keys or passwords involving passwords or one-time passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/30Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy
    • H04L9/3066Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy involving algebraic varieties, e.g. elliptic or hyper-elliptic curves
    • 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]
    • 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
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/80Wireless

Definitions

  • the present application relates to the field of communications, and more particularly, to a method and apparatus for security authentication applied to wireless fidelity (WiFi).
  • WiFi wireless fidelity
  • WiFi is a wireless local area network technology created in the IEEE 802.11 standard, which is widely used in home and public places (such as shopping malls, company interiors, etc.).
  • Security protocols are the foundation of WiFi and control who can use the network.
  • the WiFi security protocol enables the supplicant (supplicant) and the access point (access point, AP) to authenticate each other, and generates a session key (session key) and a group transient key (GTK), where the session key It can be used to protect the unicast communication between the subsequent supplier and the AP, and the multicast key is used to protect the broadcast communication of the AP.
  • supplicant supply point
  • AP access point
  • GTK group transient key
  • both the supplicant and the AP share a password (pw).
  • Both the Supplicant and the AP can derive the pairwise master key (PMK) based on their respective pw, and then both the supplicant and the AP can perform identity authentication and calculate the pairwise transient key (PTK) according to the PMK, and the AP
  • the multicast key can be passed to the supplicant.
  • the PTK includes a temporary key TK, that is, a session key.
  • WiFi protected access 3 WiFi protected access 3, WPA3
  • both the supplicant and the AP can perform simultaneous authentication of equals (SAE), use a shared low-entropy password to achieve mutual authentication and generate a high-entropy shared key to avoid brute force password cracking.
  • SAE simultaneous authentication of equals
  • DoS denial of service
  • the present application provides a method and apparatus for security authentication applied to WiFi, which can help the AP and the first device avoid side-channel attacks during security authentication.
  • a method for security authentication applied to WiFi is provided.
  • the method can be applied to an access point AP, for example, performed by the AP, or a component (eg, a chip or a circuit, etc.) configurable in the AP.
  • the access point AP negotiates the pairing master key PMK with the first device based on the double-base cipher exponential key exchange TBPEKE protocol according to the password, wherein the password is the shared key between the AP and the first device . Then, the AP performs a 4-way handshake with the first device according to the PMK.
  • a PMK with a high entropy value can be generated by executing the TBPEKE process, so that the security authentication method provided by the embodiments of the present application can help resist offline dictionary attacks.
  • the embodiments of the present application since TBPEKE can easily prevent side channel attacks, the embodiments of the present application generate PMKs by executing TBPEKE, which can improve the ability of the AP and the first device to prevent side channel attacks during the WiFi security authentication process, which is helpful. The AP and the first device avoid side channel attacks during security authentication.
  • TBPEKE is also a PAKE protocol.
  • the SAE process in the existing WPA3 security protocol can be replaced with a TBPEKE process to generate a high-entropy PMK.
  • the above-mentioned PMK includes a first PMK1 and a second PMK2.
  • the AP negotiates the pairing master key PMK with the first device based on the double-base cipher exponential key exchange TBPEKE protocol, which can be specifically implemented in the following ways:
  • the first device may send the first parameter X to the AP, and the AP may send the second parameter Y to the first device, where the first parameter X and the second parameter Y are respectively determined according to the hashtocurve function g , the first device can calculate PMK1 according to the first parameter X and the second parameter Y, and the AP can calculate PMK2 according to the first parameter X and the second parameter Y.
  • the first parameter X and the second parameter Y transmitted between the AP and the first device are generated based on the hashtocurve function g and a random number, and do not involve the calculation of the password, so it is difficult for an attacker to know the password , thereby improving the ability of the AP and the first device to prevent side channel attacks during the WiFi security authentication process, and helping the AP and the first device to avoid side channel attacks during security authentication.
  • the access point AP can negotiate the pairing master key PMK with the first device before negotiating the pairing master key PMK with the first device according to the password and based on the double-base cipher exponential key exchange TBPEKE protocol.
  • a security suite to be used is negotiated by associating with the first device, wherein the security suite is used to indicate the hash-to-curve function g.
  • the AP and the first device may perform a 4-way handshake based on the PMK.
  • the AP performs a 4-way handshake with the first device according to the PMK, which may be implemented in the following manner:
  • the AP sends a first message to the first device.
  • the first message is used to instruct the first device to generate a first pairing temporary key PTK1.
  • the first message includes a one-time random number of the AP.
  • the first PTK1 is based on the first PMK1, AP
  • the one-time random number of the first device and the one-time random number of the first device are generated, and the first PTK1 includes the first key confirmation key KCK1, the first key encryption key KEK1 and the first temporary key TK1.
  • the AP obtains a second message from the first device, the second message adopts the first KCK1 to protect the integrity of the message, and the second message includes a one-time random number of the first device.
  • the AP generates a second PTK2 according to the second PMK2, the one-time random number of the AP, and the one-time random number of the first device, and the second PTK2 includes the second KCK2, the second KEK2, and the second TK2. Then, the AP sends a third message to the first device, the third message includes the multicast key GTK, the third message uses the second KEK2 to protect the privacy of the GTK, and the second KCK2 protects the integrity of the message sex. The AP acquires a fourth message from the first device, the fourth message is used to respond to the third message, and the fourth message uses the second KCK2 to protect the integrity of the message.
  • the AP and the first device perform a 4-way handshake process, which can perform identity authentication, and generate a session key and a multicast key to protect the unicast communication between the subsequent requesting device and the AP, and the AP broadcast communications.
  • the AP and the first device can successfully perform a 4-way handshake.
  • the AP and the first device may perform an association before performing the 4-way handshake, and negotiate a security suite to be used.
  • the security suite may be used to indicate the encryption algorithm used in the 4-way handshake process. and other related parameters.
  • association and the 4-way handshake process reference may be made to the description in the prior art, and details are not repeated here.
  • the requesting device may send a first connection request to the AP, which includes the first parameter X.
  • the AP receives the first connection request.
  • the AP may perform the above-mentioned security authentication process with the first device.
  • the AP calculates the second PMK2 according to the first parameter X and the second parameter Y. Specifically, the AP may calculate the second PMK2 according to the first parameter X, the first parameter Two parameters Y, the ID of the first device and the ID of the AP are used to calculate the second PMK2.
  • the AP can calculate PMK2 according to the following formula:
  • PMK2 KDF(Z, id dev
  • Z X y
  • id dev represents the ID of the first device
  • id AP represents the ID of the AP
  • KDF( ) is a standard key derivation function.
  • the ID of the first device may be the MAC address of the first device
  • the ID of the AP may be the MAC address of the AP, which is not limited in this application.
  • the AP may also send a broadcast message, where the broadcast message includes the ID of the AP.
  • the requesting device can receive the broadcast message and obtain the ID of the AP therefrom.
  • the above hash-to-curve function g is expressed as:
  • U and V are respectively two independent random generators obtained from a cyclic group G whose order is a prime number p, and pw represents the password.
  • the hashtocurve function g is the function obtained according to TBPEKE.
  • the broadcast message may further include RSNEwithsupp.ciphers to notify the capability of ciphers.
  • the first device selects matching ciphers, that is, selects a cipher suite supported by itself, so as to obtain the above-mentioned g, or to obtain the related parameters (eg, U, V, etc.) of g.
  • the AP broadcasts RSNEwithsupp.ciphers, and the first device selects the matching ciphers, which can be an example of the security suite to be negotiated between the AP and the first device.
  • the above-mentioned hash-to-curve function g is stored locally in the AP in advance.
  • DoS Denial of Service
  • the above-mentioned second parameter Y is generated by the AP according to the hash-to-curve function g. That is to say, when the AP receives the first parameter X sent by the first device, the AP can generate the second parameter Y according to the pre-stored hash-to-curve function g without generating the hash-to-curve function according to the password pw g.
  • the second parameter Y is determined by the AP by reusing the second parameter Y sent to the second device.
  • the reuse of the second parameter Y by the AP can also be equivalent to the reuse of the random number y by the AP, which is not limited in this application.
  • the AP can avoid the real-time calculation of the second parameter Y when authenticating the device, thereby reducing the amount of calculation on the AP side, thereby helping to reduce or avoid the AP suffered a DoS attack.
  • the AP may also obtain the identification ID of the first device from the first device, and then send the first device to the first device with the ID of the first device.
  • Credentials for anti-DoS services.
  • the credential is determined according to the ID and key k of the first device.
  • the AP receives the credential and the ID of the first device from the first device, and verifies the credential according to the ID and key k of the first device.
  • the AP processes the connection request of the first device.
  • the credential fails the verification, the AP does not process the connection request of the first device.
  • the AP can send the anti-DoS token bound to the ID of the first device to the first device, and the first device needs to send its ID and the token to the AP again, so that the AP can receive
  • the ID of the first device and the corresponding token are verified, and the connection request of the first device is processed only when the token passes the verification, which can help prevent the AP from processing all the connection requests, and then Helps reduce or avoid DoS attacks on APs.
  • the first device may send a second connection request to the AP, which may include the first parameter X, the identification ID of the first device, and the above-mentioned credentials.
  • the AP receives the second connection request.
  • the identification ID of the first device may be the MAC address of the first device.
  • the data frame format of the second connection request may include the MAC address of the first device.
  • the first list before sending the second parameter Y to the first device, it may also be determined that the first list does not include the ID of the first device, where the first The list includes the ID of at least one device connected to the network provided by the AP.
  • the first list may be the DEVinPROC list.
  • the AP will further process the connection request of the first device only when it determines that the ID of the first device is not in the first list, which can help prevent the AP from processing all connection requests , which helps to reduce the amount of computation on the AP side, which in turn helps to reduce or avoid DoS attacks on the AP.
  • the ID of the first device may also be added to the above-mentioned first list.
  • the updating of the first list can be realized. Further, when the connection request containing the ID of the first device is subsequently received, since the ID is already included in the first list, the AP may not process the connection request, thereby helping to reduce or avoid the AP being attacked. cause DoS attacks.
  • a method for security authentication applied to WiFi is provided.
  • the method can be applied to a first device, eg, executed by the first device, or a component (eg, a chip or a circuit, etc.) configurable in the first device.
  • the first device negotiates the pairing master key PMK with the access point AP based on the double-base cipher exponential key exchange TBPEKE protocol according to the password, wherein the password is the AP and the first device shared key between. Then, the first device performs a 4-way handshake with the AP according to the PMK.
  • the PMK includes a first PMK1 and a second PMK2, and the above-mentioned first device communicates with the access device according to the password and based on the double-base cipher exponential key exchange TBPEKE protocol.
  • the point AP negotiates the pairing master key PMK, which can be implemented in the following ways:
  • the first device sends the first parameter X to the AP, where the first parameter X is determined according to the hash-to-curve function g, and the hash-to-curve function g is used to convert the password into an elliptic curve through a point multiplication operation.
  • the first device can also communicate with the AP based on the double-base cipher exponential key exchange TBPEKE protocol according to the password before negotiating the pairing master key PMK with the AP.
  • the AP associates and negotiates a security suite to be used, wherein the security suite is used to indicate the hash-to-curve function g.
  • the first device performs a 4-way handshake with the AP according to the PMK, which may be implemented in the following manner:
  • the first device receives a first message from the AP, where the first message includes the one-time random number of the AP; the first device generates the one-time random number according to the first PMK1, the one-time random number of the AP, and the one-time random number of the first device
  • the first paired temporary key PTK1 includes a first key confirmation key KCK1, a first key encryption key KEK1 and a first temporary key TK1.
  • the first device sends a second message to the AP, the second message uses the first KCK1 to protect the integrity of the message, the second message includes the one-time random number of the first device, and the second message is used to indicate the
  • the AP generates a second PTK2, the second PTK2 is generated according to the second PMK2, the one-time random number of the AP, and the one-time random number of the first device, and the second PTK2 includes the first Two KCK2, second KEK2 and second TK2;
  • the first device obtains a third message from the AP, the third message includes the multicast key GTK, and the third message uses the second KEK2 to protect the privacy of the GTK, using the
  • the second KCK2 is used to protect the integrity of the message;
  • the first device sends a fourth message to the AP, the fourth message is used to respond to the third message, and the fourth message uses a KCK to protect the integrity of the message.
  • the hash-to-curve function g is expressed as:
  • U and V are respectively two independent random generators obtained from a cyclic group G whose order is a prime number p, and pw represents the password.
  • the identification ID of the first device before the receiving the second parameter Y from the AP, the identification ID of the first device may also be sent to the AP, and then the identification ID of the first device may be sent from the AP to the AP.
  • a credential for a Denial of Service DoS service is received, the credential being generated from the key k and the ID of the first device.
  • the credentials and the ID of the requesting device may then be sent to the AP.
  • the ID of the first device includes a MAC address of the first device.
  • an apparatus for security authentication applied to WiFi is provided, which is used to execute the method in the first aspect or any possible implementation manner of the first aspect.
  • the apparatus includes a method for executing the first aspect.
  • the apparatus includes a processing unit and a transceiver unit.
  • the processing unit may negotiate a pairing master key PMK with the first device based on the double-base cipher exponential key exchange TBPEKE protocol according to a password, where the password is a shared key between the AP and the first device.
  • the processing unit may negotiate with the first device through the transceiver unit.
  • the processing unit may also perform a 4-way handshake with the first device according to the PMK.
  • the processing unit may perform a 4-way handshake with the first device through the transceiver unit.
  • the PMK includes a first PMK1 and a second PMK2.
  • the transceiver unit is configured to obtain a first parameter X from the first device, wherein the first parameter X is determined according to a hash-to-curve function g, and the hash-to-curve function g is used for point multiplication
  • the processing unit is configured to calculate the second PMK2 according to the first parameter X and the second parameter Y obtained by the transceiver unit.
  • the processing unit is further configured to associate with the first device and negotiate a security suite to be used, wherein the security suite is used to instruct the Seek to the curve function g.
  • the transceiver unit is configured to send a first message to the first device, where the first message is used to instruct the first device to generate a first pairing temporary key PTK1, and the first message includes a one-time random number of the AP
  • the first PTK1 is generated according to the first PMK1, the one-time random number of the AP, and the one-time random number of the first device, and the first PTK1 includes the first key confirmation password.
  • key KCK1 first key encryption key KEK1 and first temporary key TK1.
  • the transceiver unit is further configured to obtain a second message from the first device, the second message adopts the first KCK1 to protect the integrity of the message, and the second message includes a one-time random number of the first device .
  • the processing unit is further configured to generate the second PTK2 according to the second PMK2, the one-time random number of the AP, and the one-time random number of the first device, where the second PTK2 includes the second KCK2, the first Two KEK2 and a second TK2.
  • the transceiver unit is further configured to send a third message to the first device, where the third message includes a multicast key GTK, the third message uses the second KEK2 to protect the privacy of the GTK, and uses the The second KCK2 is described to protect the integrity of the message.
  • the transceiver unit is further configured to acquire a fourth message from the first device, where the fourth message is used to respond to the third message, and the fourth message uses the second KCK2 to protect the integrity of the message.
  • the hash-to-curve function g is expressed as:
  • U and V are respectively two independent random generators obtained from a cyclic group G whose order is a prime number p, and pw represents the password.
  • the hash-to-curve function g is stored locally in the AP in advance.
  • the second parameter Y is generated by the AP according to the hash-to-curve function g; or the second parameter Y is generated by the AP through the Determined by reuse of the second parameter Y sent to the second device.
  • the transceiving unit is further configured to acquire the identification ID of the first device from the first device, and send a message to the first device for the Credentials of the DoS service, wherein the credentials are determined according to the identification ID of the first device and the key k.
  • the transceiver unit is further configured to acquire the credential and the ID of the first device from the first device.
  • the processing unit is further configured to verify the credential according to the ID of the first device and the key k.
  • the processing unit is further configured to determine that the first list does not include the ID of the first device, wherein the first list includes at least one device connected to the first device.
  • the ID of the network device provided by the AP is further configured to determine that the first list does not include the ID of the first device, wherein the first list includes at least one device connected to the first device. The ID of the network device provided by the AP.
  • the processing unit is further configured to add the ID of the first device to the first list.
  • the ID of the first device includes a MAC address of the first device.
  • a device for security authentication applied to WiFi is provided, which is used to execute the method in the second aspect or any possible implementation manner of the second aspect.
  • the device includes a device for executing the second aspect.
  • the apparatus includes a processing unit and a transceiver unit.
  • the processing unit may negotiate a pairing master key PMK with the access point AP based on the double-base cipher exponential key exchange TBPEKE protocol according to the password, wherein the password is the shared secret between the AP and the first device. key.
  • the processing unit may negotiate with the AP through the transceiver unit.
  • the processing unit may also perform a 4-way handshake with the AP according to the PMK.
  • the processing unit may perform a 4-way handshake with the first device through the transceiver unit.
  • the PMK includes a first PMK1 and a second PMK2.
  • the processing unit is configured to calculate the first PMK1 according to the first parameter X and the second parameter Y.
  • the processing unit is further configured to associate with the AP to negotiate a security suite to be used, wherein the security suite is used to indicate the hash to Curve function g.
  • the transceiver unit is further configured to receive a first message from the AP, where the first message includes a one-time random number of the AP.
  • the processing unit is further configured for the first device to generate a first pairing temporary key PTK1 according to the first PMK1, the one-time random number of the AP, and the one-time random number of the first device, and the first pairing temporary key PTK1.
  • the PTK1 includes a first key confirmation key KCK1, a first key encryption key KEK1 and a first temporary key TK1.
  • the transceiver unit is further configured to send a second message to the AP, where the second message uses the first KCK1 to protect the integrity of the message, and the second message includes a one-time random number of the first device, so the The second message is used to instruct the AP to generate a second PTK2, and the second PTK2 is generated according to the second PMK2, the one-time random number of the AP and the one-time random number of the first device,
  • the second PTK2 includes a second KCK2, a second KEK2 and a second TK2.
  • the transceiver unit is further configured to obtain a third message from the AP, where the third message includes a multicast key GTK, the third message uses the second KEK2 to protect the privacy of the GTK, and the third message uses the second KEK2 to protect the privacy of the GTK. Two KCK2 to protect the integrity of the message.
  • the transceiver unit is further configured to send a fourth message to the AP, where the fourth message is used to respond to the third message, and the fourth message uses a KCK to protect the integrity of the message.
  • the hash-to-curve function g is expressed as:
  • U and V are respectively two independent random generators obtained from a cyclic group G whose order is a prime number p, and pw represents the password.
  • the transceiver unit is further configured to send the identification ID of the first device to the AP.
  • the transceiver unit is further configured to receive a credential for the anti-denial of service DoS service from the AP, where the credential is generated according to the key k and the ID of the first device;
  • the transceiver unit is further configured to send the credential and the ID of the requesting device to the AP.
  • the ID of the first device includes a MAC address of the first device.
  • an apparatus for security authentication applied to WiFi including: a processor and a transceiver.
  • a memory may also be included.
  • the memory is used to store instructions
  • the processor is used to execute the instructions stored in the memory, and when the processor executes the instructions stored in the memory, the execution causes the processor to execute the first aspect or any of the first aspects.
  • the processor coupled to the transceiver, is configured to negotiate a pairing master key PMK with the first device based on the double-base cipher exponential key exchange TBPEKE protocol according to a password, wherein the password is the AP and the first device.
  • the processor is specifically configured to instruct the transceiver to obtain the first PMK1 from the first device
  • a parameter X wherein the first parameter X is determined according to a hash-to-
  • the processor is further configured to associate with the first device to negotiate a security suite to be used, wherein the security suite is used to instruct the Ukraine Seek to the curve function g.
  • the processor is further configured to instruct the transceiver to send a first message to the first device, where the first message is used to instruct the first device Generate a first pairing temporary key PTK1, the first message includes a one-time random number of the AP, and the first PTK1 is based on the first PMK1, the one-time random number of the AP and the first
  • the first PTK1 includes the first key confirmation key KCK1, the first key encryption key KEK1 and the first temporary key TK1, which is generated by the one-time random number of the device.
  • the processor is further configured to instruct the transceiver to obtain a second message from the first device, the second message adopts the first KCK1 to protect the integrity of the message, and the second message includes the first device
  • the one-time random number; the second PTK2 is generated according to the second PMK2, the one-time random number of the AP and the one-time random number of the first device, and the second PTK2 includes the second KCK2, Second KEK2 and second TK2.
  • the processor is further configured to instruct the transceiver to send a third message to the first device, where the third message includes a multicast key GTK, and the third message uses the second KEK2 to protect the GTK's Privacy, the second KCK2 is used to protect the integrity of the message.
  • the processor is further configured to instruct the transceiver to obtain a fourth message from the first device, the fourth message is used to respond to the third message, and the fourth message uses the second KCK2 to protect the message completeness.
  • the hash-to-curve function g is expressed as:
  • U and V are respectively two independent random generators obtained from a cyclic group G whose order is a prime number p, and pw represents the password.
  • the hash-to-curve function g is stored locally in the AP in advance.
  • the second parameter Y is generated by the AP according to the hash-to-curve function g; or the second parameter Y is generated by the AP through Determined by reuse of the second parameter Y sent to the second device.
  • the processor is further configured to instruct the transceiver to obtain the identification ID of the first device from the first device, and instruct the transceiver Sending a credential for the anti-DoS service to the first device, wherein the credential is determined according to an identification ID and a key k of the first device.
  • the processor is further configured to instruct the transceiver to obtain the credential and the ID of the first device from the first device, and verify the credential according to the ID of the first device and the key k.
  • the processor is further configured to determine that the ID of the first device is not included in the first list, where the first list includes at least one connection The device ID of the network provided by the AP.
  • the processor is further configured to add the ID of the first device to the first list.
  • the ID of the first device includes the MAC address of the first device.
  • an apparatus for security authentication applied to WiFi including: a processor and a transceiver.
  • a memory may also be included.
  • the memory is used to store instructions
  • the processor is used to execute the instructions stored in the memory, and when the processor executes the instructions stored in the memory, the execution causes the processor to execute the second aspect or any of the second aspects.
  • the processor coupled to the transceiver, is configured to negotiate a paired master key PMK with an access point AP based on a double-base cipher exponential key exchange TBPEKE protocol according to a password, wherein the password is the AP a shared key with the first device; and a 4-way handshake with the AP according to the PMK.
  • the PMK includes a first PMK1 and a second PMK2.
  • the processor is further configured to calculate the first PMK1 according to the first parameter X and the second parameter Y.
  • the processor is further configured to associate with the AP to negotiate a security suite to be used, wherein the security suite is used to indicate the hash to Curve function g.
  • the processor is further configured to instruct the transceiver to receive a first message from the AP, where the first message includes a one-time random number of the AP; According to the first PMK1, the one-time random number of the AP, and the one-time random number of the first device, a first pairing temporary key PTK1 is generated, and the first PTK1 includes a first key confirmation key KCK1, a first key encryption key KEK1 and a first temporary key TK1.
  • the processor is further configured to instruct the transceiver to send a second message to the AP, the second message adopts the first KCK1 to protect the integrity of the message, and the second message includes a once
  • the second message is used to instruct the AP to generate a second PTK2, the second PTK2 is based on the second PMK2, the one-time random number of the AP and the one-time random number of the first device The random number is generated, and the second PTK2 includes a second KCK2, a second KEK2 and a second TK2.
  • the processor is further configured to instruct the transceiver to obtain a third message from the AP, the third message includes a multicast key GTK, and the third message uses the second KEK2 to protect the privacy of the GTK , the second KCK2 is used to protect the integrity of the message.
  • the processor is further configured to instruct the transceiver to send a fourth message to the AP, where the fourth message is used to respond to the third message, and the fourth message uses a KCK to protect the integrity of the message.
  • the hash-to-curve function g is expressed as:
  • U and V are respectively two independent random generators obtained from a cyclic group G whose order is a prime number p, and pw represents the password.
  • the processor is further configured to instruct the transceiver to send the identification ID of the first device to the AP.
  • the processor is further configured to instruct the transceiver to receive a credential for a denial-of-service DoS service from the AP, the credential being generated according to the key k and the ID of the first device.
  • the processor is further configured to instruct the transceiver to send the credential and the ID of the requesting device to the AP.
  • the ID of the first device includes the MAC address of the first device.
  • a chip for security authentication applied to WiFi including a processor and a communication interface, where the processor is configured to call and execute an instruction from the communication interface, and when the processor executes the instruction, A method in any of the above-described first to second aspects or any possible implementation of any of the aspects is implemented.
  • the chip may further include a memory in which instructions are stored, and the processor is configured to execute the instructions stored in the memory or derived from other instructions.
  • the processor is configured to implement the method in any of the above-described first to second aspects or any possible implementation of any of the aspects.
  • a computer-readable medium for storing a computer program, the computer program comprising a method for performing any one of the first to second aspects or any possible implementation of any aspect instruction.
  • the embodiments of the present application further provide a computer program product comprising instructions, when the computer program product is run on a computer, the computer is made to execute any one of the first to second aspects or any one of the aspects.
  • a tenth aspect provides a communication system, the communication system includes a device having functions for implementing the methods and various possible designs of the above-mentioned first aspect, and the above-mentioned methods and various possible designs for implementing the above-mentioned second aspect. functional device.
  • 1 is a schematic flowchart of a method for WiFi-based security authentication
  • FIG. 2 is a schematic flowchart of a method for WPA3-based security authentication
  • FIG. 3 is a schematic diagram of an application scenario applying an embodiment of the present application.
  • FIG. 4 is a schematic flowchart of a method for security authentication applied to WiFi provided by an embodiment of the present application
  • Fig. 5 is an example of the flow of TBPEKE
  • FIG. 6 is a schematic flowchart of a method for security authentication applied to WiFi provided by an embodiment of the present application
  • FIG. 7 is a schematic flowchart of another method for security authentication applied to WiFi provided by an embodiment of the present application.
  • FIG. 8 is a schematic flowchart of another method for security authentication applied to WiFi provided by an embodiment of the present application.
  • FIG. 9 is a schematic flowchart of another method for security authentication applied to WiFi provided by an embodiment of the present application.
  • FIG. 10 is a schematic diagram of an apparatus for security authentication applied to WiFi provided by an embodiment of the present application.
  • FIG. 1 shows a schematic flowchart of a method 100 for WiFi-based security authentication.
  • the WiFi security protocol may be the second-generation WiFi protected access 2 (WPA2) version, or a version prior to WPA2, such as wired equivalent privacy (WEP), second-generation WEP (WEP2) ), WPA, etc., without limitation.
  • the flow shown in FIG. 1 may also be referred to as a security protocol flow.
  • the method 100 is performed by a requesting device (alternatively, a supplicant) and an AP.
  • the AP can provide the network based on the WiFi protocol
  • the requesting device is the terminal device requesting to use the network provided by the AP.
  • the AP and the requesting device share the password pw.
  • method 100 may include steps 101 to 109 . Wherein, steps 104 to 109 may be referred to as a 4-way handshake process.
  • the requesting device and the AP can agree on the security suite to be used by association.
  • the security suite may indicate the relevant encryption algorithm used between the requesting device and the AP, as well as other relevant parameters.
  • the requesting device may derive the PMK based on the pw shared by both the requesting device and the AP.
  • the requesting device may also obtain the PMK based on the media access control (media access control, MAC) addresses of both the requesting device and the AP, which is not limited in this application.
  • media access control media access control, MAC
  • the AP generates a PMK.
  • the AP may derive the PMK based on the pw shared by both the requesting device and the AP.
  • the AP may also obtain the PMK based on the MAC addresses of both the requesting device and the AP, which is not limited in this application.
  • the AP and the first device may perform a 4-way handshake based on the PMK.
  • the AP sends Msg1(r, anonce) to the requesting device.
  • the requesting device receives the Msg1(r, anonce).
  • Msg1 represents message 1 (message1)
  • anonce represents the one-time random number of the AP
  • r represents the count of the counter.
  • the requesting device may select a one-time random number (represented as snonce), and generate PTK according to PMK, anonce, and snonce.
  • the requesting device may also generate a PTK according to PMK, anonce, snonce, and the MAC addresses of both the requesting device and the AP, which is not limited in this application.
  • the PTK includes three parts, namely, a key confirmation key (key confirmation key, KCK), a key encryption key (key encryption key, KEK), and a temporary key (transient key, TK).
  • KCK is used to protect the privacy of the message during the 4-way handshake process
  • KEK is used to protect the integrity of the message during the 4-way handshake process
  • TK is the real session key, used to protect the subsequent request between the device and the AP. Communication.
  • Msg2 ( ⁇ r, snonce ⁇ KCK )
  • the AP receives the Msg2( ⁇ r, snonce ⁇ KCK ).
  • Msg2 represents message 2 (message 2), wherein the Msg2 uses KCK to protect the integrity of the message.
  • the AP can generate the PTK according to PMK, anonce, and snonce.
  • the AP may also generate the PTK according to the PMK, anonce, snonce, and the MAC addresses of both the requesting device and the AP, which is not limited in this application.
  • the PTK generated by the requesting device is the same as the PTK generated by the AP.
  • the following flow is performed.
  • the AP sends Msg3( ⁇ r+1,anonce, ⁇ GTK ⁇ KEK ⁇ KCK ) to the requesting device.
  • the AP receives the Msg3 ( ⁇ r+1,anonce, ⁇ GTK ⁇ KEK ⁇ KCK ).
  • Msg3 represents message 3 (message 3)
  • GTK is a multicast key.
  • the Msg3 uses KEK to protect the privacy of GTK, and uses KCK to protect the integrity of the entire message of Msg3.
  • the requesting device sends Msg4( ⁇ r+1 ⁇ KCK ) to the AP.
  • the AP receives the Msg4( ⁇ r+1 ⁇ KCK ).
  • Msg4 represents message 4 (message 4).
  • the Msg4 adopts KCK to protect the integrity of the message.
  • steps 101 to 108 reference may be made to the description in the prior art, and details are not repeated here.
  • the AP and the requesting device can perform identity authentication through the 4-way handshake process, and generate a session key and a multicast key to protect the subsequent unicast communication between the requesting device and the AP, as well as the broadcast of the AP. communication.
  • the PMK is calculated from the password pw (or the MAC addresses of both parties), and a notable feature of the password pw is that its length is small, that is, it has a low entropy value. Therefore, if the attacker intercepts the message of the 4-way handshake in the process of generating the key, the attacker may obtain the password through brute force cracking, thereby threatening network security.
  • WPA3 version performs SAE process to generate high entropy before traditional security protocol processes (such as association and 4-way handshake process).
  • PMK password authenticated key exchange
  • SAE is a password-based password authentication and key exchange (password authenticated key exchange, PAKE) protocol.
  • FIG. 2 shows a schematic flowchart of a method 200 for WPA3-based security authentication.
  • the method 200 may include both requesting the device and the AP to generate a PMK, an association, and a 4-way handshake process.
  • a PMK with a high entropy value is generated by executing the SAE process (ie, step 210 ), wherein the SAE is implemented on an elliptic curve.
  • Alice for example, a client
  • Bob for example, an AP
  • step 210 includes steps 211 to 220 .
  • P is a point on the corresponding elliptic curve, which can be derived into P from the password pw, and the MAC address of the supplier and AP.
  • the calculation process of generating P from the password pw may be referred to as a hash-to-curve function.
  • Alice auth-commits to Bob (s A , E A ).
  • Bob auth-commits (s B , E B ) to Alice.
  • both Alice and Bob can use the calculated ⁇ value as PMK.
  • the embodiments of the present application provide a communication solution, wherein the AP and the first device (eg, the requesting device) negotiate the pairing master key PMK according to the password, based on the double-base cipher exponential key exchange TBPEKE protocol, and according to The PMK, performs a 4-way handshake.
  • the embodiments of the present application generate PMK by executing TBPEKE, which can improve the ability of the AP and the first device to prevent side channel attacks during the WiFi security authentication process, thereby helping The AP and the first device avoid side channel attacks during security authentication.
  • FIG. 3 shows a schematic diagram of an application scenario to which an embodiment of the present application is applied.
  • multiple requesting devices eg, requesting device 1, requesting device 2, and requesting device 3
  • each requesting device executes a security protocol with the AP, performs mutual authentication and negotiates a key to protect the communication channel between the two.
  • different requesting devices can use the same password to execute a security protocol with the AP.
  • the requesting device may be, for example, the first device.
  • FIG. 3 shows an example of the system applied to the embodiments of the present application, but the present application is not limited thereto.
  • one, two, four or more requesting devices may also be connected to the AP, which are all within the protection scope of the embodiments of the present application.
  • the technical solution of the present application can be applied to a WiFi communication system, for example, the communication system shown in FIG. 3 .
  • Devices in the WiFi communication system may have a wireless communication connection relationship.
  • One of the devices may be, for example, an AP or a chip configured in the AP, and another device may be, for example, a first device or a chip configured in the first device. This embodiment of the present application does not limit this.
  • the embodiments of the present application will be described in detail by taking the security authentication process of the AP and the first device as an example. It can be understood that the chip configured in the AP and the chip configured in the first device can both perform security authentication based on the same method. This application does not limit this.
  • FIG. 4 shows a schematic flowchart of a method 400 for WiFi security authentication provided by an embodiment of the present application.
  • Method 400 may include steps 410-430.
  • the AP and the first device may negotiate a PMK (ie, generate a PMK) based on a dual base password encrypted key exchange (twin base password encrypted key exchange, TBPEKE) protocol according to the password.
  • the password is a shared key between the AP and the first device.
  • the TBPEKE protocol can be used to replace the SAE protocol in WPA3.
  • the AP performs a 4-way handshake with the first device.
  • steps 420 and 430 reference may be made to the description in FIG. 1 , and details are not repeated here.
  • a PMK with a high entropy value can be generated by executing the TBPEKE process, so that the security authentication method provided by the embodiments of the present application can help resist offline dictionary attacks.
  • the embodiments of the present application since TBPEKE can easily prevent side channel attacks, the embodiments of the present application generate PMKs by executing TBPEKE, which can improve the ability of the AP and the first device to prevent side channel attacks during the WiFi security authentication process, which is helpful. The AP and the first device avoid side channel attacks during security authentication.
  • FIG. 5 shows an example of the flow of TBPEKE.
  • the common parameters of both parties A and B in TBPEKE include: a cyclic group G (Gofprimeorderp) whose order is prime p, and two independent random generators U and V in the group (denoted as U, ), and a hash function H(ahashfunctiononto ⁇ 0,1 ⁇ l , denoted as H: ⁇ 0,1 ⁇ * ⁇ 0,1 ⁇ l ) that outputs ⁇ 0,1 ⁇ l .
  • H: ⁇ 0,1 ⁇ * ⁇ 0,1 ⁇ is a secure hash function, such as SHA256.
  • a and B share the password pw.
  • A can be calculated based on the public parameters and the password pw:
  • A sends A
  • A After receiving Y, A can calculate: Z ⁇ Y x .
  • B After receiving A
  • a and B can calculate the key sk from A, B, g, X, Y, Z, respectively.
  • sk can be calculated according to the following formula:
  • G represents an elliptic curve group
  • this hashtocurve function g a dot product operation is involved for pw. Among them, the dot product operation can effectively achieve anti-side channel attack.
  • the first parameter X and the second parameter Y transmitted between the AP and the first device are generated based on the hashtocurve function g and a random number, and do not involve the calculation of the password pw, so it is difficult for an attacker to know
  • the password pw can further improve the ability of the AP and the first device to prevent side channel attacks during the WiFi security authentication process.
  • B can reuse Y and y without using different Y and y for each A.
  • FIG. 6 shows a schematic flowchart of a method 600 for WiFi security authentication provided by an embodiment of the present application.
  • method 600 may be performed by a first device and an AP.
  • the first device and the AP both share the password pw, exchange the TBPEKE protocol with the double-base cipher exponential key, negotiate the pairing master key PMK, and perform a 4-way handshake according to the PMK.
  • method 600 includes steps 610-650.
  • the first device sends X to the access point AP.
  • the AP receives X from the first device.
  • the first parameter X is determined according to a hash-to-curve function (hashtocurve) g.
  • the first device may determine the first parameter X according to a hashtocurve function g.
  • x is from The random number chosen in , i.e.
  • the first device may also send an ID of the first device to the access point AP, where the ID of the first device is used to uniquely identify the first device.
  • the first device may send a connection request to the AP, and the connection request may include the first parameter X and the ID of the first device, which is not limited in this application.
  • the ID of the first device may be the MAC address of the first device, which is not limited in this application.
  • the frame format of the message (eg, connection request) sent by the first device to the AP may include the MAC address, which is not limited in this application.
  • g can be expressed as the following formula:
  • U and V are respectively two independent random generators obtained from the cyclic group G whose order is prime p.
  • the AP may also send a broadcast message, and the broadcast message may further include RSNEwithsupp.ciphers to notify the capability of ciphers.
  • the first device selects matching ciphers, that is, selects a cipher suite supported by itself, to obtain the above-mentioned g, or to obtain the related parameters of g (for example, the above-mentioned U, V).
  • the AP broadcasts RSNEwithsupp.ciphers, and the first device selects the matching ciphers, which can be an example of the security suite to be negotiated between the AP and the first device.
  • a cipher suite, g, or U may be stored on the side of the first device as system parameters.
  • the broadcast message may be a beacons frame, and the beacon frame may be sent before step 610, which is not limited in this application.
  • the first device may determine the hashtocurve function g according to the system parameters U and V and the password pw.
  • the broadcast message may further include the ID of the AP.
  • the requesting device can receive the broadcast message and obtain the ID of the AP therefrom.
  • the ID of the AP may be the MAC address of the AP.
  • the AP sends Y to the first device.
  • the AP may determine the second parameter Y.
  • y is from The random number chosen in , i.e.
  • the AP when the AP receives the first parameter sent by the first device and the MAC address of the first device, it can directly select the random number y, and calculate Y according to the random number y and the pre-stored g, without needing to pw to calculate g.
  • step 610 the g determined by the first device side and the g stored by the AP side are the same.
  • it can be implemented by presetting codes in the first device and the AP respectively, which is not limited in this application.
  • the AP suffers from a denial of service (DoS) attack.
  • DoS denial of service
  • the AP can reuse the second parameter Y.
  • the AP can reuse the second parameter Y.
  • the AP can reuse the second parameter Y.
  • the AP can avoid the real-time calculation of the second parameter Y when authenticating the device, thereby reducing the amount of calculation on the AP side, thereby helping to reduce or avoid the AP suffered a DoS attack.
  • the AP may send a response message corresponding to the connection request to the first device, which may include Y, which is not limited in this application.
  • the first device determines PMK1.
  • the first device may determine the pairing master key PMK1 according to the above-mentioned first parameter X and second parameter Y.
  • the first device may calculate PMK1 according to the first parameter X, the second parameter Y, the ID of the first device, and the ID of the AP.
  • the first device may calculate PMK1 according to the following formula:
  • Z Y x
  • id dev represents the ID of the first device
  • id AP represents the ID of the AP
  • KDF( ) is a standard key derivation function.
  • the AP determines PMK2.
  • the AP may determine the pairing master key PMK2 according to the above-mentioned first parameter X and second parameter Y.
  • the AP may calculate PMK2 according to the first parameter X, the second parameter Y, the ID of the first device, and the ID of the AP.
  • the AP can calculate PMK2 according to the following formula:
  • Z X y , id dev represents the ID of the first device, id AP represents the ID of the AP, and KDF( ) is a standard key derivation function.
  • the first device and the AP perform association and 4-way handshake.
  • both the AP and the first device can perform mutual identity authentication, and generate a session key and a multicast key to protect the unicast communication between the subsequent requesting device and the AP, as well as the AP's broadcast communication.
  • the first device and the AP may comply with the specification of WPA3. As an example, reference may be made to the description in FIG. 1 , which will not be repeated.
  • the first device may send the first parameter X to the AP, and the AP may send the second parameter Y to the first device, where the first parameter X and the second parameter Y are respectively determined according to the hashtocurve function g , the first device can calculate PMK1 according to the first parameter X and the second parameter Y, and the AP can calculate PMK2 according to the first parameter X and the second parameter Y.
  • the first parameter X and the second parameter Y transmitted between the AP and the first device are generated based on the hashtocurve function g and a random number, and do not involve the calculation of the password, so it is difficult for an attacker to know the password , thereby improving the ability of the AP and the first device to prevent side channel attacks during the WiFi security authentication process, and helping the AP and the first device to avoid side channel attacks during security authentication.
  • FIG. 7 shows a schematic flowchart of a method 700 for WiFi security authentication provided by an embodiment of the present application.
  • method 700 may be performed by a first device and an AP.
  • the first device or AP reference may be made to the above description.
  • FIG. 7 shows the steps or operations of the method for security authentication applied to WiFi, but these steps or operations are only examples, and the embodiments of the present application may also perform other operations or the operations of the respective operations in FIG. 7 . deformed. Furthermore, the various steps in FIG. 7 may be performed in a different order than presented in FIG. 7, and it is possible that not all operations in FIG. 7 are performed.
  • method 700 includes steps 701 to 708 .
  • the AP broadcasts the beacon frame.
  • the beacon frame may include the MAC address of the AP (may be represented as MAC AP ).
  • the beacon frame may further include RSNEwithsupp.ciphers (robust security network element with supported ciphers) to notify the capability of ciphers, which is not limited in this application.
  • a terminal device within the coverage of the WiFi network of the AP can receive the beacon frame and acquire information in the beacon frame.
  • the first device shown in FIG. 7 may receive the beacon frame and determine that it needs to connect to the WiFi network provided by the AP.
  • the first device selects a cipher, which may mean that the first device selects a cipher suite supported by itself, to obtain the hashtocurve function g, or to obtain the relevant parameters of g (such as U, V, etc.), which is not made in this application. limited.
  • the first device selects the cipher suite, g, or U, V may be stored on the first device side as system parameters.
  • the hashtocurve function g point product transforms the password pw into points on the elliptic curve.
  • the process of determining the first parameter X reference may be made to the description of step 610 in FIG. 6 , which will not be repeated here.
  • the first device sends X and MAC dev to the AP.
  • the first device may send a connection request to the AP, which includes the above-mentioned first parameter X and the MAC address MAC dev of the first device, which is not limited in this application.
  • the embodiment of the present application is described by taking the identifier of the first device as the MAC address of the first device and the identifier of the AP as the MAC address of the AP as an example, but the embodiment of the present application is not limited thereto.
  • the first device may also send other identifiers uniquely used to identify the first device to the AP, which is not limited in this application.
  • step 702 the g determined by the first device side and the g stored by the AP side are the same.
  • it can be implemented by presetting codes in the first device and the AP respectively, which is not limited in this application.
  • the AP when the AP receives connection requests sent by multiple (ie, two or more) first devices, the AP can reuse y and Y. In this way, it can be avoided that the AP calculates the second parameter Y in real time when authenticating the device, so that the calculation amount on the AP side can be reduced, thereby helping to reduce or avoid DoS attacks.
  • the AP sends Y to the first device.
  • steps 706 and 707 reference may be made to the description of steps 630 and 640 in FIG. 6, and details are not repeated here.
  • the first device and the AP perform association and 4-way handshake.
  • both the AP and the first device can perform mutual identity authentication, and generate a session key and a multicast key to protect the unicast communication between the subsequent requesting device and the AP, as well as the AP's broadcast communication.
  • association and 4-way handshake reference may be made to the description in FIG. 1 , and details are not repeated here.
  • the first device may send the first parameter X to the AP, and the AP may send the second parameter Y to the first device, where the first parameter X and the second parameter Y are respectively determined according to the hashtocurve function g , the first device can calculate PMK1 according to the first parameter X and the second parameter Y, and the AP can calculate PMK2 according to the first parameter X and the second parameter Y.
  • the first parameter X and the second parameter Y transmitted between the AP and the first device are generated based on the hashtocurve function g and a random number, and do not involve the calculation of the password, so it is difficult for an attacker to know the password , thereby improving the ability of the AP and the first device to prevent side channel attacks during the WiFi security authentication process, and helping the AP and the first device to avoid side channel attacks during security authentication.
  • FIG. 8 shows a schematic flowchart of a method 800 for WiFi security authentication provided by an embodiment of the present application.
  • the AP may send an anti-DoS credential token to the first device, and verify the token sent by the first device again, so as to further enhance the anti-DoS attack capability.
  • FIG. 8 shows the steps or operations of the method for security authentication applied to WiFi, but these steps or operations are only examples, and the embodiment of the present application may also perform other operations or different operations of the respective operations in FIG. 8 . deformed. Furthermore, the various steps in FIG. 8 may be performed in a different order than presented in FIG. 8, and it is possible that not all operations in FIG. 8 are performed.
  • method 800 includes steps 801 to 812 .
  • whether to enable an anti-DoS (anti-DoS) mechanism may be set.
  • a label can be preset, when the anti-DoS mechanism is enabled, the value of the label can be set to 1, otherwise, the value of the label can be set to 0.
  • the token sent by the first device may be verified, and/or Y and y may be reused, which is not limited in this application.
  • the AP broadcasts the beacon frame.
  • the first device may receive the beacon frame and determine that it needs to connect to the WiFi network provided by the AP.
  • the first device sends X and MAC dev to the AP.
  • the AP receives X and MAC dev .
  • steps 801 to 803 reference may be made to the descriptions of steps 701 to 703 in FIG. 7, and details are not repeated here.
  • the AP may generate a token bound to the MAC dev address according to the stored key k and the MAC address MAC dev of the first device in the connection request.
  • h() is a secure hash function.
  • the AP sends a token to the first device. That is, after generating the token bound to the above MAC dev address, the AP returns the token to the first device. Correspondingly, the first device receives the token.
  • the first device sends token, X and MAC dev to the AP.
  • the AP receives token, X and MAC dev .
  • the first device submits the connection request and the token to the AP again.
  • the token may be carried in the connection request, which is not limited in this application.
  • the token can also be encapsulated in a message together with the connection request and sent to the AP.
  • the first device may send a first connection request to the AP, which may include X and MAC dev ; in step 806, the first device may send a second connection request to the AP, which may include token, X and MAC dev .
  • AP check (check) token? h(k, MAC dev ). That is, the AP checks whether the token received in step 806 is equal to the token it calculated in step 804 .
  • the first device may use a fake MAC address to maliciously attack the AP.
  • the first device may be an attacker. Therefore, the AP may not process the connection request of the first device to reduce or avoid DoS attacks.
  • the above steps 804 to 807 may be executed, and when the value of the set label is 0, the above steps 804 to 807 may not be executed. Not limited.
  • the AP when the label value is not set, and the AP supports the calculation and verification of the above token, the AP can always perform steps 804 to 807 after receiving the connection request, that is, step 803. Not limited.
  • step 808 reference may be made to the description of step 704 in FIG. 7, and details are not repeated here.
  • the AP when the value of the set label is 1 and the AP receives multiple connection requests, the AP can reuse Y and y.
  • the AP when the value of the set label is 0, when the AP receives multiple connection requests, the AP does not reuse Y and y, that is, selects y for different first devices respectively, and calculates Y.
  • the AP when the label value is not set, can always reuse Y and y when receiving multiple connection requests, which is not limited in this application.
  • the AP sends Y to the first device.
  • the first device associates with the AP and performs a 4-way handshake.
  • steps 809 to 812 reference may be made to the description of steps 705 to 708 in FIG. 7, and details are not repeated here.
  • the AP can generate an anti-DoS token bound to the MAC address of the first device according to the MAC address of the first device and the key stored by the AP, and return the token to the first device , the first device needs to send its MAC address and token to the AP again, so that the AP can verify its MAC address and the corresponding token, and process the connection request of the first device only when the token passes the verification, thereby It can help to prevent the AP from processing all connection requests, thereby helping to reduce or avoid DoS attacks on the AP.
  • FIG. 9 shows a schematic flowchart of a method 900 for WiFi security authentication provided by an embodiment of the present application.
  • the AP may maintain a list of connected devices (deviceinprocessing, DEVinPROC). When the first device is not in the list of connected devices, the AP will further process the connection request of the first device.
  • FIG. 9 shows the steps or operations of the method for security authentication applied to WiFi, but these steps or operations are only examples, and the embodiment of the present application may also perform other operations or different operations of the respective operations in FIG. 9 . deformed. Furthermore, the various steps in FIG. 9 may be performed in a different order than presented in FIG. 9, and it is possible that not all operations in FIG. 9 are intended to be performed.
  • method 900 includes steps 901 to 914 .
  • whether to set a label can be set.
  • the value of the label can be set to 1, and otherwise, the value of the label can be set to 0.
  • the AP broadcasts the beacon frame.
  • the first device may receive the beacon frame and determine that it needs to connect to the WiFi network provided by the AP.
  • the first device sends X and MAC dev to the AP.
  • the AP receives X and MAC dev .
  • steps 901 to 903 reference may be made to the descriptions of steps 801 to 803 in FIG. 8 , which will not be repeated here.
  • the list of connected devices maintained by the AP may include the MAC address of at least one terminal device (ie, connected device) connected to the network provided by the AP.
  • the MAC address of the first device is in DEVinPROC (MAC dev ⁇ DEVinPROC), it means that the first device has been able to connect to the network provided by the AP, then it can be inferred that the first device uses a fake MAC address to connect to the AP.
  • the first device may be an attacker. At this time, therefore, the AP may not process the connection request of the first device, that is, will not calculate the token for the first device, so as to reduce or avoid DoS attacks on the AP.
  • the AP sends a token to the first device. That is, after generating the token bound to the above MAC dev address, the AP returns the token to the first device. Correspondingly, the first device receives the token.
  • the first device sends token, X and MAC dev to the AP.
  • the first device submits the connection request and the token to the AP again.
  • the token may be carried in the connection request, which is not limited in this application.
  • the token can also be encapsulated in a message together with the connection request and sent to the AP.
  • the AP receives token, X and MAC dev .
  • AP check Check token? h(k, MAC dev ). That is, the AP checks if the MAC dev received in step 906 is in the DEVinPROC list, and checks if the token is equal to the token it calculated in step 904.
  • the AP can be in MAC dev not in the DEVinPROC list, i.e. After that, it is further checked whether the token is equal to the token it calculated in step 904.
  • connection request is processed.
  • the AP may not verify the token, that is, the connection request of the first device may not be processed.
  • DEVinPROC DEVinPROCv ⁇ MAC dev ⁇ .
  • the AP may not process the connection request, thereby helping to reduce or avoid DoS attacks on the AP.
  • the AP sends Y to the first device.
  • the first device associates with the AP and performs a 4-way handshake.
  • steps 909 to 913 reference may be made to the description of steps 808 to 812 in FIG. 8 , and details are not repeated here.
  • DEVinPROC DEVinPROC- ⁇ MAC dev ⁇ .
  • the first device can be deleted from the current DEVinPROC list the MAC address. In this way, the first device can still send a connection request to the AP subsequently, and since the MAC address of the first device is not in DEVinPROC, the AP can process the connection request of the first device accordingly.
  • the AP will further process the connection request of the first device only when it determines that the MAC address of the first device is not in its DEVinPROC list, which can help to prevent the AP from ignoring all connection requests.
  • the processing helps to reduce the amount of computation on the AP side, thereby helping to reduce or avoid DoS attacks on the AP.
  • the method implemented by the AP may also be implemented by a component (such as a chip or circuit) that can be used for the AP, and the method implemented by the first device may also be implemented by the first device.
  • a component eg, a chip or circuit
  • FIG. 10 is a schematic diagram of an apparatus 1000 for WiFi security authentication provided by an embodiment of the present application.
  • the apparatus 1000 may be an AP, and may also be a chip or circuit, such as a chip or circuit that can be provided in the AP.
  • the apparatus 1000 may be the first device, or may be a chip or a circuit, for example, a chip or a circuit that may be provided in the first device.
  • the apparatus 1000 may include a processing unit 1010 (ie, an example of a processor) and a transceiver unit 1030 .
  • a processing unit 1010 ie, an example of a processor
  • a transceiver unit 1030 ie, an example of a transceiver
  • the transceiver unit 1030 may be implemented by a transceiver or a transceiver-related circuit or an interface circuit.
  • the apparatus may further include a storage unit 1020 .
  • the storage unit 1020 is used to store instructions.
  • the storage unit may also be used to store data or information.
  • the storage unit 1020 may be implemented by a memory.
  • the processing unit 1010 may be configured to execute the instructions stored in the storage unit 1020, so that the apparatus 1000 implements the steps performed by the AP in the above method.
  • the processing unit 1010, the storage unit 1020, and the transceiver unit 1030 can communicate with each other through an internal connection path to transmit control and/or data signals.
  • the storage unit 1020 is used to store a computer program
  • the processing unit 1010 can be used to call and run the computer program from the storage unit 1020 to control the transceiver unit 1030 to receive signals and/or send signals, and complete the above method. AP steps.
  • the processor unit 1010 when the processor unit 1010 is a processor and the transceiver unit 1030 is a transceiver, the processor may be coupled to the transceiver, such as sending instructions to the transceiver to instruct (or control) the transceiver unit to receive signals and/or Send a signal to complete the steps of the AP in the above method.
  • the processing unit 1010 may be configured to execute the instructions stored in the storage unit 1020, so that the apparatus 1000 implements the steps performed by the first device in the above method.
  • the processing unit 1010, the storage unit 1020, and the transceiver unit 1030 can communicate with each other through an internal connection path to transmit control and/or data signals.
  • the storage unit 1020 is used to store a computer program
  • the processing unit 1010 can be used to call and run the computer program from the storage unit 1020 to control the transceiver unit 1030 to receive signals and/or send signals, and complete the above method. Steps of the first device.
  • the processor unit 1010 when the processor unit 1010 is a processor and the transceiver unit 1030 is a transceiver, the processor may be coupled to the transceiver, such as sending instructions to the transceiver to instruct (or control) the transceiver unit to receive signals and/or Send a signal to complete the steps of the first device in the above method.
  • the storage unit 1020 may be integrated in the processing unit 1010 , or may be provided separately from the processing unit 1010 .
  • the transceiver unit 1030 may be integrated in the processing unit 1010, or may be provided separately from the processing unit 1010.
  • the transceiver unit 1030 may include a receiver and a transmitter.
  • the receiver and the transmitter may be the same or different physical entities. When they are the same physical entity, they can be collectively referred to as transceivers.
  • the transceiver unit 1030 may include an input interface and an output interface.
  • the function of the transceiver unit 1030 can be considered to be implemented by a transceiver circuit or a dedicated chip for transceiver.
  • the processing unit 1010 can be considered to be implemented by a dedicated processing chip, a processing circuit, a processing unit or a general-purpose chip.
  • a general-purpose computer may be used to implement the communication device (for example, the AP or the first device) provided in the embodiments of the present application.
  • the program codes that will implement the functions of the processing unit 1010 and the transceiver unit 1030 are stored in the storage unit 1020, and the general-purpose processing unit implements the functions of the processing unit 1010 and the transceiver unit 1030 by executing the codes in the storage unit 1020.
  • the device 1000 when the device 1000 is an AP or a chip or circuit provided in the AP,
  • the processing unit 1010 may negotiate a pairing master key PMK with the first device based on the double-base cipher exponential key exchange TBPEKE protocol according to the password, where the password is the shared key between the AP and the first device .
  • the processing unit 1010 may negotiate with the first device through the transceiver unit 1030 .
  • the processing unit 1010 may also perform a 4-way handshake with the first device according to the PMK.
  • the processing unit 1010 may perform a 4-way handshake with the first device through the transceiver unit 1030 .
  • the processing unit 1010 may negotiate with the first device through the transceiver unit 1030 , and the processing unit 1010 may perform a 4-way handshake with the first device through the transceiver unit 1030 .
  • the PMK includes a first PMK1 and a second PMK2.
  • the transceiver unit 1030 is configured to obtain a first parameter X from the first device, wherein the first parameter X is determined according to a hash-to-curve function g, and the hash-to-curve function g is used to pass the point
  • the transceiver unit 1030 is further configured to send a second parameter Y to the first device to instruct the first device to calculate the first PMK1 according to the first parameter X and the second parameter Y, wherein the second parameter
  • the processing unit 1030 is further configured to calculate the second PMK2 according to the first parameter X and the second parameter Y obtained by the transceiver unit.
  • the processing unit 1010 is further configured to associate with the first device to negotiate a security suite to be used, wherein the security suite is used to indicate the hash-to-curve function g.
  • the transceiver unit 1030 is configured to send a first message to the first device, where the first message is used to instruct the first device to generate a first pairing temporary key PTK1, the first The message includes the one-time random number of the AP, the first PTK1 is generated according to the first PMK1, the one-time random number of the AP, and the one-time random number of the first device, and the first PTK1 is generated according to the one-time random number of the first device.
  • the PTK1 includes a first key confirmation key KCK1, a first key encryption key KEK1 and a first temporary key TK1.
  • the transceiver unit 1030 is further configured to obtain a second message from the first device, the second message uses the first KCK1 to protect the integrity of the message, and the second message includes a one-time random number.
  • the processing unit 1010 is further configured to generate the second PTK2 according to the second PMK2, the one-time random number of the AP, and the one-time random number of the first device, where the second PTK2 includes the second KCK2, Second KEK2 and second TK2.
  • the transceiver unit 1010 is further configured to send a third message to the first device, where the third message includes a multicast key GTK, and the third message uses the second KEK2 to protect the privacy of the GTK, using The second KCK2 to protect the integrity of the message.
  • the transceiver unit 1030 is further configured to acquire a fourth message from the first device, where the fourth message is used to respond to the third message, and the fourth message uses the second KCK2 to protect the integrity of the message.
  • the hash-to-curve function g is expressed as:
  • U and V are respectively two independent random generators obtained from a cyclic group G whose order is a prime number p, and pw represents the password.
  • the hash-to-curve function g is stored locally in the AP in advance.
  • the second parameter Y is generated by the AP according to the hash-to-curve function g; or the second parameter Y is the first parameter Y sent by the AP to the second device through reuse. Two parameters Y to determine.
  • the transceiving unit 1030 is further configured to acquire the identification ID of the first device from the first device, and send the credentials for the anti-DoS service to the first device, wherein, The credential is determined based on the identification ID of the first device and the key k.
  • the transceiver unit 1030 is further configured to acquire the credential and the ID of the first device from the first device.
  • the processing unit 1010 is further configured to verify the credential according to the ID of the first device and the key k.
  • the processing unit 1010 is further configured to determine that the ID of the first device is not included in the first list, where the first list includes the ID of at least one device connected to the network provided by the AP. ID.
  • the processing unit 1010 is further configured to add the ID of the first device to the first list.
  • the ID of the first device includes the MAC address of the first device.
  • the apparatus 1000 when the apparatus 1000 is the first device or a chip or circuit provided in the first device,
  • the processing unit 1010 may negotiate a pairing master key PMK with the access point AP based on the double-base cipher exponential key exchange TBPEKE protocol according to a password, where the password is a shared between the AP and the first device key.
  • the processing unit may negotiate with the AP through the transceiver unit.
  • the processing unit 1010 may also perform a 4-way handshake with the AP according to the PMK.
  • the processing unit may perform a 4-way handshake with the first device through the transceiver unit.
  • the processing unit 1010 may negotiate with the AP through the transceiver unit 1030 , and the processing unit 1010 may perform a 4-way handshake with the AP through the transceiver unit 1030 .
  • the PMK includes a first PMK1 and a second PMK2.
  • the processing unit 1010 is configured to calculate the first PMK1 according to the first parameter X and the second parameter Y.
  • the processing unit 1010 is further configured to associate with the AP to negotiate a security suite to be used, wherein the security suite is used to indicate the hash-to-curve function g.
  • the transceiver unit 1030 is further configured to receive a first message from the AP, where the first message includes a one-time random number of the AP.
  • the processing unit 1010 is further configured for the first device to generate a first pairing temporary key PTK1 according to the first PMK1, the one-time random number of the AP, and the one-time random number of the first device, and the first pairing temporary key PTK1.
  • a PTK1 includes a first key confirmation key KCK1, a first key encryption key KEK1 and a first temporary key TK1.
  • the transceiver unit 1030 is further configured to send a second message to the AP, where the second message uses the first KCK1 to protect the integrity of the message, and the second message includes a one-time random number of the first device,
  • the second message is used to instruct the AP to generate a second PTK2, and the second PTK2 is generated according to the second PMK2, the one-time random number of the AP and the one-time random number of the first device , the second PTK2 includes a second KCK2, a second KEK2 and a second TK2.
  • the transceiver unit 1030 is further configured to obtain a third message from the AP, where the third message includes a multicast key GTK, the third message uses the second KEK2 to protect the privacy of the GTK, and uses the The second KCK2 to protect the integrity of the message.
  • the transceiver unit 1030 is further configured to send a fourth message to the AP, where the fourth message is used to respond to the third message, and the fourth message uses a KCK to protect the integrity of the message.
  • the hash-to-curve function g is expressed as:
  • U and V are respectively two independent random generators obtained from a cyclic group G whose order is a prime number p, and pw represents the password.
  • the transceiver unit 1030 is further configured to send the identification ID of the first device to the AP.
  • the transceiver unit 1030 is further configured to receive a credential for the anti-denial of service DoS service from the AP, where the credential is generated according to the key k and the ID of the first device.
  • the transceiver unit 1030 is further configured to send the credential and the ID of the requesting device to the AP.
  • the ID of the first device includes the MAC address of the first device.
  • Each unit in the above embodiments may also be referred to as a module or a circuit or a component.
  • each module or unit in the apparatus 1000 may be used to perform various actions or processing procedures performed by the AP in the above method embodiments.
  • each module or unit in the apparatus 1000 may be used to perform each action or processing process performed by the first device in the above method embodiments.
  • the embodiment of the present application further provides a communication system, which includes the aforementioned AP and the first device.
  • the processor may be a central processing unit (central processing unit, CPU), and the processor may also be other general-purpose processors, digital signal processors (digital signal processors, DSP), application-specific integrated circuits (application specific integrated circuit, ASIC), off-the-shelf programmable gate array (field programmable gate array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the memory in the embodiments of the present application may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory.
  • the non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically programmable Erase programmable read-only memory (electrically EPROM, EEPROM) or flash memory.
  • Volatile memory may be random access memory (RAM), which acts as an external cache.
  • RAM random access memory
  • SRAM static random access memory
  • DRAM dynamic random access memory
  • DRAM synchronous dynamic random access memory
  • SDRAM synchronous dynamic random access memory
  • DDR SDRAM double data rate synchronous dynamic random access memory
  • enhanced SDRAM enhanced synchronous dynamic random access memory
  • SLDRAM synchronous connection dynamic random access memory Fetch memory
  • direct memory bus random access memory direct rambus RAM, DR RAM
  • the above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination.
  • the above-described embodiments may be implemented in whole or in part in the form of a computer program product.
  • the computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated.
  • the computer may be a general purpose computer, special purpose computer, computer network, or other programmable device.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be downloaded from a website site, computer, server, or data center Transmission to another website site, computer, server or data center by wire (eg, infrared, wireless, microwave, etc.).
  • the computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, a data center, or the like that contains one or more sets of available media.
  • the usable media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVDs), or semiconductor media.
  • the semiconductor medium may be a solid state drive.
  • Embodiments of the present application further provide a computer-readable medium on which a computer program is stored, and when the computer program is executed by a computer, implements the steps performed by the AP in any of the foregoing embodiments, or the steps performed by the first device.
  • An embodiment of the present application further provides a computer program product, which, when executed by a computer, implements the steps performed by the AP in any of the foregoing embodiments, or the steps performed by the first device.
  • An embodiment of the present application also provides a system chip, where the system chip includes: a communication unit and a processing unit.
  • the processing unit may, for example, be a processor.
  • the communication unit may be, for example, an input/output interface, a pin or a circuit, or the like.
  • the processing unit can execute computer instructions, so that the chip in the communication apparatus executes the steps performed by the AP provided in the foregoing embodiments of the present application, or the steps performed by the first device.
  • the computer instructions are stored in a storage unit.
  • various aspects or features of the present application may be implemented as a method, apparatus, or article of manufacture using standard programming and/or engineering techniques.
  • article of manufacture encompasses a computer program accessible from any computer readable device, carrier or medium.
  • computer readable media may include, but are not limited to: magnetic storage devices (eg, hard disks, floppy disks, or magnetic tapes, etc.), optical disks (eg, compact discs (CDs), digital versatile discs (DVDs) etc.), smart cards and flash memory devices (eg, erasable programmable read-only memory (EPROM), card, stick or key drives, etc.).
  • various storage media described herein can represent one or more devices and/or other machine-readable media for storing information.
  • the term "machine-readable medium” may include, but is not limited to, wireless channels and various other media capable of storing, containing, and/or carrying instructions and/or data.
  • each step can be used as a solution, and can also be combined with one or more other steps to form a solution. Not limited.
  • the size of the sequence numbers of the above-mentioned processes does not mean the sequence of execution, and the execution sequence of each process should be determined by its functions and internal logic, rather than the implementation of the embodiments of the present application.
  • the process constitutes any qualification.
  • the disclosed system, apparatus and method may be implemented in other manners.
  • the apparatus embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the functions, if implemented in the form of software functional units and sold or used as independent products, may be stored in a computer-readable storage medium.
  • the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution.
  • the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program codes .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Algebra (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Physics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本申请提供了一种应用于WiFi的安全认证的方法和装置。其中,接入点AP根据口令,基于双基密码指数密钥交换TBPEKE协议,与第一设备协商配对主密钥PMK,其中,该口令为AP与第一设备之间的共享密钥;AP根据该PMK,与第一设备进行4路握手。因此,本申请实施例中,通过执行TBPEKE流程能够生成高熵值的PMK,从而本申请实施例提供的安全认证的方法能够有助于抗离线字典攻击。并且由于TBPEKE能够很容易地实现防侧信道攻击,因此本申请实施例通过执行TBPEKE来生成PMK,能够提高AP和第一设备在WiFi的安全认证过程中的防侧信道攻击的能力,有助于AP和第一设备在安全认证时避免遭致侧信道攻击。

Description

应用于WiFi的安全认证的方法和装置 技术领域
本申请涉及通信领域,并且更具体的,涉及一种应用于无线保真(wireless fidelity,WiFi)的安全认证的方法和装置。
背景技术
WiFi是创建于IEEE 802.11标准的无线局域网技术,广泛使用于家庭、公共场合(比如商场、公司内部等)场景。安全协议是WiFi的基础,控制谁可以使用网络。具体的,WiFi安全协议使得请求者(supplicant)和接入点(access point,AP)相互认证,并生成会话密钥(sessionkey)和群播密钥(group transient key,GTK),其中会话密钥可以用于保护后续supplicant和AP之间的单播通信,群播密钥用于保护AP的广播通信。
在WiFi安全协议中,supplicant和AP双方共享口令(pw)。Supplicant和AP双方可以基于各自的pw推导出配对主密钥(pairwise master key,PMK),进而supplicant和AP双方可以根据PMK进行身份认证和计算配对临时密钥(pairwise transient key,PTK),并且AP可以将群播密钥传递给supplicant。其中,PTK中包括临时密钥TK,即会话密钥。
目前,最新的WiFi安全协议为第三代WiFi保护访问(WiFiprotected access 3,WPA3)。在WPA3版本中,supplicant和AP双方可以执行同时证等(simultaneous authentication of equals,SAE),使用共享的低熵值口令实现相互身份认证并生成高熵值的共享密钥,避免口令的暴力破解。但是,当前的WPA3版本并不能有效阻止侧信道攻击,或拒绝服务(denialofservice,DoS)攻击。
发明内容
本申请提供一种应用于WiFi的安全认证的方法和装置,能够有助于AP和第一设备在安全认证时避免遭致侧信道攻击。
第一方面,提供了一种应用于WiFi的安全认证的方法,该方法可以应用于接入点AP,例如由AP,或可配置于AP的部件(例如芯片或者电路等)执行。
在该方法中,接入点AP根据口令,基于双基密码指数密钥交换TBPEKE协议,与第一设备协商配对主密钥PMK,其中,该口令为AP与第一设备之间的共享密钥。然后,AP根据该PMK,与第一设备进行4路握手。
因此,本申请实施例中,通过执行TBPEKE流程能够生成高熵值的PMK,从而本申请实施例提供的安全认证的方法能够有助于抗离线字典攻击。并且由于TBPEKE能够很容易地实现防侧信道攻击,因此本申请实施例通过执行TBPEKE来生成PMK,能够提高AP和第一设备在WiFi的安全认证过程中的防侧信道攻击的能力,有助于AP和第一设备在安全认证时避免遭致侧信道攻击。
其中,TBPEKE也是一种PAKE协议。在一些实施例中,可以将现有的WPA3安全 协议中的SAE流程替换为TBPEKE流程,来生成高熵值的PMK。
结合第一方面,在第一方面的某些实现方式中,上述PMK包括第一PMK1和第二PMK2。
其中,所述AP根据口令,基于双基密码指数密钥交换TBPEKE协议,与第一设备协商配对主密钥PMK,具体可以通过以下方式实现:
AP从第一设备获取第一参数X,其中,第一参数X是根据哈希到曲线函数(hashtocurve)g确定的,该哈希到曲线函数g用于通过点乘运算将口令转化为椭圆曲线上的点,X=g x,其中,x为随机数。然后,AP向第一设备发送第二参数Y,以指示第一设备根据第一参数X和第二参数Y计算第一PMK1,其中,第二参数Y是根据哈希到曲线函数g确定的,Y=g y,y为随机数。之后,AP根据所述第一参数X、所述第二参数Y,计算第二PMK2。
因此,本申请实施例中,第一设备可以向AP发送第一参数X,AP可以向第一设备发送第二参数Y,其中,第一参数X和第二参数Y分别是根据hashtocurve函数g确定的,进而第一设备可以根据该第一参数X、第二参数Y,来计算PMK1,AP可以根据该第一参数X、第二参数Y,来计算PMK2。在本申请实施例中,AP和第一设备之间传输的第一参数X和第二参数Y是基于hashtocurve函数g和随机数生成的,并不涉及口令的计算,从而攻击者很难知道口令,进而能够提高AP和第一设备在WiFi的安全认证过程中的防侧信道攻击的能力,有助于AP和第一设备在安全认证时避免遭致侧信道攻击。
而在现有技术中,当在WPA3协议中采用SAE流程计算PMK时,需要利用共享口令进行计算,这样,通过信道测试,结合暴力破解等手段,攻击者可以获取口令,从而导致口令泄露。
结合第一方面,在第一方面的某些实现方式中,所述接入点AP根据口令,基于双基密码指数密钥交换TBPEKE协议,与第一设备协商配对主密钥PMK之前,还可以与所述第一设备进行关联商定欲使用的安全套件,其中,所述安全套件用于指示所述哈希到曲线函数g。
在第一PMK1和第二PMK2相同时,AP和第一设备可以基于PMK,进行4路握手。
结合第一方面,在第一方面的某些实现方式中,所述AP根据所述PMK,与所述第一设备进行4路握手,具体可以通过以下方式实现:
AP向第一设备发送第一消息,第一消息用于指示第一设备生成第一配对临时密钥PTK1,第一消息包括AP的一次性随机数,该第一PTK1是根据第一PMK1、AP的一次性随机数和第一设备的一次性随机数生成的,第一PTK1中包括第一密钥确认密钥KCK1、第一密钥加密密钥KEK1和第一临时密钥TK1。然后,AP从第一设备获取第二消息,第二消息采用第一KCK1来保护消息的完整性,第二消息包括第一设备的一次性随机数。AP根据第二PMK2、AP的一次性随机数和第一设备的一次性随机数生成第二PTK2,第二PTK2中包括第二KCK2、第二KEK2和第二TK2。然后,AP向第一设备发送第三消息,第三消息包括群播密钥GTK,第三消息采用所述第二KEK2来保护所述GTK的私密性,所述第二KCK2来保护消息的完整性。AP从第一设备获取第四消息,所述第四消息用于响应所述第三消息,所述第四消息采用所述第二KCK2来保护消息的完整性。
因此,AP和第一设备根据PMK,执行双方通过4路握手过程,能够进行身份认证,并生成会话密钥和群播密钥,以保护后续请求设备和AP之间的单播通信,以及AP的广 播通信。
需要说明的是,在第一PTK1与第二PTK2相同时,AP和第一设备能够成功地进行4路握手。
可选的,AP和第一设备基于PMK,进行4路握手之前,还可以进行一次关联,商定欲使用的安全套件,该安全套件例如可以用于指示在4路握手过程中使用的加密算法,以及其他相关参数。具体的,该关联以及4路握手过程可以参见现有技术中的描述,不再赘述。
在一些实施例中,请求设备可以向AP发送第一连接请求,其中包括第一参数X。对应的,AP接收该第一连接请求。响应于该第一连接请求,AP可以与第一设备执行上述安全认证的流程。
结合第一方面,在第一方面的某些实现方式中,AP根据所述第一参数X、所述第二参数Y,计算第二PMK2,具体可以为:AP根据该第一参数X、第二参数Y、第一设备的ID和AP的ID,计算第二PMK2。
作为示例,AP可以根据以下公式计算PMK2:
PMK2=KDF(Z,id dev||id AP||X||Y);
其中,对于AP而言,Z=X y,id dev表示第一设备的ID,id AP表示AP的ID,KDF()为标准的密钥推演函数。
作为示例,第一设备的ID可以为第一设备的MAC地址,AP的ID可以为AP的MAC地址,本申请对此不作限定。
在一些可选的实施例之前,AP还可以发送广播消息,所述广播消息中包括所述AP的ID。对应的,请求设备可以接收到该广播消息,并从中获取到AP的ID。
结合第一方面,在第一方面的某些实现方式中,上述哈希到曲线函数g表示为:
g=U·V pw
其中,U、V分别为从阶数为素数p的循环群G中获取的两个独立的随机生成元,pw表示所述口令。
这里,该hashtocurve函数g即为根据TBPEKE获得的函数。
可选的,广播消息中还可以包括RSNEwithsupp.ciphers,以通知ciphers的能力。相应的,第一设备选择匹配的ciphers,即选择自己支持的密码套件,以获取到上述g,或用于获取g的相关参数(例如U,V等)。第一设备选择了密码套件之后,g,或U,V可以作为系统参数保存在第一设备侧。这里,AP广播RSNEwithsupp.ciphers,以及第一设备选择匹配的ciphers即可以为AP与第一设备进行关联商定欲使用的安全套件的一个示例。
结合第一方面,在第一方面的某些实现方式中,上述哈希到曲线函数g是预先保存在所述AP本地的。
也就是说,AP端可以保管g=U·V pw,而不是口令pw。因此,本申请实施例通过AP端直接保管g=U·V pw,而不是口令pw,能够避免AP在认证设备时实时计算g,从而能够减小AP端的计算量,进而有助于减少或避免在AP遭致拒绝服务(denialofservice,DoS)攻击。
结合第一方面,在第一方面的某些实现方式中,上述第二参数Y是AP根据哈希到曲线函数g生成的。也就是说,当AP接收到第一设备发送的第一参数X时,AP可以根据 预先保存的哈希到曲线函数g,生成第二参数Y,而无需根据口令pw来生成哈希到曲线函数g。
或者,在某些实现方式中,第二参数Y是AP通过重用向第二设备发送的第二参数Y来确定的。另外,由于Y=g y,因此AP端重用第二参数Y,也可以等价于AP端重用随机数y,本申请对此不作限定。
因此,本申请实施例通过AP端重用第二参数Y或随机数y,能够避免AP在认证设备时实时计算第二参数Y,从而能够减小AP端的计算量,进而有助于减少或避免AP遭致DoS攻击。
结合第一方面,在第一方面的某些实现方式中,AP向第一设备发送第二参数Y之前,还可以从第一设备获取第一设备的标识ID,然后,向第一设备发送用于抗DoS服务的凭证(token)。其中,该凭证是根据第一设备的ID和密钥k确定的。然后,AP从第一设备接收该凭证和第一设备的ID,并根据第一设备的ID和密钥k,验证该凭证。
当第一设备发送的凭证验证通过时,AP对第一设备的连接请求进行处理。当该凭证没有通过验证时,AP不对第一设备的连接请求进行处理。
因此,本申请实施例中,AP可以向第一设备发送绑定于该第一设备的ID的抗DoS的token,第一设备需再次向AP发送其ID和该token,使得AP能够对接收到的第一设备的ID和对应的token进行验证,并且只在该token通过验证时才对该第一设备的连接请求进行处理,从而能够有助于避免AP对所有的连接请求都进行处理,进而有助于减少或避免AP遭致DoS攻击。
作为示例,第一设备可以向AP发送第二连接请求,其中可以包括第一参数X、第一设备的标识ID和上述凭证。对应的,AP接收该第二连接请求。
作为示例,第一设备的标识ID可以为第一设备的MAC地址。其中,该第二连接请求的数据帧格式中可以包括第一设备的MAC地址。
结合第一方面,在第一方面的某些实现方式中,所述向所述第一设备发送第二参数Y之前,还可以确定第一列表中没有包括第一设备的ID,其中,第一列表中包括至少一个连接该AP提供的网络的设备的ID。
作为示例,第一列表可以为DEVinPROC列表。
因此,本申请实施例中,通过AP在确定第一设备的ID不在第一列表中时,才会进一步处理该第一设备的连接请求,能够有助于避免AP对所有的连接请求都进行处理,有助于减小AP端的计算量,进而有助于减少或避免AP遭致DoS攻击。
结合第一方面,在第一方面的某些实现方式中,还可以在上述第一列表中增加第一设备的ID。
这样,能够实现对第一列表的更新。进一步的,当后续再接收到该包含该第一设备的ID的连接请求时,由于该ID已经包含在第一列表中,AP可以不对该连接请求进行处理,从而有助于减少或避免AP遭致DoS攻击。
第二方面,提供了一种应用于WiFi的安全认证的方法,该方法可以应用于第一设备,例如由第一设备,或可配置于第一设备的部件(例如芯片或者电路等)执行。
在该方法中,第一设备根据口令,基于于双基密码指数密钥交换TBPEKE协议,与接入点AP协商配对主密钥PMK,其中,所述口令为所述AP与所述第一设备之间的共享 密钥。然后,所述第一设备根据所述PMK,与所述AP进行4路握手。
结合第二方面,在第二方面的某些实现方式中,所述PMK包括第一PMK1和第二PMK2,上述第一设备根据口令,基于于双基密码指数密钥交换TBPEKE协议,与接入点AP协商配对主密钥PMK,具体可以通过以下方式实现:
第一设备向AP发送第一参数X,其中,第一参数X是根据哈希到曲线函数g确定的,哈希到曲线函数g用于通过点乘运算将所述口令转化为椭圆曲线上的点,X=g x,其中,x为随机数;第一设备从所述AP获取第二参数Y,其中,所述第二参数Y是根据哈希到曲线函数g确定的,Y=g y,y为随机数,其中,第一参数X、第二参数Y用于所述AP计算所述第二PMK2;第一设备根据第一参数X、第二参数Y,计算第一PMK1。
结合第二方面,在第二方面的某些实现方式中,所述第一设备根据口令,基于双基密码指数密钥交换TBPEKE协议,与AP协商配对主密钥PMK之前,还可以与所述AP进行关联商定欲使用的安全套件,其中,所述安全套件用于指示所述哈希到曲线函数g。
结合第二方面,在第二方面的某些实现方式中,所述第一设备根据所述PMK,与所述AP进行4路握手,具体可以通过以下方式实现:
第一设备从AP接收第一消息,第一消息包括所述AP的一次性随机数;所述第一设备根据第一PMK1、AP的一次性随机数、第一设备的一次性随机数,生成第一配对临时密钥PTK1,第一PTK1中包括第一密钥确认密钥KCK1、第一密钥加密密钥KEK1和第一临时密钥TK1。第一设备向AP发送第二消息,第二消息采用第一KCK1来保护消息的完整性,所述第二消息包括所述第一设备的一次性随机数,所述第二消息用于指示所述AP生成第二PTK2,所述第二PTK2是根据所述第二PMK2、所述AP的一次性随机数和所述第一设备的一次性随机数生成的,所述第二PTK2中包括第二KCK2、第二KEK2和第二TK2;第一设备从AP获取第三消息,第三消息包括群播密钥GTK,第三消息采用第二KEK2来保护所述GTK的私密性,采用所述第二KCK2来保护消息的完整性;第一设备向AP发送第四消息,所述第四消息用于响应所述第三消息,所述第四消息采用KCK来保护消息的完整性。
结合第二方面,在第二方面的某些实现方式中,所述哈希到曲线函数g表示为:
g=U·V pw
其中,U、V分别为从阶数为素数p的循环群G中获取的两个独立的随机生成元,pw表示所述口令。
结合第二方面,在第二方面的某些实现方式中,所述从所述AP接收第二参数Y之前,还可以向所述AP发送所述第一设备的标识ID,然后从所述AP接收用于抗拒绝服务DoS服务的凭证,所述凭证是根据密钥k和所述第一设备的ID生成的。然后,可以向所述AP发送所述凭证和所述请求设备的ID。
结合第二方面,在第二方面的某些实现方式中,所述第一设备的ID包括所述第一设备的MAC地址。
第三方面,提供了一种应用于WiFi的安全认证的装置,用于执行上述第一方面或第一方面的任意可能的实现方式中的方法,具体的,该装置包括用于执行上述第一方面或第一方面的任意可能的实现方式中的方法的单元或模块。例如,该装置包括处理单元和收发单元。
处理单元可以根据口令,基于双基密码指数密钥交换TBPEKE协议,与第一设备协商配对主密钥PMK,其中,所述口令为所述AP与所述第一设备之间的共享密钥。示例性的,处理单元可以通过收发单元与第一设备进行协商。
处理单元还可以根据所述PMK,与所述第一设备进行4路握手。示例性的,处理单元可以通过收发单元与第一设备进行4路握手。
结合第三方面,在第三方面的某些实现方式中,所述PMK包括第一PMK1和第二PMK2。
其中,收发单元用于从所述第一设备获取第一参数X,其中,所述第一参数X是根据哈希到曲线函数g确定的,所述哈希到曲线函数g用于通过点乘运算将所述口令转化为椭圆曲线上的点,X=g x,其中,x为随机数。
收发单元还用于向所述第一设备发送第二参数Y,以指示所述第一设备根据所述第一参数X和第二参数Y计算所述第一PMK1,其中,所述第二参数Y是根据所述哈希到曲线函数g确定的,Y=g y,y为随机数,
处理单元用于根据收发单元获取的所述第一参数X,以及所述第二参数Y,计算所述第二PMK2。
结合第三方面,在第三方面的某些实现方式中,所述处理单元还用于与所述第一设备进行关联商定欲使用的安全套件,其中,所述安全套件用于指示所述哈希到曲线函数g。
结合第三方面,在第三方面的某些实现方式中,
收发单元用于向所述第一设备发送第一消息,所述第一消息用于指示所述第一设备生成第一配对临时密钥PTK1,所述第一消息包括所述AP的一次性随机数,所述第一PTK1是根据所述第一PMK1、所述AP的一次性随机数和所述第一设备的一次性随机数生成的,所述第一PTK1中包括第一密钥确认密钥KCK1、第一密钥加密密钥KEK1和第一临时密钥TK1。
收发单元还用于从所述第一设备获取第二消息,所述第二消息采用所述第一KCK1来保护消息的完整性,所述第二消息包括所述第一设备的一次性随机数。
处理单元还用于根据所述第二PMK2、所述AP的一次性随机数和所述第一设备的一次性随机数生成所述第二PTK2,所述第二PTK2中包括第二KCK2、第二KEK2和第二TK2。
收发单元还用于向所述第一设备发送第三消息,所述第三消息包括群播密钥GTK,所述第三消息采用所述第二KEK2来保护所述GTK的私密性,采用所述第二KCK2来保护消息的完整性。
收发单元还用于从所述第一设备获取第四消息,所述第四消息用于响应所述第三消息,所述第四消息采用所述第二KCK2来保护消息的完整性。
结合第三方面,在第三方面的某些实现方式中,所述哈希到曲线函数g表示为:
g=U·V pw
其中,U、V分别为从阶数为素数p的循环群G中获取的两个独立的随机生成元,pw表示所述口令。
结合第三方面,在第三方面的某些实现方式中,所述哈希到曲线函数g是预先保存在所述AP本地的。
结合第三方面,在第三方面的某些实现方式中,所述第二参数Y是所述AP根据所述哈希到曲线函数g生成的;或者所述第二参数Y是所述AP通过重用向第二设备发送的第二参数Y来确定的。
结合第三方面,在第三方面的某些实现方式中,所述收发单元还用于从所述第一设备获取所述第一设备的标识ID,以及向所述第一设备发送用于抗DoS服务的凭证,其中,所述凭证是根据所述第一设备的标识ID和密钥k确定的。
收发单元还用于从所述第一设备获取所述凭证和所述第一设备的ID。
处理单元还用于根据所述第一设备的ID和所述密钥k,验证所述凭证。
结合第三方面,在第三方面的某些实现方式中,处理单元还用于确定第一列表中没有包括所述第一设备的ID,其中,所述第一列表中包括至少一个连接所述AP提供的网络的设备的ID。
结合第三方面,在第三方面的某些实现方式中,处理单元还用于在所述第一列表中增加所述第一设备的ID。
结合第三方面,在第三方面的某些实现方式中,所述第一设备的ID包括所述第一设备的MAC地址。
第四方面,提供了一种应用于WiFi的安全认证的装置,用于执行上述第二方面或第二方面的任意可能的实现方式中的方法,具体的,该装置包括用于执行上述第二方面或第二方面的任意可能的实现方式中的方法的单元或模块。例如,该装置包括处理单元和收发单元。
处理单元可以根据口令,基于于双基密码指数密钥交换TBPEKE协议,与接入点AP协商配对主密钥PMK,其中,所述口令为所述AP与所述第一设备之间的共享密钥。示例性的,处理单元可以通过收发单元与AP进行协商。
处理单元还可以根据所述PMK,与所述AP进行4路握手。示例性的,处理单元可以通过收发单元与第一设备进行4路握手。
结合第四方面,在第四方面的某些实现方式中,所述PMK包括第一PMK1和第二PMK2。
其中,收发单元用于向所述AP发送第一参数X,其中,所述第一参数X是根据哈希到曲线函数g确定的,所述哈希到曲线函数g用于通过点乘运算将所述口令转化为椭圆曲线上的点,X=g x,其中,x为随机数。
收发单元还用于从所述AP获取第二参数Y,其中,所述第二参数Y是根据所述哈希到曲线函数g确定的,Y=g y,y为随机数,其中,所述第一参数X、所述第二参数Y用于所述AP计算所述第二PMK2。
处理单元用于根据所述第一参数X、所述第二参数Y,计算第一PMK1。
结合第四方面,在第四方面的某些实现方式中,所述处理单元还用于与所述AP进行关联商定欲使用的安全套件,其中,所述安全套件用于指示所述哈希到曲线函数g。
结合第四方面,在第四方面的某些实现方式中,
收发单元还用于从所述AP接收第一消息,所述第一消息包括所述AP的一次性随机数。
处理单元还用于所述第一设备根据所述第一PMK1、所述AP的一次性随机数、所述 第一设备的一次性随机数,生成第一配对临时密钥PTK1,所述第一PTK1中包括第一密钥确认密钥KCK1、第一密钥加密密钥KEK1和第一临时密钥TK1。
收发单元还用于向所述AP发送第二消息,所述第二消息采用所述第一KCK1来保护消息的完整性,所述第二消息包括所述第一设备的一次性随机数,所述第二消息用于指示所述AP生成第二PTK2,所述第二PTK2是根据所述第二PMK2、所述AP的一次性随机数和所述第一设备的一次性随机数生成的,所述第二PTK2中包括第二KCK2、第二KEK2和第二TK2。
收发单元还用于从所述AP获取第三消息,所述第三消息包括群播密钥GTK,所述第三消息采用所述第二KEK2来保护所述GTK的私密性,采用所述第二KCK2来保护消息的完整性。
收发单元还用于向所述AP发送第四消息,所述第四消息用于响应所述第三消息,所述第四消息采用KCK来保护消息的完整性。
结合第四方面,在第四方面的某些实现方式中,所述哈希到曲线函数g表示为:
g=U·V pw
其中,U、V分别为从阶数为素数p的循环群G中获取的两个独立的随机生成元,pw表示所述口令。
结合第四方面,在第四方面的某些实现方式中,收发单元还用于向所述AP发送所述第一设备的标识ID。
收发单元还用于从所述AP接收用于抗拒绝服务DoS服务的凭证,所述凭证是根据密钥k和所述第一设备的ID生成的;
收发单元还用于向所述AP发送所述凭证和所述请求设备的ID。
结合第四方面,在第四方面的某些实现方式中,所述第一设备的ID包括所述第一设备的MAC地址。
第五方面,提供了一种应用于WiFi的安全认证的装置,包括:处理器和收发器。可选的,还可以包括存储器。其中,该存储器用于存储指令,该处理器用于执行该存储器存储的指令,并且当该处理器执行该存储器存储的指令时,该执行使得该处理器执行上述第一方面或第一方面的任意可能的实现方式中的方法。
所述处理器,耦合至所述收发器,用于根据口令,基于双基密码指数密钥交换TBPEKE协议,与第一设备协商配对主密钥PMK,其中,所述口令为AP与所述第一设备之间的共享密钥,以及根据所述PMK,与所述第一设备进行4路握手。
结合第五方面,在第五方面的某些实现方式中,所述PMK包括第一PMK1和第二PMK2,其中,所述处理器具体用于指示所述收发器从所述第一设备获取第一参数X,其中,所述第一参数X是根据哈希到曲线函数g确定的,所述哈希到曲线函数g用于通过点乘运算将所述口令转化为椭圆曲线上的点,X=g x,其中,x为随机数;以及指示所述收发器向所述第一设备发送第二参数Y,以指示所述第一设备根据所述第一参数X和第二参数Y计算所述第一PMK1,其中,所述第二参数Y是根据所述哈希到曲线函数g确定的,Y=g y,y为随机数;以及根据所述第一参数X、所述第二参数Y,计算所述第二PMK2。
结合第五方面,在第五方面的某些实现方式中,所述处理器还用于与所述第一设备进行关联商定欲使用的安全套件,其中,所述安全套件用于指示所述哈希到曲线函数g。
结合第五方面,在第五方面的某些实现方式中,处理器还用于指示所述收发器向所述第一设备发送第一消息,所述第一消息用于指示所述第一设备生成第一配对临时密钥PTK1,所述第一消息包括所述AP的一次性随机数,所述第一PTK1是根据所述第一PMK1、所述AP的一次性随机数和所述第一设备的一次性随机数生成的,所述第一PTK1中包括第一密钥确认密钥KCK1、第一密钥加密密钥KEK1和第一临时密钥TK1。
处理器还用于指示所述收发器从所述第一设备获取第二消息,所述第二消息采用所述第一KCK1来保护消息的完整性,所述第二消息包括所述第一设备的一次性随机数;根据所述第二PMK2、所述AP的一次性随机数和所述第一设备的一次性随机数生成所述第二PTK2,所述第二PTK2中包括第二KCK2、第二KEK2和第二TK2。
处理器还用于指示所述收发器向所述第一设备发送第三消息,所述第三消息包括群播密钥GTK,所述第三消息采用所述第二KEK2来保护所述GTK的私密性,采用所述第二KCK2来保护消息的完整性。
处理器还用于指示所述收发器从所述第一设备获取第四消息,所述第四消息用于响应所述第三消息,所述第四消息采用所述第二KCK2来保护消息的完整性。
结合第五方面,在第五方面的某些实现方式中,所述哈希到曲线函数g表示为:
g=U·V pw
其中,U、V分别为从阶数为素数p的循环群G中获取的两个独立的随机生成元,pw表示所述口令。
结合第五方面,在第五方面的某些实现方式中,所述哈希到曲线函数g是预先保存在所述AP本地的。
结合第五方面,在第五方面的某些实现方式中,所述第二参数Y是所述AP根据所述哈希到曲线函数g生成的;或者所述第二参数Y是所述AP通过重用向第二设备发送的第二参数Y来确定的。
结合第五方面,在第五方面的某些实现方式中,所述处理器还用于指示所述收发器从所述第一设备获取所述第一设备的标识ID,以及指示所述收发器向所述第一设备发送用于抗DoS服务的凭证,其中,所述凭证是根据所述第一设备的标识ID和密钥k确定的。
处理器还用于指示所述收发器从所述第一设备获取所述凭证和所述第一设备的ID,并根据所述第一设备的ID和所述密钥k,验证所述凭证。
结合第五方面,在第五方面的某些实现方式中,所述处理器还用于确定第一列表中没有包括所述第一设备的ID,其中,所述第一列表中包括至少一个连接所述AP提供的网络的设备的ID。
结合第五方面,在第五方面的某些实现方式中,所述处理器还用于在所述第一列表中增加所述第一设备的ID。
结合第五方面,在第五方面的某些实现方式中,所述第一设备的ID包括所述第一设备的MAC地址。
第六方面,提供了一种应用于WiFi的安全认证的装置,包括:处理器和收发器。可选的,还可以包括存储器。其中,该存储器用于存储指令,该处理器用于执行该存储器存储的指令,并且当该处理器执行该存储器存储的指令时,该执行使得该处理器执行上述第二方面或第二方面的任意可能的实现方式中的方法。
所述处理器,耦合至所述收发器,用于根据口令,基于于双基密码指数密钥交换TBPEKE协议,与接入点AP协商配对主密钥PMK,其中,所述口令为所述AP与所述第一设备之间的共享密钥;以及根据所述PMK,与所述AP进行4路握手。
结合第六方面,在第六方面的某些实现方式中,所述PMK包括第一PMK1和第二PMK2。
其中,所述处理器具体用于指示所述收发器向所述AP发送第一参数X,其中,所述第一参数X是根据哈希到曲线函数g确定的,所述哈希到曲线函数g用于通过点乘运算将所述口令转化为椭圆曲线上的点,X=g x,其中,x为随机数。
处理器还用于指示所述收发器从所述AP获取第二参数Y,其中,所述第二参数Y是根据所述哈希到曲线函数g确定的,Y=g y,y为随机数,其中,所述第一参数X、所述第二参数Y用于所述AP计算所述第二PMK2。
处理器还用于根据所述第一参数X、所述第二参数Y,计算第一PMK1。
结合第六方面,在第六方面的某些实现方式中,所述处理器还用于与所述AP进行关联商定欲使用的安全套件,其中,所述安全套件用于指示所述哈希到曲线函数g。
结合第六方面,在第六方面的某些实现方式中,处理器还用于指示所述收发器从所述AP接收第一消息,所述第一消息包括所述AP的一次性随机数;根据所述第一PMK1、所述AP的一次性随机数、所述第一设备的一次性随机数,生成第一配对临时密钥PTK1,所述第一PTK1中包括第一密钥确认密钥KCK1、第一密钥加密密钥KEK1和第一临时密钥TK1。
处理器还用于指示所述收发器向所述AP发送第二消息,所述第二消息采用所述第一KCK1来保护消息的完整性,所述第二消息包括所述第一设备的一次性随机数,所述第二消息用于指示所述AP生成第二PTK2,所述第二PTK2是根据所述第二PMK2、所述AP的一次性随机数和所述第一设备的一次性随机数生成的,所述第二PTK2中包括第二KCK2、第二KEK2和第二TK2。
处理器还用于指示所述收发器从所述AP获取第三消息,所述第三消息包括群播密钥GTK,所述第三消息采用所述第二KEK2来保护所述GTK的私密性,采用所述第二KCK2来保护消息的完整性。
处理器还用于指示所述收发器向所述AP发送第四消息,所述第四消息用于响应所述第三消息,所述第四消息采用KCK来保护消息的完整性。
结合第六方面,在第六方面的某些实现方式中,所述哈希到曲线函数g表示为:
g=U·V pw
其中,U、V分别为从阶数为素数p的循环群G中获取的两个独立的随机生成元,pw表示所述口令。
结合第六方面,在第六方面的某些实现方式中,所述处理器还用于指示所述收发器向所述AP发送所述第一设备的标识ID。
处理器还用于指示所述收发器从所述AP接收用于抗拒绝服务DoS服务的凭证,所述凭证是根据密钥k和所述第一设备的ID生成的。
处理器还用于指示所述收发器向所述AP发送所述凭证和所述请求设备的ID。
结合第六方面,在第六方面的某些实现方式中,所述第一设备的ID包括所述第一设 备的MAC地址。
第七方面,提供了一种应用于WiFi的安全认证的芯片,包括处理器和通信接口,所述处理器用于从所述通信接口调用并运行指令,当所述处理器执行所述指令时,实现上述第一方面至第二方面中任一方面或任一方面的任意可能的实现方式中的方法。
可选地,该芯片还可以包括存储器,该存储器中存储有指令,处理器用于执行存储器中存储的指令或源于其他的指令。当该指令被执行时,处理器用于实现上述第一方面至第二方面中任一方面或任一方面的任意可能的实现方式中的方法。
第八方面,提供了一种计算机可读介质,用于存储计算机程序,该计算机程序包括用于执行第一方面至第二方面中任一方面或任一方面的任意可能的实现方式中的方法的指令。
第九方面,本申请实施例还提供一种包含指令的计算机程序产品,当该计算机程序产品在计算机上运行时,使得该计算机执行第一方面至第二方面中任一方面或任一方面的任意可能的实现方式中的方法。
第十方面,提供了一种通信系统,该通信系统包括具有实现上述第一方面的各方法及各种可能设计的功能的装置,以及上述具有实现上述第二方面的各方法及各种可能设计的功能的装置。
应理解,本申请的第二至第十方面及对应的实现方式所取得的有益效果参见本申请的第一方面及对应的实现方式所取得的有益效果,不再赘述。
附图说明
图1是一种基于WiFi的安全认证的方法的示意性流程图;
图2是一种基于WPA3的安全认证的方法的示意性流程图;
图3是应用本申请实施例的应用场景的一个示意图;
图4是本申请实施例提供的一种应用于WiFi的安全认证的方法的示意性流程图;
图5是TBPEKE的流程的一个示例;
图6是本申请实施例提供的一种应用于WiFi的安全认证的方法的示意性流程图;
图7是本申请实施例提供的另一种应用于WiFi的安全认证的方法的示意性流程图;
图8是本申请实施例提供的另一种应用于WiFi的安全认证的方法的示意性流程图;
图9是本申请实施例提供的另一种应用于WiFi的安全认证的方法的示意性流程图;
图10为本申请实施例提供的应用于WiFi的安全认证的装置的示意图。
具体实施方式
下面将结合附图,对本申请中的技术方案进行描述。
图1示出了一种基于WiFi的安全认证的方法100的示意性流程图。在图1中,WiFi安全协议可以为第二代WiFi保护访问(WiFiprotected access 2,WPA2)版本,或WPA2之前的版本,例如有线等效保密(wired equivalent privacy,WEP)、第二代WEP(WEP2)、WPA等,不作限定。
图1中所示的流程也可以称为安全协议流程。如图1所示,方法100由请求设备(也可以替换为请求者,supplicant)和AP执行。其中,AP可以基于WiFi协议提供网络,请 求设备即请求使用AP提供的网络的终端设备。AP和请求设备双方共享口令pw。参见图1,方法100可以包括步骤101至109。其中,步骤104至109可以称为4路握手过程(4wayhandshake)。
101,请求设备和AP关联。这里,请求设备和AP通过关联(association)可以欲商定使用的安全套件。示例性的,安全套件可以指示请求设备与AP之间使用的相关的加密算法,以及其他相关参数。
102,请求设备生成PMK。示例性的,请求设备可以基于请求设备和AP双方共享的pw推导出PMK。可选的,请求设备还可以基于请求设备和AP双方的媒体访问控制(media access control,MAC)地址得到PMK,本申请对此不作限定。
103,AP生成PMK。示例性的,AP可以基于请求设备和AP双方共享的pw推导出PMK。可选的,AP还可以基于请求设备和AP双方的MAC地址得到PMK,本申请对此不作限定。
在一些实施例中,在请求设备生成的PMK和AP生成的PMK相同时,AP和第一设备可以基于PMK,进行4路握手。
104,AP向请求设备发送Msg1(r,anonce)。对应的,请求设备接收该Msg1(r,anonce)。这里,Msg1表示消息1(message1),anonce表示AP的一次性随机数,r表示计数器的计数。
105,请求设备派生(derive)PTK。
示例性的,请求设备可以选择一次性随机数(表示为snonce),并根据PMK、anonce、snonce生成PTK。可选的,请求设备还可以根据PMK、anonce、snonce,以及请求设备和AP双方的MAC地址,生成PTK,本申请对此不作限定。
示例性的,PTK包括三部分,分别为密钥确认密钥(key confirmation key,KCK)、密钥加密密钥(key encryption key,KEK)和临时密钥(transient key,TK)。其中,KCK用于在4路握手过程中保护消息的私密性,KEK用于在4路握手过程中保护消息的完整性,TK为真正的会话密钥,用于保护后续请求设备和AP之间的通信。
106,请求设备向AP发送Msg2({r,snonce} KCK)。对应的,AP接收该Msg2({r,snonce} KCK)。这里,Msg2表示消息2(message 2),其中,该Msg2采用KCK来保护消息的完整性。
107,AP derivePTK。
示例性的,AP可以根据PMK、anonce、snonce生成PTK。可选的,AP还可以根据PMK、anonce、snonce,以及请求设备和AP双方的MAC地址,生成PTK,本申请对此不作限定。
在一些实施例中,请求设备生成的PTK与AP生成的PTK相同。在请求设备生成的PTK与AP生成的PTK相同时,执行以下的流程。
108,AP向请求设备发送Msg3({r+1,anonce,{GTK} KEK} KCK)。对应的,AP接收该Msg3({r+1,anonce,{GTK} KEK} KCK)。这里,Msg3表示消息3(message 3),GTK为群播密钥。其中,该Msg3采用KEK保护GTK的私密性,采用KCK来保护Msg3整条消息的完整性。
108,请求设备向AP发送Msg4({r+1} KCK)。对应的,AP接收该Msg4({r+1} KCK)。 这里,Msg4表示消息4(message 4)。其中,该Msg4采用KCK来保护消息的完整性。
具体的,该步骤101至108可以参见现有技术中的描述,不再赘述。
由上述描述可知,AP和请求设备双方通过4路握手过程,能够进行身份认证,并生成会话密钥和群播密钥,以保护后续请求设备和AP之间的单播通信,以及AP的广播通信。
在上述方法100中,PMK是由口令pw(或以及双方的MAC地址)计算得到的,而口令pw的一个显著特点是其长度较小,即具有较低的熵值。因此,如果攻击者截取到了生成密钥的过程中的4路握手的消息,那么攻击者就可能通过暴力破解的方式得到口令,从而威胁网络安全。
为了解决WPA2以及以前的WiFi安全协议版本中的攻击者可能对口令pw进行暴力破解的隐患,WPA3版本在传统的安全协议流程(例如association和4路握手流程)之前,执行SAE流程来生成高熵值的PMK,从而有利于避免口令的暴力破解。其中,SAE为一种基于口令的密码认证和密钥交换(password authenticated key exchange,PAKE)协议。
图2示出了一种基于WPA3的安全认证的方法200的示意性流程图。方法200可以包括请求设备和AP双方生成PMK、关联以及4路握手过程。与方法100不同的是,在图2中通过执行SAE流程来生成高熵值的PMK(即步骤210),其中,SAE实现于椭圆曲线上。作为示例,在图2中以Alice(例如为一个客户端)和Bob(例如为一个AP)双方执行SAE流程为例描述。如图2所示,步骤210包括步骤211至220。
211,Alice选取(pick)随机数(random)r A和m A,计算s A=(r A+m A)modq,E A=-m A·P。
212,Bob选取(pick)随机数(random)r B和m B,计算s B=(r B+m B)modq,E B=-m B·P。
其中,P是相应椭圆曲线上的一个点,可以由口令pw,以及supplicant和AP的MAC地址推衍生成P。这里,由口令pw生成P的计算过程可以称为哈希到曲线(hash-to-curve)函数。
213,Alice向Bob验证提交(auth-commit)(s A,E A)。
214,Bob向Alice验证提交(auth-commit)(s B,E B)。
215,Alice校验(verify)s B和E B,计算K=r A(s B·P+E B),κ=hash(K),tr=(s A,E A,s B,E B),c A=HMAC(κ,tr)。其中,κ=hash(K)可以作为PMK。
216,Bob校验(verify)s A和E A,计算K=r B(s A·P+E A),κ=hash(K),tr=(s B,E B,s A,E A),c B=HMAC(κ,tr)。其中,κ=hash(K)可以作为PMK。
217,Alice向Bob验证提交c A
218,Bob向Alice验证提交c B
219,Alice校验c B
220,Bob校验c A
当步骤219和220中c B和c A都通过校验后,Alice和Bob双方可以采用各自计算的κ值作为PMK。
但是,上述SAE流程中,由于在计算P的过程中需要利用共享口令pw进行计算,因此通过信道测试,结合暴力破解等手段,攻击者可以获取pw,从而导致口令泄露。有鉴于此,本申请实施例提供了一种通信方案,其中,AP和第一设备(例如请求设备)根据口令,基于双基密码指数密钥交换TBPEKE协议,协商配对主密钥PMK,并根据该PMK, 进行4路握手。由于TBPEKE能够很容易地实现防侧信道攻击,因此本申请实施例通过执行TBPEKE来生成PMK,能够提高AP和第一设备在WiFi的安全认证过程中的防侧信道攻击的能力,从而有助于AP和第一设备在安全认证时避免遭致侧信道攻击。
图3示出了应用本申请实施例的应用场景的一个示意图。如图3所示,多个请求设备(例如请求设备1、请求设备2和请求设备3)可以安全连接到AP,并通过AP使用WiFi网络资源。其中,每个请求设备与AP执行安全协议,进行相互认证并协商保护二者之间通信信道的密钥。这里,不同的请求设备可以使用相同的口令与AP执行安全协议。这里,请求设备例如可以为第一设备。
应理解,图3示出了应用于本申请实施例的系统的一个示例,但本申请并不限于此。例如,还可以是一个、两个、四个或者更多的请求设备与AP连接,这些都在本申请实施例的保护范围之内。
下面将结合附图详细说明本申请提供的应用于WiFi的安全认证的方法和装置。
本申请的技术方案可以应用于WiFi通信系统中,例如,图3中所示的通信系统。处于WiFi通信系统中的装置之间可具有无线通信连接关系。该装置中的一个装置例如可以为AP,或者配置于该AP中的芯片,另一个装置例如可以为第一设备,或者配置于第一设备中的芯片。本申请实施例对此不做限定。
以下,将以AP、第一设备的安全认证过程为例详细说明本申请实施例。可以理解,配置于AP的芯片、配置于第一设备的芯片均可以基于相同的方法进行安全认证。本申请对此不做限定。
图4示出了本申请实施例提供的一种应用于WiFi的安全认证的方法400的示意性流程图。方法400可以包括步骤410至430。
410,AP和第一设备可以根据口令,基于双基础密码加密密钥交换(twin base password encrypted key exchange,TBPEKE)协议来协商PMK(即生成PMK)。其中,该口令为AP与第一设备之间的共享密钥。示例性的,在图4中,可以采用TBPEKE协议来代替WPA3中的SAE协议。
420,AP与第一设备根据PMK,进行关联。
430,AP与第一设备进行4路握手。
这里,步骤420和430可以参见图1中的描述,不再赘述。
因此,本申请实施例中,通过执行TBPEKE流程能够生成高熵值的PMK,从而本申请实施例提供的安全认证的方法能够有助于抗离线字典攻击。并且由于TBPEKE能够很容易地实现防侧信道攻击,因此本申请实施例通过执行TBPEKE来生成PMK,能够提高AP和第一设备在WiFi的安全认证过程中的防侧信道攻击的能力,有助于AP和第一设备在安全认证时避免遭致侧信道攻击。
其中,TBPEKE也是一种PAKE协议。图5示出了TBPEKE的流程的一个示例。如图5所示,TBPEKE中通信双方A和B的公共参数包括:阶数为素数p的循环群G(Gofprimeorderp),群中两个独立的随机生成元U和V(表示为U,
Figure PCTCN2020131854-appb-000001
),以及输出{0,1} l的哈希函数H(ahashfunctiononto{0,1} l,表示为H:{0,1}*→{0,1} l)。其中,H:{0,1}*→{0,1}为安全杂凑函数,比如可以为SHA256。
在TBPEKE中,A和B共享口令pw。A可以基于公共参数和口令pw,计算:
g←U·V pw
Figure PCTCN2020131854-appb-000002
X←g x
然后,A向B发送A||X。
B也可以基于公共参数和口令pw,计算:
g←U·V pw
Figure PCTCN2020131854-appb-000003
Y←g y
然后,B向A发送Y。
A在接收到Y之后,可以计算:Z←Y x
B在接收到A||X之后,可以计算:Z←X y
然后,A和B分别可以根据A、B、g、X、Y、Z计算密钥sk。示例性的,sk可以根据如下公式进行计算:
sk←H(A||B||g||X||Y||Z)。
需要说明的是,当G表示一个椭圆曲线群时,那么g=U·V pw可以看做是将口令pw转化为椭圆曲线上的一个点的hashtocurve函数。在该hashtocurve函数g中,对于pw而言涉及点乘运算。其中,点乘运算能够有效地实现抗侧信道攻击。
在本申请实施例中,AP和第一设备之间传输的第一参数X和第二参数Y是基于hashtocurve函数g和随机数生成的,并不涉及口令pw的计算,从而攻击者很难知道口令pw,进而能够提高AP和第一设备在WiFi的安全认证过程中的防侧信道攻击的能力。
而在现有技术中,当在WPA3协议中采用SAE流程计算PMK时,需要利用共享口令进行计算,这样,通过信道测试,结合暴力破解等手段,攻击者可以获取口令,从而导致口令泄露。
可选的,在上述步骤410执行的过程中,可以根据需要对上述图5中所示的TBPEKE流程进行一些修改。例如,当B作为AP时,B可以保管g=U·V pw,而不是pw。又例如,对于多个A需要进行身份认证时,B可以重用Y和y,而无需对每个A都使用不同的Y和y。
图6示出了本申请实施例提供的一种应用于WiFi的安全认证的方法600的示意性流程图。作为示例,方法600可由第一设备和AP执行。在方法600中,第一设备和AP双方共享口令pw,并双基密码指数密钥交换TBPEKE协议,协商配对主密钥PMK,并根据该PMK,进行4路握手。如图6所示,方法600包括步骤610至650。
610,第一设备向接入点AP发送X。对应的,AP从第一设备接收X。其中,第一参数X是根据哈希到曲线函数(hashtocurve)g确定的。
在一些实施例中,第一设备可以根据哈希到曲线(hashtocurve)函数g,确定第一参数X。其中,该hashtocurve函数g用于通过点乘运算将口令pw转化为椭圆曲线上的点,X=g x,其中,x为随机数。作为示例,x为从
Figure PCTCN2020131854-appb-000004
中选择的随机数,即
Figure PCTCN2020131854-appb-000005
在一些实施例中,第一设备还可以向接入点AP发送第一设备的ID,第一设备的ID用于唯一地标识该第一设备。示例性的,第一设备可以向AP发送连接请求,该连接请求中可以包括第一参数X和第一设备的ID,本申请对此不作限定。
作为示例,第一设备的ID可以为第一设备的MAC地址,本申请对此不作限定。此时,第一设备向AP发送的消息(例如连接请求)的帧格式中可以包括该MAC地址,本申请对此不作限定。
作为示例,根据上文中的TBPEKE协议,g可表示为如下公式:
g=U·V pw
其中,U、V分别为从阶数为素数p的循环群G中获取的两个独立的随机生成元。
在一些可选的实施例之前,AP还可以发送广播消息,广播消息中还可以包括RSNEwithsupp.ciphers,以通知ciphers的能力。相应的,第一设备选择匹配的ciphers,即选择自己支持的密码套件,以获取到上述g,或用于获取g的相关参数(例如上述U,V)。这里,AP广播RSNEwithsupp.ciphers,以及第一设备选择匹配的ciphers即可以为AP与第一设备进行关联商定欲使用的安全套件的一个示例。作为示例,第一设备选择了密码套件之后,g,或U,V可以作为系统参数保存在第一设备侧。
作为示例,该广播消息可以为信标(beacons)帧,该信标帧可以在步骤610之前发送,本申请对此不作限定。
在一些实施例中,第一设备在执行步骤610,即向AP发送第一参数X之前,可以根据系统参数U和V,以及口令pw,确定hashtocurve函数g。
在一些实施例中,所述广播消息中还可以包括AP的ID。对应的,请求设备可以接收到该广播消息,并从中获取到AP的ID。作为示例,AP的ID可以为AP的MAC地址。
620,AP向所述第一设备发送Y。
在一些实施例中,AP可以确定第二参数Y。其中,第二参数Y是根据hashtocurve函数g确定的,Y=g y,y为随机数。作为示例,y为从
Figure PCTCN2020131854-appb-000006
中选择的随机数,即
Figure PCTCN2020131854-appb-000007
这里,hashtocurve函数g可以参见步骤610中的描述,不再赘述。
作为一种可能的实现方式,AP端可以保管g=U·V pw,而不是口令pw。也就是说,g=U·V pw可以预先保存在AP本地,而口令pw不需要预先保存在AP本地。这样,当AP在接收到第一设备发送的第一参数和该第一设备的MAC地址时,可以直接选择随机数y,并根据随机数y和预先保管的g,计算Y,而不需要根据pw来计算g。
需要说明的是,在步骤610中,第一设备侧确定的g与AP侧保管的g是相同的,例如可以通过在第一设备和AP中分别预置代码实现,本申请对此不作限定。
因此,本申请实施例通过AP端直接保管g=U·V pw,而不是口令pw,能够避免AP在认证设备时实时计算g,从而能够减小AP端的计算量,进而有助于减少或避免AP遭致拒绝服务(denialofservice,DoS)攻击。
作为另一种可能的实现方式,AP端可以重用第二参数Y。作为示例,当AP端与多个第一设备进行设备认证,且这些第一设备可以使用相同的口令pw与AP执行安全协议时,AP可以重用第二参数Y。例如,在AP向第二第一设备发送第二参数Y之后,AP接收到了第一设备发送的第一参数X和该第一设备的ID,那么AP可以不需要再根据Y=g y来计算一个新的第二参数,而是可以直接将之前发送给第二第一设备的该第二参数发送给第一设备。
可以理解的是,由于Y=g y,因此AP端重用第二参数Y,也可以等价于AP端重用随机数y,本申请对此不作限定。
因此,本申请实施例通过AP端重用第二参数Y或随机数y,能够避免AP在认证设备时实时计算第二参数Y,从而能够减小AP端的计算量,进而有助于减少或避免AP遭致DoS攻击。
在其他可能的实现方式中,AP端可以将上述两个独立的随机生成元U和V,作为系 统参数保存,并根据U和V,以及口令pw,确定hashtocurve函数g,并进一步选取随机数y,根据Y=g y,来确定第二参数Y,本申请对此不作限定。
在一些实施例中,在步骤620中,AP可以向第一设备发送对应于连接请求的响应消息,其中可以包括Y,本申请对此不作限定。
630,第一设备确定PMK1。
具体的,第一设备可以根据上述第一参数X、第二参数Y,确定配对主密钥PMK1。
示例性的,第一设备可以根据该第一参数X、第二参数Y、第一设备的ID和AP的ID,计算PMK1。作为示例,第一设备可以根据以下公式计算PMK1:
PMK1=KDF(Z,id dev||id AP||X||Y),
其中,Z=Y x,id dev表示第一设备的ID,id AP表示AP的ID,KDF()为标准的密钥推演函数。
640,AP确定PMK2。
示例性的,AP可以根据上述第一参数X、第二参数Y,确定配对主密钥PMK2。
示例性的,AP可以根据该第一参数X、第二参数Y、第一设备的ID和AP的ID,计算PMK2。作为示例,AP可以根据以下公式计算PMK2:
PMK2=KDF(Z,id dev||id AP||X||Y),
其中,Z=X y,id dev表示第一设备的ID,id AP表示AP的ID,KDF()为标准的密钥推演函数。
650,第一设备和AP进行关联和4路握手。
这里,通过关联和4路握手过程,AP和第一设备双方可以进行相互身份认证,并生成会话密钥和群播密钥,以保护后续请求设备和AP之间的单播通信,以及AP的广播通信。示例性的,在后续的关联和4路握手的过程中,第一设备和AP可以遵照WPA3的规范。作为示例,可以参见图1中的描述,不再赘述。
因此,本申请实施例中,第一设备可以向AP发送第一参数X,AP可以向第一设备发送第二参数Y,其中,第一参数X和第二参数Y分别是根据hashtocurve函数g确定的,进而第一设备可以根据该第一参数X、第二参数Y,来计算PMK1,AP可以根据该第一参数X、第二参数Y,来计算PMK2。在本申请实施例中,AP和第一设备之间传输的第一参数X和第二参数Y是基于hashtocurve函数g和随机数生成的,并不涉及口令的计算,从而攻击者很难知道口令,进而能够提高AP和第一设备在WiFi的安全认证过程中的防侧信道攻击的能力,有助于AP和第一设备在安全认证时避免遭致侧信道攻击。
而在现有技术中,当在WPA3协议中采用SAE流程计算PMK时,需要利用共享口令进行计算,这样,通过信道测试,结合暴力破解等手段,攻击者可以获取口令,从而导致口令泄露。
图7示出了本申请实施例提供的一种应用于WiFi的安全认证的方法700的示意性流程图。作为示例,方法700可由第一设备和AP执行。在方法700中,第一设备和AP双方共享口令pw,并且AP端保管g=U·V pw。具体的,第一设备或AP可以参见上文中的描述。
应理解,图7示出了示出了应用于WiFi的安全认证的方法的步骤或操作,但这些步骤或操作仅是示例,本申请实施例还可以执行其他操作或者图7中的各个操作的变形。此 外,图7中的各个步骤可以按照与图7中呈现的不同的顺序来执行,并且有可能并非要执行图7中的全部操作。
如图7所示,方法700包括步骤701至708。
701,AP广播信标帧。其中,该信标帧中可以包括AP的MAC地址(可表示为MAC AP)。可选的,信标帧中还可以包括RSNEwithsupp.ciphers(robust security network element with supported ciphers),以通知ciphers的能力,本申请对此不作限定。
相应的,在AP的WiFi网络的覆盖范围内的终端设备可以接收到该信标帧,并获取该信标帧中的信息。作为示例,图7中所示的第一设备可以接收到该信标帧,并确定需要连接该AP提供的WiFi网络。
702,第一设备选择密码(selectcipher),选择随机数
Figure PCTCN2020131854-appb-000008
确定X=(U·V pw) x
示例性的,第一设备选择密码,可以指第一设备选择自己支持的密码套件,以获取到hashtocurve函数g,或用于获取g的相关参数(例如U,V等),本申请对此不作限定。第一设备选择了密码套件之后,g,或U,V可以作为系统参数保存在第一设备侧。
作为示例,第一设备选择随机数
Figure PCTCN2020131854-appb-000009
确定X=(U·V pw) x,具体U和V为从阶数为素数p的循环群G中获取两个独立的随机生成元,可以作为系统参数保存在第一设备侧,第一设备可以根据系统参数元U和V,以及口令pw,确定hashtocurve函数g=U·V pw。这里,hashtocurve函数g点乘运算将口令pw转化为椭圆曲线上的点。然后,第一设备可以选择随机数
Figure PCTCN2020131854-appb-000010
并根据hashtocurve函数g和该随机数x,确定第一参数X=(U·V pw)x。具体的,确定第一参数X的过程可以参见图6中步骤610的描述,这里不再赘述。
703,第一设备向AP发送X和MAC dev
示例性的,第一设备可以向AP发送连接请求,其中包括上述第一参数X和第一设备的MAC地址MAC dev,本申请对此不作限定。
需要说明的是,本申请实施例以第一设备的标识为第一设备的MAC地址,AP的标识为AP的MAC地址为例进行描述,但本申请实施例并不限于此。例如,在另一些实施例中,第一设备还可以向AP发送其他唯一用于标识第一设备的标识,本申请对此不作限定。
704,AP选择随机数
Figure PCTCN2020131854-appb-000011
Y=(U·V pw) y
这里,作为一种实现方式,AP端可以保管g=U·V pw,而不是口令pw,因此AP端可以在接收到第一参数X和MAC dev之后,选择随机数y,并根据预先存储的hashtocurve函数g=U·V pw和随机数y,确定第二参数Y=(U·V pw) y
需要说明的是,在步骤702中,第一设备侧确定的g与AP侧保管的g是相同的,例如可以通过在第一设备和AP中分别预置代码实现,本申请对此不作限定。
因此,本申请实施例通过AP端直接保管g=U·V pw,而不是口令pw,能够避免AP在认证设备时实时计算g,从而能够减小AP端的计算量,进而有助于减少或避免遭致DoS攻击。
在一些可选的实施例中,当AP端接收多个(即两个或两个以上)第一设备发送的连接请求时,AP端可以重用y和Y。这样,能够避免AP在认证设备时实时计算第二参数Y,从而能够减小AP端的计算量,进而有助于减少或避免遭致DoS攻击。
705,AP向第一设备发送Y。
706,第一设备计算Z=Y x,PMK=KDF(Z,MAC dev||MAC AP||X||Y)。
707,AP计算Z=X y,PMK=KDF(Z,MAC dev||MAC AP||X||Y)。
具体的,步骤706和707可以参见图6中步骤630和640的描述,不再赘述。
708,第一设备和AP进行关联和4路握手。
这里,通过关联和4路握手过程,AP和第一设备双方可以进行相互身份认证,并生成会话密钥和群播密钥,以保护后续请求设备和AP之间的单播通信,以及AP的广播通信。示例性的,关联和4路握手过程可以参见图1中的描述,不再赘述。
因此,本申请实施例中,第一设备可以向AP发送第一参数X,AP可以向第一设备发送第二参数Y,其中,第一参数X和第二参数Y分别是根据hashtocurve函数g确定的,进而第一设备可以根据该第一参数X、第二参数Y,来计算PMK1,AP可以根据该第一参数X、第二参数Y,来计算PMK2。在本申请实施例中,AP和第一设备之间传输的第一参数X和第二参数Y是基于hashtocurve函数g和随机数生成的,并不涉及口令的计算,从而攻击者很难知道口令,进而能够提高AP和第一设备在WiFi的安全认证过程中的防侧信道攻击的能力,有助于AP和第一设备在安全认证时避免遭致侧信道攻击。
而在现有技术中,当在WPA3协议中采用SAE流程计算PMK时,需要利用共享口令进行计算,这样,通过信道测试,结合暴力破解等手段,攻击者可以获取口令,从而导致口令泄露。
图8示出了本申请实施例提供的一种应用于WiFi的安全认证的方法800的示意性流程图。方法800中,AP可以向第一设备发送抗DoS的凭证token,并对第一设备再次发送的token进行验证,以进一步增强抗DoS攻击的能力。在方法800中,第一设备和AP双方共享口令pw,并且AP端保管g=U·V pw,并额外设置密钥k,密钥k用于生成抗DoS的凭证token。
应理解,图8示出了示出了应用于WiFi的安全认证的方法的步骤或操作,但这些步骤或操作仅是示例,本申请实施例还可以执行其他操作或者图8中的各个操作的变形。此外,图8中的各个步骤可以按照与图8中呈现的不同的顺序来执行,并且有可能并非要执行图8中的全部操作。
如图8所示,方法800包括步骤801至812。
可选的,本申请实施例中,可以设置是否启用(enable)反DoS(anti-DoS)机制。作为示例,可以预先设置标签(label),当启用反DoS机制,可以将标签值设为1,反之可以将标签至设为0。当启用反DoS机制时,可以验证第一设备发送的token,和/或重用Y和y,本申请对此不作限定。
801,AP广播信标帧。相应的,第一设备可以接收到该信标帧,并确定需要连接该AP提供的WiFi网络。
802,第一设备选择密码,选择随机数
Figure PCTCN2020131854-appb-000012
确定X=(U·V pw) x
803,第一设备向AP发送X和MAC dev。对应的,AP接收X和MAC dev
具体的,步骤801至和803可以参见图7中步骤701至703中的描述,这里不再赘述。
804,AP计算token=h(k,MAC dev)。
作为示例,AP在接收到第一设备发送的连接请求时,可以根据保管的密钥k和连接请求中的该第一设备的MAC地址MAC dev,生成绑定于MAC dev地址的token。其中,h() 为安全杂凑函数。
805,AP向第一设备发送token。即,AP在生成绑定于上述MAC dev地址的token之后,向第一设备返回该token。对应的,第一设备接收该token。
806,第一设备向AP发送token、X和MAC dev。对应的,AP接收token、X和MAC dev
作为示例,第一设备再次向AP提交连接请求以及token。示例性的,token可以携带在该连接请求中,本申请对此不作限定。例如,token也可以与连接请求一起封装在一条消息中发送给AP。
示例性的,步骤803中,第一设备可以向AP发送第一连接请求,其中可以包括X和MAC dev;在步骤806中,第一设备可以向AP发送第二连接请求,其中可以包括token、X和MAC dev
807,AP检查(check)token?=h(k,MAC dev)。即,AP检查在步骤806中接收的token是否等于其在步骤804中计算的token。
当token=h(k,MAC dev),即AP在步骤806中接收的token等于其在步骤804中计算的token时,则该token通过验证,此时AP可以进一步处理该第一设备的连接请求。
当token≠h(k,MACdev),即AP在步骤806中接收的token不等于其在步骤804中计算的token时,则该token没有通过验证,此时AP可以不对该第一设备的连接请求进行处理。
可以理解的是,当token没有通过验证时,则表示该token与绑定于该token的MAC地址并不匹配,因此此时该第一设备可能使用了虚假的MAC地址对AP进行恶意攻击,该第一设备可能为攻击者。因此AP可以不对该第一设备的连接请求进行处理,以减少或避免遭致DoS攻击。
在一些可选的实施例中,当设置的label的值为1时,可以执行以上步骤804至807,当设置的label的值为0时,可以不执行以上步骤804至807,本申请对此不作限定。
在另一些可选的实施例中,当没有设置label值,并且AP支持计算并验证上述token时,AP可以在接收到连接请求,即步骤803之后,始终执行步骤804至807,本申请对此不作限定。
808,AP选择随机数
Figure PCTCN2020131854-appb-000013
Y=(U·V pw) y
具体的,步骤808可以参见图7中步骤704的描述,这里不再赘述。
在一些可选的实施例中,当设置的label的值为1,并且AP接收到多个连接请求时,AP可以重用Y和y。当设置的label的值为0时,当AP接收到多个连接请求时,AP不重用Y和y,即分别对不同的第一设备选择y,并计算Y。
在另一些可选的实施例中,当没有设置label值时,AP可以在接收到多个连接请求时,始终重用Y和y,本申请对此不作限定。
809,AP向第一设备发送Y。
810,第一设备计算Z=Y x,PMK=KDF(Z,MAC dev||MAC AP||X||Y)。
811,AP计算Z=X y,PMK=KDF(Z,MAC dev||MAC AP||X||Y)。
812,第一设备和AP进行关联和4路握手。
具体的,步骤809至812可以参见图7中步骤705至708的描述,这里不再赘述。
因此,本申请实施例中,AP可以根据第一设备的MAC地址和AP端保存的密钥,生 成绑定于该第一设备的MAC地址的抗DoS的token,并向第一设备返回该token,第一设备需再次向AP发送其MAC地址和token,使得AP能够对其MAC地址和对应的token进行验证,并且只在该token通过验证时才对该第一设备的连接请求进行处理,从而能够有助于避免AP对所有的连接请求都进行处理,进而有助于减少或避免AP遭致DoS攻击。
图9示出了本申请实施例提供的一种应用于WiFi的安全认证的方法900的示意性流程图。方法900中,AP可以维护一个在连设备(deviceinprocessing,DEVinPROC)的列表,当第一设备不在该在连设备的列表中时,AP才会进一步处理该第一设备的连接请求。在方法900中,第一设备和AP双方共享口令pw,并且AP端可以保管g=U·V pw,并额外设置密钥k。
应理解,图9示出了示出了应用于WiFi的安全认证的方法的步骤或操作,但这些步骤或操作仅是示例,本申请实施例还可以执行其他操作或者图9中的各个操作的变形。此外,图9中的各个步骤可以按照与图9中呈现的不同的顺序来执行,并且有可能并非要执行图9中的全部操作。
如图9所示,方法900包括步骤901至914。
可选的,本申请实施例中,可以设置是否标签(label),当启用反DoS机制,可以将标签值设为1,反之可以将标签至设为0。具体的,可以参见图8中的描述,不再赘述。
901,AP广播信标帧。相应的,第一设备可以接收到该信标帧,并确定需要连接该AP提供的WiFi网络。
902,第一设备选择密码,选择随机数
Figure PCTCN2020131854-appb-000014
确定X=(U·V pw) x
903,第一设备向AP发送X和MAC dev。对应的,AP接收X和MAC dev
具体的,步骤901至903可以参见图8中步骤801至803中的描述,这里不再赘述。
904,AP检查
Figure PCTCN2020131854-appb-000015
计算token=h(k,MAC dev)。
具体的,AP在
Figure PCTCN2020131854-appb-000016
时,计算token=h(k,MAC dev),在MAC dev∈DEVinPROC时,不计算token=h(k,MAC dev)。
作为示例,AP端维护的在连设备的列表(可以表示为DEVinPROC)中可以包括至少一个连接该AP提供的网络的终端设备(即在连设备)的MAC地址。当第一设备的MAC地址不在DEVinPROC中(即
Figure PCTCN2020131854-appb-000017
)时,AP会进一步处理该第一设备的连接请求,即根据该第一设备的MAC地址和AP端保管的密钥,为该第一设备计算token=h(k,MAC dev)。而当第一设备的MAC地址在DEVinPROC中(MAC dev∈DEVinPROC)时,表示该第一设备已经能够连接到该AP提供的网络了,那么可以推测该第一设备使用了虚假的MAC地址对AP进行恶意攻击,该第一设备可能为攻击者。此时,因此AP可以不对该第一设备的连接请求进行处理,即不会为该第一设备计算token,以减少或避免AP遭致DoS攻击。
905,AP向第一设备发送token。即,AP在生成绑定于上述MAC dev地址的token之后,向第一设备返回该token。对应的,第一设备接收该token。
906,第一设备向AP发送token、X和MAC dev
作为示例,第一设备再次向AP提交连接请求以及token。示例性的,token可以携带在该连接请求中,本申请对此不作限定。例如,token也可以与连接请求一起封装在一条消息中发送给AP。
对应的,AP接收token、X和MAC dev
907,AP检查
Figure PCTCN2020131854-appb-000018
检查token?=h(k,MAC dev)。即,AP检查在步骤906中接收的MAC dev是否在DEVinPROC列表中,以及检查token是否等于其在步骤904中计算的token。
作为示例,AP可以在MAC dev不在DEVinPROC列表中,即
Figure PCTCN2020131854-appb-000019
之后,进一步检查token是否等于其在步骤904中计算的token。
Figure PCTCN2020131854-appb-000020
且token=h(k,MAC dev),即该第一设备不是在连设备,且AP在步骤906中接收的token等于其在步骤904中计算的token时,AP可以进一步处理该第一设备的连接请求。
Figure PCTCN2020131854-appb-000021
且token≠h(k,MAC dev),即该第一设备不是在连设备,但AP在步骤906中接收的token不等于其在步骤904中计算的token时,AP可以不对该第一设备的连接请求进行处理。
当MAC dev∈DEVinPROC时,AP可以不对token进行验证,即可不对该第一设备的连接请求进行处理。
908,DEVinPROC=DEVinPROCv{MAC dev}。
具体而言,DEVinPROC=DEVinPROCv{MAC dev}表示可以在现有的DEVinPROC列表中增加上述第一设备的MAC地址,实现对DEVinPROC的更新。这样,当后续再接收到该包含该MAC dev的连接请求时,由于该MAC dev已经包含在DEVinPROC中,AP可以不对该连接请求进行处理,从而有助于减少或避免AP遭致DoS攻击。
909,选择随机数
Figure PCTCN2020131854-appb-000022
Y=(U·V pw) y
910,AP向第一设备发送Y。
911,第一设备计算Z=Y x,PMK=KDF(Z,MAC dev||MAC AP||X||Y)。
912,AP计算Z=X y,PMK=KDF(Z,MAC dev||MAC AP||X||Y)。
913,第一设备和AP进行关联和4路握手。
具体的,步骤909至913可以参见图8中步骤808至812的描述,这里不再赘述。
914,如果失败,则DEVinPROC=DEVinPROC-{MAC dev}。
具体而言,如果第一设备与AP之间进行身份认证或生成密钥失败,即此时该第一设备并不是该AP的在连设备,那么可以在当前的DEVinPROC列表中删除该第一设备的MAC地址。这样,后续该第一设备仍然可以向AP发送连接请求,并且由于该第一设备的MAC地址没有在DEVinPROC中,因此AP可以对该第一设备的连接请求进行相应的处理。
因此,本申请实施例中,通过AP在确定第一设备的MAC地址不在其DEVinPROC的列表中时,才会进一步处理该第一设备的连接请求,能够有助于避免AP对所有的连接请求都进行处理,有助于减小AP端的计算量,进而有助于减少或避免AP遭致DoS攻击。
可以理解的是,本申请上述各个实施例中,由AP实现的方法也可以由可用于AP的部件(例如芯片或者电路)实现,由第一设备实现的方法也可以由可用于第一设备的部件(例如芯片或者电路)实现。
根据前述方法,图10为本申请实施例提供的应用于WiFi的安全认证的装置1000的示意图。
一些实施例中,该装置1000可以为AP,也可以为芯片或电路,比如可设置于AP的芯片或电路。一些实施例中,该装置1000可以为第一设备,也可以为芯片或电路,比如可设置于第一设备的芯片或电路。
该装置1000可以包括处理单元1010(即,处理器的一例)和收发单元1030。
可选的,收发单元1030可以通过收发器或者收发器相关电路或者接口电路实现。
可选的,该装置还可以包括存储单元1020。一种可能的方式中,该存储单元1020用于存储指令。可选的,该存储单元也可以用于存储数据或者信息。存储单元1020可以通过存储器实现。
一种可能的设计中,该处理单元1010可以用于执行该存储单元1020存储的指令,以使装置1000实现如上述方法中AP执行的步骤。
进一步的,该处理单元1010、存储单元1020、收发单元1030可以通过内部连接通路互相通信,传递控制和/或数据信号。例如,该存储单元1020用于存储计算机程序,该处理单元1010可以用于从该存储单元1020中调用并运行该计算计程序,以控制收发单元1030接收信号和/或发送信号,完成上述方法中AP的步骤。
示例性的,当处理器单元1010为处理器,收发单元1030为收发器时,该处理器可以耦合至收发器,例如向收发器发送指令,以指示(或控制)收发单元接收信号和/或发送信号,完成上述方法中AP的步骤。
一种可能的设计中,该处理单元1010可以用于执行该存储单元1020存储的指令,以使装置1000实现如上述方法中第一设备执行的步骤。
进一步的,该处理单元1010、存储单元1020、收发单元1030可以通过内部连接通路互相通信,传递控制和/或数据信号。例如,该存储单元1020用于存储计算机程序,该处理单元1010可以用于从该存储单元1020中调用并运行该计算计程序,以控制收发单元1030接收信号和/或发送信号,完成上述方法中第一设备的步骤。
示例性的,当处理器单元1010为处理器,收发单元1030为收发器时,该处理器可以耦合至收发器,例如向收发器发送指令,以指示(或控制)收发单元接收信号和/或发送信号,完成上述方法中第一设备的步骤。
存储单元1020可以集成在处理单元1010中,也可以与处理单元1010分开设置。收发单元1030可以集成在处理单元1010中,也可以与处理单元1010分开设置。
可选地,若该装置1000为通信设备,该收发单元1030可以包括接收器和发送器。其中,接收器和发送器可以为相同或者不同的物理实体。为相同的物理实体时,可以统称为收发器。
可选地,若该装置1000为芯片或电路,该收发单元1030可以包括输入接口和输出接口。
作为一种实现方式,收发单元1030的功能可以考虑通过收发电路或者收发的专用芯片实现。处理单元1010可以考虑通过专用处理芯片、处理电路、处理单元或者通用芯片实现。
作为另一种实现方式,可以考虑使用通用计算机的方式来实现本申请实施例提供的通信设备(例如,AP或第一设备)。即将实现处理单元1010、收发单元1030功能的程序代码存储在存储单元1020中,通用处理单元通过执行存储单元1020中的代码来实现处理 单元1010、收发单元1030的功能。
在一些实施方式中,当装置1000是AP或设置于AP中的芯片或电路时,
处理单元1010可以根据口令,基于双基密码指数密钥交换TBPEKE协议,与第一设备协商配对主密钥PMK,其中,所述口令为所述AP与所述第一设备之间的共享密钥。示例性的,处理单元1010可以通过收发单元1030与第一设备进行协商。
处理单元1010还可以根据所述PMK,与所述第一设备进行4路握手。示例性的,处理单元1010可以通过收发单元1030与第一设备进行4路握手。
示例性的,处理单元1010可以通过收发单元1030与第一设备进行协商,处理单元1010可以通过收发单元1030与第一设备进行4路握手。
在一些可能的实现方式中,所述PMK包括第一PMK1和第二PMK2。
其中,收发单元1030用于从所述第一设备获取第一参数X,其中,所述第一参数X是根据哈希到曲线函数g确定的,所述哈希到曲线函数g用于通过点乘运算将所述口令转化为椭圆曲线上的点,X=g x,其中,x为随机数。
收发单元1030还用于向所述第一设备发送第二参数Y,以指示所述第一设备根据所述第一参数X和第二参数Y计算所述第一PMK1,其中,所述第二参数Y是根据所述哈希到曲线函数g确定的,Y=g y,y为随机数,
处理单元1030还用于根据收发单元获取的所述第一参数X,以及所述第二参数Y,计算所述第二PMK2。
在一些可能的实现方式中,处理单元1010还用于与所述第一设备进行关联商定欲使用的安全套件,其中,所述安全套件用于指示所述哈希到曲线函数g。
在一些可能的实现方式中,收发单元1030用于向所述第一设备发送第一消息,所述第一消息用于指示所述第一设备生成第一配对临时密钥PTK1,所述第一消息包括所述AP的一次性随机数,所述第一PTK1是根据所述第一PMK1、所述AP的一次性随机数和所述第一设备的一次性随机数生成的,所述第一PTK1中包括第一密钥确认密钥KCK1、第一密钥加密密钥KEK1和第一临时密钥TK1。
收发单元1030还用于从所述第一设备获取第二消息,所述第二消息采用所述第一KCK1来保护消息的完整性,所述第二消息包括所述第一设备的一次性随机数。
处理单元1010还用于根据所述第二PMK2、所述AP的一次性随机数和所述第一设备的一次性随机数生成所述第二PTK2,所述第二PTK2中包括第二KCK2、第二KEK2和第二TK2。
收发单元1010还用于向所述第一设备发送第三消息,所述第三消息包括群播密钥GTK,所述第三消息采用所述第二KEK2来保护所述GTK的私密性,采用所述第二KCK2来保护消息的完整性。
收发单元1030还用于从所述第一设备获取第四消息,所述第四消息用于响应所述第三消息,所述第四消息采用所述第二KCK2来保护消息的完整性。
在一些可能的实现方式中,所述哈希到曲线函数g表示为:
g=U·V pw
其中,U、V分别为从阶数为素数p的循环群G中获取的两个独立的随机生成元,pw表示所述口令。
在一些可能的实现方式中,所述哈希到曲线函数g是预先保存在所述AP本地的。
在一些可能的实现方式中,所述第二参数Y是所述AP根据所述哈希到曲线函数g生成的;或者所述第二参数Y是所述AP通过重用向第二设备发送的第二参数Y来确定的。
在一些可能的实现方式中,所述收发单元1030还用于从所述第一设备获取所述第一设备的标识ID,以及向所述第一设备发送用于抗DoS服务的凭证,其中,所述凭证是根据所述第一设备的标识ID和密钥k确定的。
收发单元1030还用于从所述第一设备获取所述凭证和所述第一设备的ID。
处理单元1010还用于根据所述第一设备的ID和所述密钥k,验证所述凭证。
在一些可能的实现方式中,处理单元1010还用于确定第一列表中没有包括所述第一设备的ID,其中,所述第一列表中包括至少一个连接所述AP提供的网络的设备的ID。
在一些可能的实现方式中,处理单元1010还用于在所述第一列表中增加所述第一设备的ID。
在一些可能的实现方式中,所述第一设备的ID包括所述第一设备的MAC地址。
在一些实施方式中,当装置1000是第一设备或设置于第一设备中的芯片或电路时,
处理单元1010可以根据口令,基于于双基密码指数密钥交换TBPEKE协议,与接入点AP协商配对主密钥PMK,其中,所述口令为所述AP与所述第一设备之间的共享密钥。示例性的,处理单元可以通过收发单元与AP进行协商。
处理单元1010还可以根据所述PMK,与所述AP进行4路握手。示例性的,处理单元可以通过收发单元与第一设备进行4路握手。
示例性的,处理单元1010可以通过收发单元1030与Ap进行协商,处理单元1010可以通过收发单元1030与AP进行4路握手。
在一些可能的实现方式中,所述PMK包括第一PMK1和第二PMK2。
其中,收发单元1030用于向所述AP发送第一参数X,其中,所述第一参数X是根据哈希到曲线函数g确定的,所述哈希到曲线函数g用于通过点乘运算将所述口令转化为椭圆曲线上的点,X=g x,其中,x为随机数。
收发单元1030还用于从所述AP获取第二参数Y,其中,所述第二参数Y是根据所述哈希到曲线函数g确定的,Y=g y,y为随机数,其中,所述第一参数X、所述第二参数Y用于所述AP计算所述第二PMK2。
处理单元1010用于根据所述第一参数X、所述第二参数Y,计算第一PMK1。
一些可能的实现方式中,处理单元1010还用于与所述AP进行关联商定欲使用的安全套件,其中,所述安全套件用于指示所述哈希到曲线函数g。
在一些可能的实现方式中,收发单元1030还用于从所述AP接收第一消息,所述第一消息包括所述AP的一次性随机数。
处理单元1010还用于所述第一设备根据所述第一PMK1、所述AP的一次性随机数、所述第一设备的一次性随机数,生成第一配对临时密钥PTK1,所述第一PTK1中包括第一密钥确认密钥KCK1、第一密钥加密密钥KEK1和第一临时密钥TK1。
收发单元1030还用于向所述AP发送第二消息,所述第二消息采用所述第一KCK1来保护消息的完整性,所述第二消息包括所述第一设备的一次性随机数,所述第二消息用于指示所述AP生成第二PTK2,所述第二PTK2是根据所述第二PMK2、所述AP的一次 性随机数和所述第一设备的一次性随机数生成的,所述第二PTK2中包括第二KCK2、第二KEK2和第二TK2。
收发单元1030还用于从所述AP获取第三消息,所述第三消息包括群播密钥GTK,所述第三消息采用所述第二KEK2来保护所述GTK的私密性,采用所述第二KCK2来保护消息的完整性。
收发单元1030还用于向所述AP发送第四消息,所述第四消息用于响应所述第三消息,所述第四消息采用KCK来保护消息的完整性。
在一些可能的实现方式中,所述哈希到曲线函数g表示为:
g=U·V pw
其中,U、V分别为从阶数为素数p的循环群G中获取的两个独立的随机生成元,pw表示所述口令。
在一些可能的实现方式中,收发单元1030还用于向所述AP发送所述第一设备的标识ID。收发单元1030还用于从所述AP接收用于抗拒绝服务DoS服务的凭证,所述凭证是根据密钥k和所述第一设备的ID生成的。收发单元1030还用于向所述AP发送所述凭证和所述请求设备的ID。
在一些可能的实现方式中,所述第一设备的ID包括所述第一设备的MAC地址。
上述实施例中的各个单元也可以称为模块或者电路或者部件。
其中,以上列举的装置1000中各模块或单元的功能和动作仅为示例性说明。当该装置1000配置在或本身即为AP时,装置1000中各模块或单元可以用于执行上述方法实施例中AP所执行的各动作或处理过程。当该装置1000配置在或本身即为第一设备时,装置1000中各模块或单元可以用于执行上述方法实施例中第一设备所执行的各动作或处理过程。
该装置1000所涉及的与本申请实施例提供的技术方案相关的概念,解释和详细说明及其他步骤请参见前述方法或其他实施例中关于这些内容的描述,此处不做赘述。
根据本申请实施例提供的方法,本申请实施例还提供一种通信系统,其包括前述的AP和第一设备。
应理解,本申请实施例中,处理器可以为中央处理单元(central processing unit,CPU),该处理器还可以是其他通用处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现成可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
还应理解,本申请实施例中的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(random access memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的随机存取存储器(random access memory,RAM)可用,例如静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、 双倍数据速率同步动态随机存取存储器(double data rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(direct rambus RAM,DR RAM)。
上述实施例,可以全部或部分地通过软件、硬件、固件或其他任意组合来实现。当使用软件实现时,上述实施例可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令或计算机程序。在计算机上加载或执行所述计算机指令或计算机程序时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以为通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集合的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质。半导体介质可以是固态硬盘。
本申请实施例还提供了一种计算机可读介质,其上存储有计算机程序,该计算机程序被计算机执行时实现上述任一实施例中的AP执行的步骤,或者第一设备执行的步骤。
本申请实施例还提供了一种计算机程序产品,该计算机程序产品被计算机执行时实现上述任一实施例中的AP执行的步骤,或者第一设备执行的步骤。
本申请实施例还提供了一种系统芯片,该系统芯片包括:通信单元和处理单元。该处理单元,例如可以是处理器。该通信单元例如可以是输入/输出接口、管脚或电路等。该处理单元可执行计算机指令,以使该通信装置内的芯片执行上述本申请实施例提供的AP执行的步骤,或者第一设备执行的步骤。
可选地,该计算机指令被存储在存储单元中。
另外,本申请的各个方面或特征可以实现成方法、装置或使用标准编程和/或工程技术的制品。本申请中使用的术语“制品”涵盖可从任何计算机可读器件、载体或介质访问的计算机程序。例如,计算机可读介质可以包括,但不限于:磁存储器件(例如,硬盘、软盘或磁带等),光盘(例如,压缩盘(compact disc,CD)、数字通用盘(digital versatile disc,DVD)等),智能卡和闪存器件(例如,可擦写可编程只读存储器(erasable programmable read-only memory,EPROM)、卡、棒或钥匙驱动器等)。另外,本文描述的各种存储介质可代表用于存储信息的一个或多个设备和/或其它机器可读介质。术语“机器可读介质”可包括但不限于,无线信道和能够存储、包含和/或承载指令和/或数据的各种其它介质。
需要说明的是,在本申请提供的各个实施例中,各个步骤之间没有时间限制关系,并且各个步骤可以作为一个方案,也可以和其他一个或多个步骤组合构成一个方案,本申请对此不作限定。
本申请中的各个实施例可以独立的使用,也可以进行联合的使用,例如各不同实施例中的任何一个或多个步骤可以进行组合,单独构成实施例,这里不做限定。
应理解,在上文示出的实施例中,第一、第二仅为便于区分不同的对象,而不应对本 申请构成任何限定。
还应理解,在本申请的实施例中,上述过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
还应理解,“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。“至少一个”是指一个或一个以上;“A和B中的至少一个”,类似于“A和/或B”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和B中的至少一个,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (41)

  1. 一种应用于无线保真WiFi的安全认证的方法,其特征在于,包括:
    接入点AP根据口令,基于双基密码指数密钥交换TBPEKE协议,与第一设备协商配对主密钥PMK,其中,所述口令为所述AP与所述第一设备之间的共享密钥;
    所述AP根据所述PMK,与所述第一设备进行4路握手。
  2. 根据权利要求1所述的方法,其特征在于,所述PMK包括第一PMK1和第二PMK2,其中,所述接入点AP根据口令,基于双基密码指数密钥交换TBPEKE协议,与第一设备协商配对主密钥PMK,包括:
    所述AP从所述第一设备获取第一参数X,其中,所述第一参数X是根据哈希到曲线函数g确定的,所述哈希到曲线函数g用于通过点乘运算将所述口令转化为椭圆曲线上的点,X=g x,其中,x为随机数;
    所述AP向所述第一设备发送第二参数Y,以指示所述第一设备根据所述第一参数X和第二参数Y计算所述第一PMK1,其中,所述第二参数Y是根据所述哈希到曲线函数g确定的,Y=g y,y为随机数;
    所述AP根据所述第一参数X、所述第二参数Y,计算所述第二PMK2。
  3. 根据权利要求2所述的方法,其特征在于,所述接入点AP根据口令,基于双基密码指数密钥交换TBPEKE协议,与第一设备协商配对主密钥PMK之前,还包括:
    所述AP与所述第一设备进行关联商定欲使用的安全套件,其中,所述安全套件用于指示所述哈希到曲线函数g。
  4. 根据权利要求2或3所述的方法,其特征在于,所述AP根据所述PMK,与所述第一设备进行4路握手,包括:
    所述AP向所述第一设备发送第一消息,所述第一消息用于指示所述第一设备生成第一配对临时密钥PTK1,所述第一消息包括所述AP的一次性随机数,所述第一PTK1是根据所述第一PMK1、所述AP的一次性随机数和所述第一设备的一次性随机数生成的,所述第一PTK1中包括第一密钥确认密钥KCK1、第一密钥加密密钥KEK1和第一临时密钥TK1;
    从所述第一设备获取第二消息,所述第二消息采用所述第一KCK1来保护消息的完整性,所述第二消息包括所述第一设备的一次性随机数;
    所述AP根据所述第二PMK2、所述AP的一次性随机数和所述第一设备的一次性随机数生成所述第二PTK2,所述第二PTK2中包括第二KCK2、第二KEK2和第二TK2;
    所述AP向所述第一设备发送第三消息,所述第三消息包括群播密钥GTK,所述第三消息采用所述第二KEK2来保护所述GTK的私密性,采用所述第二KCK2来保护消息的完整性;
    从所述第一设备获取第四消息,所述第四消息用于响应所述第三消息,所述第四消息采用所述第二KCK2来保护消息的完整性。
  5. 根据权利要求2-4任一项所述的方法,其特征在于,所述哈希到曲线函数g表示为:
    g=U·V pw
    其中,U、V分别为从阶数为素数p的循环群G中获取的两个独立的随机生成元,pw表示所述口令。
  6. 根据权利要求2-5任一项所述的方法,其特征在于,所述哈希到曲线函数g是预先保存在所述AP本地的。
  7. 根据权利要求2-6任一项所述的方法,其特征在于,所述第二参数Y是所述AP根据所述哈希到曲线函数g生成的;或者
    所述第二参数Y是所述AP通过重用向第二设备发送的第二参数Y来确定的。
  8. 根据权利要求2-7任一项所述的方法,其特征在于,所述AP向所述第一设备发送第二参数Y之前,还包括:
    从所述第一设备获取所述第一设备的标识ID;
    向所述第一设备发送用于抗DoS服务的凭证,其中,所述凭证是根据所述第一设备的标识ID和密钥k确定的;
    从所述第一设备获取所述凭证和所述第一设备的ID;
    根据所述第一设备的ID和所述密钥k,验证所述凭证。
  9. 根据权利要求2-8任一项所述的方法,其特征在于,向所述第一设备发送第二参数Y之前,还包括:
    确定第一列表中没有包括所述第一设备的ID,其中,所述第一列表中包括至少一个连接所述AP提供的网络的设备的ID。
  10. 根据权利要求9所述的方法,其特征在于,还包括:
    在所述第一列表中增加所述第一设备的ID。
  11. 根据权利要求8-11任一项所述的方法,其特征在于,所述第一设备的ID包括所述第一设备的MAC地址。
  12. 一种应用于无线保真WiFi的安全认证的方法,其特征在于,包括:
    第一设备根据口令,基于于双基密码指数密钥交换TBPEKE协议,与接入点AP协商配对主密钥PMK,其中,所述口令为所述AP与所述第一设备之间的共享密钥;
    所述第一设备根据所述PMK,与所述AP进行4路握手。
  13. 根据权利要求12所述的方法,其特征在于,所述PMK包括第一PMK1和第二PMK2,所述第一设备根据口令,基于于双基密码指数密钥交换TBPEKE协议,与接入点AP协商配对主密钥PMK,包括:
    所述第一设备向所述AP发送第一参数X,其中,所述第一参数X是根据哈希到曲线函数g确定的,所述哈希到曲线函数g用于通过点乘运算将所述口令转化为椭圆曲线上的点,X=g x,其中,x为随机数;
    所述第一设备从所述AP获取第二参数Y,其中,所述第二参数Y是根据所述哈希到曲线函数g确定的,Y=g y,y为随机数,其中,所述第一参数X、所述第二参数Y用于所述AP计算所述第二PMK2;
    所述第一设备根据所述第一参数X、所述第二参数Y,计算所述第一PMK1。
  14. 根据权利要求13所述的方法,其特征在于,所述第一设备根据口令,基于双基密码指数密钥交换TBPEKE协议,与AP协商配对主密钥PMK之前,还包括:
    所述第一设备与所述AP进行关联商定欲使用的安全套件,其中,所述安全套件用于指示所述哈希到曲线函数g。
  15. 根据权利要求13或14所述的方法,其特征在于,所述第一设备根据所述PMK,与所述AP进行4路握手,包括:
    所述第一设备从所述AP接收第一消息,所述第一消息包括所述AP的一次性随机数;
    所述第一设备根据所述第一PMK1、所述AP的一次性随机数、所述第一设备的一次性随机数,生成第一配对临时密钥PTK1,所述第一PTK1中包括第一密钥确认密钥KCK1、第一密钥加密密钥KEK1和第一临时密钥TK1;
    向所述AP发送第二消息,所述第二消息采用所述第一KCK1来保护消息的完整性,所述第二消息包括所述第一设备的一次性随机数,所述第二消息用于指示所述AP生成第二PTK2,所述第二PTK2是根据所述第二PMK2、所述AP的一次性随机数和所述第一设备的一次性随机数生成的,所述第二PTK2中包括第二KCK2、第二KEK2和第二TK2;
    从所述AP获取第三消息,所述第三消息包括群播密钥GTK,所述第三消息采用所述第二KEK2来保护所述GTK的私密性,采用所述第二KCK2来保护消息的完整性;
    向所述AP发送第四消息,所述第四消息用于响应所述第三消息,所述第四消息采用KCK来保护消息的完整性。
  16. 根据权利要求13-15任一项所述的方法,其特征在于,所述哈希到曲线函数g表示为:
    g=U·V pw
    其中,U、V分别为从阶数为素数p的循环群G中获取的两个独立的随机生成元,pw表示所述口令。
  17. 根据权利要求13-16任一项所述的方法,其特征在于,所述从所述AP接收第二参数Y之前,还包括:
    向所述AP发送所述第一设备的标识ID;
    从所述AP接收用于抗拒绝服务DoS服务的凭证,所述凭证是根据密钥k和所述第一设备的ID生成的;
    向所述AP发送所述凭证和所述请求设备的ID。
  18. 根据权利要求17所述的方法,其特征在于,所述第一设备的ID包括所述第一设备的MAC地址。
  19. 一种应用于无线保真WiFi的安全认证的装置,其特征在于,包括:处理器和收发器,
    所述处理器,耦合至所述收发器,用于根据口令,基于双基密码指数密钥交换TBPEKE协议,与第一设备协商配对主密钥PMK,其中,所述口令为AP与所述第一设备之间的共享密钥;
    根据所述PMK,与所述第一设备进行4路握手。
  20. 根据权利要求19所述的装置,其特征在于,所述PMK包括第一PMK1和第二PMK2,其中,所述处理器具体用于:
    指示所述收发器从所述第一设备获取第一参数X,其中,所述第一参数X是根据哈希到曲线函数g确定的,所述哈希到曲线函数g用于通过点乘运算将所述口令转化为椭圆曲 线上的点,X=g x,其中,x为随机数;
    指示所述收发器向所述第一设备发送第二参数Y,以指示所述第一设备根据所述第一参数X和第二参数Y计算所述第一PMK1,其中,所述第二参数Y是根据所述哈希到曲线函数g确定的,Y=g y,y为随机数;
    根据所述第一参数X、所述第二参数Y,计算所述第二PMK2。
  21. 根据权利要求20所述的装置,其特征在于,所述处理器还用于:与所述第一设备进行关联商定欲使用的安全套件,其中,所述安全套件用于指示所述哈希到曲线函数g。
  22. 根据权利要求20或21所述的装置,其特征在于,所述处理器具体用于:
    指示所述收发器向所述第一设备发送第一消息,所述第一消息用于指示所述第一设备生成第一配对临时密钥PTK1,所述第一消息包括所述AP的一次性随机数,所述第一PTK1是根据所述第一PMK1、所述AP的一次性随机数和所述第一设备的一次性随机数生成的,所述第一PTK1中包括第一密钥确认密钥KCK1、第一密钥加密密钥KEK1和第一临时密钥TK1;
    指示所述收发器从所述第一设备获取第二消息,所述第二消息采用所述第一KCK1来保护消息的完整性,所述第二消息包括所述第一设备的一次性随机数;
    根据所述第二PMK2、所述AP的一次性随机数和所述第一设备的一次性随机数生成所述第二PTK2,所述第二PTK2中包括第二KCK2、第二KEK2和第二TK2;
    指示所述收发器向所述第一设备发送第三消息,所述第三消息包括群播密钥GTK,所述第三消息采用所述第二KEK2来保护所述GTK的私密性,采用所述第二KCK2来保护消息的完整性;
    指示所述收发器从所述第一设备获取第四消息,所述第四消息用于响应所述第三消息,所述第四消息采用所述第二KCK2来保护消息的完整性。
  23. 根据权利要求20-22任一项所述的装置,其特征在于,所述哈希到曲线函数g表示为:
    g=U·V pw
    其中,U、V分别为从阶数为素数p的循环群G中获取的两个独立的随机生成元,pw表示所述口令。
  24. 根据权利要求20-23任一项所述的装置,其特征在于,所述哈希到曲线函数g是预先保存在所述AP本地的。
  25. 根据权利要求20-24任一项所述的装置,其特征在于,所述第二参数Y是所述AP根据所述哈希到曲线函数g生成的;或者
    所述第二参数Y是所述AP通过重用向第二设备发送的第二参数Y来确定的。
  26. 根据权利要求20-25任一项所述的装置,其特征在于,所述处理器还用于:
    指示所述收发器从所述第一设备获取所述第一设备的标识ID;
    指示所述收发器向所述第一设备发送用于抗DoS服务的凭证,其中,所述凭证是根据所述第一设备的标识ID和密钥k确定的;
    指示所述收发器从所述第一设备获取所述凭证和所述第一设备的ID;
    根据所述第一设备的ID和所述密钥k,验证所述凭证。
  27. 根据权利要求20-26任一项所述的装置,其特征在于,所述处理器还用于:
    确定第一列表中没有包括所述第一设备的ID,其中,所述第一列表中包括至少一个连接所述AP提供的网络的设备的ID。
  28. 根据权利要求27所述的装置,其特征在于,所述处理器还用于:
    在所述第一列表中增加所述第一设备的ID。
  29. 根据权利要求26-28任一项所述的装置,其特征在于,所述第一设备的ID包括所述第一设备的MAC地址。
  30. 一种应用于无线保真WiFi的安全认证的装置,其特征在于,包括:处理器和收发器,
    所述处理器,耦合至所述收发器,用于根据口令,基于于双基密码指数密钥交换TBPEKE协议,与接入点AP协商配对主密钥PMK,其中,所述口令为所述AP与所述第一设备之间的共享密钥;
    根据所述PMK,与所述AP进行4路握手。
  31. 根据权利要求30所述的装置,其特征在于,所述PMK包括第一PMK1和第二PMK2,所述处理器具体用于:
    指示所述收发器向所述AP发送第一参数X,其中,所述第一参数X是根据哈希到曲线函数g确定的,所述哈希到曲线函数g用于通过点乘运算将所述口令转化为椭圆曲线上的点,X=g x,其中,x为随机数;
    指示所述收发器从所述AP获取第二参数Y,其中,所述第二参数Y是根据所述哈希到曲线函数g确定的,Y=g y,y为随机数,其中,所述第一参数X、所述第二参数Y用于所述AP计算所述第二PMK2;
    根据所述第一参数X、所述第二参数Y,计算所述第一PMK1。
  32. 根据权利要求31所述的装置,其特征在于,所述处理器还用于:
    与所述AP进行关联商定欲使用的安全套件,其中,所述安全套件用于指示所述哈希到曲线函数g。
  33. 根据权利要求31或32所述的装置,其特征在于,所述处理器具体用于:
    指示所述收发器从所述AP接收第一消息,所述第一消息包括所述AP的一次性随机数;
    根据所述第一PMK1、所述AP的一次性随机数、所述第一设备的一次性随机数,生成第一配对临时密钥PTK1,所述第一PTK1中包括第一密钥确认密钥KCK1、第一密钥加密密钥KEK1和第一临时密钥TK1;
    指示所述收发器向所述AP发送第二消息,所述第二消息采用所述第一KCK1来保护消息的完整性,所述第二消息包括所述第一设备的一次性随机数,所述第二消息用于指示所述AP生成第二PTK2,所述第二PTK2是根据所述第二PMK2、所述AP的一次性随机数和所述第一设备的一次性随机数生成的,所述第二PTK2中包括第二KCK2、第二KEK2和第二TK2;
    指示所述收发器从所述AP获取第三消息,所述第三消息包括群播密钥GTK,所述第三消息采用所述第二KEK2来保护所述GTK的私密性,采用所述第二KCK2来保护消息的完整性;
    指示所述收发器向所述AP发送第四消息,所述第四消息用于响应所述第三消息,所 述第四消息采用KCK来保护消息的完整性。
  34. 根据权利要求31-33任一项所述的装置,其特征在于,所述哈希到曲线函数g表示为:
    g=U·V pw
    其中,U、V分别为从阶数为素数p的循环群G中获取的两个独立的随机生成元,pw表示所述口令。
  35. 根据权利要求31-34任一项所述的装置,其特征在于,所述处理器还用于:
    指示所述收发器向所述AP发送所述第一设备的标识ID;
    指示所述收发器从所述AP接收用于抗拒绝服务DoS服务的凭证,所述凭证是根据密钥k和所述第一设备的ID生成的;
    指示所述收发器向所述AP发送所述凭证和所述请求设备的ID。
  36. 根据权利要求35所述的装置,其特征在于,所述第一设备的ID包括所述第一设备的MAC地址。
  37. 一种应用于无线保真WiFi的安全认证的装置,其特征在于,包括:
    用于执行权利要求1-11任一项所述的方法的单元。
  38. 一种应用于无线保真WiFi的安全认证的装置,其特征在于,包括:
    用于执行权利要求12-18任一项所述的方法的单元。
  39. 一种通信芯片,其特征在于,所述芯片包括:
    处理器和通信接口,所述处理器用于从所述通信接口调用并运行指令,当所述处理器执行所述指令时,实现如权利要求1-11中任一项所述的方法。
  40. 一种通信芯片,其特征在于,所述芯片包括:
    处理器和通信接口,所述处理器用于从所述通信接口调用并运行指令,当所述处理器执行所述指令时,实现如权利要求12-18中任一项所述的方法。
  41. 一种通信系统,其特征在于,包括:
    如权利要求19-29任一项所述的装置,以及如权利要求30-36任一项所述的装置。
PCT/CN2020/131854 2020-11-26 2020-11-26 应用于WiFi的安全认证的方法和装置 WO2022109940A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
EP20962831.2A EP4236407A4 (en) 2020-11-26 2020-11-26 SECURITY AUTHENTICATION METHOD AND APPARATUS APPLYING TO WI-FI
CN202080107004.3A CN116438822A (zh) 2020-11-26 2020-11-26 应用于WiFi的安全认证的方法和装置
PCT/CN2020/131854 WO2022109940A1 (zh) 2020-11-26 2020-11-26 应用于WiFi的安全认证的方法和装置
US18/323,211 US20230308874A1 (en) 2020-11-26 2023-05-24 Security authentication method and apparatus applied to wi-fi

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/131854 WO2022109940A1 (zh) 2020-11-26 2020-11-26 应用于WiFi的安全认证的方法和装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/323,211 Continuation US20230308874A1 (en) 2020-11-26 2023-05-24 Security authentication method and apparatus applied to wi-fi

Publications (1)

Publication Number Publication Date
WO2022109940A1 true WO2022109940A1 (zh) 2022-06-02

Family

ID=81755108

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/131854 WO2022109940A1 (zh) 2020-11-26 2020-11-26 应用于WiFi的安全认证的方法和装置

Country Status (4)

Country Link
US (1) US20230308874A1 (zh)
EP (1) EP4236407A4 (zh)
CN (1) CN116438822A (zh)
WO (1) WO2022109940A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103096307A (zh) * 2011-10-27 2013-05-08 中兴通讯股份有限公司 密钥验证方法及装置
CN103797830A (zh) * 2011-09-12 2014-05-14 高通股份有限公司 用于对与一组共享临时密钥数据的交换进行编码的系统和方法
US20180359633A1 (en) * 2017-06-12 2018-12-13 Apple Inc. Neighbor Awareness Networking Device Pairing
CN110087240A (zh) * 2019-03-28 2019-08-02 中国科学院计算技术研究所 基于wpa2-psk模式的无线网络安全数据传输方法及系统

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
SG10201609247YA (en) * 2016-11-04 2018-06-28 Huawei Int Pte Ltd System and method for configuring a wireless device for wireless network access
KR102119317B1 (ko) * 2017-10-31 2020-06-04 한국시스템보증(주) 사용자 단말을 식별하여 무선 ap로의 접속을 차단하는 장치 및 방법

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103797830A (zh) * 2011-09-12 2014-05-14 高通股份有限公司 用于对与一组共享临时密钥数据的交换进行编码的系统和方法
CN103096307A (zh) * 2011-10-27 2013-05-08 中兴通讯股份有限公司 密钥验证方法及装置
US20180359633A1 (en) * 2017-06-12 2018-12-13 Apple Inc. Neighbor Awareness Networking Device Pairing
CN110087240A (zh) * 2019-03-28 2019-08-02 中国科学院计算技术研究所 基于wpa2-psk模式的无线网络安全数据传输方法及系统

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4236407A4 *

Also Published As

Publication number Publication date
EP4236407A4 (en) 2023-11-08
CN116438822A (zh) 2023-07-14
EP4236407A1 (en) 2023-08-30
US20230308874A1 (en) 2023-09-28

Similar Documents

Publication Publication Date Title
US10218501B2 (en) Method, device, and system for establishing secure connection
US10601594B2 (en) End-to-end service layer authentication
US20200195445A1 (en) Registration method and apparatus based on service-based architecture
TWI388180B (zh) 通信系統中之金鑰產生
US8694782B2 (en) Wireless authentication using beacon messages
EP3051744B1 (en) Key configuration method and apparatus
US10516654B2 (en) System, apparatus and method for key provisioning delegation
JP2019537871A (ja) デバイスプロビジョニングプロトコル(dpp)のためのコンフィギュレータ鍵パッケージ
WO2017049461A1 (zh) 用户设备ue的接入方法、设备及系统
CN112514436B (zh) 发起器和响应器之间的安全的、被认证的通信
TW201014314A (en) Techniques for secure channelization between UICC and a terminal
US20230283475A1 (en) Identity authentication system, method, apparatus, and device, and computer-readable storage medium
WO2018024048A1 (zh) 一种认证方法,服务器,终端以及网关
US20230308875A1 (en) Wi-fi security authentication method and communication apparatus
US20220329582A1 (en) Communication method and related product
WO2020216047A1 (zh) 一种认证信息处理方法、终端和网络设备
WO2020215958A1 (zh) 一种认证信息处理方法、终端和网络设备
WO2020029735A1 (zh) 扩展的通用引导架构认证方法、装置及存储介质
WO2022109940A1 (zh) 应用于WiFi的安全认证的方法和装置
CN114173327A (zh) 基于5g行业专网的认证方法及终端
WO2022109941A1 (zh) 应用于WiFi的安全认证的方法和装置
US12008108B2 (en) Extended authentication method and apparatus for generic bootstrapping architecture, and storage medium
JP2019016841A (ja) 基地局装置、通信システム、及び通信方法

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: 20962831

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2020962831

Country of ref document: EP

Effective date: 20230526

NENP Non-entry into the national phase

Ref country code: DE