Method and device for security authentication applied to WiFi

By sharing different keys for the first device and the second device with the access point AP in the WiFi security protocol, and using the TBPEKE protocol to generate a high-entropy key, the risk of leakage caused by multiple devices sharing the same password in WiFi is solved, and device management and security authentication are enhanced.

CN116458173BActive Publication Date: 2025-10-03HUAWEI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202080107043.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-26
Publication Date
2025-10-03
Estimated Expiration
2040-11-26

AI Technical Summary

Technical Problem

In Wi-Fi security protocols, all user devices share the same password, resulting in a high risk of password leakage and an inability to effectively manage device access.

Method used

The first device shares the second password with the access point AP, and the second device shares the third password with the AP. The double-base cryptographic exponential key exchange protocol (TBPEKE) is used to generate a high-entropy pairing master key, enhancing the ability to resist offline dictionary attacks and side-channel attacks during the security authentication process.

Benefits of technology

It reduces the risk of leaking passwords shared by multiple devices, enables the management and security authentication of the second device, and improves the anti-attack capability of WiFi security authentication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116458173B_ABST
    Figure CN116458173B_ABST
Patent Text Reader

Abstract

The present application provides a method and apparatus for security authentication applied to WiFi, which can help avoid the sharing of passwords by multiple devices and enable the management of a second device by a first device. In this method, an access point (AP) receives a first password input from a first device, where the first password is a factory-preset password. When the first password passes AP verification, the AP obtains a second password shared between the AP and the first device, and performs a four-way handshake with the first device based on the second password. The second password is a shared key between the first device and the AP. The AP can then receive a first request from the first device and, in response to the first request, send a third password to the first device, where the first request is used to request the second device to access the AP, and the third password is a shared key between the second device and the AP.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communications, and more specifically, to a method and apparatus for secure authentication applied to wireless fidelity (WiFi). Background Art

[0002] WiFi is a wireless local area network technology based on the IEEE 802.11 standard and is widely used in homes and public places (such as shopping malls and corporate offices). Security protocols are the foundation of WiFi, controlling who can use the network. Specifically, WiFi security protocols enable mutual authentication between the supplicant and the access point (AP) and generate a session key (session key) and a group transient key (GTK). The session key is used to protect subsequent unicast communications between the supplicant and the AP, while the group transient key is used to protect the AP's broadcast communications.

[0003] In Wi-Fi security protocols, the supplicant and AP share a password (pw). Based on their respective pws, the supplicant and AP can derive the pairwise master key (PMK). The PMK allows the supplicant and AP to authenticate and calculate the pairwise transient key (PTK). The AP can then pass the multicast key to the supplicant. The PTK includes the transient key (TK), also known as the session key.

[0004] Currently, in Wi-Fi security protocols, all user devices share a password, meaning all devices use the same password to access the AP. Therefore, a password leak on one device will lead to the leak of passwords on all other devices, increasing the risk of password leakage. Summary of the Invention

[0005] The present application provides a method and apparatus for secure authentication applied to WiFi, which enables a first device to share a second password with an AP, and a second device to share a third password with the AP, thereby helping to avoid password sharing among multiple devices and thus reducing the risk of password leakage. In addition, the third password shared by the second device and the AP is obtained by the first device, so that the present application enables the first device to manage the second device's access to the AP.

[0006] In a first aspect, a method for security authentication applied to WiFi is provided. The method can be applied to an access point AP, for example, executed by the AP, or a component (such as a chip or circuit, etc.) configurable in the AP.

[0007] In this method, an access point (AP) receives a first password input from a first device, where the first password is a factory-set password. If the first password is verified by the AP, the AP obtains a second password shared between the AP and the first device and performs a four-way handshake with the first device based on the second password. The second password is a shared key between the first device and the AP.

[0008] Then, the AP may receive a first request from the first device, where the first request is used to request the second device to access the AP. The AP responds to the first request and sends a third password to the first device, where the third password is a shared key between the second device and the AP.

[0009] Therefore, in the embodiment of the present application, when the factory-preset first password input by the first device is verified by the AP, the AP and the first device can execute a security authentication protocol based on the second password shared between the AP and the first device. Furthermore, the first device can request the AP to connect the second device to the AP, and the AP sends the third password shared by the AP and the second device to the first device in response to the request. Therefore, on the one hand, the embodiment of the present application can realize that the first device and the AP share the second password, and the second device and the AP share the third password, which helps to avoid multiple devices sharing passwords, thereby reducing the risk of password leakage. On the other hand, by obtaining the third password shared by the second device and the AP through the first device, the present application can realize that the first device manages the access of the second device to the AP.

[0010] As an example, since the first password sent by the first device to the AP has passed the verification, the first device can act as a master device to manage other devices (such as the second device, which can be called an ordinary device), such as authorizing the ordinary device to connect to the AP's network, or canceling the ordinary device's access to the AP's network, etc., without limitation.

[0011] In some embodiments, the AP may also store the identifier of the first device and the second password. The identifier of the first device corresponds to the second password. This allows the second password to be bound to the identifier of the first device, thereby enhancing the AP's ability to resist rainbow table attacks.

[0012] As a possible implementation, the AP may request the first device to generate the second password. For example, when the first password ω is verified, the AP may send an instruction message to the first device, instructing the first device to generate the second password. After receiving the instruction message, the first device may generate the second password. The first device may then send the second password to the AP. In this way, both the first device and the AP can obtain the second password.

[0013] As another possible implementation, the AP can generate the aforementioned second password and transmit it to the first device. For example, when the first password ω passes verification, the AP can generate a second password for the first device and transmit it to the first device. In this way, both the first device and the AP can obtain the second password.

[0014] In conjunction with the first aspect, in certain implementations of the first aspect, performing a four-way handshake with the first device according to the second password can be specifically implemented in the following manner:

[0015] According to the second password, based on the twin base password encrypted key exchange (TBPEKE) protocol, a first pairing master key PMK1 is negotiated with the first device, and then a 4-way handshake is performed with the first device according to the first PMK1.

[0016] Therefore, in the embodiments of the present application, a high-entropy PMK can be generated by executing the TBPEKE process, thereby helping to provide the AP with the first device with the ability to resist offline dictionary attacks during security authentication. Furthermore, because TBPEKE can easily prevent side-channel attacks, the embodiments of the present application, by executing TBPEKE to generate the PMK, can improve the AP and the first device's ability to resist side-channel attacks during the WiFi security authentication process.

[0017] In other embodiments, the AP may also negotiate a first PMK1 with the first device based on the second password and the simultaneous authentication of equals (SAE) protocol, and then perform a 4-way handshake with the first device based on the first PMK1. This application does not limit this.

[0018] In combination with the first aspect, in certain implementations of the first aspect, before negotiating the first pairing master key PMK1 with the first device based on the double-base cryptographic exponential key exchange (TBPEKE) protocol according to the second password, the first hash-to-curve function g corresponding to the first device may also be determined according to the second password. mst , the first hash to curve function g mst The second password is converted into a point on the elliptic curve by a point multiplication operation. Then, the identifier of the first device and the first hash to curve function g are saved. mst , wherein the identifier of the first device is the same as the first hash to curve function g mst Have a corresponding relationship.

[0019] As an example, the identifier of the first device and the first hash-to-curve function g mst , can be saved in the account file on the AP side (which can be expressed as DEV-ACCT), for example, add an item {id mst , g mst}, that is, DEV-ACCT=DEV-ACCTv{id mst , g mst}. Here, {id mst , g mst} can be an account established by the AP for the first device.

[0020] Therefore, in the embodiment of the present application, the AP can further use the second password pw mst Calculate the hashtocurve function g mst , and save the identification id of the first device mst and the hashtocurve function g mst , so that the first device and the AP can subsequently use the hashtocurve function g mst Perform security authentication.

[0021] In combination with the first aspect, in some implementations of the first aspect, the first hash to curve function g mst Expressed as:

[0022]

[0023] Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and id mst Indicates the identifier of the first device, pw mst Indicates the second password.

[0024] Here, the hashtocurve function g mst According to the identification id of the first device mst and the second password pw mst Obtained, so that the hashtocurve function g mst The first device's ID mst Binding can enhance the AP's ability to resist rainbow table attacks.

[0025] In combination with the first aspect, in some implementations of the first aspect, the first hash to curve function g mst Expressed as:

[0026]

[0027] Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and n mst is a random number, pw mst Indicates the second password.

[0028] That is to say, in the embodiment of the present application, the random number n can be used mst To replace the identification id of the first device mst To calculate g mst This can enhance the AP's ability to resist rainbow table attacks.

[0029] In this implementation, the AP can also generate the random number n mst , you can add {id mst , n mst , g mst}, that is, DEV-ACCT=DEV-ACCTv{id mst , n mst , g mst}, this application does not limit this. In addition, the AP can use the random number n mst Sent to the first device.

[0030] In combination with the first aspect, in some implementations of the first aspect, after obtaining the second password shared between the AP and the first device, it may also be determined that the first password is invalid.

[0031] In this way, when other devices send the first password ω to the AP, the first password ω will not pass verification, so the AP will no longer determine the other device as the master device. In this way, there can be only a limited number of master devices in the system, such as one or two, which can help improve the security of the system.

[0032] In combination with the first aspect, in some implementations of the first aspect, the AP may further delete the identifier of the first device and the second password, and activate the first password.

[0033] By deleting the identifier and second password of the first device, the first device can be revoked as the primary device. Furthermore, by activating the first password, when another device subsequently sends the first password to the AP, the first password will pass verification. At this time, the AP can also determine the other device as the primary device, thus replacing the primary device.

[0034] As an example, the identification of the first device and the second password can be deleted, and the first password can be activated by resetting the AP system, which is not limited in this application.

[0035] In some embodiments, when the AP stores the identifier of the first device and the first hash-to-curve function g mst When the first device identifier and the first Hash-to-curve function g are deleted, mst , and activate the first password to revoke the first device as the main device, and the AP can determine other devices as the main device to achieve the replacement of the main device.

[0036] In some embodiments, the AP may also store the identifier of the second device and the third password. The identifier of the second device corresponds to the third password. This allows the third password to be bound to the identifier of the second device, thereby enhancing the AP's ability to resist rainbow table attacks.

[0037] In combination with the first aspect, in some implementations of the first aspect, the first request includes an identifier of the second device.

[0038] In some embodiments, when the first request does not include the identifier of the second device, the AP may generate the identifier of the second device, which is not limited in this application.

[0039] In combination with the first aspect, in some implementations of the first aspect, the AP may further perform a 4-way handshake with the second device according to the third password, thereby achieving security authentication between the second device and the AP.

[0040] In combination with the first aspect, in certain implementations of the first aspect, performing a four-way handshake with the second device according to the third password can be specifically implemented in the following manner:

[0041] According to the third password, based on the double-base cryptographic exponential key exchange (TBPEKE) protocol, a second pairing master key PMK2 is negotiated with the second device; and then, according to the second PMK2, a four-way handshake is performed with the first device.

[0042] Therefore, in the embodiments of the present application, a high-entropy PMK can be generated by executing the TBPEKE process, thereby helping to provide resistance to offline dictionary attacks during secure authentication between the AP and the second device. Furthermore, because TBPEKE can easily prevent side-channel attacks, the embodiments of the present application, by executing TBPEKE to generate the PMK, can improve the ability of the AP and the second device to prevent side-channel attacks during the WiFi security authentication process.

[0043] In other embodiments, the AP may also negotiate a second PMK2 with the first device based on the SAE protocol according to the second password, and then perform a 4-way handshake with the first device according to the second PMK2. This application does not limit this.

[0044] In combination with the first aspect, in certain implementations of the first aspect, before negotiating the second pairing master key PMK2 with the second device based on the double-base cryptographic exponential key exchange (TBPEKE) protocol according to the third password, the second hash-to-curve function g corresponding to the second device may be determined according to the third password. T , the second hash to curve function g T Used to convert the third password into a point on the elliptic curve through a point multiplication operation; save the identifier of the second device and the second hash to curve function g T , wherein the identification of the second device is related to the second hash-to-curve function g T Have a corresponding relationship.

[0045] Therefore, in the device authorization protocol process of the embodiment of the present application, the AP can further use the third password pw T Calculate the hashtocurve function g T , and save the identification id of the second device T and the hashtocurve function g T , so that the subsequent second device and AP can use the hashtocurve function g T Perform security authentication.

[0046] As an example, the identifier of the second device and the second hash-to-curve function g T , can be saved in the account file on the AP side (which can be expressed as DEV-ACCT), for example, add an item {id T , g T}, that is, DEV-ACCT=DEV-ACCTv{id T , g T}. Here, {id T , g T} can be an account established by the AP for the second device.

[0047] In combination with the first aspect, in some implementations of the first aspect, the second hash to curve function g T Expressed as:

[0048]

[0049] Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and id T Indicates the identifier of the second device, pw T Indicates the third password.

[0050] Here, the hashtocurve function g T It is based on the identification id of the second device T and the third password pw T Obtained, so that the hashtocurve function g T The identification id of the second device T Binding can enhance the AP's ability to resist rainbow table attacks.

[0051] In combination with the first aspect, in some implementations of the first aspect, the second hash to curve function g T Expressed as:

[0052]

[0053] Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and n T is a random number, pw T Indicates the third password.

[0054] That is to say, in the embodiment of the present application, the random number n can be used T To replace the identification id of the second device T To calculate g T This can enhance the AP's ability to resist rainbow table attacks.

[0055] In this implementation, the AP can also generate the random number n T , you can add {id T , n T , g T}, that is, DEV-ACCT=DEV-ACCTv{id T , n T , g T}, this application does not limit this. In addition, the AP can use the random number n T Send it to the first device, and then the first device will send the random number n T with id T Send to the second device. For example, the AP can T and g T Send it to the first device together, and then the first device will send n T with id T and g T Sent to the second device together.

[0056] In combination with the first aspect, in some implementations of the first aspect, the identifier of the second device is a MAC address of the second device, wherein the data frame of the first request includes the MAC address of the second device.

[0057] In other embodiments, the identifier of the second device may also be a user name of the second device. As an example, the second device may generate the identifier of the second device itself, or the first device may generate the identifier of the second device, or the AP may generate the identifier of the second device, which is not limited in this application.

[0058] In combination with the first aspect, in some implementations of the first aspect, the identifier of the first device is a MAC address of the first device.

[0059] The method further includes receiving a MAC address of the first device from the first device.

[0060] In other embodiments, the identifier of the first device may also be a user name of the first device. As an example, the first device may generate the identifier of the first device itself, or the AP may generate the identifier of the first device, which is not limited in this application.

[0061] In a second aspect, a method for secure authentication of Wireless Fidelity (WiFi) is provided. The method can be applied to a first device, for example, executed by the first device, or a component (such as a chip or circuit) configurable in the first device.

[0062] In this method, a first device sends a first password to an access point (AP). The first password is a factory-set password. Then, upon request from the AP verifying that the first password is authenticated, the first device obtains a second password shared between the AP and the first device and performs a four-way handshake with the AP based on the second password. The second password is a shared key between the first device and the AP.

[0063] The first device may then receive a second request from the second device and, based on the second request, send a first request to the AP, wherein the second request is for requesting permission for the second device to access the AP, and the first request is for requesting permission for the second device to access the AP. The first device may then receive a third password from the AP and send the third password to the second device, wherein the third password is a shared key between the second device and the AP.

[0064] In conjunction with the second aspect, in certain implementations of the second aspect, performing a four-way handshake with the AP according to the second password may be implemented in the following manner:

[0065] According to the second password, based on the double-base cryptographic exponential key exchange (TBPEKE) protocol, a first pairing master key PMK1 is negotiated with the AP; according to the first PMK1, a four-way handshake is performed with the AP.

[0066] In combination with the second aspect, in certain implementations of the second aspect, before negotiating the first pairing master key PMK1 with the AP based on the double-base cryptographic exponential key exchange TBPEKE protocol according to the second password, the first hash-to-curve function g corresponding to the first device may also be determined according to the second password. mst , the first hash to curve function g mst Used to convert the second password into a point on the elliptic curve through a point multiplication operation.

[0067] In conjunction with the second aspect, in some implementations of the second aspect, the first hash to curve function g mst Expressed as:

[0068]

[0069] Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and id mst Indicates the identifier of the first device, pw mst Indicates the second password.

[0070] In conjunction with the second aspect, in some implementations of the second aspect, the first hash to curve function g mst Expressed as:

[0071]

[0072] Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and n mst is a random number, pw mst Indicates the second password.

[0073] In combination with the second aspect, in some implementations of the second aspect, the first request includes an identifier of the second device, and the second request includes an identifier of the second device.

[0074] In combination with the second aspect, in some implementations of the second aspect, the identifier of the second device is a MAC address of the second device.

[0075] In a third aspect, a method for secure authentication of Wireless Fidelity (WiFi) is provided. The method can be applied to a second device, for example, executed by the second device, or a component (such as a chip or circuit) configurable in the second device.

[0076] In this method, a second device sends a second request to a first device, wherein the second request is for requesting permission for the second device to access the AP. The second device then receives a third password from the first device, wherein the third password is a shared key generated by the AP between the second device and the AP.

[0077] In combination with the third aspect, in certain implementations of the third aspect, the second device may perform a 4-way handshake with the AP based on the third password, thereby achieving security authentication between the second device and the AP.

[0078] In conjunction with the third aspect, in certain implementations of the third aspect, performing a four-way handshake with the AP according to the third password may be specifically implemented in the following manner:

[0079] According to the third password, based on the double-base cryptographic exponential key exchange (TBPEKE) protocol, a second pairing master key PMK2 is negotiated with the AP; according to the second PMK2, a four-way handshake is performed with the AP.

[0080] In conjunction with the third aspect, in certain implementations of the third aspect, before negotiating the second pairing master key PMK2 with the AP based on the double-base cryptographic exponential key exchange TBPEKE protocol according to the third password, the second hash-to-curve function g corresponding to the second device may also be determined according to the third password. T , the second hash to curve function g T Used to convert the third password into a point on an elliptic curve through a point multiplication operation.

[0081] In conjunction with the third aspect, in some implementations of the third aspect, the second hash to curve function g T Expressed as:

[0082]

[0083] Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and id T Indicates the identifier of the first device, pw T Indicates the third password.

[0084] In conjunction with the third aspect, in some implementations of the third aspect, the second hash to curve function g T Expressed as:

[0085]

[0086] Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and n T is a random number, pw T Indicates the third password.

[0087] In combination with the third aspect, in some implementations of the third aspect, the second request includes an identifier of the second device.

[0088] In combination with the third aspect, in some implementations of the third aspect, the identifier of the second device is a MAC address of the second device.

[0089] In a fourth aspect, a device for secure authentication of Wireless Fidelity (Wi-Fi) is provided, configured to perform the method of the first aspect or any possible implementation of the first aspect. Specifically, the device includes units or modules configured to perform the method of the first aspect or any possible implementation of the first aspect. For example, the device includes a processing unit and a transceiver unit.

[0090] The transceiver unit is used to receive a first password input from a first device, where the first password is a factory preset password.

[0091] The processing unit is configured to obtain a second password shared between the AP and the first device when the first password passes verification by the AP, where the second password is a shared key between the first device and the AP.

[0092] The processing unit is further configured to perform a 4-way handshake with the first device according to the second password.

[0093] The transceiver unit is further configured to receive a first request from the first device, where the first request is used to request a second device to access the AP.

[0094] The processing unit is further configured to control the transceiver unit to send a third password to the first device in response to the first request, where the third password is a shared key between the second device and the AP.

[0095] In conjunction with the fourth aspect, in certain implementations of the fourth aspect, the processing unit is specifically configured to:

[0096] According to the second password, based on the double-base cryptographic exponential key exchange (TBPEKE) protocol, a first pairing master key PMK1 is negotiated with the first device, and according to the first PMK1, a four-way handshake is performed with the first device.

[0097] In conjunction with the fourth aspect, in some implementations of the fourth aspect, the processing unit is further configured to:

[0098] Determine the first hash to curve function g corresponding to the first device based on the second password mst , the first hash to curve function g mst Used to convert the second password into a point on an elliptic curve through a point multiplication operation; and save the identifier of the first device and the first hash to curve function g mst , wherein the identifier of the first device is the same as the first hash to curve function g mst Have a corresponding relationship.

[0099] In conjunction with the fourth aspect, in some implementations of the fourth aspect, the first hash to curve function g mst Expressed as:

[0100]

[0101] Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and id mst Indicates the identifier of the first device, pw mst Indicates the second password.

[0102] In conjunction with the fourth aspect, in some implementations of the fourth aspect, the first hash to curve function g mst Expressed as:

[0103]

[0104] Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and n mst is a random number, pw mst Indicates the second password.

[0105] In combination with the fourth aspect, in some implementations of the fourth aspect, the processing unit is further used to determine that the first password is invalid.

[0106] In combination with the fourth aspect, in some implementations of the fourth aspect, the processing unit is further configured to delete the identifier of the first device and the second password, and activate the first password.

[0107] In combination with the fourth aspect, in some implementations of the fourth aspect, the processing unit is further configured to perform a 4-way handshake with the second device according to the third password.

[0108] In conjunction with the fourth aspect, in certain implementations of the fourth aspect, the processing unit is specifically configured to:

[0109] According to the third password, based on the double-base cryptographic exponential key exchange (TBPEKE) protocol, a second pairing master key PMK2 is negotiated with the second device, and according to the second PMK2, a four-way handshake is performed with the first device.

[0110] In combination with the fourth aspect, in some implementations of the fourth aspect, the processing unit is further configured to determine, based on the third password, a second hash-to-curve function g corresponding to the second device. T , the second hash to curve function g T Used to convert the third password into a point on the elliptic curve by point multiplication, and save the identifier of the second device and the second hash to curve function g T , wherein the identification of the second device is related to the second hash-to-curve function g T Have a corresponding relationship.

[0111] In conjunction with the fourth aspect, in some implementations of the fourth aspect, the second hash to curve function g T Expressed as:

[0112]

[0113] Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and id T Indicates the identifier of the second device, pw T Indicates the third password.

[0114] In conjunction with the fourth aspect, in some implementations of the fourth aspect, the second hash to curve function g T Expressed as:

[0115]

[0116] Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and n T is a random number, pw T Indicates the third password.

[0117] In combination with the fourth aspect, in some implementations of the fourth aspect, the first request includes an identifier of the second device.

[0118] In combination with the fourth aspect, in some implementations of the fourth aspect, the identifier of the second device is the MAC address of the second device.

[0119] In a fifth aspect, a device for secure authentication of wireless fidelity (Wi-Fi) is provided, configured to execute the method of the second aspect or any possible implementation of the second aspect. Specifically, the device includes units or modules configured to execute the method of the second aspect or any possible implementation of the second aspect. For example, the device includes a processing unit and a transceiver unit.

[0120] The transceiver unit is used to send a first password to the access point AP, where the first password is a factory preset password.

[0121] The processing unit is configured to obtain a second password shared between the AP and the first device upon request that the first password passes verification by the AP, where the second password is a shared key between the first device and the AP.

[0122] The processing unit is further configured to perform a 4-way handshake with the AP according to the second password.

[0123] The transceiver unit is further configured to receive a second request from a second device, where the second request is configured to request that the second device be allowed to access the AP.

[0124] The processing unit is further configured to control the transceiver unit to send a first request to the AP in response to the second request, where the first request is configured to request the second device to access the AP.

[0125] The transceiver unit is further configured to receive a third password from the AP, where the third password is a shared key between the second device and the AP.

[0126] The transceiver unit is further configured to send the third password to the second device.

[0127] In conjunction with the fifth aspect, in certain implementations of the fifth aspect, the processing unit is specifically configured to:

[0128] According to the second password, based on the double-base cryptographic exponential key exchange (TBPEKE) protocol, a first pairing master key PMK1 is negotiated with the AP; and according to the first PMK1, the first device performs a 4-way handshake with the AP.

[0129] In conjunction with the fifth aspect, in some implementations of the fifth aspect, the processing unit is further configured to determine, based on the second password, a first hash-to-curve function g corresponding to the first device. mst , the first hash to curve function g mst Used to convert the second password into a point on the elliptic curve through a point multiplication operation.

[0130] In conjunction with the fifth aspect, in some implementations of the fifth aspect, the first hash to curve function g mst Expressed as:

[0131]

[0132] Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and id mst Indicates the identifier of the first device, pw mst Indicates the second password.

[0133] In conjunction with the fifth aspect, in some implementations of the fifth aspect, the first hash to curve function g mst Expressed as:

[0134]

[0135] Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and n mst is a random number, pw mst Indicates the second password.

[0136] In combination with the fifth aspect, in some implementations of the fifth aspect, the first request includes an identifier of the second device, and the second request includes an identifier of the second device.

[0137] In combination with the fifth aspect, in some implementations of the fifth aspect, the identifier of the second device is the MAC address of the second device.

[0138] In a sixth aspect, a device for secure authentication of wireless fidelity (Wi-Fi) is provided, configured to execute the method of the third aspect or any possible implementation of the third aspect. Specifically, the device includes units or modules configured to execute the method of the third aspect or any possible implementation of the third aspect. For example, the device includes a processing unit and a transceiver unit.

[0139] The transceiver unit is used to send a second request to the first device, where the second request is used to request that the second device be allowed to access the AP.

[0140] The transceiver unit is further configured to receive a third password from the first device, where the third password is a shared key generated by the AP between the second device and the AP.

[0141] In combination with the sixth aspect, in some implementations of the sixth aspect, the processing unit is further configured to perform a 4-way handshake with the AP according to the third password.

[0142] In combination with the sixth aspect, in certain implementations of the sixth aspect, the processing unit is specifically used to negotiate a second pairing master key PMK2 with the AP based on the third password and the double-base cryptographic exponential key exchange TBPEKE protocol, and to perform a four-way handshake with the AP based on the second PMK2.

[0143] In combination with the sixth aspect, in some implementations of the sixth aspect, the processing unit is further configured to determine, based on the third password, a second hash-to-curve function g corresponding to the second device. T , the second hash to curve function g T Used to convert the third password into a point on an elliptic curve through a point multiplication operation.

[0144] In conjunction with the sixth aspect, in some implementations of the sixth aspect, the second hash to curve function g T Expressed as:

[0145]

[0146] Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and id T Indicates the identifier of the first device, pw T Indicates the third password.

[0147] In conjunction with the sixth aspect, in some implementations of the sixth aspect, the second hash to curve function g T Expressed as:

[0148]

[0149] Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and n T is a random number, pw T Indicates the third password.

[0150] In combination with the sixth aspect, in some implementations of the sixth aspect, the second request includes an identifier of the second device.

[0151] In combination with the sixth aspect, in some implementations of the sixth aspect, the identifier of the second device is the MAC address of the second device.

[0152] In a seventh aspect, an apparatus for secure authentication of Wireless Fidelity (Wi-Fi) is provided, comprising: a processor and a transceiver, the processor being coupled to the transceiver. Optionally, the apparatus may further include a memory. The memory is configured to store instructions, and the processor is configured to execute the instructions stored in the memory. When the processor executes the instructions stored in the memory, the execution causes the processor to perform the method of the first aspect or any possible implementation of the first aspect.

[0153] The transceiver is used to receive a first password input from a first device, where the first password is a factory preset password.

[0154] The processor is configured to obtain a second password shared between the AP and the first device when the first password passes verification by the AP, where the second password is a shared key between the first device and the AP.

[0155] The processor is further configured to perform a 4-way handshake with the first device according to the second password.

[0156] The transceiver is further configured to receive a first request from the first device, where the first request is used to request a second device to access the AP.

[0157] The processor is further configured to control the transceiver to send a third password to the first device in response to the first request, where the third password is a shared key between the second device and the AP.

[0158] In conjunction with the seventh aspect, in certain implementations of the seventh aspect, the processor is specifically configured to:

[0159] According to the second password, based on the double-base cryptographic exponential key exchange (TBPEKE) protocol, negotiate a first pairing master key PMK1 with the first device; and according to the first PMK1, perform a 4-way handshake with the first device.

[0160] In conjunction with the seventh aspect, in certain implementations of the seventh aspect, the processor is further configured to:

[0161] Determine the first hash to curve function g corresponding to the first device based on the second password mst , the first hash to curve function g mst Used to convert the second password into a point on an elliptic curve by a point multiplication operation, and to save the identifier of the first device and the first hash to curve function g mst , wherein the identifier of the first device is the same as the first hash to curve function g mst Have a corresponding relationship.

[0162] In conjunction with the seventh aspect, in some implementations of the seventh aspect, the first Hash to curve function g mst Expressed as:

[0163]

[0164] Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and id mst Indicates the identifier of the first device, pw mst Indicates the second password.

[0165] In conjunction with the seventh aspect, in some implementations of the seventh aspect, the first Hash to curve function g mst Expressed as:

[0166]

[0167] Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and n mst is a random number, pw mst Indicates the second password.

[0168] In combination with the seventh aspect, in some implementations of the seventh aspect, the processor is further used to determine that the first password is invalid.

[0169] In combination with the seventh aspect, in some implementations of the seventh aspect, the processor is further configured to delete the identifier of the first device and the second password, and activate the first password.

[0170] In combination with the seventh aspect, in some implementations of the seventh aspect, the processor is further used to perform a 4-way handshake with the second device according to the third password.

[0171] In combination with the seventh aspect, in certain implementations of the seventh aspect, the processor is specifically used to negotiate a second pairing master key PMK2 with the second device based on the third password and the double-base cryptographic exponential key exchange TBPEKE protocol, and then perform a four-way handshake with the first device based on the second PMK2.

[0172] In combination with the seventh aspect, in some implementations of the seventh aspect, the processor is further configured to determine, based on the third password, a second hash-to-curve function g corresponding to the second device. T , the second hash to curve function g T Used to convert the third password into a point on the elliptic curve by point multiplication, and save the identifier of the second device and the second hash to curve function g T, wherein the identification of the second device is related to the second hash-to-curve function g T Have a corresponding relationship.

[0173] In conjunction with the seventh aspect, in some implementations of the seventh aspect, the second hash to curve function g T Expressed as:

[0174]

[0175] Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and id T Indicates the identifier of the second device, pw T Indicates the third password.

[0176] In conjunction with the seventh aspect, in some implementations of the seventh aspect, the second hash to curve function g T Expressed as:

[0177]

[0178] Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and n T is a random number, pw T Indicates the third password.

[0179] In combination with the seventh aspect, in some implementations of the seventh aspect, the first request includes an identifier of the second device.

[0180] In combination with the seventh aspect, in some implementations of the seventh aspect, the identifier of the second device is the MAC address of the second device.

[0181] In an eighth aspect, an apparatus for secure authentication of Wireless Fidelity (Wi-Fi) is provided, comprising: a processor and a transceiver, the processor being coupled to the transceiver. Optionally, the apparatus may further include a memory. The memory is configured to store instructions, and the processor is configured to execute the instructions stored in the memory. When the processor executes the instructions stored in the memory, the execution causes the processor to perform the method of the second aspect or any possible implementation of the second aspect.

[0182] The transceiver is used to send a first password to an access point AP, where the first password is a factory preset password.

[0183] The processor is configured to obtain a second password shared between the AP and the first device upon request that the first password passes verification by the AP, where the second password is a shared key between the first device and the AP.

[0184] The processor is configured to perform a 4-way handshake with the AP according to the second password.

[0185] The transceiver is configured to receive a second request from a second device, where the second request is used to request that the second device be allowed to access the AP.

[0186] The transceiver is configured to send a first request to the AP in response to the second request, where the first request is used to request the second device to access the AP.

[0187] The transceiver is used to receive a third password from the AP, where the third password is a shared key between the second device and the AP.

[0188] The transceiver is configured to send the third password to the second device.

[0189] In combination with the eighth aspect, in certain implementations of the eighth aspect, the processor is specifically used to negotiate a first pairing master key PMK1 with the AP based on the double-base cryptographic exponential key exchange TBPEKE protocol according to the second password; and perform a four-way handshake with the AP based on the first PMK1.

[0190] In combination with the eighth aspect, in some implementations of the eighth aspect, the processor is further configured to determine, based on the second password, a first hash-to-curve function g corresponding to the first device. mst , the first hash to curve function g mst Used to convert the second password into a point on the elliptic curve through a point multiplication operation.

[0191] In conjunction with the eighth aspect, in certain implementations of the eighth aspect, the first hash to curve function g mst Expressed as:

[0192]

[0193] Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and id mst Indicates the identifier of the first device, pw mst Indicates the second password.

[0194] In conjunction with the eighth aspect, in certain implementations of the eighth aspect, the first hash to curve function g mst Expressed as:

[0195]

[0196] Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and n mst is a random number, pw mst Indicates the second password.

[0197] In combination with the eighth aspect, in some implementations of the eighth aspect, the first request includes the identifier of the second device, and the second request includes the identifier of the second device.

[0198] In combination with the eighth aspect, in certain implementations of the eighth aspect, the identifier of the second device is the MAC address of the second device.

[0199] In a ninth aspect, a device for secure authentication of Wireless Fidelity (Wi-Fi) is provided, comprising: a processor and a transceiver, the processor being coupled to the transceiver. Optionally, the device may further include a memory. The memory is configured to store instructions, and the processor is configured to execute the instructions stored in the memory. When the processor executes the instructions stored in the memory, the execution causes the processor to perform the method of the third aspect or any possible implementation of the third aspect.

[0200] The transceiver is used to send a second request to the first device, where the second request is used to request that the second device be allowed to access the AP.

[0201] The transceiver is further configured to receive a third password from the first device, where the third password is a shared key generated by the AP between the second device and the AP.

[0202] In combination with the ninth aspect, in certain implementations of the ninth aspect, the processor is configured to perform a four-way handshake with the AP based on the third password.

[0203] In combination with the ninth aspect, in certain implementations of the ninth aspect, the processor is specifically used to negotiate a second pairing master key PMK2 with the AP based on the third password and the double-base cryptographic exponential key exchange TBPEKE protocol, and then perform a four-way handshake with the AP based on the second PMK2.

[0204] In combination with the ninth aspect, in some implementations of the ninth aspect, the processor is further configured to determine, based on the third password, a second hash-to-curve function g corresponding to the second device. T , the second hash to curve function g T Used to convert the third password into a point on an elliptic curve through a point multiplication operation.

[0205] In conjunction with the ninth aspect, in certain implementations of the ninth aspect, the second hash to curve function gT Expressed as:

[0206]

[0207] Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and id T Indicates the identifier of the first device, pw T Indicates the third password.

[0208] In conjunction with the ninth aspect, in certain implementations of the ninth aspect, the second hash to curve function g T Expressed as:

[0209]

[0210] Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and n T is a random number, pw T Indicates the third password.

[0211] In combination with the ninth aspect, in certain implementations of the ninth aspect, the second request includes an identifier of the second device.

[0212] In combination with the ninth aspect, in certain implementations of the ninth aspect, the identifier of the second device is the MAC address of the second device.

[0213] In the tenth aspect, a chip is provided, comprising a processor and a communication interface, wherein the processor is used to call and run instructions from the communication interface, and when the processor executes the instructions, the method of any aspect of the first to third aspects or any possible implementation of any aspect is implemented.

[0214] Optionally, the communication chip may further include a memory storing instructions, and the processor is configured to execute the instructions stored in the memory or instructions derived from other sources. When the instructions are executed, the processor is configured to implement the method of any one of the first to third aspects or any possible implementation of any one of the aspects.

[0215] In an eleventh aspect, a computer-readable medium is provided for storing a computer program, wherein the computer program comprises instructions for executing the method of any one of the first to third aspects or any possible implementation of any one of the aspects.

[0216] In the twelfth aspect, an embodiment of the present application further provides a computer program product comprising instructions, which, when run on a computer, enables the computer to execute a method in any one of the first to third aspects or any possible implementation of any one of the aspects.

[0217] In the thirteenth aspect, a communication system is provided, which includes a device having functions for implementing the methods and various possible designs of the above-mentioned first aspect, the above-mentioned device having functions for implementing the methods and various possible designs of the above-mentioned second aspect, and the above-mentioned device having functions for implementing the methods and various possible designs of the above-mentioned second aspect.

[0218] It should be understood that the beneficial effects achieved by the second to thirteenth aspects of the present application and the corresponding implementation methods can be referred to the beneficial effects achieved by the first aspect of the present application and the corresponding implementation methods, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0219] Figure 1 It is a schematic flow chart of a method for WiFi-based security authentication;

[0220] Figure 2 is a schematic flow chart of a WPA3-based security authentication method;

[0221] Figure 3 This is a schematic diagram of an application scenario in which the embodiments of the present application are applied;

[0222] Figure 4 This is a schematic flow chart of a method for security authentication applied to WiFi provided in an embodiment of the present application;

[0223] Figure 5 is an example of TBPEKE’s process;

[0224] Figure 6 This is a specific example of the process for the master device to determine the corresponding protocol provided in the embodiment of the present application;

[0225] Figure 7 This is a specific example of the process corresponding to the device authentication protocol provided in the embodiment of the present application;

[0226] Figure 8 This is a specific example of the process corresponding to the device authorization protocol provided in the embodiment of the present application;

[0227] Figure 9 This is another specific example of the process corresponding to the device authentication protocol provided in the embodiment of the present application;

[0228] Figure 10 This is another specific example of the process corresponding to the device authentication protocol provided in the embodiment of the present application;

[0229] Figure 11 A schematic diagram of a device for WiFi security authentication provided in an embodiment of the present application. DETAILED DESCRIPTION

[0230] First, the relevant terms involved in the embodiments of the present application are introduced.

[0231] Brute force cracking (also known as offline dictionary attack): Offline dictionary attack on passwords means that because passwords are short and have a small value space, attackers can repeatedly guess all possible passwords and determine the correct password by comparing them with the hijacked communication information.

[0232] Rainbow table attack: In systems that use passwords for authentication, the server typically doesn't store each user's password directly. Instead, it stores a hash of each password. This prevents an attacker from directly obtaining all user passwords after compromising the server. A rainbow table attack involves creating a table (a rainbow table) containing all possible passwords and their corresponding hash values. Once the attacker has compromised the server, they can determine the user's password by comparing the hash value in the rainbow table with the hash value stored on the server.

[0233] The technical solution in this application will be described below with reference to the accompanying drawings.

[0234] Figure 1 FIG1 shows a schematic flow chart of a method 100 for WiFi-based security authentication. Figure 1 In the present invention, the WiFi security protocol can be the second-generation WiFi protected access 2 (WPA2) version, or a version before WPA2, such as wired equivalent privacy (WEP), second-generation WEP (WEP2), WPA, etc., without limitation.

[0235] Figure 1 The process shown in can also be called a security protocol process. Figure 1 As shown, method 100 is performed by a requesting device (also referred to as a supplicant) and an AP. The AP can provide a network based on the WiFi protocol, and the requesting device is a terminal device that requests to use the network provided by the AP. The AP and the requesting device share a password pw. Figure 1 The method 100 may include steps 101 to 109. Steps 104 to 109 may be referred to as a 4-way handshake process.

[0236] 101. The requesting device and the AP associate. Here, the requesting device and the AP may negotiate a security suite to be used through association. For example, the security suite may indicate the encryption algorithms used between the requesting device and the AP, as well as other relevant parameters.

[0237] 102. The requesting device generates a PMK. Exemplarily, the requesting device may derive the PMK based on a PW shared by the requesting device and the AP. Alternatively, the requesting device may derive the PMK based on the media access control (MAC) addresses of the requesting device and the AP, although this application does not limit this.

[0238] 103. The AP generates a PMK. For example, the AP can derive the PMK based on a PW shared by the requesting device and the AP. Alternatively, the AP can derive the PMK based on the MAC addresses of the requesting device and the AP, which is not limited in this application.

[0239] In some embodiments, when the PMK generated by the requesting device is the same as the PMK generated by the AP, the AP and the first device may perform a 4-way handshake based on the PMK.

[0240] 104. The AP sends Msg1(r, anonce) to the requesting device. The requesting device receives Msg1(r, anonce). Here, Msg1 represents message 1, anonce represents the AP's one-time random number, and r represents the count of the counter.

[0241] 105, requesting the device to derive PTK.

[0242] Exemplarily, the requesting device may select a one-time random number (denoted as snonce) and generate a PTK based on the PMK, anonce, and snonce. Optionally, the requesting device may also generate a PTK based on the PMK, anonce, snonce, and the MAC addresses of both the requesting device and the AP, which is not limited in this application.

[0243] Exemplarily, the PTK consists of three parts: a key confirmation key (KCK), a key encryption key (KEK), and a transient key (TK). The KCK is used to protect the privacy of messages during the 4-way handshake, the KEK is used to protect the integrity of messages during the 4-way handshake, and the TK is the actual session key used to protect subsequent communications between the requesting device and the AP.

[0244] 106, the requesting device sends Msg2({r, snonce} KCK Correspondingly, the AP receives the Msg2({r, snonce} KCK Here, Msg2 represents message 2, where the Msg2 uses KCK to protect the integrity of the message.

[0245] 107,AP derivePTK.

[0246] For example, the AP may generate the PTK based on the PMK, anonce, and snonce. Optionally, the AP may also generate the PTK based on the PMK, anonce, snonce, and the MAC addresses of the requesting device and the AP, which is not limited in this application.

[0247] In some embodiments, the PTK generated by the requesting device is the same as the PTK generated by the AP. When the PTK generated by the requesting device is the same as the PTK generated by the AP, the following process is performed.

[0248] 108, AP sends Msg3({r+1,anonce,{GTK} KEK} KCK ). Correspondingly, the AP receives the Msg3({r+1,anonce,{GTK} KEK} KCK Here, Msg3 represents message 3, and GTK represents the multicast key. Msg3 uses KEK to protect the privacy of GTK, and KCK to protect the integrity of the entire Msg3 message.

[0249] 109, the requesting device sends Msg4({r+1} KCK ). Correspondingly, the AP receives the Msg4({r+1} KCK Here, Msg4 represents message 4. Msg4 uses KCK to protect the integrity of the message.

[0250] Specifically, the steps 101 to 108 may refer to the description in the prior art and will not be described in detail.

[0251] As can be seen from the above description, the AP and the requesting device can perform identity authentication and generate session keys and multicast keys through the 4-way handshake process to protect subsequent unicast communications between the requesting device and the AP, as well as the AP's broadcast communications.

[0252] In method 100, the PMK is calculated from the password pw (or the MAC addresses of both parties). A notable characteristic of the password pw is its small length, i.e., its low entropy. Therefore, if an attacker intercepts the four-way handshake messages during key generation, they could potentially obtain the password through brute force, threatening network security.

[0253] To address the potential brute-force cracking of the password (pw) by attackers in WPA2 and previous Wi-Fi security protocol versions, WPA3 performs the SAE process before traditional security protocol processes (such as association and the four-way handshake) to generate a high-entropy PMK, thereby preventing brute-force cracking of the password. SAE is a password-based password authentication and key exchange (PAKE) protocol.

[0254] Figure 2 The schematic flow chart of a WPA3-based security authentication method 200 is shown. The method 200 may include the requesting device and the AP generating PMK, association, and a 4-way handshake process. Figure 2 In the process of generating a PMK with high entropy value by executing the SAE process (i.e. step 210), wherein SAE is implemented on the elliptic curve. As an example, in Figure 2 In the example, Alice (e.g., a client) and Bob (e.g., an AP) perform the SAE process. Figure 2 As shown, step 210 includes steps 211 to 220 .

[0255] 211, Alice picks a random number r A and m A , calculate s A =(r A +m A )modq,E A =-m A ·P.

[0256] 212, Bob picks a random number r B and m B , calculate s B =(r B +m B )modq,E B =-m B ·P.

[0257] Where P is a point on the corresponding elliptic curve and can be derived from the password pw and the MAC addresses of the supplicant and the AP. The calculation process of generating P from the password pw can be called a hash-to-curve function.

[0258] 213, Alice submits auth-commit to Bob (s A , E A ).

[0259] 214, Bob submits auth-commit to Alice (s B , E B ).

[0260] 215, Alice verifies B and E B , calculate K = r A (s B P+E B ),κ=hash(K),tr=(s A ,E A ,s B ,E B ), c A =HMAC(κ,tr). Among them, κ=hash(K) can be used as PMK.

[0261] 216, Bob verifies A and E A , calculate K = r B (s A P+E A ),κ=hash(K),tr=(s B ,E B ,s A ,E A ), c B =HMAC(κ,tr). Among them, κ=hash(K) can be used as PMK.

[0262] 217, Alice submits c to Bob for verification A .

[0263] 218, Bob submits c to Alice for verification B .

[0264] 219, Alice verifies c B .

[0265] 220, Bob verifies c A .

[0266] When c B and c A After both pass verification, Alice and Bob can use their respective calculated κ values ​​as PMK.

[0267] Therefore, by performing the SAE process to generate a high-entropy PMK before traditional security protocol processes (such as association and 4-way handshake processes), it can help reduce or even avoid the possibility of brute force cracking.

[0268] However, in the current WiFi security protocol, all requesting devices share a password, that is, all requesting devices use the same password to access the AP (i.e., connect to the network provided by the AP). In this way, the leakage of the password of one requesting device will lead to the leakage of the passwords of all requesting devices.

[0269] In view of this, an embodiment of the present application provides a communication solution in which, when multiple requesting devices connect to a network provided by an AP, different requesting devices use different passwords for security authentication with the AP, i.e., one password per device. In this way, leaking the password of one requesting device will not affect the passwords of other devices.

[0270] Figure 3 A schematic diagram of a system according to an embodiment of the present application is shown. Figure 3 As shown, multiple requesting devices (e.g., requesting device 1, requesting device 2, and requesting device 3) can securely connect to an AP and use WiFi network resources through the AP. 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. When executing the security protocol with the AP, different requesting devices use different passwords to execute the security protocol with the AP. Before each requesting device uses its own password to execute the security protocol with the AP, it must establish a shared password with the AP.

[0271] It should be understood that Figure 3 An example of a system applied to an embodiment of the present application is shown, but the present application is not limited thereto. For example, one, two, four or more requesting devices may be connected to the AP, and all of these are within the scope of protection of the embodiment of the present application.

[0272] The method and apparatus for WiFi security authentication provided by the present application will be described in detail below with reference to the accompanying drawings.

[0273] The technical solution of the present application can be applied to wireless communication systems, for example, Figure 3The communication system shown in . Devices in the wireless 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, another device may be, for example, a first device, or a chip configured in the first device, and another device may be, for example, a second device, or a chip configured in the second device. This embodiment of the application is not limited to this.

[0274] The following describes the embodiments of the present application in detail using the communication process between an AP, a first device, and a second device as an example. It is understood that the chip configured in the AP, the chip configured in the first device, and the chip configured in the second device can all communicate based on the same method. This application does not limit this.

[0275] Figure 4 FIG. 4 is a schematic flow chart of a method 400 for secure authentication of WiFi provided in an embodiment of the present application. Figure 4 As shown, method 400 includes steps 401 to 409 .

[0276] Exemplarily, the WiFi security protocol adopted by method 400 may include three protocols, namely, a master device determination protocol, a device authorization protocol, and a device authentication protocol. Steps 401 to 403 may correspond to the master device determination protocol. That is, through steps 401 to 403, the first device may be determined as the master device. Step 404 may correspond to the device authentication protocol. That is, through step 404, the first device may perform security authentication with the AP. Steps 405 to 408 may correspond to the device authorization protocol. That is, through steps 405 to 408, the second device may establish a password shared with the AP through the first device. Step 409 may correspond to the device authentication protocol. That is, through step 409, the second device may perform security authentication with the AP.

[0277] Next, steps 401 to 409 will be described in detail.

[0278] 401. A first device sends a first password ω to an AP. The first password ω is a factory preset password.

[0279] As an example, the first password ω can be the factory password ω that the AP securely stores when it leaves the factory. This password ω can be transmitted along with the AP to the owner of the AP. For example, the password ω can be written into a secret envelope, placed in a QR (quick response) code attached to the AP, or sent to the owner via text message, etc., although this application is not limited thereto. After obtaining the password ω, the owner can enter it into the first device, causing the first device to obtain the password ω. The first device can then send the first password ω to the AP.

[0280] Correspondingly, the AP receives the first password ω. After receiving the first password ω, the AP may verify the first password ω. When the first password ω passes the verification, the AP may set the first device as the master device (i.e., the master supplicant).

[0281] It should be noted that in the embodiments of the present application, the AP needs to differentiate between requesting devices (or user devices), for example, dividing requesting devices (or user devices) into master devices and ordinary devices, wherein the master device can be used to manage ordinary devices. For example, the master device can be responsible for authorization, that is, the master device can authorize ordinary devices so that the ordinary devices can obtain the password shared with the AP.

[0282] Exemplarily, the master device may be, for example, the first device to be successfully connected to the AP by default. For example, when a family buys a new AP and starts using the AP for the first time, the first device to be connected to the AP is the master device.

[0283] In some optional embodiments, the first device may also send an identifier of the first device (which may be recorded as id) to the AP. mst ). Correspondingly, the AP receives the identification ID of the first device mst Among them, the identification id of the first device mst That is, the unique identity of the first device can be used to uniquely identify the first device.

[0284] As a possible implementation, the first device may generate an identification ID of the first device mst , and identify it as id mst The first device ID is carried in the data frame containing the first password ω and sent to the AP. mst For example, it can be the user name of the first device.

[0285] As another possible implementation, the identifier of the first device may be the MAC address of the first device. In this case, in step 401, the data frame containing the first password ω sent by the first device to the AP may include the MAC address of the first device. Alternatively, the first device may independently send its MAC address to the AP, which is not limited in this application.

[0286] 402, the first device obtains the second password pw shared between the AP and the first device mst Among them, the second password pw mst is a shared key between the first device and the AP.

[0287] 403, the AP obtains the second password pw shared between the AP and the first device mst Among them, the second password pwmst is a shared key between the first device and the AP.

[0288] As a possible implementation, the AP may require the first device to generate the second password pw mst For example, when the first password ω passes the verification, the AP may send an instruction message to the first device to instruct the first device to generate the second password pw mst After receiving the instruction message, the first device can generate the second password pw mst Then, the first device can send the second password pw to the AP. mst In this way, both the first device and the AP can obtain the second password pw mst .

[0289] As another possible implementation, the AP may generate the second password pw mst , and the second password pw mst For example, when the first password ω is verified, the AP may generate a second password pw for the first device. mst , and the second password pw mst In this way, both the first device and the AP can obtain the second password.

[0290] In some optional embodiments, the AP may store the identifier of the first device (which may be recorded as id mst ) and the second password pw mst , where the first device's ID mst With the second password pw mst Therefore, the embodiment of the present application sets the identification id of the first device mst With the second password pw mst There is a corresponding relationship, which can realize the second password pw mst Binding with the identifier of the first device can help enhance the ability of the AP side to resist rainbow table attacks.

[0291] In addition, when a connection request is subsequently received from the first device, the second password pw mst , and according to the second password pw mst A device authentication protocol is performed with the first device.

[0292] As a possible implementation, the AP may generate an identification ID for the first device. mst Optionally, the AP may also generate the identification ID of the first device mst Sent to the first device.

[0293] As another possible implementation, the AP can receive the identification ID of the first device from the first device. mst For details, please refer to the relevant description in step 401, which will not be repeated here.

[0294] Therefore, in an embodiment of the present application, since the first password sent by the first device to the AP has passed the verification, the first device can act as a master device to manage other devices (for example, ordinary devices), such as authorizing ordinary devices to connect to the AP's network, or canceling the ordinary device's access to the AP's network, etc.

[0295] In some optional embodiments, the AP may further determine that the first password ω is invalid. For example, when the first password ω passes verification and the AP sets the first device as the master device, the AP may determine that the first password ω is invalid. After the AP determines that the first password ω is invalid, when other devices send the first password ω to the AP, the first password ω will not pass verification. Therefore, the AP will no longer determine the other device as the master device. This allows only a limited number of master devices, such as one or two, to exist in the system, thereby improving system security.

[0296] In some optional embodiments, the AP may also delete the saved identification ID of the first device. mst and the identification id of the first device mst The corresponding second password pw mst , thereby revoking the first device as the master device. At this time, the AP can also activate the above-mentioned first password ω. As an example, the identification ID of the first device can be achieved by resetting the AP system. mst and the second password pw mst The deletion of , and the activation of the first password ω, are not limited in this application.

[0297] After the first password ω is activated, when another device subsequently sends the first password ω to the AP, the first password ω will be verified. At this time, the AP can also determine the other device as the master device to achieve the replacement of the master device.

[0298] 404. The first device performs a 4-way handshake with the AP.

[0299] As an example, the first device and the AP can use the second password pw mst , obtain PMK, and perform a 4-way handshake protocol for security authentication, and generate session keys and multicast keys to protect the subsequent unicast communication between the requesting device and the AP, as well as the AP's broadcast communication. After that, the first device can securely connect to the AP, that is, establish a secure communication channel with the AP. Here, the 4-way handshake between the first device and the AP can be seen in Figure 1 The description in will not be repeated here.

[0300] After the first device securely connects to the AP through the device authentication protocol, the first device can authorize the standard device, allowing the standard device to obtain a password shared with the AP. Specifically, the first device, the second device, and the AP can perform the following steps 405 to 408, i.e., the device authorization protocol, so that the second device can establish a password shared with the AP through the first device.

[0301] 405. The second device sends a request #1 to the first device. Correspondingly, the first device receives the request #1.

[0302] Here, the second device can act as a normal device and send Request #1 to the first device, requesting the first device to allow the second device to access the AP. In other words, in step 405, the second device can request authorization from the first device. In some embodiments, Request #1 can also be referred to as an authorization request, which is not limited in this application.

[0303] In some optional embodiments, the second device may also send an identifier of the second device (which may be recorded as id) to the first device. T ). Among them, the identification id of the second device T That is, the unique identity of the second device can be used to uniquely identify the second device.

[0304] As a possible implementation, the second device may generate an identifier of the second device (which may be recorded as id T ) and identify it with id T Carried in the above request #1 and sent to the first device. As an example, id T For example, it can be the user name of the second device.

[0305] As another possible implementation, the identification ID of the second device T It can be the MAC address of the second device. In this case, in step 405, the data frame of the request #1 sent by the second device to the first device may include the MAC address of the second device. Alternatively, the second device may send its MAC address to the first device separately, which is not limited in this application.

[0306] 406. The first device sends a request #2 to the AP, requesting the second device to access the AP. The AP receives the request #2. In some embodiments, the request #2 may also be referred to as an authorization request, which is not limited in this application.

[0307] Exemplarily, after receiving the request #1 from the second device, the first device may send the request #2 to the AP when determining that the second device is authorized to connect to the AP.

[0308] In some other optional embodiments, when the first device determines not to authorize the second device, that is, does not allow the second device to connect to the AP, it may not send a request to the AP for requesting the second device to access the AP.

[0309] In some optional embodiments, when the first device determines to authorize the second device to connect to the AP, it may also determine an authorization policy. For example, the authorization policy may indicate the validity period of a password shared between the AP and the second device, or whether the password shared between the AP and the second device is bound to the MAC address of the second device, etc., which is not limited in this application. In this case, request #2 may include the authorization policy.

[0310] In some optional embodiments, request #2 may also include the identification ID of the second device. T Here, the second device's ID T It can be the user name of the second device or the MAC address of the second device, without limitation.

[0311] Optionally, when the id of the second device in the above request #2 T When it is not the MAC address of the second device, request #2 may further include the MAC address of the second device.

[0312] For example, the first device may generate an ID for the second device. T , or the first device obtains the identification ID of the second device from request #1 in step 405 above T , this application does not limit this.

[0313] 407. The AP sends a third password to the first device, where the third password is a shared key between the second device and the AP. Correspondingly, the first device receives the third password.

[0314] For example, after receiving request #2, the AP may generate a third password (which may be recorded as pw T ), and the third password pw T Sent to the first device.

[0315] In some optional embodiments, when the request #2 includes an authorization policy, the AP may generate the third password pw according to the authorization policy. T For example, you can set a third password pw T The validity period of the third password pw T Whether to bind the MAC address of the second device is not limited.

[0316] In some optional embodiments, the AP may store the identifier of the second device (which may be recorded as id T) and the third password pw T , where the second device's ID T With the third password pw T Therefore, the embodiment of the present application sets the identification ID of the second device T With the third password pw T Have a corresponding relationship, can realize the third password pw T Binding with the identifier of the second device can help enhance the ability of the AP to resist rainbow table attacks.

[0317] In addition, when a connection request from a second device is subsequently received, the third password pw T , and according to the third password pw T Perform security authentication with the second device.

[0318] As a possible implementation, the AP may generate an identification ID for the second device. T Optionally, the AP may also generate the identification ID of the first device T As an example, the AP may transmit (id T , pw T ).

[0319] As another possible implementation, the AP can receive the identification ID of the second device from the first device. T For details, please refer to the relevant description in step 406, which will not be repeated here.

[0320] 408. The first device sends a third password to the second device. Correspondingly, the second device receives the third password.

[0321] In some optional embodiments, when the AP generates an identifier of the second device and transmits it to the first device (id T , pw T ), the first device can T , pw T ) is transmitted to the second device.

[0322] In some optional embodiments, when the first device generates the identification ID of the second device T and receives the third password pw from AP T When the first device is transmitted (id T , pw T ), this application does not limit this.

[0323] Therefore, in the embodiment of the present application, the first device can request the AP to connect the second device to the AP, and receive and send to the second device a third password generated by the AP and shared by the AP and the second device, thereby authorizing the second device through the first device, so that the second device can obtain the third password shared with the AP. Therefore, the embodiment of the present application, through the device authorization protocol, can, on the one hand, enable a common device to share the password corresponding to the common device with the AP, helping to avoid multiple devices sharing the password, and on the other hand, can help realize the management of the common device by the master device.

[0324] Optionally, in 409 , the second device performs a 4-way handshake with the AP.

[0325] As an example, the second device and the AP can use the third password pw T , obtain PMK, and perform a 4-way handshake protocol for security authentication and calculation of PTK, and generate session keys and multicast keys to protect the subsequent unicast communication between the requesting device and the AP, as well as the AP's broadcast communication. After that, the second device can securely connect to the AP, that is, establish a secure communication channel with the AP. Here, the 4-way handshake between the second device and the AP can be seen in Figure 1 The description in will not be repeated here.

[0326] Therefore, in the embodiment of the present application, when the factory-preset first password input by the first device is verified by the AP, the AP and the first device can execute a security authentication protocol based on the second password shared between the AP and the first device. Furthermore, the first device can request the AP to connect the second device to the AP, and the AP sends the third password shared by the AP and the second device to the first device in response to the request, so that the second device can obtain the third password shared by the second device and the AP through the first device. Therefore, on the one hand, the embodiment of the present application can realize that the first device and the AP share the second password, and the second device and the AP share the third password, which helps to avoid multiple devices sharing passwords, thereby reducing the risk of password leakage. On the other hand, the second device can obtain the third password shared by the second device and the AP through the first device, so that the present application can realize that the first device manages the access of the second device to the AP.

[0327] In some embodiments, during the security authentication between the requesting device (e.g., the first device or the second device) and the AP, the AP may also negotiate a PMK with the requesting device based on a password (e.g., the second password or the third password) based on a simultaneous authentication of equals (SAE) protocol. This is not limited in this application. When the SAE process is used, although it can help reduce or even prevent the possibility of password cracking by brute force, an attacker may launch a side-channel attack on the AP or the requesting device. In this case, the attacker may still obtain the password shared between the requesting device and the AP, resulting in password leakage.

[0328] In other embodiments, during the security authentication process between the above-mentioned requesting device (e.g., the first device or the second device) and the AP, the AP may also negotiate a pairing master key PMK with the requesting device based on the password (e.g., the second password or the third password) and a twin base password encrypted key exchange (TBPEKE) protocol, and then perform a 4-way handshake with the requesting device based on the PMK.

[0329] Therefore, in the embodiments of the present application, by executing the TBPEKE process, a PMK with a high entropy value can be generated. This embodiment of the present application can help provide resistance to offline dictionary attacks during security authentication between the AP and the first device. Furthermore, because TBPEKE can easily prevent side-channel attacks, the embodiments of the present application, by executing TBPEKE to generate a PMK, can improve the ability of the AP and the requesting device to prevent side-channel attacks during the WiFi security authentication process.

[0330] TBPEKE is also a PAKE protocol. Figure 5 An example of the TBPEKE process is shown. Figure 5 As shown in the figure, the public parameters of the two communicating parties A and B in TBPEKE include: a cyclic group G of prime order p (Gofprimeorderp), two independent random generators U and V in the group (denoted as U, ), and output {0,1} l The hash function H(ahashfunctiononto{0,1} l , expressed as H:{0,1}*→{0,1} l ). Wherein, H: {0,1}*→{0,1} is a secure hash function, such as SHA256.

[0331] In TBPEKE, A and B share a password pw. Based on the public parameters and the password pw, A can calculate:

[0332] g←U·V pw , X←g x

[0333] Then, A sends A||X to B.

[0334] B can also calculate based on the public parameters and password pw:

[0335] g←U·V pw , Y←g y

[0336] Then, B sends Y to A.

[0337] After receiving Y, A can calculate: Z←Y x .

[0338] After receiving A||X, B can calculate: Z←X y .

[0339] Then, A and B can respectively calculate the key sk according to A, B, g, X, Y, and Z. For example, sk can be calculated according to the following formula:

[0340] sk←H(A||B||g||X||Y||Z).

[0341] It should be noted that when G represents an elliptic curve group, then g = U·V pw This can be thought of as a hash-to-curve function that converts the password pw into a point on an elliptic curve. This hash-to-curve function involves a point multiplication operation for pw. This point multiplication operation effectively protects against side-channel attacks. Therefore, in the embodiments of this application, using TBPEKE can help prevent side-channel attacks.

[0342] In some embodiments, during the device authentication process, the above Figure 5 The TBPEKE process shown in is modified with some modifications. For example, when B is an instance of AP, B can keep g = U·V pw , instead of pw. For another example, we can also use g=U·V pw Some modifications are made, which are all within the protection scope of the embodiments of the present application.

[0343] Next, combine Figures 6 to 10 , describes several specific embodiments provided by this application. Figures 6 to 10 In the embodiment, TBPEKE is used to generate PMK.

[0344] Figure 6 FIG. 1 shows a specific example of a process in which the master device determines the corresponding protocol. Figure 6 As shown, the master device determination protocol may be executed by the first device and the AP and may include steps 601 to 607 .

[0345] It should be understood that Figure 6 The steps or operations of the process of the master device determining the protocol are shown, but these steps or operations are only examples. The embodiment of the present application may also perform other operations or Figure 6 In addition, Figure 6 The steps in Figure 6 are executed in a different order than the ones presented in the Figure 6 All operations in .

[0346] 601, the first device sends a first password ω and the first device identification ID to the AP mst Correspondingly, the AP receives the first password ω and the identification ID of the first device mst .

[0347] Specifically, the first password ω and the identification id of the first device mst See also Figure 4 The description in , will not be repeated here.

[0348] In some optional embodiments, in step 601, the first device may not send the identification ID of the first device to the AP. mst , this application does not limit this.

[0349] 602, AP verifies (checks) ω.

[0350] For example, when ω passes the verification, the AP can determine the first device as the master device. At this time, the following steps 603 to 607 can be performed. Specifically, the master device can refer to Figure 4 The description in , will not be repeated here.

[0351] In some embodiments, when ω fails to pass the verification, the AP does not determine the first device as the primary device, and the process may end.

[0352] 603, the first device obtains the second password pw mst (getpw mst ).

[0353] 604, AP obtains the second password pw mst (getpw mst ).

[0354] Specifically, the second password pwmst , and how the first device or AP obtains the second password pw mst See also Figure 4 The description in , will not be repeated here.

[0355] In some embodiments, the first device and the AP respectively obtain the second password pw mst Afterwards, the AP can save the identification ID of the first device mst and the second password pw mst , and the first device and the AP can be based on the identification id of the first device mst and the second password pw mst , based on the SAE protocol, device authentication is performed. For details, please refer to Figure 4 The description in will not be repeated here.

[0356] In some other embodiments, the first device and the AP can use the second password pw mst Based on the TBPEKE protocol, the AP negotiates a pairing master key (PMK), and then performs a 4-way handshake with the first device based on the PMK to execute the security protocol. At this point, the AP may also perform the following steps 605 and 606.

[0357] Optional, 605, Computation

[0358] Among them, U and V are two independent random generators obtained from the cyclic group G of prime order p, which can be saved as system parameters on the AP side. h() is a secure hash function, g mst The hash to curve function of the first device may be referred to as the first hash to curve function g mst , used to convert the password pw mst Convert to a point on the elliptic curve. g mst The relevant parameters may be generated when the first device subsequently performs identity authentication with the AP. For details, please refer to the following description.

[0359] Here, the hashtocurve function g mst According to the identification id of the first device mst and the second password pw mst Obtained, so that the hashtocurve function g mst The first device's ID mst Binding can enhance the AP's ability to resist rainbow table attacks.

[0360] Optional, 606, DEV-ACCT = DEV-ACCTv{id mst , g mst}.

[0361] Wherein, DEV-ACCT represents the account file saved by the AP side, which may include the identifiers of one or more accounts and the hashtocurve function corresponding to each account. In step 606, the AP may store the identifier id of the first device mst , and the calculated hashtocurve function g mst Save in the account file DEV-ACCT, that is, you can add an item {id mst , g mst}, that is, DEV-ACCT=DEV-ACCTv{id mst , g mst}. That is, {id mst , g mst} can be an account established by the AP for the first device.

[0362] It should be noted that the first device ID is used here. mst and the corresponding hashtocurve function g mst The example of saving in the account file DEV-ACCT is used for explanation, but the embodiment of the present application is not limited to this. For example, the identification id of the first device is saved mst and the corresponding hashtocurve function g mst The account file can have other names, or can be saved in other files, etc., without limitation.

[0363] 607, deactivate ω.

[0364] Specifically, step 607 can be found in Figure 4 The description in , will not be repeated here.

[0365] In some embodiments, the AP can also replace the main device. For example, the AP can delete the saved identification ID of the first device. mst and the identification id of the first device mst The corresponding hash to curve function g mst , thereby revoking the first device as the master device. At this time, the AP can also activate the above-mentioned first password ω. As an example, the identification ID of the first device can be achieved by resetting the AP system. mst and hash to curve function g mst The deletion of , and the activation of the first password ω, are not limited in this application.

[0366] After the first password ω is activated, when other devices send the first password ω to the AP, the first password ω will be verified. At this time, the AP can also determine the other device as the master device to achieve the replacement of the master device.

[0367] Therefore, in the embodiment of the present application, in the process of determining the master device protocol, the AP can further determine the master device protocol according to the second password pw mst Calculate the hashtocurve function g mst , and save the identification id of the first device mst and the hashtocurve function g mst , so that the first device and the AP can subsequently use the hashtocurve function g mst Perform security authentication.

[0368] In some other embodiments, alternatively, step 605 may be: generate a random number n mst ,calculate Accordingly, step 606 can be replaced by: DEV-ACCT=DEV-ACCTv{id mst , n mst , g mst}. And, the AP can use the random number n mst Sent to the first device.

[0369] That is to say, in the embodiment of the present application, the random number n can be used mst To replace the identification id of the first device mst To calculate g mst This can enhance the AP's ability to resist rainbow table attacks.

[0370] Figure 7 A specific example of the process corresponding to the device authentication protocol is shown. Among them, the first device can perform security authentication with the AP, for example, according to the hash to curve function g mst , obtain PMK, and perform 4-way handshake protocol for security authentication. For example, the device authentication protocol process can be Figure 6 The master device determines the protocol flow shown, that is, after the AP determines that the first device is the master device, the first device can perform security authentication with the AP based on the obtained second password. Figure 7 The device authentication protocol shown in can be Figure 4 This is a specific example of step 404, and this application does not limit this.

[0371] As an example, after the master device confirms the agreement, the first device may keep the second password pw mstThe AP keeps the ID of the first device. mst and the hashtocurve function g mst , that is, keep {id mst , g mst},in This application does not limit this.

[0372] In some other embodiments, when the AP side calculates When the AP keeps the ID of the first device mst , random number n mst and the hashtocurve function g mst , that is, keep {id mst , n mst , g mst}, this application does not limit this.

[0373] It should be understood that Figure 7 The steps or operations of the process of the device authentication protocol are shown, but these steps or operations are only examples. The embodiment of the present application may also perform other operations or Figure 7 In addition, Figure 7 The steps in Figure 7 are executed in a different order than the ones presented in the Figure 7 All operations in .

[0374] like Figure 7 As shown, the device authentication process may include steps 701 to 707.

[0375] 701, first device selection Sure

[0376] As an example, the first device selects a random number Sure Specifically, U and V are two independent random generators obtained from a cyclic group G with a prime order of p, which can be stored as system parameters on the first device side. The first device can generate a random number based on the system parameters U and V and the password pw mst , determine the hashtocurve function The first device can then select a random number And according to the hashtocurve function g mst And the random number x, determine the first parameter

[0377] It should be noted that in step 701, the g determined by the first device side mst g kept on the AP side mstare the same, for example, it can be achieved by presetting codes in the first device and the AP respectively, which is not limited in this application.

[0378] 702, the first device sends X and id to the AP mst . Correspondingly, AP receives X and id mst .

[0379] For example, the first device may send a connection request to the AP, which includes the above parameter X and the identification ID of the first device. mst , this application does not limit this.

[0380] 703, AP selects a random number

[0381] Here, when the AP can keep Instead of the password pw mst At this time, the AP can receive the parameters X and id mst After that, a random number y is selected and the pre-stored hashtocurve function is used and random number y, determine the second parameter

[0382] Therefore, the embodiment of the present application directly stores the Instead of the password pw mst , which can avoid the AP from calculating g in real time when authenticating the device mst , thereby reducing the amount of calculation on the AP side, and thus helping to reduce or avoid denial of service (DoS) attacks.

[0383] In other embodiments, the AP can keep the identification ID of the second device mst and the second password pw mst At this time, when the AP receives the parameters X and id mst Afterwards, the AP can use the saved system parameters U and V, as well as the password pw mst , determine the hashtocurve function And further select a random number y, according to Y=g y , to determine the second parameter Y, which is not limited in this application.

[0384] 704. The AP sends Y to the first device. Correspondingly, the first device receives Y.

[0385] 705, the first device calculates Z=Y x ,PMK=KDF(Z,id mst ||id AP ||X||Y).

[0386] 706, AP calculates Z=X y ,PMK=KDF(Z,id mst ||id AP ||X||Y).

[0387] For example, the first device and the AP can respectively use the above parameters X, Y, and the identification ID of the first device. mst and the AP's ID AP , determine the pairing master key PMK.

[0388] As an example, the first device and the AP can calculate the Z value respectively, and calculate the Z value according to PMK=KDF(Z, id mst ||id AP ||X||Y) to determine the PMK. For the first device, Z=Y x , for AP, Z=X y Among them, id AP represents the identifier of the AP. For example, the identifier of the AP may be the MAC address of the AP. KDF() is a standard key derivation function.

[0389] In some optional embodiments, before the first device determines the PMK in step 705, the AP may send a broadcast message including the AP's MAC address. Accordingly, the requesting device may receive the broadcast message and obtain the AP's MAC address through it. For example, the broadcast message may be a beacon frame, which may be sent before step 701, though this application does not limit this.

[0390] 707 , the first device associates with the AP and performs a 4-way handshake.

[0391] Here, through the association and 4-way handshake process, the AP and the first device can mutually authenticate each other and calculate the PTK. After the first device passes the device authentication protocol, the first device can connect to the AP and establish a secure communication channel.

[0392] Therefore, in the embodiment of the present application, the first device can be configured according to the hashtocurve function g mst , determine parameter X, and send the parameter X and the identification ID of the first device to the AP mst , the AP can send parameter Y to the first device, wherein parameter Y is also based on the hashtocurve function g mst Determined, and then the first device and the AP can be based on the parameter X, parameter Y, the identification id of the first device mst and the AP's ID AP , to determine the PMK.

[0393] In the embodiment of the present application, 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 a password, so that 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.

[0394] In the existing technology, when the SAE process is used to calculate the PMK in the WPA3 protocol, a shared password is required for calculation. In this way, an attacker can obtain the password through channel testing combined with brute force cracking, thereby causing the password to be leaked.

[0395] In other embodiments, alternatively, when the AP side keeps When step 701 is performed, the first device may determine Step 703 can be replaced by This application does not limit this. In addition, before step 701, the first device may receive a random number n from the AP. mst This can enhance the AP's ability to resist rainbow table attacks.

[0396] Figure 8 A specific example of the process corresponding to the device authorization protocol is shown. Among them, the first device can authorize the second device so that the second device can obtain the third password shared with the AP. The device authorization protocol process can be performed by the main device through the device authentication protocol, such as Figure 7 As an example, after the master device confirms the agreement, the AP can keep the first device's ID mst and the hashtocurve function g mst , that is, keep {id mst , g mst}, this application does not limit this.

[0397] In some other embodiments, when the AP side calculates When the AP keeps the ID of the first device mst , random number n mst and the hashtocurve function g mst , that is, keep {id mst , n mst , g mst}, this application does not limit this.

[0398] It should be understood that Figure 8The steps or operations of the process of the device authorization agreement are shown, but these steps or operations are only examples. The embodiment of the present application can also perform other operations or Figure 8 In addition, Figure 8 The steps in Figure 8 are executed in a different order than the ones presented in the Figure 8 All operations in .

[0399] like Figure 8 As shown, the device authentication process may include steps 801 to 808.

[0400] 801. A first device performs device authentication with an AP.

[0401] For example, step 801 can refer to Figure 7 The description in , will not be repeated here.

[0402] 802. The second device sends a request #1 to the first device, where the request #1 is used to request the first device to allow the second device to access the AP. Correspondingly, the first device receives the request #1.

[0403] For example, step 802 can refer to Figure 4 The description in step 405 is not repeated here.

[0404] 803, the first device sends a request #2 to the AP. The request #2 is used to request the second device to access the AP. Optionally, the request #2 may include the authorization policy P, the identification ID of the second device T .

[0405] For example, step 803 can refer to Figure 4 The description of step 406 is omitted here.

[0406] 804, AP generates {id T , pw T}.

[0407] Exemplarily, the AP generates a third password pw for the second device. T The AP uses the ID of the second device T And the third password pw T , generate {id T , pw T}. For example, the AP can obtain the identification ID of the second device from request #2 T In some other embodiments, when request #2 does not include the identification ID of the second device T When the AP can generate the identification ID of the third device T, this application does not limit this. For details, please refer to Figure 4 The description of step 407 is omitted here.

[0408] Optionally, when request #2 includes authorization policy P, the AP may generate a third password based on the authorization policy P. For example, see Figure 4 The description of step 407 is omitted here.

[0409] 805, AP sends {id T , pw T}. Correspondingly, the first device receives {id T , pw T}.

[0410] 806, the first device sends {id T , pw T}. Correspondingly, the second device receives {id T , pw T}.

[0411] In some embodiments, the second device and the AP obtain the third password {id T , pw T}After that, AP can save {id T , pw T}, and the second device and the AP can be based on the identification id of the second device T and the second password pw T , perform device authentication. For details, please refer to Figure 4 The description in will not be repeated here.

[0412] In other embodiments, when the hashtocurve function used by the second device and the AP when generating the PMK can convert the password pw into a point on an elliptic curve through a point multiplication operation, for example, TBPEKE can be used to generate the PMK, and the AP can also perform the following steps 807 and 808.

[0413] Optional, 807, AP calculation

[0414] Among them, U and V are the two independent random generators obtained from the cyclic group G of prime order p, which can be saved on the AP side as system parameters, h() is a secure hash function, g T The hash to curve function of the second device may be referred to as the second hash to curve function g T , used to convert the password pw T Convert to a point on the elliptic curve. g TThe relevant parameters may be generated when the second device subsequently performs identity authentication with the AP. For details, please refer to the description below.

[0415] Here, the hashtocurve function g T It is based on the identification id of the second device T and the third password pw T Obtained, so that the hashtocurve function g T The identification id of the second device T Binding can enhance the AP's ability to resist rainbow table attacks.

[0416] Optional, 808, DEV-ACCT = DEV-ACCTv{id mst , g mst , P}.

[0417] Among them, DEV-ACCT can be found in Figure 6 In step 608, the AP can use the ID of the second device T , and the calculated hashtocurve function g T Save in the account file DEV-ACCT. For example, you can add an item {id T , g T ,P}, that is, DEV-ACCT=DEV-ACCTv{id T , g T , P}. That is, {id T , g T , P} can be an account established by the AP for the second device.

[0418] In some other embodiments, when the request #2 does not include the authorization policy P, an item {id T , g T ,P}, that is, DEV-ACCT=DEV-ACCTv{id T , g T ,P}, as the account established by the AP for the second device, this application does not limit this.

[0419] It should be noted that the second device ID is used here. T and the corresponding hashtocurve function g T The example of saving in the account file DEV-ACCT is used for explanation, but the embodiment of the present application is not limited to this. For example, the identification id of the second device is saved T and the corresponding hashtocurve function g TThe account file may have another name or be saved in another file, etc.

[0420] Therefore, in the device authorization protocol process of the embodiment of the present application, the AP can further use the third password pw T Calculate the hashtocurve function g T , and save the identification id of the second device T and the hashtocurve function g T , so that the subsequent second device and AP can use the hashtocurve function g T Perform security authentication.

[0421] In some embodiments, alternatively, step 804 may be: AP generates {id T , pw T , n T}. Accordingly, in steps 805 and 806, the transmitted T , pw T , n T}. Then, in step 807, AP calculates Accordingly, step 808 can be replaced by: DEV-ACCT=DEV-ACCTv{id T , n T , g T , P}, or, DEV-ACCT = DEV-ACCTv{id T , n T , g T}. And, the AP can use the random number n T Send it to the first device, and then the first device will send the random number n T with id T Send to the second device. For example, the AP can T and g T Send it to the first device together, and then the first device will send n T with id T and g T Sent to the second device together.

[0422] That is to say, in the embodiment of the present application, the random number n can be used T To replace the identification id of the second device T To calculate g T , which can enhance the AP's ability to resist rainbow table attacks.

[0423] Figure 9Another specific example of the process corresponding to the device authentication protocol is shown. In which the second device can perform device authentication with the AP, for example, according to the hash to curve function g T , obtain PMK, and perform 4-way handshake protocol for security authentication. For example, the device authentication protocol process can be Figure 8 The device authorization protocol process shown is then executed, that is, after the first device authorizes the second device so that the second device obtains the third password shared with the AP, the second device can perform security authentication with the AP based on the obtained third password. In addition, Figure 9 The device authentication protocol shown in can be Figure 4 This is a specific example of step 409, which is not limited in this application.

[0424] As an example, after the device authorization protocol, the second device may keep the third password pw T The AP keeps the ID of the second device T and the hashtocurve function g T , that is, keep {id T , g T}, this application does not limit this.

[0425] In some other embodiments, when the AP side calculates When the AP keeps the ID of the second device T , random number n T and the hashtocurve function g T , that is, keep {id T , n T , g T}, this application does not limit this.

[0426] It should be understood that Figure 9 The steps or operations of the process of the device authentication protocol are shown, but these steps or operations are only examples. The embodiment of the present application may also perform other operations or Figure 9 In addition, Figure 9 The steps in Figure 9 are executed in a different order than the ones presented in the Figure 9 All operations in .

[0427] like Figure 9 As shown, the device authentication process may include steps 901 to 907.

[0428] 901, Second device selection Sure

[0429] For example, the second device selects Sure process, with the first device selected Sure The process is similar, you can refer to Figure 7 The description of step 701 may require some simple adaptation, which will not be repeated here.

[0430] 902, the second device sends X and id to the AP T . Correspondingly, AP receives X and id T .

[0431] For example, the second device may send a connection request to the AP, which includes the above parameter X and the identification ID of the second device. T , this application does not limit this.

[0432] 903, AP selects a random number

[0433] For example, AP selection Sure The process of AP selection Sure The process is similar, you can refer to Figure 7 The description of step 703 may require some simple adaptation, which will not be repeated here.

[0434] 904. The AP sends Y to the second device. Correspondingly, the second device receives Y.

[0435] 905, the second device calculates Z=Y x ,PMK=KDF(Z,id T ||id AP ||X||Y).

[0436] 906, AP calculates Z=X y ,PMK=KDF(Z,id T ||id AP ||X||Y).

[0437] For example, the second device calculates Z, and PMK=KDF(Z,id T ||id AP ||X||Y) process, calculate Z with the first device, and PMK=KDF(Z,id mst ||id AP The process of ||X||Y) is similar, AP calculates Z, and PMK=KDF(Z,id T ||id AP||X||Y), and the AP calculates Z, and PMK=KDF(Z,id mst ||id AP The process of ||X||Y) is similar, you can refer to Figure Figure 7 The description of steps 705 and 706 may require some simple adaptation, which will not be repeated here.

[0438] 907 , the second device associates with the AP and performs a 4-way handshake.

[0439] Here, through the association and 4-way handshake process, the AP and the second device can mutually authenticate each other and calculate the PTK. After the second device passes the device authentication protocol, it can connect to the AP and establish a secure communication channel.

[0440] Therefore, in the embodiment of the present application, the second device can be configured according to the hashtocurve function g T , determine parameter X, and send the parameter X and the identification id of the second device to the AP T , the AP can send parameter Y to the second device, where parameter Y is also based on the hashtocurve function g T Determined, and then the second device and the AP can be based on the parameter X, parameter Y, the identification ID of the second device T and the AP's ID AP , to determine the PMK.

[0441] In the embodiment of the present application, the first parameter X and the second parameter Y transmitted between the AP and the second device are based on the hash to curve function g T The password is generated by random numbers and does not involve password calculation, so it is difficult for attackers to know the password, which can improve the ability of the AP and the second device to prevent side channel attacks during the WiFi security authentication process, and help the AP and the second device avoid side channel attacks during security authentication.

[0442] In the existing technology, when the SAE process is used to calculate the PMK in the WPA3 protocol, a shared password is required for calculation. In this way, an attacker can obtain the password through channel testing combined with brute force cracking, thereby causing the password to be leaked.

[0443] In other embodiments, alternatively, when the AP side keeps When step 901 is performed, the first device may determine Step 903 can be replaced by This application does not limit this. In addition, before step 901, the second device can obtain the random number n sent from the AP. T This can enhance the AP's ability to resist rainbow table attacks.

[0444] In the device identity authentication protocol, when the requesting device (for example, the first device or the second device) communicates with the AP according to the password pw (for example, the second password pw corresponding to the first device), mst , or the third password pw corresponding to the second device T ), during the PMK generation process, the AP side is susceptible to DoS attacks. To reduce or avoid DoS attacks, the present application embodiment may adopt at least one of the following solutions:

[0445] Solution 1: The AP can send an anti-DoS credential token to the requesting device and verify the token sent again by the requesting device. Only when the token verification is successful will the AP further process the connection request from the requesting device.

[0446] Solution 2: The AP can maintain a list of connected devices (device in processing, DEV in PROC). Only when the requesting device is not in the list of connected devices will the AP further process the connection request of the requesting device.

[0447] Next, combine Figure 10 The device authentication protocol process in the device authentication protocol is described in detail for the above two schemes.

[0448] Figure 10 Another specific example of the process corresponding to the device authentication protocol is shown. For example, the AP side can adopt the above-mentioned solution 1 and solution 2 to reduce or avoid DoS attacks. Among them, the requesting device can be the first device or the second device mentioned above, and this application does not limit this. The requesting device and the AP both share the password pw (for example, pw mst , or pw T ), and the AP can keep {id dev , g dev}, where id dev Indicates the ID of the requesting device. or And set the key k additionally. dev Indicates a random number. For example, when the requesting device is the first device, id dev Can be id mst , n dev Can be n mst , g dev Can be g mst , when the requesting device is the second device, id dev Can be id T , n dev Can be n T , g dev Can be gT .

[0449] It should be noted that Figure 10 China-Israel Take the following example to describe the The process corresponding to the device authentication protocol can refer to Figure 10 The description in will not be repeated here.

[0450] It should be understood that Figure 10 The steps or operations of the process of the device authentication protocol are shown, but these steps or operations are only examples. The embodiment of the present application may also perform other operations or Figure 10 In addition, Figure 10 The steps in Figure 10 are executed in a different order than the ones presented in the Figure 10 All operations in .

[0451] like Figure 10 As shown, the device authentication process may include steps 1001 to 1014.

[0452] Optionally, in embodiments of the present application, it is possible to configure whether to enable the anti-DoS mechanism. For example, a label may be pre-set. When the anti-DoS mechanism is enabled, the label value may be set to 1, and otherwise, the label value may be set to 0. When the anti-DoS mechanism is enabled, the token sent by the requesting device may be verified, but this application does not limit this.

[0453] 1001, AP broadcasts a beacon frame. The beacon frame may include the AP identifier (which may be represented as id AP ), for example, it can be the MAC address of the AP (which can be expressed as MAC AP Optionally, the beacon frame may further include RSNEwithsupp.ciphers (robust security network element with supported ciphers) to notify the capabilities of the ciphers, etc., which is not limited in this application.

[0454] Accordingly, the requesting device may receive the beacon frame and determine that it needs to connect to the WiFi network provided by the AP.

[0455] 1002, request the device to select a password (selectcipher), select a random number Sure

[0456] Exemplarily, the requesting device selects matching ciphers, that is, selects a cipher suite supported by itself, to obtain the above g, or related parameters for obtaining g (such as the above U, V).

[0457] Here, the AP broadcasting RSNEwithsupp.ciphers and the requesting device selecting matching ciphers is an example of the AP and the requesting device negotiating the security suite to be used during association. As an example, after the requesting device selects the cipher suite, g, or U, V can be saved as system parameters on the first device side.

[0458] For example, requesting a random number from a device Sure See above Figure 7 701, or Figure 9 The description of step 901 in will not be repeated here.

[0459] 1003, requesting the device to send X and id to the AP dev . Correspondingly, AP receives X and id dev .

[0460] As an example, the requesting device may send a connection request to the AP, which includes X and id dev , this application does not limit this.

[0461] 1004, AP inspection Calculate token = h(k,MAC dev ).

[0462] Specifically, AP When calculating token=h(k,MAC dev ), on MAC dev ∈DEVinPROC, token=h(k,MAC dev ).

[0463] As an example, the list of connected devices maintained by the AP (which can be represented as DEVinPROC) may include the MAC address of at least one requesting device (i.e., connected device) that is connected to the network provided by the AP. ), the AP will further process the connection request of the requesting device, that is, calculate the token = h(k,MAC dev ). When the MAC address of the requesting device is in DEVinPROC, that is (MAC dev∈DEVinPROC), it means that the requesting device has been able to connect to the network provided by the AP. It can be inferred that the requesting device is using a fake MAC address to maliciously attack the AP and is likely an attacker. In this case, the AP can not process the connection request of the requesting device, that is, it will not calculate a token for the requesting device, thereby reducing or avoiding DoS attacks on the AP.

[0464] 1005, AP sends token to the requesting device. That is, AP generates a token bound to the above id. dev After receiving the token of the address, the token is returned to the requesting device. Correspondingly, the requesting device receives the token.

[0465] 1006, requesting the device to send token, X and id to the AP dev .

[0466] As an example, the requesting device submits a connection request and a token to the AP again. For example, the token may be included in the connection request, which is not limited in this application. For example, the token may also be encapsulated together with the connection request in a message and sent to the AP.

[0467] Correspondingly, AP receives token, X and id dev .

[0468] 1007, AP inspection Check token? =h(k,MAC dev ). That is, the AP checks the ID received in step 1006 dev Is it in the DEVinPROC list, and check whether token is equal to the token calculated in step 1004.

[0469] As an example, the AP can dev Not in the DEVinPROC list, i.e. Afterwards, it is further checked whether the token is equal to the token calculated in step 1004.

[0470] when And token=h(k,id dev ), that is, when the requesting device is not a connected device and the token received by the AP in step 1006 is equal to the token calculated by the AP in step 1004, the AP can further process the connection request of the requesting device.

[0471] when And token≠h(k,id dev), that is, the requesting device is not a connected device, but when the token received by the AP in step 1006 is not equal to the token calculated by it in step 1004, the AP may not process the connection request of the requesting device.

[0472] Therefore, in the embodiment of the present application, the AP can dev The key k saved by the AP generates an anti-DoS token bound to the identifier of the requesting device and returns the token to the requesting device. The requesting device needs to send its identifier id to the AP again. dev and token, so that the AP can identify its id dev The AP processes the connection request of the requesting device only when the token is verified, thereby helping to avoid the AP processing all connection requests, thereby helping to reduce or avoid DoS attacks on the AP.

[0473] When id dev ∈DEVinPROC, the AP may not verify the token, that is, it may not process the connection request of the requesting device.

[0474] 1008, DEVinPROC=DEVinPROCv{id dev}.

[0475] Specifically, DEVinPROC=DEVinPROCv{id dev} indicates that the ID of the requested device can be added to the existing DEVinPROC list dev , to update DEVinPROC. In this way, when the subsequent dev When the connection request is made, due to the id dev It is already included in DEVinPROC, and the AP does not need to process the connection request, thereby helping to reduce or avoid DoS attacks on the AP.

[0476] 1009, select a random number

[0477] 1010. The AP sends Y to the requesting device.

[0478] 1011, request device to calculate Z=Y x ,PMK=KDF(Z,id dev ||id AP ||X||Y).

[0479] 1012, AP calculates Z=X y ,PMK=KDF(Z,iddev ||id AP ||X||Y).

[0480] 1013: Request the device to associate with the AP and perform a 4-way handshake.

[0481] Specifically, steps 1009 to 1013 can refer to Figure 7 703 to 707, or refer to Figure 9 The descriptions of steps 903 to 907 are not repeated here.

[0482] 1014, if failed, then DEVinPROC = DEVinPROC-{id dev}.

[0483] Specifically, if the identity authentication or key generation between the requesting device and the AP fails, that is, the requesting device is not currently connected to the AP, the requesting device's identifier can be deleted from the current DEVinPROC list. This allows the requesting device to continue sending connection requests to the AP, and because the requesting device's identifier is not in the DEVinPROC list, the AP can process the requesting device's connection request accordingly.

[0484] Therefore, in an embodiment of the present application, the AP will further process the connection request of the requesting device only when it determines that the MAC address of the requesting device is not in its DEVinPROC list. This can help avoid the AP from processing all connection requests, help reduce the amount of calculation on the AP side, and further help reduce or avoid DoS attacks on the AP.

[0485] It can be understood that in the above-mentioned embodiments of the present application, the method implemented by the AP can also be implemented by components that can be used for the AP (such as chips or circuits), the method implemented by the first device can also be implemented by components that can be used for the first device (such as chips or circuits), and the method implemented by the second device can also be implemented by components that can be used for the second device (such as chips or circuits).

[0486] According to the above method, Figure 11 Schematic diagram of an apparatus 1100 for WiFi security authentication provided in an embodiment of the present application.

[0487] In some embodiments, the apparatus 1100 may be an AP, or a chip or circuit, such as a chip or circuit that can be provided in an AP. In some embodiments, the apparatus 1100 may be a first device, or a chip or circuit, such as a chip or circuit that can be provided in a first device. In some embodiments, the apparatus 1100 may be a second device, or a chip or circuit, such as a chip or circuit that can be provided in a second device.

[0488] The apparatus 1100 may include a processing unit 1110 (ie, an example of a processor) and a transceiver unit 1130 .

[0489] Optionally, the transceiver unit 1130 may be implemented by a transceiver or a transceiver-related circuit or an interface circuit.

[0490] Optionally, the device may further include a storage unit 1120. In one possible embodiment, the storage unit 1120 is used to store instructions. Alternatively, the storage unit may also be used to store data or information. The storage unit 1120 may be implemented as a memory.

[0491] In one possible design, the processing unit 1110 can be used to execute instructions stored in the storage unit 1120 so that the device 1100 implements the steps performed by the AP in the above method.

[0492] Furthermore, the processing unit 1110, storage unit 1120, and transceiver unit 1130 can communicate with each other via internal connection paths to transmit control and / or data signals. For example, the storage unit 1120 is used to store a computer program, and the processing unit 1110 can be used to call and execute the computer program from the storage unit 1120 to control the transceiver unit 1130 to receive and / or transmit signals, thereby completing the AP step in the above method.

[0493] Exemplarily, when the processor unit 1110 is a processor and the transceiver unit 1130 is a transceiver, the processor can be coupled to the transceiver, for example, sending instructions to the transceiver to instruct (or control) the transceiver unit to receive signals and / or send signals, thereby completing the AP steps in the above method.

[0494] In one possible design, the processing unit 1110 can be used to execute instructions stored in the storage unit 1120 so that the apparatus 1100 implements the steps performed by the first device in the above method.

[0495] Furthermore, the processing unit 1110, storage unit 1120, and transceiver unit 1130 can communicate with each other via internal connection paths to transmit control and / or data signals. For example, the storage unit 1120 is used to store a computer program, and the processing unit 1110 can be used to call and execute the computer program from the storage unit 1120 to control the transceiver unit 1130 to receive and / or send signals, thereby completing the first device step in the above method.

[0496] Exemplarily, when the processor unit 1110 is a processor and the transceiver unit 1130 is a transceiver, the processor can be coupled to the transceiver, for example, sending instructions to the transceiver to instruct (or control) the transceiver unit to receive signals and / or send signals, thereby completing the steps of the first device in the above method.

[0497] In one possible design, the processing unit 1110 can be used to execute instructions stored in the storage unit 1120 so that the apparatus 1100 implements the steps performed by the second device in the above method.

[0498] Furthermore, the processing unit 1110, storage unit 1120, and transceiver unit 1130 can communicate with each other via internal connection paths to transmit control and / or data signals. For example, the storage unit 1120 is used to store a computer program, and the processing unit 1110 can be used to call and execute the computer program from the storage unit 1120 to control the transceiver unit 1130 to receive and / or send signals, thereby completing the second device step in the above method.

[0499] Exemplarily, when the processor unit 1110 is a processor and the transceiver unit 1130 is a transceiver, the processor can be coupled to the transceiver, for example, sending instructions to the transceiver to instruct (or control) the transceiver unit to receive signals and / or send signals, thereby completing the steps of the second device in the above method.

[0500] The storage unit 1120 may be integrated into the processing unit 1110 or may be provided separately from the processing unit 1110 .

[0501] Optionally, if the apparatus 1100 is a communication device, the transceiver unit 1130 may include a receiver and a transmitter. The receiver and transmitter may be the same or different physical entities. When they are the same physical entity, they may be collectively referred to as a transceiver.

[0502] Optionally, if the device 1100 is a chip or a circuit, the transceiver unit 1130 may include an input interface and an output interface.

[0503] As an implementation, the functions of the transceiver unit 1130 may be implemented by a transceiver circuit or a dedicated transceiver chip. The processing unit 1110 may be implemented by a dedicated processing chip, a processing circuit, a processing unit, or a general-purpose chip.

[0504] As another implementation, it is possible to use a general-purpose computer to implement the communication device (e.g., AP, first device, or second device) provided in the embodiments of the present application. Specifically, the program code for implementing the functions of the processing unit 1110 and the transceiver unit 1130 is stored in the storage unit 1120, and the general-purpose processing unit implements the functions of the processing unit 1110 and the transceiver unit 1130 by executing the code in the storage unit 1120.

[0505] In some embodiments, when the device 1100 is an AP or a chip or circuit disposed in an AP,

[0506] The transceiver unit 1130 is configured to receive a first password input from a first device, where the first password is a factory preset password.

[0507] The processing unit 1110 is configured to obtain a second password shared between the AP and the first device when the first password passes verification by the AP, where the second password is a shared key between the first device and the AP.

[0508] The processing unit 1110 is further configured to perform a 4-way handshake with the first device according to the second password. Exemplarily, the processing unit 1110 may perform a 4-way handshake with the first device via the transceiver unit 1130 .

[0509] The transceiver unit 1130 is further configured to receive a first request from the first device, where the first request is used to request a second device to access the AP.

[0510] The processing unit 1110 is further configured to control the transceiver unit 1130 to send a third password to the first device in response to the first request, where the third password is a shared key between the second device and the AP.

[0511] In some possible implementations, the processing unit 1110 is specifically configured to negotiate a first pairing master key PMK1 with the first device based on the second password and a double-base cryptographic exponential key exchange (TBPEKE) protocol, and perform a four-way handshake with the first device based on the first PMK1.

[0512] In some possible implementations, the processing unit 1110 is further configured to determine, based on the second password, a first hash-to-curve function g corresponding to the first device. mst , the first hash to curve function g mst Used to convert the second password into a point on an elliptic curve through a point multiplication operation; and save the identifier of the first device and the first hash to curve function g mst , wherein the identifier of the first device is the same as the first hash to curve function g mstHave a corresponding relationship.

[0513] In some possible implementations, the first hash to curve function g mst Expressed as:

[0514]

[0515] Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and id mst Indicates the identifier of the first device, pw mst Indicates the second password.

[0516] In some possible implementations, the first hash to curve function g mst Expressed as:

[0517]

[0518] Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and n mst is a random number, pw mst Indicates the second password.

[0519] In some possible implementations, the processing unit 1110 is further configured to determine that the first password is invalid.

[0520] In some possible implementations, the processing unit 1110 is further configured to delete the identifier of the first device and the second password, and activate the first password.

[0521] In some possible implementations, the processing unit 1110 is further configured to perform a 4-way handshake with the second device according to the third password. Exemplarily, the processing unit 1110 may perform a 4-way handshake with the second device via the transceiver unit 1130 .

[0522] In some possible implementations, the processing unit 1110 is specifically configured to negotiate a second pairing master key PMK2 with the second device based on the third password and a double-base cryptographic exponential key exchange (TBPEKE) protocol, and perform a four-way handshake with the first device based on the second PMK2.

[0523] In some possible implementations, the processing unit 1110 is further configured to determine, based on the third password, a second hash-to-curve function g corresponding to the second device. T , the second hash to curve function g TUsed to convert the third password into a point on the elliptic curve by point multiplication, and save the identifier of the second device and the second hash to curve function g T , wherein the identification of the second device is related to the second hash-to-curve function g T Have a corresponding relationship.

[0524] In some possible implementations, the second hash to curve function g T Expressed as:

[0525]

[0526] Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and id T Indicates the identifier of the second device, pw T Indicates the third password.

[0527] In some possible implementations, the second hash to curve function g T Expressed as:

[0528]

[0529] Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and n T is a random number, pw T Indicates the third password.

[0530] In some possible implementations, the first request includes an identifier of the second device.

[0531] In some possible implementations, the identifier of the second device is a MAC address of the second device.

[0532] In some embodiments, when the apparatus 1100 is a first device or a chip or circuit disposed in a first device,

[0533] The transceiver unit 1130 is configured to send a first password to the access point AP, where the first password is a factory preset password.

[0534] The processing unit 1110 is configured to obtain a second password shared between the AP and the first device upon request that the first password passes the AP verification, where the second password is a shared key between the first device and the AP.

[0535] The processing unit 1110 is further configured to perform a 4-way handshake with the AP according to the second password. Exemplarily, the processing unit 1110 may perform a 4-way handshake with the AP via the transceiver unit 1130 .

[0536] The transceiver unit 1130 is further configured to receive a second request from a second device, where the second request is configured to request that the second device be allowed to access the AP.

[0537] The processing unit 1110 is further configured to control the transceiver unit to send a first request to the AP in response to the second request, where the first request is configured to request the second device to access the AP.

[0538] The transceiver unit 1130 is further configured to receive a third password from the AP, where the third password is a shared key between the second device and the AP.

[0539] The transceiver unit 1130 is further configured to send the third password to the second device.

[0540] In some possible implementations, the processing unit 1110 is specifically configured to negotiate a first pairing master key PMK1 with the AP based on the second password and the double-base cryptographic exponential key exchange TBPEKE protocol; and the first device performs a four-way handshake with the AP based on the first PMK1.

[0541] In some possible implementations, the processing unit 1110 is further configured to determine, based on the second password, a first hash-to-curve function g corresponding to the first device. mst , the first hash to curve function g mst Used to convert the second password into a point on the elliptic curve through a point multiplication operation.

[0542] In some possible implementations, the first hash to curve function g mst Expressed as:

[0543]

[0544] Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and id mst Indicates the identifier of the first device, pw mst Indicates the second password.

[0545] In some possible implementations, the first hash to curve function g mst Expressed as:

[0546]

[0547] Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and n mst is a random number, pw mst Indicates the second password.

[0548] In some possible implementations, the first request includes an identifier of the second device, and the second request includes an identifier of the second device.

[0549] In some possible implementations, the identifier of the second device is a MAC address of the second device.

[0550] In some embodiments, when the apparatus 1100 is a second device or a chip or circuit disposed in a second device,

[0551] The transceiver unit 1130 is configured to send a second request to the first device, where the second request is used to request that the second device be allowed to access the AP.

[0552] The transceiver unit 1130 is further configured to receive a third password from the first device, where the third password is a shared key generated by the AP between the second device and the AP.

[0553] In some possible implementations, the processing unit 1110 is further configured to perform a 4-way handshake with the AP according to the third password. Exemplarily, the processing unit 1110 may perform a 4-way handshake with the AP via the transceiver unit 1130 .

[0554] In some possible implementations, the processing unit 1110 is specifically configured to negotiate a second pairing master key PMK2 with the AP based on the third password and a double-base cryptographic exponential key exchange (TBPEKE) protocol, and perform a four-way handshake with the AP based on the second PMK2.

[0555] In some possible implementations, the processing unit 1110 is further configured to determine, based on the third password, a second hash-to-curve function g corresponding to the second device. T , the second hash to curve function g T Used to convert the third password into a point on an elliptic curve through a point multiplication operation.

[0556] In some possible implementations, the second hash to curve function g T Expressed as:

[0557]

[0558] Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and id T Indicates the identifier of the first device, pw T Indicates the third password.

[0559] In some possible implementations, the second hash to curve function g T Expressed as:

[0560]

[0561] Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and n T is a random number, pw T Indicates the third password.

[0562] In some possible implementations, the second request includes an identifier of the second device.

[0563] In some possible implementations, the identifier of the second device is a MAC address of the second device.

[0564] Each unit in the above embodiments may also be referred to as a module, a circuit, or a component.

[0565] The functions and actions of the modules or units in the apparatus 1100 listed above are merely exemplary. When the apparatus 1100 is configured in or is itself an AP, the modules or units in the apparatus 1100 can be used to perform the actions or processes performed by the AP in the above-mentioned method embodiments. When the apparatus 1100 is configured in or is itself a first device, the modules or units in the apparatus 1100 can be used to perform the actions or processes performed by the first device in the above-mentioned method embodiments. When the apparatus 1100 is configured in or is itself a second device, the modules or units in the apparatus 1100 can be used to perform the actions or processes performed by the second device in the above-mentioned method embodiments.

[0566] For the concepts, explanations, detailed descriptions and other steps involved in the device 1100 and related to the technical solutions provided in the embodiments of the present application, please refer to the descriptions of these contents in the aforementioned methods or other embodiments, and will not be repeated here.

[0567] According to the method provided in the embodiment of the present application, the embodiment of the present application also provides a communication system, which includes the aforementioned AP and the first device and the second device.

[0568] It should be understood that in the embodiments of the present application, the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.

[0569] It should also be understood that the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).

[0570] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented using software, the above embodiments can 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 program are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., infrared, wireless, microwave, etc.) method. 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 or data center that contains one or more available media sets. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state drive.

[0571] An embodiment of the present application also provides a computer-readable medium having a computer program stored thereon. When the computer program is executed by a computer, the computer program implements the steps performed by the AP in any of the above embodiments, or the steps performed by the first device, or the steps performed by the second device.

[0572] An embodiment of the present application also provides a computer program product, which, when executed by a computer, implements the steps performed by the AP in any of the above embodiments, or the steps performed by the first device, or the steps performed by the second device.

[0573] Embodiments of the present application also provide a system-on-chip (SoC), comprising: a communication unit and a processing unit. The processing unit may be, for example, a processor. The communication unit may be, for example, an input / output interface, a pin, or a circuit. The processing unit may execute computer instructions to cause the chip within the communication device to perform the steps performed by the AP, the steps performed by the first device, or the steps performed by the second device, as provided in the embodiments of the present application.

[0574] Optionally, the computer instructions are stored in a storage unit.

[0575] In addition, various aspects or features of the present application can be implemented as methods, devices or products using standard programming and / or engineering techniques. The term "product" as used in this application covers computer programs that can be accessed from any computer-readable device, carrier or medium. For example, computer-readable media may include, but are not limited to: magnetic storage devices (e.g., hard disks, floppy disks or tapes, etc.), optical disks (e.g., compact discs (CDs), digital versatile discs (DVDs), etc.), smart cards and flash memory devices (e.g., erasable programmable read-only memories (EPROMs), cards, sticks or key drives, etc.). In addition, the various storage media described herein may 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.

[0576] It should be noted that in the various embodiments provided in this application, there is no time limit relationship between the various steps, and each step can be used as a solution, or can be combined with one or more other steps to form a solution. This application does not limit this.

[0577] The various embodiments in this application can be used independently or in combination. For example, any one or more steps in different embodiments can be combined to constitute an embodiment separately, which is not limited here.

[0578] It should be understood that in the embodiments shown above, the first and the second are only used to facilitate the distinction between different objects and should not constitute any limitation to the present application.

[0579] It should also be understood that in the embodiments of the present application, the size of the serial numbers of the above processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0580] It should also be understood that "and / or" describes the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent three situations: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship. "At least one" means one or more; "at least one of A and B" is similar to "A and / or B", describing the association relationship of associated objects, indicating that three relationships can exist. For example, at least one of A and B can represent three situations: A exists alone, A and B exist at the same time, and B exists alone.

[0581] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0582] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0583] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0584] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0585] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0586] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0587] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A method for security authentication applied to wireless fidelity WiFi, characterized in that: The method comprises: The access point AP receives a first password input from the first device, where the first password is a factory preset password; When the first password passes verification by the AP, the AP obtains a second password shared between the AP and the first device, where the second password is a shared key between the first device and the AP. The AP performs a 4-way handshake with the first device according to the second password; The AP receives a first request from the first device, where the first request is used to request a second device to access the AP; The AP sends a third password to the first device in response to the first request, where the third password is a shared key between the second device and the AP.

2. The method according to claim 1, characterized in that The AP performs a 4-way handshake with the first device according to the second password, including: The AP negotiates a first pairing master key PMK1 with the first device based on the second password and the double-base cryptographic exponential key exchange (TBPEKE) protocol; The AP performs a 4-way handshake with the first device according to the first PMK1.

3. The method according to claim 2, characterized in that Before the AP negotiates with the first device a first pairing master key PMK1 based on the double-base cryptographic exponential key exchange (TBPEKE) protocol according to the second password, the method further includes: The AP determines the first hash to curve function g corresponding to the first device according to the second password mst , the first hash to curve function g mst for converting the second password into a point on an elliptic curve through a point multiplication operation; The AP stores the identifier of the first device and the first Hash-to-curve function g mst , wherein the identifier of the first device is the same as the first hash to curve function g mst Have a corresponding relationship.

4. The method according to claim 3, characterized in that The first hash to curve function g mst Expressed as: g mst =U·V h(idmst,pwmst) Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and id mst Indicates the identifier of the first device, pw mst Indicates the second password.

5. The method according to claim 3, characterized in that The first hash to curve function g mst Expressed as: g mst =U·V h(nmst,pwmst) Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and n mst is a random number, pw mst Indicates the second password.

6. The method according to any one of claims 1 to 5, characterized in that After the AP obtains the second password shared between the AP and the first device, the method further includes: The AP determines that the first password is invalid.

7. The method according to claim 6, characterized in that Also includes: The AP deletes the identifier of the first device and the second password; The AP activates the first password.

8. The method according to any one of claims 1 to 5, characterized in that Also includes: The AP performs a 4-way handshake with the second device according to the third password.

9. The method according to claim 8, characterized in that The AP performs a 4-way handshake with the second device according to the third password, including: The AP negotiates a second pairing master key PMK2 with the second device based on the double-base cryptographic exponential key exchange (TBPEKE) protocol according to the third password; The AP performs a 4-way handshake with the first device according to the second PMK2.

10. The method according to claim 9, characterized in that Before the AP negotiates the second pairing master key PMK2 with the second device based on the double-base cryptographic exponential key exchange (TBPEKE) protocol according to the third password, the method further includes: The AP determines the second hash to curve function g corresponding to the second device according to the third password T , the second hash to curve function g T used to convert the third password into a point on an elliptic curve through a point multiplication operation; The AP stores the identifier of the second device and the second Hash-to-curve function g T , wherein the identification of the second device is related to the second hash-to-curve function g T Have a corresponding relationship.

11. The method according to claim 10, characterized in that The second hash to curve function g T Expressed as: g T =U·V h(idT,pwT) Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and id T Indicates the identifier of the second device, pw T Indicates the third password.

12. The method according to claim 10, characterized in that The second hash to curve function g T Expressed as: g T =U·V h(nT,pwT) Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and n T is a random number, pw T Indicates the third password.

13. The method according to claim 1, wherein The first request includes an identifier of the second device.

14. The method according to claim 13, wherein: The identifier of the second device is the MAC address of the second device.

15. A method for security authentication applied to wireless fidelity WiFi, characterized in that: The method comprises: The first device sends a first password to the access point AP, where the first password is a factory preset password; Upon request that the first password passes verification by the AP, the first device obtains a second password shared between the AP and the first device, where the second password is a shared key between the first device and the AP; The first device performs a 4-way handshake with the AP according to the second password; The first device receives a second request from a second device, where the second request is used to request that the second device be allowed to access the AP; The first device sends a first request to the AP in response to the second request, where the first request is used to request the second device to access the AP; The first device receives a third password from the AP, where the third password is a shared key between the second device and the AP; The first device sends the third password to the second device.

16. The method according to claim 15, characterized in that The first device performs a 4-way handshake with the AP according to the second password, including: The first device negotiates a first pairing master key PMK1 with the AP based on a double-base cryptographic exponential key exchange (TBPEKE) protocol according to the second password; The first device performs a 4-way handshake with the AP according to the first PMK1.

17. The method according to claim 16, characterized in that Before the first device negotiates a first pairing master key PMK1 with the AP based on the double-base cryptographic exponential key exchange (TBPEKE) protocol according to the second password, the method further includes: The first device determines a first hash-to-curve function g corresponding to the first device according to the second password mst , the first hash to curve function g mst Used to convert the second password into a point on the elliptic curve through a point multiplication operation.

18. The method according to claim 17, characterized in that The first hash to curve function g mst Expressed as: g mst =U·V h(idmst,pwmst) Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and id mst Indicates the identifier of the first device, pw mst Indicates the second password.

19. The method according to claim 17, wherein The first hash to curve function g mst Expressed as: g mst =U·V h(nmst,pwmst) Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and n mst is a random number, pw mst Indicates the second password.

20. The method according to any one of claims 15 to 19, characterized in that: The first request includes the identifier of the second device, and the second request includes the identifier of the second device.

21. The method according to claim 20, characterized in that The identifier of the second device is the MAC address of the second device.

22. A method for security authentication applied to wireless fidelity WiFi, characterized in that: The method comprises: The second device sends a second request to the first device, where the second request is used to request that the second device be allowed to access the access point AP; The first device is configured to send a first password to the AP, where the first password is a factory-preset password; upon request from the AP verifying that the first password is verified, obtain a second password shared between the AP and the first device, where the second password is a shared key between the first device and the AP; and perform a four-way handshake with the AP based on the second password; The second device receives a third password from the first device, where the third password is a shared key between the second device and the AP generated when the AP receives a first request from the first device, where the first request is used to request the second device to access the AP.

23. The method according to claim 22, characterized in that Also includes: The second device performs a 4-way handshake with the AP according to the third password.

24. The method according to claim 23, wherein The second device performs a 4-way handshake with the AP according to the third password, including: The second device negotiates a second pairing master key PMK2 with the AP based on the double-base cryptographic exponential key exchange (TBPEKE) protocol according to the third password; The second device performs a 4-way handshake with the AP according to the second PMK2.

25. The method according to claim 24, characterized in that Before the second device negotiates a second pairing master key PMK2 with the AP based on the double-base cryptographic exponential key exchange (TBPEKE) protocol according to the third password, the second device further includes: The second device determines the second hash to curve function g corresponding to the second device according to the third password T , the second hash to curve function g T Used to convert the third password into a point on an elliptic curve through a point multiplication operation.

26. The method according to claim 25, characterized in that The second hash to curve function g T Expressed as: g T =U·V h(idT,pwT) Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and id T Indicates the identifier of the first device, pw T Indicates the third password.

27. The method according to claim 25, characterized in that The second hash to curve function g T Expressed as: g T =U·V h(nT,pwT) Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and n T is a random number, pw T Indicates the third password.

28. The method according to any one of claims 22 to 27, characterized in that The second request includes an identifier of the second device.

29. The method according to claim 28, characterized in that The identifier of the second device is the MAC address of the second device.

30. A device for security authentication of wireless fidelity (WiFi), the device being an access point (AP), or a chip or circuit provided in the access point (AP), characterized in that: include: a processor and a transceiver, the processor being coupled to the transceiver, The transceiver is used to receive a first password input from a first device, where the first password is a factory preset password; The processor is configured to, when the first password passes authentication by an access point (AP), obtain a second password shared between the AP and the first device, where the second password is a shared key between the first device and the AP; The processor is further configured to perform a 4-way handshake with the first device according to the second password; The transceiver is further configured to receive a first request from the first device, where the first request is configured to request a second device to access the AP; The processor is further configured to control the transceiver to send a third password to the first device in response to the first request, where the third password is a shared key between the second device and the AP.

31. The device according to claim 30, characterized in that The processor is specifically configured to: According to the second password, based on the double-base cryptographic exponential key exchange (TBPEKE) protocol, negotiate a first pairing master key PMK1 with the first device; Perform a 4-way handshake with the first device according to the first PMK1.

32. The device according to claim 31, characterized in that The processor is further configured to: Determine the first hash to curve function g corresponding to the first device based on the second password mst , the first hash to curve function g mst for converting the second password into a point on an elliptic curve through a point multiplication operation; Save the identifier of the first device and the first hash-to-curve function g mst , wherein the identifier of the first device is the same as the first hash to curve function g mst Have a corresponding relationship.

33. The device according to claim 32, characterized in that The first hash to curve function g mst Expressed as: g mst =U·V h(idmst,pwmst) Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and id mst Indicates the identifier of the first device, pw mst Indicates the second password.

34. The device according to claim 32, characterized in that The first hash to curve function g mst Expressed as: g mst =U·V h(nmst,pwmst) Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and n mst is a random number, pw mst Indicates the second password.

35. The device according to any one of claims 30 to 34, characterized in that The processor is further configured to determine that the first password is invalid.

36. The device according to claim 35, characterized in that The processor is further configured to: Deleting the identifier of the first device and the second password; Activate the first password.

37. The device according to any one of claims 30 to 34, characterized in that The processor is further configured to perform a 4-way handshake with the second device according to the third password.

38. The device according to claim 37, characterized in that The processor is specifically configured to: According to the third password, based on the double-base cryptographic exponential key exchange (TBPEKE) protocol, negotiate a second pairing master key PMK2 with the second device; Perform a 4-way handshake with the first device according to the second PMK2.

39. The device according to claim 38, characterized in that The processor is further configured to: Determine the second hash to curve function g corresponding to the second device according to the third password T , the second hash to curve function g T used to convert the third password into a point on an elliptic curve through a point multiplication operation; Save the identifier of the second device and the second hash to curve function g T , wherein the identification of the second device is related to the second hash-to-curve function g T Have a corresponding relationship.

40. The device according to claim 39, characterized in that The second hash to curve function g T Expressed as: g T =U·V h(idT,pwT) Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and id T Indicates the identifier of the second device, pw T Indicates the third password.

41. The device according to claim 39, characterized in that The second hash to curve function g T Expressed as: g T =U·V h(nT,pwT) Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and n T is a random number, pw T Indicates the third password.

42. The device according to claim 30, characterized in that The first request includes an identifier of the second device.

43. The device according to claim 42, characterized in that The identifier of the second device is the MAC address of the second device.

44. A device for security authentication of wireless fidelity (WiFi), wherein the device is a first device, or a chip or circuit provided in the first device, characterized in that: include: a processor and a transceiver, the processor being coupled to the transceiver, The transceiver is used to send a first password to the access point AP, where the first password is a factory preset password; The processor is configured to obtain, upon request that the first password passes verification by the AP, a second password shared between the AP and the first device, where the second password is a shared key between the first device and the AP; The processor is configured to perform a 4-way handshake with the AP according to the second password; The transceiver is configured to receive a second request from a second device, where the second request is configured to request that the second device be allowed to access the AP; The transceiver is configured to send a first request to the AP in response to the second request, where the first request is used to request the second device to access the AP; The transceiver is used to receive a third password from the AP, where the third password is a shared key between the second device and the AP; The transceiver is configured to send the third password to the second device.

45. The device according to claim 44, characterized in that The processor is specifically configured to: According to the second password, based on the double-base cryptographic exponential key exchange (TBPEKE) protocol, negotiate a first pairing master key PMK1 with the AP; Perform a 4-way handshake with the AP according to the first PMK1.

46. ​​The device according to claim 45, characterized in that The processor is further configured to: Determine the first hash to curve function g corresponding to the first device based on the second password mst , the first hash to curve function g mst Used to convert the second password into a point on the elliptic curve through a point multiplication operation.

47. The device according to claim 46, characterized in that The first hash to curve function g mst Expressed as: g mst =U·V h(idmst,pwmst) Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and id mst Indicates the identifier of the first device, pw mst Indicates the second password.

48. The device according to claim 46, characterized in that The first hash to curve function g mst Expressed as: g mst =U·V h(nmst,pwmst) Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and n mst is a random number, pw mst Indicates the second password.

49. The device according to any one of claims 44 to 48, characterized in that The first request includes the identifier of the second device, and the second request includes the identifier of the second device.

50. The device according to claim 49, characterized in that The identifier of the second device is the MAC address of the second device.

51. A device for security authentication of wireless fidelity (WiFi), wherein the device is a second device, or a chip or circuit provided in the second device, characterized in that: include: a processor and a transceiver, the processor being coupled to the transceiver, The transceiver is configured to send a second request to the first device, where the second request is configured to request that the second device be allowed to access the access point AP; The first device is configured to send a first password to the AP, where the first password is a factory-preset password; upon request from the AP verifying that the first password is verified, obtain a second password shared between the AP and the first device, where the second password is a shared key between the first device and the AP; and perform a four-way handshake with the AP based on the second password; The transceiver is further used to receive a third password from the first device, where the third password is a shared key between the second device and the AP generated when the AP receives a first request from the first device, where the first request is used to request the second device to access the AP.

52. The device according to claim 51, characterized in that The processor is configured to: Perform a 4-way handshake with the AP according to the third password.

53. The device according to claim 52, characterized in that The processor is specifically configured to: According to the third password, based on the double-base cryptographic exponential key exchange (TBPEKE) protocol, negotiate a second pairing master key PMK2 with the AP; Perform a 4-way handshake with the AP according to the second PMK2.

54. The device according to claim 53, characterized in that The processor is further configured to: Determine the second hash to curve function g corresponding to the second device according to the third password T , the second hash to curve function g T Used to convert the third password into a point on an elliptic curve through a point multiplication operation.

55. The device according to claim 54, characterized in that The second hash to curve function g T Expressed as: g T =U·V h(idT,pwT) Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and id T Indicates the identifier of the first device, pw T Indicates the third password.

56. The device according to claim 54, characterized in that The second hash to curve function g T Expressed as: g T =U·V h(nT,pwT) Among them, U and V are two independent random generators obtained from the cyclic group G of order p, h() is a secure hash function, and n T is a random number, pw T Indicates the third password.

57. The device according to any one of claims 51 to 56, characterized in that The second request includes an identifier of the second device.

58. The device according to claim 57, characterized in that The identifier of the second device is the MAC address of the second device.

59. A device for security authentication of wireless fidelity WiFi, characterized in that: include: A unit for performing the method according to any one of claims 1 to 14; or A unit for performing the method according to any one of claims 15 to 21; or Unit for performing the method according to any one of claims 22-29.

60. A communication chip, characterized in that: The chip includes: A processor and a communication interface, the processor being configured to call and execute instructions from the communication interface, and when the processor executes the instructions, implementing the method according to any one of claims 1 to 14; or Implementing the method according to any one of claims 15 to 21; or Implement the method according to any one of claims 22 to 29.

61. A communication system, characterized in that include: The device of any one of claims 30 to 43, the device of any one of claims 44 to 50, and the device of any one of claims 51 to 58.

Citation Information

Patent Citations

  • Network access authentication using a point-of-sale device

    CN106664556A