Key generation method and device, equipment and medium
Patent Information
- Application Number
- CN202280095848.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-15
- Publication Date
- 2024-12-13
AI Technical Summary
In wireless LANs, PMKID and password identifiers are easily intercepted by attackers during the authentication process, leading to user privacy leaks and security risks. It is difficult to effectively protect these keys with existing technology.
By generating different PMKID and password identifiers for the next association, the key is updated during each association, so that attackers cannot determine the user's identity through the obtained key, thus preventing illegal access.
It effectively protects the user's privacy and the security of the wireless LAN, reduces computing and communication overhead, and prevents attackers from illegally accessing the network through obtained keys.
Smart Images

Figure CN119137986A_ABST
Abstract
Description
Key generation method, device, equipment and medium Technical Field
[0001] The present application relates to the field of wireless local area networks, and in particular to a key generation method, apparatus, device and medium. Background Art
[0002] The PMKID (Pairwise Master Key Identifier) and Password Identifier in wireless LAN are used to improve the efficiency of association between stations and access points.
[0003] The PMKID and password identifier are used during the authentication process of stations and access points. Attackers can intercept the PMKID and password identifier to locate the user's terminal, leaking user privacy and posing security risks. Therefore, PMKID and password identifiers need to be protected.
[0004] Summary of the Invention
[0005] The embodiments of the present application provide a key generation method, apparatus, device, and medium that can simultaneously protect the PMKID and cryptographic identifier, thereby ensuring the security of both while reducing computing and communication overhead.
[0006] This embodiment of the present application provides a key generation method, the method comprising:
[0007] During this association process, a first pairwise master key identifier PMKID and a first cryptographic identifier are generated for use in the next association. The first PMKID is different from the second PMKID used in this association, and the first cryptographic identifier is different from the second cryptographic identifier used in this association.
[0008] An embodiment of the present application provides a key generation device, which includes:
[0009] The key generation module is used to generate a first pairwise master key identifier PMKID and a first cryptographic identifier for use in the next association during the current association process, where the first PMKID is different from the second PMKID used in the current association, and the first cryptographic identifier is different from the second cryptographic identifier used in the current association.
[0010] According to one aspect of the present application, a computer-readable storage medium is provided, in which executable instructions are stored. The executable instructions are loaded and executed by a key generation device to implement the key generation method as described above.
[0011] According to one aspect of the present application, a chip is provided, which includes a programmable logic circuit or a program, and a key generation device equipped with the chip is used to implement the key generation method as described above.
[0012] According to one aspect of the present application, a computer program product is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a key generation device or a WiFi device reads the computer instructions from the computer-readable storage medium, and the key generation device or the WiFi device executes the computer instructions, so that the key generation device or the WiFi device performs the key generation method as described above.
[0013] The technical solutions provided by the embodiments of the present application include at least the following beneficial effects:
[0014] The embodiment of the present application can generate a first pairwise master key identifier (PMKID) and a first cryptographic identifier for use in the next association, thereby ensuring the security of both. Even if an attacker is able to obtain both the PMKID and the cryptographic identifier, since the PMKID and the cryptographic identifier used for each association are updated, the attacker cannot use the obtained PMKID and the cryptographic identifier to determine the identity of the user to whom the access point or site belongs. Consequently, the attacker cannot illegally access the access point or site, thereby ensuring the security of the association of the access point or site and protecting the privacy of the user. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0016] FIG1 is a schematic diagram of a key generation system provided by an exemplary embodiment of the present application;
[0017] FIG2 is a flow chart of a PSK authentication mode provided by an exemplary embodiment of the present application;
[0018] FIG3 is a flow chart of a four-way handshake provided by an exemplary embodiment of the present application;
[0019] FIG4 is a flow chart of an SAE certification mode provided by an exemplary embodiment of the present application;
[0020] FIG5 is a schematic diagram of a key generation method provided by an exemplary embodiment of the present application;
[0021] FIG6 is a schematic diagram of a key generation method provided by an exemplary embodiment of the present application;
[0022] FIG7 is a schematic diagram of a key generation method provided by an exemplary embodiment of the present application;
[0023] FIG8 is a schematic diagram of a key generation method provided by an exemplary embodiment of the present application;
[0024] FIG9 is a schematic diagram of a key generation method provided by an exemplary embodiment of the present application;
[0025] FIG10 is a schematic diagram of a key generation method provided by an exemplary embodiment of the present application;
[0026] FIG11 is a schematic diagram of a management frame provided by an exemplary embodiment of the present application;
[0027] FIG12 is a schematic diagram of a key generation method provided by an exemplary embodiment of the present application;
[0028] FIG13 is a schematic diagram of a key generation device provided by an exemplary embodiment of the present application;
[0029] FIG14 is a schematic diagram of a key generation device provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0030] To make the objectives, technical solutions, and advantages of the present application more clear, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings. Exemplary embodiments will be described in detail herein, with examples shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are merely examples of devices and methods consistent with certain aspects of the present application, as detailed in the appended claims.
[0031] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. As used in this disclosure and the appended claims, the singular forms "a," "an," "the," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
[0032] It should be understood that although the terms first, second, third, etc. may be used in this disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of this disclosure, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining."
[0033] Figure 1 shows a block diagram of a communication system provided by an exemplary embodiment of the present application. The communication system includes an AP and a STA, which is not limited in the present application. The present application uses the key generation system including an AP and a STA as an example for explanation.
[0034] In some scenarios, an AP may be referred to as an AP STA, that is, in a sense, an AP is also a type of STA.
[0035] An AP acts as a bridge between wired and wireless networks, connecting wireless network clients together and then connecting the wireless network to the Ethernet. An AP can be a terminal device (such as a mobile phone) or a network device (such as a router) equipped with a Wireless Fidelity (Wi-Fi) chip.
[0036] It should be understood that the role of STA in the communication system is not absolute. For example, in some scenarios, when a mobile phone is connected to a router, the mobile phone is a STA. When the mobile phone serves as a hotspot for other mobile phones, the mobile phone acts as an AP.
[0037] APs and STAs can be devices used in the Internet of Vehicles, IoT nodes and sensors in the Internet of Things (IoT), smart cameras, smart remote controls, smart water and electricity meters in smart homes, and sensors in smart cities.
[0038] In some embodiments, the STA may support, but is not limited to, the 802.11be standard. The STA may also support various current and future 802.11 family WLAN standards, such as 802.11ax, 802.11ac, 802.11n, 802.11g, 802.11b, and 802.11a.
[0039] In some embodiments, the AP may be a device supporting the 802.11be standard. The AP may also be a device supporting various current and future 802.11 family WLAN standards, such as 802.11ax, 802.11ac, 802.11n, 802.11g, 802.11b, and 802.11a.
[0040] In the embodiment of the present application, the STA may be a mobile phone, tablet computer, computer, virtual reality (VR) device, augmented reality (AR) device, wireless device in industrial control, set-top box, wireless device in self-driving, in-vehicle communication equipment, wireless device in remote medical care, wireless device in smart grid, wireless device in transportation safety, wireless device in smart city, wireless device in smart home, wireless communication chip / ASIC / SOC / etc. that supports WLAN / Wi-Fi technology.
[0041] WLAN technology can support frequency bands including but not limited to: low frequency bands (2.4GHz, 5GHz, 6GHz) and high frequency bands (60GHz).
[0042] One or more links exist between a station and an access point.
[0043] In some embodiments, stations and access points support multi-band communications, for example, communicating simultaneously on the 2.4 GHz, 5 GHz, 6 GHz, and 60 GHz frequency bands, or communicating simultaneously on different channels within the same frequency band (or different frequency bands), thereby improving the communication throughput and / or reliability between devices. Such devices are generally referred to as multi-band devices, or multi-link devices (MLDs), and are sometimes also referred to as multi-link entities or multi-band entities. A multi-link device can be an access point device or a station device. If the multi-link device is an access point device, the multi-link device includes one or more APs; if the multi-link device is a station device, the multi-link device includes one or more non-AP STAs.
[0044] An AP is a device deployed in a wireless local area network to provide wireless communication capabilities for STAs. A station may include: User Equipment (UE), an access terminal, a subscriber unit, a subscriber station, a mobile station, a mobile station, a remote station, a remote terminal, a mobile device, a wireless communication device, a user agent, or a user device. Optionally, a station may also be a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a Personal Digital Assistant (PDA), a handheld device with wireless communication capabilities, a computing device or other processing device connected to a wireless modem, a vehicle-mounted device, or a wearable device, but the embodiments of the present application are not limited to this.
[0045] In the embodiment of the present application, both the station and the access point support the IEEE 802.11 standard.
[0046] In wireless network standards, APs and STAs perform authentication before establishing an association. Two common authentication modes are PSK (Pre-Shared Key) and SAE (Simultaneous Authentication of Equals). These two modes require different implementation steps. Next, we briefly describe the PSK authentication process. Please refer to Figure 2, which shows a schematic diagram of a PSK authentication process provided by an embodiment of the present application. The steps are as follows:
[0047] Step 201: The station sends a probe request to the access point.
[0048] Step 202: The access point sends a probe response to the station.
[0049] Step 203: The station sends an open system authentication request to the access point.
[0050] Step 204: The access point sends an open system authentication response to the station.
[0051] Step 205: The station sends an association request to the access point.
[0052] Step 206: The access point sends an association response to the station.
[0053] Step 207: The station and the access point complete a four-way handshake.
[0054] Please refer to FIG3 , which shows a schematic diagram of a four-way handshake process provided by an embodiment of the present application. The steps are as follows:
[0055] Step 301: The site generates a random number SNonce for the authenticated party.
[0056] Step 302: The access point generates an authenticator random number ANonce.
[0057] Step 303: The access point sends a data frame carrying EAPOL-Key type Extensible Authentication Protocol (EAP) data to the station.
[0058] Optionally, in this step, the EAPOL-Key type packet includes ANonce and a single Individual indication (indicating that the key to be generated is only used for a single site, as opposed to group, which indicates that the key to be generated is used for a group of sites).
[0059] Step 304: The site generates a PTK (Pairwise Transient Key).
[0060] Step 305: The station sends a data frame carrying EAPOL-Key type extended authentication protocol data to the access point.
[0061] Optionally, in this step, the EAPOL-Key type data packet includes ANonce, a message integrity check code (Message Integrity Code, MIC) and an Individual indication.
[0062] Step 306: The access point generates a PTK.
[0063] Optionally, the access point can also generate GTK, IGTK, and BIGTK.
[0064] Step 307: The access point sends a data frame carrying EAPOL-Key type extended authentication protocol data to the station.
[0065] Optionally, in this step, the EAPOL-Key type data packet includes PTK, MIC, Individual, Wrapped GTK, Wrapped IGTK, and Wrapped BIGTK.
[0066] Step 308: The access point sends a data frame carrying EAPOL-Key type extended authentication protocol data to the station.
[0067] Optionally, in this step, the EAPOL-Key type data packet includes MIC and Individual.
[0068] Step 309: The site installs PTK, GTK, IGNK, and BIGTK.
[0069] Step 310: The access point installs PTK, GTK, IGNK, and BIGTK.
[0070] Next, the process of the SAE authentication mode will be briefly introduced. Please refer to Figure 4, which shows a schematic diagram of the process of an SAE authentication mode provided in an embodiment of the present application. The steps are as follows:
[0071] Step 401: The station sends a probe request to the access point.
[0072] Step 402: The access point sends a probe reply to the station.
[0073] Step 403: The station sends an SAE authentication frame carrying a Commit message to the access point.
[0074] Step 404: The access point sends an SAE identity authentication frame carrying a Commit message to the station.
[0075] Step 405: The station sends an SAE identity authentication frame carrying a confirmation message to the access point.
[0076] Step 406: The access point sends an SAE identity authentication frame carrying a confirmation message to the station.
[0077] Step 407: The station and the access point complete association.
[0078] Step 408: The station and the access point complete a four-way handshake.
[0079] The access point needs to maintain a two-dimensional table of PMKIDs used by the station during the current association and to be used by the station during the next association, as shown in Table 1.
[0080] Table 1 Two-dimensional table of PMKID stored on the AP side
[0081]
[0082] If the SAE authentication mode is used, the access point also needs to maintain a two-dimensional table of password identifiers used by the STA during the current association and the STA will use the next time it associates, as shown in Table 2.
[0083] Table 2 Two-dimensional table of Password Identifiers stored on the AP
[0084]
[0085] A STA needs to maintain a two-dimensional table of PMKIDs used when it associates with an AP this time and will use them the next time it associates with an AP, as shown in Table 3.
[0086] Table 3 PMKID two-dimensional table stored on the STA side
[0087] AP1AP 2…AP nAP MAC MAC1MAC2…MACnPMKID used currentlyPMKID1PMKID20…PMKIDn0PMKID1PMKID21…PMKIDn1PMKID used next time
[0088] If SAE is used, the STA also needs to maintain a two-dimensional table of password identifiers used when associating with the AP this time and to be used when associating with the AP next time, as shown in Table 4.
[0089] Table 4 Password Identifier two-dimensional table stored on the STA side
[0090]
[0091] Therefore, the embodiment of the present application designs a mechanism to simultaneously protect the PMKID and the cryptographic identifier, which can generate the first PMKID and the first cryptographic identifier for the next association use at one time to protect the user's privacy. Next, the present application will be introduced from different aspects. The embodiment of the present application can generate the first PMKID and the first cryptographic identifier based on the same timing, or the embodiment of the present application can generate the first PMKID and the first cryptographic identifier based on the same algorithm, or the embodiment of the present application can generate the first PMKID and the first cryptographic identifier based on different algorithms, or the embodiment of the present application can generate the first PMKID and the first cryptographic identifier based on the same key.
[0092] FIG5 shows a key generation method provided by an exemplary embodiment of the present application. The method may be performed by the AP or STA shown in FIG1 and may include the following steps:
[0093] Step 501: During this association process, a first pairwise master key identifier PMKID and a first cryptographic identifier are generated for use in the next association. The first PMKID is different from the second PMKID used in this association, and the first cryptographic identifier is different from the second cryptographic identifier used in this association.
[0094] In some embodiments, the first PMKID and the first cryptographic identifier are generated at the same time. Optionally, the first PMKID and the first cryptographic identifier are generated when the station and the access point complete a four-way handshake. Alternatively, the first PMKID and the first cryptographic identifier are generated when the authentication phase of SAE identity authentication between the station and the access point is completed.
[0095] Optionally, the first PMKID and the first cryptographic identifier are generated using the same algorithm, or the first PMKID and the first cryptographic identifier are generated based on different algorithms.
[0096] 1. When the first PMKID and the first cryptographic identifier are generated using the same algorithm, the same algorithm is the first algorithm;
[0097] Exemplarily, when SAE identity authentication is adopted, the input parameters of the first algorithm include the second PMKID and the second cryptographic identifier.
[0098] Exemplarily, when SAE identity authentication is not adopted, the input parameters of the first algorithm include the second PMKID and a default password identifier.
[0099] 2. The first PMKID and the first cryptographic identifier are generated based on different algorithms;
[0100] Exemplarily, the first PMKID is generated based on a second algorithm, the input parameters of the second algorithm including the second PMKID; and / or the first cryptographic identifier is generated based on a third algorithm, the input parameters of the third algorithm including the second cryptographic identifier. The second algorithm and the third algorithm are different algorithms.
[0101] Exemplarily, the access point generates the first PMKID and the first cryptographic identifier using different algorithms, the station only generates the first PMKID, and the access point provides the first cryptographic identifier to the station.
[0102] Exemplarily, when the above method is applied to a station, the first PMKID is generated based on a second algorithm, and the input parameters of the second algorithm include the second PMKID; the first cryptographic identifier is obtained based on a management frame sent by an access point.
[0103] Exemplarily, when the method is applied to an access point, the first PMKID is generated based on a second algorithm, and the input parameters of the second algorithm include the second PMKID; the first cryptographic identifier is generated based on a fourth algorithm, and the input parameters of the fourth algorithm include the second cryptographic identifier encrypting the first cryptographic identifier to generate a management frame; and the management frame is sent to the station.
[0104] In some embodiments, the first PMKID and the first cryptographic identifier are generated based on the same key.
[0105] Optionally, the first PMKID and the first cryptographic identifier are generated based on the same algorithm or different algorithms.
[0106] 1. When the first PMKID and the first cryptographic identifier are generated based on the same algorithm, the same algorithm is the first algorithm;
[0107] Exemplarily, when SAE identity authentication is adopted, the first PMKID and the first cryptographic identifier are generated by applying a first algorithm based on the same key, the MAC address of the station, the MAC address of the access point, the second PMKID and the second cryptographic identifier.
[0108] Exemplarily, when SAE identity authentication is not adopted, the first PMKID and the first cryptographic identifier are generated using a first algorithm based on the same key, the MAC address of the station, the MAC address of the access point, the second PMKID and the default cryptographic identifier.
[0109] 2. The first PMKID and the first cryptographic identifier are generated based on different algorithms;
[0110] Exemplarily, the first PMKID is generated using a second algorithm based on the same key, the MAC address of the site, the MAC address of the access point, and the second PMKID; and / or, the first cryptographic identifier is generated using a third algorithm based on the same key, the MAC address of the site, the MAC address of the access point, and the second cryptographic identifier.
[0111] Exemplarily, the access point generates the first PMKID and the first cryptographic identifier using different algorithms, the station only generates the first PMKID, and the access point provides the first cryptographic identifier to the station.
[0112] Exemplarily, when the method is applied to a site, the first PMKID is generated based on the same key, the MAC address of the site, the MAC address of the access point and the second PMKID using a second algorithm; the first cryptographic identifier is obtained based on a management frame sent by the access point, and the management frame is transmitted using encryption.
[0113] Exemplarily, when the method is applied to an access point, the first PMKID is generated based on the same key, the MAC address of the station, the MAC address of the access point, and the second PMKID; the first cryptographic identifier is generated based on the same key and the second cryptographic identifier using a fourth algorithm.
[0114] In the case where the first PMKID and the first cryptographic identifier are generated after the station and the access point complete the four-way handshake, the identical key is a secret value derived from the PTK.
[0115] In the case where the first PMKID and the first cryptographic identifier are generated after the authentication phase of the SAE identity authentication between the station and the access point is completed, the identical key is a secret value derived from the PMK.
[0116] In an optional implementation of the present application, the first PMKID and the first cryptographic identifier are stored.
[0117] Exemplarily, the first PMKID is stored in the PMKID two-dimensional table of the site, which is used to record the PMKID used by the site and the access point to establish a wireless connection; the first password identifier is stored in the password identifier two-dimensional table of the site, which is used to record the password identifier used by the site and the access point to establish a wireless connection.
[0118] The embodiment of the present application can generate a first pairwise master key identifier (PMKID) and a first cryptographic identifier for use in the next association, thereby ensuring the security of both. Even if an attacker is able to obtain both the PMKID and the cryptographic identifier, since the PMKID and the cryptographic identifier used for each association are updated, the attacker cannot use the obtained PMKID and the cryptographic identifier to determine the identity of the user to whom the access point or site belongs. Consequently, the attacker cannot illegally access the access point or site, thereby ensuring the security of the association of the access point or site and protecting the privacy of the user.
[0119] For an embodiment in which the first PMKID and the first cryptographic identifier are generated using the same algorithm at the same time after the four-way handshake:
[0120] In some embodiments, the first PMKID and the first cryptographic identifier are generated using the same algorithm at the same time. In the following embodiments, the first PMKID and the first cryptographic identifier are generated after a four-way handshake. In this case, either PSK or SAE authentication can be used between the AP and the STA. Figure 6 shows a schematic flow diagram of a key generation method provided in an embodiment of the present application.
[0121] Step 601: The station and the access point complete a four-way handshake.
[0122] Optionally, before completing the four-way handshake, if the station and the access point perform the above-mentioned PSK authentication, the station randomly generates an OTA MAC address locally; the station sends an Authentication Request frame to the AP, and the Authentication Request frame includes the randomly generated OTA MAC address; the access point sends an Authentication Response frame to the station, and the Authentication Response frame indicates that the access point has successfully authenticated the station.
[0123] For example, the station randomly generates an OTA MAC0 locally and sends an Authentication Request frame to the access point. The Authentication Request frame includes the randomly generated OTA MAC0 but does not include the second cryptographic identifier used for this association. The access point sends an Authentication Response frame to the station, indicating that the authentication is successful.
[0124] Optionally, before completing the four-way handshake, if the station and the access point perform the above-mentioned SAE authentication, the station randomly generates an OTA MAC address locally; the station sends an Authentication frame containing Commit interaction information to the access point, and the Commit interaction information includes the second cryptographic identifier used for this association and the data provided by the station for generating the PMK; the access point sends an Authentication frame containing Commit interaction information to the station, and the Commit interaction information includes the data provided by the access point for generating the PMK; the station sends an Authentication frame containing Confirm interaction information to the access point to confirm that both parties generate the same PMK; the access point sends an Authentication frame containing Confirm interaction information to the station to confirm that both parties generate the same PMK. Optionally, the second cryptographic identifier used for this association is obtained through out-of-band means (such as manual notification, Bluetooth, or scanning a QR code).
[0125] Illustratively, after completing the four-way handshake, the station and the access point generate a PTK and a second PMKID used for this association according to the IEEE 802.11 standard.
[0126] The specific process of the station and the access point completing the four-way handshake can be referred to the embodiment shown in FIG3 , and will not be described in detail here.
[0127] Next, the site side will be described first. When SAE authentication is adopted, step 602 is executed; when PSK authentication is adopted, steps 602 and 603 are executed.
[0128] Step 602: The site stores the second cryptographic identifier used for this association.
[0129] Optionally, the station adds the second password identifier to the Password Identifier used for the current connection of the corresponding access point in the Password Identifier two-dimensional table. Exemplarily, the station adds Pass_id0 to the Password Identifier used for the current connection of the corresponding access point in the Password Identifier two-dimensional table.
[0130] Step 603: The site stores the second PMKID used for this association.
[0131] Optionally, the station adds the second PMKID to the PMKID used by the corresponding access point in the PMKID two-dimensional table. Exemplarily, the station adds PMKID0 to the PMKID used by the corresponding access point in the PMKID two-dimensional table.
[0132] When SAE authentication is adopted, steps 604 and 605 are executed; when PSK authentication is adopted, steps 606 and 607 are executed.
[0133] Step 604: The station generates a first PMKID and a first cryptographic identifier to be used for the next association based on the same algorithm.
[0134] Optionally, the same algorithm is a first algorithm site, and a first PMKID and a first cryptographic identifier used in the next association are generated based on the first algorithm.
[0135] For example, the first PMKID and the first password identifier for generating the next association can be represented by the following algorithm: (PMKID1, Pass_id1) = HMAC-HASH (MAC STA , MAC AP , PMKID0, Pass_id0, key1), where PMKID1 is the first PMKID, Pass_id1 is the first cryptographic identifier, MAC STA Is the MAC address of the station, MAC AP is the MAC address of the access point, PMKID0 is the second PMKID, Pass_id0 is the second cryptographic identifier, and key1 is a secret value derived from the PTK. HMAC-HASH is a hash algorithm. Optionally, the first PMKID and the first cryptographic identifier may or may not be output simultaneously, for example, the first PMKID may be output before the first cryptographic identifier.
[0136] Since the access point and the station in this embodiment can use the PSK authentication mode or the SAE authentication mode, and the password identifier is not used when the PSK authentication mode is used, the embodiment of the application provides the following two processing methods to handle whether the password identifier exists in the first algorithm:
[0137] 1. Select the algorithm based on the authentication mode between the access point and the station;
[0138] When the SAE authentication mode is not adopted, the input parameters of the algorithm used to calculate the first PMKID and the first cryptographic identifier do not include the cryptographic identifier. The station generates the first PMKID to be used for the next association based on the same key derived from the PTK, the MAC address of the station, the MAC address of the access point, and the second PMKID used for the current association.
[0139] When the SAE authentication mode is adopted, the input parameters of the algorithm for calculating the first PMKID and the first cryptographic identifier include the cryptographic identifier. The site generates the first PMKID and the first cryptographic identifier to be used for the next association based on the same key derived from the PTK, the MAC address of the site, the MAC address of the access point, and the second PMKID and the second cryptographic identifier used for the current association.
[0140] 2. Select the value of the password identifier based on the authentication mode between the access point and the station;
[0141] When the SAE authentication mode is not adopted, the input parameters of the algorithm for calculating the first PMKID and the first password identifier do not include the password identifier. The station generates the first PMKID and the first password identifier for the next association based on the same key derived from the PTK, the MAC address of the station, the MAC address of the access point, the default password identifier, and the second PMKID used in the current association. The default password identifier can be pre-agreed by the station and the access point. For example, the default password identifier is set to Pass_id def The first cryptographic identifier obtained in this way may be discarded.
[0142] When the SAE authentication mode is adopted, the input parameters of the algorithm for calculating the first PMKID and the first cryptographic identifier include the cryptographic identifier. The site generates the first PMKID and the first cryptographic identifier to be used for the next association based on the same key derived from the PTK, the MAC address of the site, the MAC address of the access point, and the second PMKID and the second cryptographic identifier used for the current association.
[0143] Step 605: The site stores the first PMKID and the first cryptographic identifier.
[0144] Optionally, the station adds the first PMKID and the first password identifier to the maintained PMKID two-dimensional table and Password Identifier two-dimensional table, respectively, at the PMKID and Password Identifier to be used in the next association of the corresponding access point.
[0145] Step 606: The station generates a first PMKID to be used for the next association.
[0146] Optionally, referring to step 604, the station generates a first PMKID and a first cryptographic identifier for use in the next association based on the same key derived from the PTK, the station's MAC address, the access point's MAC address, the default cryptographic identifier, and the second PMKID used in the current association (the first cryptographic identifier may be discarded). Alternatively, the station generates a first PMKID for use in the next association based on the same key derived from the PTK, the station's MAC address, the access point's MAC address, and the second PMKID used in the current association.
[0147] Step 607: The site stores the first PMKID.
[0148] Optionally, the station adds the first PMKID to the PMKID to be used in the next association of the corresponding access point in the maintained PMKID two-dimensional table.
[0149] At this point, all the steps on the site side have been introduced. Next, all the steps on the access point side will be introduced. It should be noted that the steps performed by the access point are the same as those performed by the site. Unless otherwise specified, the specific details can be referred to the above steps 602 to 607, which will not be repeated here.
[0150] Step 608: The access point stores the second cryptographic identifier used for this association.
[0151] Optionally, the access point adds the second password identifier to the Password Identifier corresponding to the site used for the current connection in the Password Identifier two-dimensional table.
[0152] Step 609: The access point stores the second PMKID used for this association.
[0153] Optionally, the access point adds the second PMKID to the PMKID used by the corresponding station for the current connection in the PMKID two-dimensional table.
[0154] Step 610: The access point generates a first PMKID and a first cryptographic identifier to be used for the next association based on the same algorithm.
[0155] Step 611: The access point stores the first PMKID and the first cryptographic identifier.
[0156] The access point adds the first PMKID and the first password identifier to the maintained PMKID two-dimensional table and Password Identifier two-dimensional table at the PMKID and the password identifier to be used for the next association of the corresponding station.
[0157] Step 612: The access point generates a first PMKID to be used for the next association.
[0158] Step 613: The access point stores the first PMKID.
[0159] Optionally, the access point adds the first PMKID to the PMKID to be used by the corresponding station in the next association in the maintained PMKID two-dimensional table.
[0160] The embodiment of the present application can generate a first pairwise master key identifier PMKID and a first cryptographic identifier for use in the next association. The scheme of generating the first PMKID and the first cryptographic identifier using the same algorithm at the same time not only ensures the security of both, but also reduces computing and communication overhead.
[0161] For an embodiment in which the same algorithm is used to generate the first PMKID and the first cryptographic identifier after the authentication phase of SAE identity authentication at the same time:
[0162] In the following embodiments, the first PMKID and the first cryptographic identifier are generated after the authentication phase of SAE identity authentication is completed. In this case, the SAE authentication mode is adopted between the AP and the STA. FIG7 shows a flow diagram of a key generation method provided in an embodiment of the present application.
[0163] Step 701: The station and the access point complete the authentication phase of SAE identity authentication.
[0164] Optionally, the site randomly generates an OTA MAC address locally; the site sends an Authentication frame containing Commit interaction information to the access point, the Commit interaction information includes the second cryptographic identifier used for this association and the data provided by the site for generating the PMK; the access point sends an Authentication frame containing Commit interaction information to the site, the Commit interaction information includes the data provided by the access point for generating the PMK; the site sends an Authentication frame containing Confirm interaction information to the access point to confirm that both parties generate the same PMK; the access point sends an Authentication frame containing Confirm interaction information to the site to confirm that both parties generate the same PMK. Optionally, the second cryptographic identifier used for this association is obtained through out-of-band means (such as manual notification, Bluetooth, or scanning a QR code).
[0165] The content of the authentication phase of the SAE identity authentication can be referred to the embodiment shown in FIG4 , and will not be described in detail here.
[0166] Next, the site side will be described first. The steps on the site side include step 702 to step 705.
[0167] Step 702: The site stores the second cryptographic identifier used for this association.
[0168] Optionally, the station adds the second password identifier to the Password Identifier corresponding to the access point used for the current connection in the Password Identifier two-dimensional table.
[0169] Step 703: The site stores the second PMKID used for this association.
[0170] Optionally, the station adds the second PMKID to the PMKID used for the current connection of the corresponding access point in the PMKID two-dimensional table.
[0171] Step 704: The station generates a first PMKID and a first cryptographic identifier to be used for the next association based on the same algorithm.
[0172] Optionally, the same algorithm is a first algorithm, and the station generates a first PMKID and a first cryptographic identifier to be used in the next association based on the first algorithm.
[0173] For example, the first PMKID and the first password identifier used in the next association can be generated by the following algorithm: (PMKID1, Pass_id1) = HMAC-HASH (MAC STA , MAC AP , PMKID0, Pass_id0, key1).
[0174] It should be noted that, in the embodiment of the present application, the site will output at least one of the first PMKID and the first cryptographic identifier.
[0175] Step 705: The site stores the first PMKID and the first cryptographic identifier.
[0176] The station adds the first PMKID and the first password identifier to the maintained PMKID two-dimensional table and Password Identifier two-dimensional table respectively, corresponding to the PMKID to be used in the next association and the Password Identifier to be used in the next association of the access point.
[0177] At this point, all the steps on the site side have been introduced. Next, all the steps on the access point side will be introduced. It should be noted that the steps performed by the access point are the same as those performed by the site. Unless otherwise specified, the specific details can be referred to the above steps 702 to 705, which will not be repeated here.
[0178] Step 706: The access point stores the second cryptographic identifier used for this association.
[0179] Optionally, the access point adds the second password identifier to the Password Identifier corresponding to the site used for the current connection in the Password Identifier two-dimensional table.
[0180] Step 707: The access point stores the second PMKID used for this association.
[0181] Optionally, the access point adds the second PMKID to the PMKID used by the corresponding station for the current connection in the PMKID two-dimensional table.
[0182] Step 708: The access point generates a first PMKID and a first cryptographic identifier to be used for the next association based on the same algorithm.
[0183] It should be noted that, in the embodiment of the present application, the access point will output at least one of the first PMKID and the first cryptographic identifier.
[0184] Step 709: The access point stores the first PMKID and the first cryptographic identifier.
[0185] The access point adds the first PMKID and the first password identifier to the maintained PMKID two-dimensional table and Password Identifier two-dimensional table at the PMKID and Password Identifier to be used in the next association of the corresponding station.
[0186] Step 710: The station and the access point complete subsequent association and four-way handshake.
[0187] For the specific content of the subsequent association and four-way handshake, please refer to the embodiments shown in Figures 3 and 4, which will not be repeated here.
[0188] The embodiment of the present application can generate a first pairwise master key identifier PMKID and a first cryptographic identifier for use in the next association. The scheme of generating the first PMKID and the first cryptographic identifier using the same algorithm at the same time not only ensures the security of both, but also reduces computing and communication overhead.
[0189] For an embodiment in which different algorithms are used to generate the first PMKID and the first cryptographic identifier at the same time after the four-way handshake:
[0190] In some embodiments, the first PMKID and the first cryptographic identifier are generated at the same time using different algorithms. In the following embodiments, the first PMKID and the first cryptographic identifier are generated after a four-way handshake. In this case, either PSK or SAE authentication can be used between the AP and the STA. Figure 8 shows a schematic flow diagram of a key generation method provided in an embodiment of the present application.
[0191] Step 801: The station and the access point complete a four-way handshake.
[0192] Optionally, before completing the four-way handshake, if the station and the access point perform the above-mentioned PSK authentication, the station randomly generates an OTA MAC address locally; the station sends an Authentication Request frame to the AP, and the Authentication Request frame includes the randomly generated OTA MAC address; the access point sends an Authentication Response frame to the station, and the Authentication Response frame indicates that the access point has successfully authenticated the station.
[0193] For example, the station randomly generates an OTA MAC0 locally and sends an Authentication Request frame to the access point. The Authentication Request frame includes the randomly generated OTA MAC0 but does not include the second cryptographic identifier used for this association. The access point sends an Authentication Response frame to the station, indicating that the authentication is successful.
[0194] Optionally, before completing the four-way handshake, if the station and the access point perform the above-mentioned SAE authentication, the station randomly generates an OTA MAC address locally; the station sends an Authentication frame containing Commit interaction information to the access point, where the Commit interaction information includes the second cryptographic identifier used for this association and the data provided by the station for generating the PMK; the access point sends an Authentication frame containing Commit interaction information to the station, where the Commit interaction information includes the data provided by the access point for generating the PMK; the station sends an Authentication frame containing Confirm interaction information to the access point to confirm that both parties generate the same PMK; the access point sends an Authentication frame containing Confirm interaction information to the station to confirm that both parties generate the same PMK. Optionally, the second cryptographic identifier used for this association is obtained through an out-of-band method (e.g., manual notification, Bluetooth, or scanning a QR code).
[0195] Illustratively, after completing the four-way handshake, the station and the access point generate a PTK and a second PMKID used for this association according to the IEEE 802.11 standard.
[0196] The specific process of the station and the access point completing the four-way handshake can be referred to the embodiment shown in FIG3 , and will not be described in detail here.
[0197] Next, the site side will be described first. When SAE authentication is adopted, step 802 is executed; when PSK authentication is adopted, steps 802 and 803 are executed.
[0198] Step 802: The site stores the second cryptographic identifier used for this association.
[0199] Optionally, the station adds the second password identifier to the Password Identifier corresponding to the access point used for the current connection in the Password Identifier two-dimensional table.
[0200] Step 803: The site stores the second PMKID used for this association.
[0201] Optionally, the station adds the second PMKID to the PMKID used for the current connection of the corresponding access point in the PMKID two-dimensional table.
[0202] When SAE authentication is adopted, steps 604 and 605 are executed; when PSK authentication is adopted, steps 606 and 607 are executed.
[0203] Step 804: The station generates a first PMKID to be used for the next association based on the second algorithm.
[0204] Exemplarily, the second algorithm can be represented by the following algorithm: (PMKID1) = HMAC-HASH (MAC STA , MAC AP , PMKID0, key1), where PMKID1 is the first PMKID, MAC STA Is the MAC address of the station, MAC AP is the MAC address of the access point, PMKID0 is the second PMKID, key1 is the secret value derived from the PTK. HMAC-HASH is a hash algorithm.
[0205] Step 805: The station generates a first cryptographic identifier to be used for the next association based on the third algorithm.
[0206] Exemplarily, the third algorithm can be represented by the following algorithm: (Pass_id1) = HMAC-HASH (MAC STA , MAC AP , Pass_id0, key1), where Pass_id1 is the first password identifier, MAC STA Is the MAC address of the station, MAC AP is the MAC address of the access point, Pass_id0 is the second cryptographic identifier, key1 is the secret value derived from the PTK. HMAC-HASH is a hash algorithm.
[0207] Optionally, step 804 and step 805 are performed simultaneously.
[0208] It should be noted that, in the embodiment of the present application, the site will output at least one of the first PMKID and the first cryptographic identifier.
[0209] Step 806: The site stores the first PMKID and the first cryptographic identifier.
[0210] Optionally, the station adds the first PMKID and the first password identifier to the maintained PMKID two-dimensional table and Password Identifier two-dimensional table, respectively, at the PMKID and Password Identifier to be used in the next association of the corresponding access point.
[0211] Step 807: The station generates a first PMKID to be used for the next association.
[0212] Optionally, the station generates a first PMKID to be used for the next association based on the second algorithm.
[0213] Step 808: The station stores the first PMKID.
[0214] Optionally, the station adds the first PMKID to the PMKID to be used in the next association of the corresponding access point in the maintained PMKID two-dimensional table.
[0215] At this point, all the steps on the site side have been introduced. Next, all the steps on the access point side will be introduced. It should be noted that the steps performed by the access point are the same as those performed by the site. Unless otherwise specified, the specific details can be referred to the above steps 802 to 808, which will not be repeated here.
[0216] Step 809: The access point stores the second cryptographic identifier used for this association.
[0217] Optionally, the access point adds the second password identifier to the Password Identifier two-dimensional table at the Password Identifier corresponding to the site used for the current connection.
[0218] Step 810: The access point stores the second PMKID used for this association.
[0219] Optionally, the access point adds the second PMKID to the PMKID used by the corresponding station for the current connection in the PMKID two-dimensional table.
[0220] Step 811: The access point generates a first PMKID to be used for the next association based on a second algorithm.
[0221] Step 812: The access point generates a first cryptographic identifier to be used for the next association based on a third algorithm.
[0222] Step 813: The access point stores the first PMKID and the first cryptographic identifier.
[0223] Optionally, the access point adds the first PMKID and the first password identifier to the maintained PMKID two-dimensional table and Password Identifier two-dimensional table, respectively, at the PMKID and Password Identifier to be used for the next association of the corresponding station.
[0224] Step 814: The access point generates a first PMKID to be used for the next association.
[0225] It should be noted that, in the embodiment of the present application, the access point will output at least one of the first PMKID and the first cryptographic identifier.
[0226] Step 815: The access point stores the first PMKID.
[0227] Optionally, the access point adds the first PMKID to the PMKID to be used by the corresponding station in the next association in the maintained PMKID two-dimensional table.
[0228] The embodiment of the present application can generate a first pairwise master key identifier PMKID and a first cryptographic identifier for use in the next association. The scheme of generating the first PMKID and the first cryptographic identifier using different algorithms at the same time not only ensures the security of both, but also reduces computing and communication overhead.
[0229] For an embodiment in which different algorithms are used to generate the first PMKID and the first cryptographic identifier after the authentication phase of SAE identity authentication at the same time:
[0230] In an optional embodiment, the first PMKID and the first cryptographic identifier are generated after the authentication phase of SAE identity authentication is completed. In this case, the SAE authentication mode is adopted between the AP and the STA. FIG9 shows a flowchart of a key generation method provided in an embodiment of the present application.
[0231] Step 901: The station and the access point complete the authentication phase of SAE identity authentication.
[0232] Optionally, the site randomly generates an OTA MAC address locally; the site sends an Authentication frame containing Commit interaction information to the access point, the Commit interaction information includes the second cryptographic identifier used for this association and the data provided by the site for generating the PMK; the access point sends an Authentication frame containing Commit interaction information to the site, the Commit interaction information includes the data provided by the access point for generating the PMK; the site sends an Authentication frame containing Confirm interaction information to the access point to confirm that both parties generate the same PMK; the access point sends an Authentication frame containing Confirm interaction information to the site to confirm that both parties generate the same PMK. Optionally, the second cryptographic identifier used for this association is obtained through out-of-band means (such as manual notification, Bluetooth, or scanning a QR code).
[0233] The content of the authentication phase of the SAE identity authentication can be referred to the embodiment shown in FIG4 , and will not be described in detail here.
[0234] Next, the site side will be described first. The steps on the site side include step 902 to step 906.
[0235] Step 902: The site stores the second cryptographic identifier used for this association.
[0236] Optionally, the station adds the second password identifier to the Password Identifier corresponding to the access point used for the current connection in the Password Identifier two-dimensional table.
[0237] Step 903: The site stores the second PMKID used for this association.
[0238] Optionally, the station adds the second PMKID to the PMKID used for the current connection of the corresponding access point in the PMKID two-dimensional table.
[0239] Step 904: The station generates a first PMKID to be used for the next association based on the second algorithm.
[0240] Exemplarily, the second algorithm can be represented by the following algorithm: (PMKID1) = HMAC-HASH (MAC STA , MAC AP , PMKID0, key2), where PMKID1 is the first PMKID, MAC STA Is the MAC address of the station, MAC AP is the MAC address of the access point, PMKID0 is the second PMKID, key2 is the secret value derived from PMK. HMAC-HASH is a hash algorithm.
[0241] Step 905: The station generates a first cryptographic identifier to be used in the next association based on the third algorithm.
[0242] Exemplarily, the third algorithm can be represented by the following algorithm: (Pass_id1) = HMAC-HASH (MAC STA , MAC AP , Pass_id0, key2), where Pass_id1 is the first password identifier, MAC STA Is the MAC address of the station, MAC AP is the MAC address of the access point, Pass_id0 is the second password identifier, key2 is the secret value derived from the PMK. HMAC-HASH is a hash algorithm.
[0243] It should be noted that, in the embodiment of the present application, the site will output at least one of the first PMKID and the first cryptographic identifier.
[0244] Step 906: The site stores the first PMKID and the first cryptographic identifier.
[0245] Optionally, the station adds the first PMKID and the first password identifier to the maintained PMKID two-dimensional table and Password Identifier two-dimensional table, respectively, at the PMKID and Password Identifier to be used in the next association of the corresponding access point.
[0246] At this point, all the steps on the site side have been introduced. Next, all the steps on the access point side will be introduced. It should be noted that the steps performed by the access point are the same as those performed by the site. Unless otherwise specified, the specific details can be referred to the above steps 902 to 906, which will not be repeated here.
[0247] Step 907: The access point stores the second cryptographic identifier used for this association.
[0248] Optionally, the access point adds the second password identifier to the Password Identifier corresponding to the site used for the current connection in the Password Identifier two-dimensional table.
[0249] Step 908: The access point stores the second PMKID used for this association.
[0250] Optionally, the access point adds the second PMKID to the PMKID used by the corresponding station for the current connection in the PMKID two-dimensional table.
[0251] Step 909: The access point generates a first PMKID to be used for the next association based on the second algorithm.
[0252] Step 910: The access point generates a first cryptographic identifier to be used for the next association based on a third algorithm.
[0253] It should be noted that, in the embodiment of the present application, the access point will output at least one of the first PMKID and the first cryptographic identifier.
[0254] Step 911: The access point stores the first PMKID and the first cryptographic identifier.
[0255] Optionally, the access point adds the first PMKID and the first password identifier to the maintained PMKID two-dimensional table and Password Identifier two-dimensional table, respectively, at the PMKID and Password Identifier to be used for the next association of the corresponding station.
[0256] Step 912: The station and the access point complete subsequent association and four-way handshake.
[0257] For the specific content of the subsequent association and four-way handshake, please refer to the embodiments shown in Figures 3 and 4, which will not be repeated here.
[0258] The embodiment of the present application can generate a first pairwise master key identifier PMKID and a first cryptographic identifier for use in the next association. The scheme of generating the first PMKID and the first cryptographic identifier using different algorithms at the same time not only ensures the security of both, but also reduces computing and communication overhead.
[0259] For an embodiment in which different algorithms are used to generate the first PMKID and the first cryptographic identifier at the same time after the four-way handshake, and the first cryptographic identifier is transmitted through a management frame:
[0260] In one embodiment, the first PMKID and the first cryptographic identifier are generated simultaneously using different algorithms. The first cryptographic identifier is generated by the access point, and the base station does not generate the first cryptographic identifier. In the following embodiments, the first PMKID and the first cryptographic identifier are generated after a four-way handshake. In this case, either PSK or SAE authentication can be used between the AP and the STA. Figure 10 shows a schematic flow diagram of a key generation method provided in an embodiment of the present application.
[0261] Step 1001: The station and the access point complete a four-way handshake.
[0262] Optionally, before completing the four-way handshake, if the station and the access point perform the above-mentioned PSK authentication, the station randomly generates an OTA MAC address locally; the station sends an Authentication Request frame to the AP, where the Authentication Request frame includes the randomly generated OTA MAC address; and the access point sends an Authentication Response frame to the station, where the Authentication Response frame indicates that the access point has successfully authenticated the station.
[0263] For example, the station randomly generates an OTA MAC0 locally and sends an Authentication Request frame to the access point. The Authentication Request frame includes the randomly generated OTA MAC0 but does not include the second cryptographic identifier used for this association. The access point sends an Authentication Response frame to the station, indicating that the authentication is successful.
[0264] Optionally, before completing the four-way handshake, if the station and the access point perform the above-mentioned SAE authentication, the station randomly generates an OTA MAC address locally; the station sends an Authentication frame containing Commit interaction information to the access point, and the Commit interaction information includes the second cryptographic identifier used for this association and the data provided by the station for generating the PMK; the access point sends an Authentication frame containing Commit interaction information to the station, and the Commit interaction information includes the data provided by the access point for generating the PMK; the station sends an Authentication frame containing Confirm interaction information to the access point to confirm that both parties generate the same PMK; the access point sends an Authentication frame containing Confirm interaction information to the station to confirm that both parties generate the same PMK. Optionally, the second cryptographic identifier used for this association is obtained through out-of-band means (such as manual notification, Bluetooth, or scanning a QR code).
[0265] Illustratively, after completing the four-way handshake, the station and the access point generate a PTK and a second PMKID used for this association according to the IEEE 802.11 standard.
[0266] The specific process of the station and the access point completing the four-way handshake can be referred to the embodiment shown in FIG3 , and will not be described in detail here.
[0267] In the following steps 1002 to 1005, the process of the site generating the first PMKID will be introduced. If SAE identity authentication is adopted, steps 1002 to 1005 will be executed; if SAE identity authentication is adopted, steps 1003 to 1005 will be executed.
[0268] Step 1002: The site stores the second cryptographic identifier used for this association.
[0269] Optionally, the station adds the second password identifier to the Password Identifier corresponding to the access point used for the current connection in the Password Identifier two-dimensional table.
[0270] Step 1003: The site stores the second PMKID used for this association.
[0271] Optionally, the station adds the second PMKID to the PMKID used for the current connection of the corresponding access point in the PMKID two-dimensional table.
[0272] Step 1004: The station generates a first PMKID to be used for the next association based on the second algorithm.
[0273] Exemplarily, the second algorithm can be represented by the following algorithm: (PMKID1) = HMAC-HASH (MAC STA , MAC AP , PMKID0, key1), where PMKID1 is the first PMKID, MAC STA Is the MAC address of the station, MAC AP is the MAC address of the access point, PMKID0 is the second PMKID, key1 is the secret value derived from the PTK. HMAC-HASH is a hash algorithm.
[0274] Step 1005: The site stores the first PMKID.
[0275] Optionally, the station adds the first PMKID to the PMKID to be used in the next association of the corresponding access point in the maintained PMKID two-dimensional table.
[0276] In the following steps 1006 to 1009, the process of the access point generating the first PMKID will be described. If SAE identity authentication is used, then steps 1006 to 1009 will be executed; if SAE identity authentication is used, then steps 1007 to 1009 will be executed.
[0277] Step 1006: The access point stores the second cryptographic identifier used for this association.
[0278] Optionally, the access point adds the second password identifier to the Password Identifier corresponding to the site used for the current connection in the Password Identifier two-dimensional table.
[0279] Step 1007: The access point stores the second PMKID used for this association.
[0280] Optionally, the access point adds the second PMKID to the PMKID used by the corresponding station for the current connection in the PMKID two-dimensional table.
[0281] Step 1008: The access point generates a first PMKID to be used for the next association based on the second algorithm.
[0282] Exemplarily, the second algorithm can be represented by the following algorithm: (PMKID1) = HMAC-HASH (MAC STA , MAC AP , PMKID0, key1).
[0283] Step 1009: The access point stores the first PMKID.
[0284] Optionally, the access point adds the first PMKID to the PMKID to be used by the corresponding station in the next association in the maintained PMKID two-dimensional table.
[0285] The following steps will describe the process of generating the first cryptographic identifier. In the case of adopting the SAE authentication method, please refer to the following steps 1010 to 1019.
[0286] Step 1010: The access point generates a first cryptographic identifier to be used for the next association based on a fourth algorithm.
[0287] Exemplarily, the fourth algorithm can be represented by the following algorithm: (Pass_id1)=AES(Pass_id0, key1), where Pass_id1 is the first cryptographic identifier, Pass_id0 is the second cryptographic identifier, and key1 is a secret value derived from PTK. AES is a symmetric encryption algorithm.
[0288] Step 1011: The access point generates a management frame.
[0289] Exemplarily, the format of the management frame is shown in Figure 11, which is a schematic diagram of the management frame. What is sent is an Action frame. Since the "30~125" values of the Category field in the Action frame are reserved, the embodiment of the present application selects any value (for example, "32") to indicate. The Password Identifier Present bit is set to "1" to indicate that there is a Password Identifier field (that is, the encrypted first password identifier) behind it, otherwise it means that there is no Password Identifier field behind it. Optionally, the management frame also includes at least one of frame control (Frame Control), duration (Duration), receiver address, sender address, basic service set identifier, sequence control, high throughput control, action domain, and frame check sequence (FCS).
[0290] Exemplarily, the access point fills the management frame parameters into the management frame to obtain the management frame. Optionally, the management frame is encrypted.
[0291] Step 1012: The access point sends a management frame to the station.
[0292] Optionally, the management frame is transmitted in encrypted form.
[0293] Step 1013: The station sends a confirmation character to the access point.
[0294] Step 1014: The access point stores the first cryptographic identifier.
[0295] Optionally, the access point adds the first password identifier to the Password Identifier to be used by the corresponding station in the next association in the maintained Password Identifier two-dimensional table.
[0296] Step 1015: The station receives the management frame.
[0297] Step 1016: The station determines whether the bit of the password identifier byte in the management frame is 1.
[0298] If the bit of the password identifier byte in the management frame is 1, then execute steps 1017 and 1018;
[0299] If the bit of the password identifier byte in the management frame is 0, step 1019 is executed.
[0300] If the station receives this management frame, the Password Identifier Present bit (password identifier byte) is "0", which means that the AP does not use the SAE authentication mode, does not need to generate and maintain the Password Identifier, and can be discarded directly; if the Password Identifier Present bit is "1", it means that the value in the Password Identifier field is the encrypted ciphertext of the first password identifier that the access point will use for the next association.
[0301] Step 1017: The station decrypts the management frame and outputs the first cryptographic identifier.
[0302] Optionally, the station may use the symmetric key to decrypt the ciphertext in the Password Identifier field in the management frame to obtain a first password identifier that the station will use the next time it connects to the access point.
[0303] Step 1018: The site stores the first cryptographic identifier.
[0304] Optionally, the station adds the first password identifier to the Password Identifier to be used in the next association with the corresponding access point in the maintained Password Identifier two-dimensional table.
[0305] Step 1019: The site does not use the first cryptographic identifier.
[0306] If the SAE certification method is not used, please refer to steps 1020 to 1022 below.
[0307] Step 1020: The access point generates a management frame.
[0308] Based on the above description, in this case, the Password Identifier Present bit in the management frame is set to "0".
[0309] Step 1021: The access point sends a management frame to the station.
[0310] Step 1022: The station sends a confirmation character to the access point.
[0311] For subsequent steps, please refer to steps 1015 to 1019 above.
[0312] The embodiment of the present application can generate a first pairwise master key identifier PMKID and a first cryptographic identifier for use in the next association. The scheme of generating the first PMKID and the first cryptographic identifier using different algorithms at the same time not only ensures the security of both, but also reduces computing and communication overhead.
[0313] For an embodiment in which, after the authentication phase of SAE identity authentication at the same time, different algorithms are used to generate the first PMKID and the first cryptographic identifier and the first cryptographic identifier is transmitted through a management frame:
[0314] In one optional embodiment, the first PMKID and the first cryptographic identifier are generated simultaneously using different algorithms. The first cryptographic identifier is generated by the access point, and the base station does not generate the first cryptographic identifier. In the following embodiments, the generation of the first PMKID and the first cryptographic identifier after completing the authentication phase of SAE identity authentication is used as an example. In this case, the SAE authentication mode can be used between the AP and the STA. Figure 10 shows a schematic flow diagram of a key generation method provided in an embodiment of the present application.
[0315] Step 1201: The station and the access point complete the authentication phase of SAE identity authentication.
[0316] Optionally, the site randomly generates an OTA MAC address locally; the site sends an Authentication frame containing Commit interaction information to the access point, the Commit interaction information includes the second cryptographic identifier used for this association and the data provided by the site for generating the PMK; the access point sends an Authentication frame containing Commit interaction information to the site, the Commit interaction information includes the data provided by the access point for generating the PMK; the site sends an Authentication frame containing Confirm interaction information to the access point to confirm that both parties generate the same PMK; the access point sends an Authentication frame containing Confirm interaction information to the site to confirm that both parties generate the same PMK. Optionally, the second cryptographic identifier used for this association is obtained through out-of-band means (such as manual notification, Bluetooth, or scanning a QR code).
[0317] The content of the authentication phase of the SAE identity authentication can be referred to the embodiment shown in FIG4 , and will not be described in detail here.
[0318] In the following steps 1202 to 1204, the process of the station generating the first PMKID will be introduced.
[0319] Step 1202: The site stores the second PMKID and the second cryptographic identifier used for this association.
[0320] Optionally, the station adds the first PMKID and the first password identifier to the maintained PMKID two-dimensional table and Password Identifier two-dimensional table, respectively, at the PMKID and Password Identifier to be used in the next association of the corresponding access point.
[0321] Step 1203: The station generates a first PMKID to be used for the next association based on the second algorithm.
[0322] Exemplarily, the second algorithm can be represented by the following algorithm: (PMKID1) = HMAC-HASH (MAC STA , MAC AP , PMKID0, key2), where PMKID1 is the first PMKID, MAC STA Is the MAC address of the station, MAC AP is the MAC address of the access point, PMKID0 is the second PMKID, key2 is the secret value derived from PMK. HMAC-HASH is a hash algorithm.
[0323] Step 1204: The station stores the second PMKID.
[0324] Optionally, the station adds the first PMKID to the PMKID to be used in the next association of the corresponding access point in the maintained PMKID two-dimensional table.
[0325] In the following steps 1205 to 1207, the process of the access point generating the first PMKID will be introduced.
[0326] Step 1205: The access point stores the second PMKID and the second cryptographic identifier used for this association.
[0327] Optionally, the access point adds the second PMKID and the second password identifier to the maintained PMKID two-dimensional table and Password Identifier two-dimensional table at the PMKID and Password Identifier to be used for the current association of the corresponding station, respectively.
[0328] Step 1206: The access point generates a first PMKID to be used for the next association based on the second algorithm.
[0329] Exemplarily, the second algorithm can be represented by the following algorithm: (PMKID1) = HMAC-HASH (MAC STA , MAC AP , PMKID0, key2), where PMKID1 is the first PMKID, MAC STA Is the MAC address of the station, MAC AP is the MAC address of the access point, PMKID0 is the second PMKID, key2 is the secret value derived from PMK. HMAC-HASH is a hash algorithm.
[0330] Step 1207: The access point stores the second PMKID.
[0331] Optionally, the access point adds the first PMKID to the PMKID to be used by the corresponding station in the next association in the maintained PMKID two-dimensional table.
[0332] Step 1208: The access point generates a first cryptographic identifier to be used for the next association based on the fourth algorithm.
[0333] Exemplarily, the fourth algorithm can be represented by the following algorithm: (Pass_id1)=AES(Pass_id0, key2), where Pass_id1 is the first cryptographic identifier, Pass_id0 is the second cryptographic identifier, and key2 is a secret value derived from PMK. AES is a symmetric encryption algorithm.
[0334] Step 1209: The access point generates a management frame.
[0335] For example, the format of a management frame is shown in FIG11 . FIG11 is a schematic diagram of a management frame in which an Action frame is sent. Since the values "30 to 125" in the Category field of the Action frame are reserved, the embodiments of the present application select any value therefrom to indicate the presence of a Password Identifier field (i.e., the encrypted first password identifier). If the Password Identifier Present bit is set to "1," it indicates that a Password Identifier field (i.e., the encrypted first password identifier) is present; otherwise, it indicates that no Password Identifier field is present.
[0336] Exemplarily, the access point fills the management frame parameters into the management frame to obtain the management frame. Optionally, the management frame is encrypted.
[0337] Step 1210: The access point sends a management frame to the station.
[0338] Optionally, the management frame is transmitted in encrypted form.
[0339] Step 1211: The station sends a confirmation character to the access point.
[0340] Step 1212: The access point stores the first cryptographic identifier.
[0341] Optionally, the access point adds the first password identifier to the Password Identifier to be used by the corresponding station in the next association in the maintained Password Identifier two-dimensional table.
[0342] Step 1213: The station receives the management frame.
[0343] If the station receives this management frame, the Password Identifier Present bit (password identifier byte) is "0", which means that the AP does not use the SAE authentication mode, does not need to generate and maintain the Password Identifier, and can be discarded directly; if the Password Identifier Present bit is "1", it means that the value in the Password Identifier field is the encrypted ciphertext of the first password identifier that the access point will use for the next association.
[0344] Step 1214: The station decrypts the management frame and outputs the first cryptographic identifier.
[0345] Optionally, the station may use the symmetric key to decrypt the ciphertext in the Password Identifier field in the management frame to obtain a first password identifier that the station will use the next time it connects to the access point.
[0346] Step 1215: The site stores the first cryptographic identifier.
[0347] Optionally, the station adds the first password identifier to the Password Identifier to be used in the next association with the corresponding access point in the maintained Password Identifier two-dimensional table.
[0348] Step 1216: The station and the access point complete subsequent association and four-way handshake.
[0349] For the specific content of the subsequent association and four-way handshake, please refer to the embodiments shown in Figures 3 and 4, which will not be repeated here.
[0350] The embodiment of the present application can generate a first pairwise master key identifier PMKID and a first cryptographic identifier for use in the next association. The scheme of generating the first PMKID and the first cryptographic identifier using different algorithms at the same time not only ensures the security of both, but also reduces computing and communication overhead.
[0351] It should be noted that the above embodiments can be freely spliced or combined according to actual needs.
[0352] FIG13 shows a block diagram of a key generation device 130 provided in an exemplary embodiment of the present application. The device 130 includes at least some of the following modules:
[0353] The key generation module 131 is used to generate a first pairwise master key identifier PMKID and a first cryptographic identifier for use in the next association during this association process, where the first PMKID is different from the second PMKID used in this association, and the first cryptographic identifier is different from the second cryptographic identifier used in this association.
[0354] In an optional design, the first PMKID and the first cryptographic identifier are generated based on the same opportunity.
[0355] In an optional design, the first PMKID and the first cryptographic identifier are generated when the station and the access point complete a four-way handshake.
[0356] In an optional design, the first PMKID and the first cryptographic identifier are generated when the authentication phase of SAE identity authentication between the station and the access point is completed.
[0357] In an optional design, the first PMKID and the first cryptographic identifier are generated using the same algorithm.
[0358] In an optional design, when SAE identity authentication is adopted, the input parameters of the first algorithm include the second PMKID and the second password identifier.
[0359] In an optional design, when SAE identity authentication is not adopted, the input parameters of the first algorithm include the second PMKID and a default password identifier.
[0360] In an optional design, the first PMKID and the first cryptographic identifier are generated based on different algorithms.
[0361] In an optional design, the first PMKID is generated based on a second algorithm, and the input parameters of the second algorithm include the second PMKID; and / or the first cryptographic identifier is generated based on a third algorithm, and the input parameters of the third algorithm include the second cryptographic identifier.
[0362] In an optional design, when the method is applied to the site, the first PMKID is generated based on a second algorithm, and the input parameters of the second algorithm include the second PMKID; the first cryptographic identifier is obtained based on a management frame sent by the access point.
[0363] In an optional design, the management frame is obtained by encrypting the first cryptographic identifier based on the access point.
[0364] In an optional design, when the method is applied to the access point, the first PMKID is generated based on a second algorithm, and the input parameters of the second algorithm include the second PMKID; the first cryptographic identifier is generated based on a fourth algorithm, and the input parameters of the fourth algorithm include the second cryptographic identifier.
[0365] In an optional design, the key generation module is further used to send the management frame to the site, where the management frame includes the first cryptographic identifier and is transmitted in an encrypted manner.
[0366] In an optional design, the first PMKID and the first cryptographic identifier are generated based on the same key.
[0367] In an optional design, the first PMKID and the first cryptographic identifier are generated based on the same algorithm.
[0368] In an optional design, when SAE identity authentication is adopted, the first PMKID and the first cryptographic identifier are generated by applying a first algorithm based on the same key, the MAC address of the site, the MAC address of the access point, the second PMKID and the second cryptographic identifier.
[0369] In an optional design, when SAE identity authentication is not adopted, the first PMKID and the first cryptographic identifier are generated using a first algorithm based on the same key, the MAC address of the site, the MAC address of the access point, the second PMKID and a default cryptographic identifier.
[0370] In an optional design, the first PMKID and the first cryptographic identifier are generated based on different algorithms.
[0371] In an optional design, the first PMKID is generated based on the same key, the MAC address of the site, the MAC address of the access point and the second PMKID using a second algorithm; and / or the first cryptographic identifier is generated based on the same key, the MAC address of the site, the MAC address of the access point and the second cryptographic identifier using a third algorithm.
[0372] In an optional design, when the method is applied to the site, the first PMKID is generated based on the same key, the MAC address of the site, the MAC address of the access point and the second PMKID using a second algorithm; the first cryptographic identifier is obtained based on a management frame sent by the access point, the management frame includes the first cryptographic identifier, and the management frame is transmitted using encryption.
[0373] In an optional design, when the method is applied to the access point, the first PMKID is generated based on the same key, the MAC address of the site, the MAC address of the access point and the second PMKID; the first cryptographic identifier is generated based on the same key and the second cryptographic identifier using a fourth algorithm.
[0374] In an optional design, when the first PMKID and the first cryptographic identifier are generated after the station and the access point complete a four-way handshake, the same key is a secret value derived from a PTK.
[0375] In an optional design, when the first PMKID and the first cryptographic identifier are generated after the authentication phase of SAE identity authentication between the station and the access point is completed, the same key is a secret value derived from the PMK.
[0376] In an optional design, the storage module 132 is configured to store the first PMKID and the first cryptographic identifier.
[0377] In an optional design, the storage module 132 is also used to store the first PMKID in the PMKID two-dimensional table of the site, and the PMKID two-dimensional table is used to record the PMKID used by the site and the access point to establish a wireless connection; and store the first password identifier in the password identifier two-dimensional table of the site, and the password identifier two-dimensional table is used to record the password identifier used by the site and the access point to establish a wireless connection.
[0378] It should be noted that the device provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0379] Regarding the device in this embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method and will not be elaborated here.
[0380] FIG14 shows a schematic structural diagram of a key generation device provided by an exemplary embodiment of the present application. The key generation device 1400 includes: a processor 1401 , a receiver 1402 , a transmitter 1403 , a memory 1404 and a bus 1405 .
[0381] The processor 1401 includes one or more processing cores. The processor 1401 executes various functional applications and information processing by running software programs and modules.
[0382] The receiver 1402 and the transmitter 1403 may be implemented as a communication component, which may be a communication chip.
[0383] The memory 1404 is connected to the processor 1401 via a bus 1405. The memory 1404 may be used to store at least one instruction, and the processor 1401 may be used to execute the at least one instruction to implement each step in the above method embodiment.
[0384] In addition, the memory 1404 can be implemented by any type of volatile or non-volatile storage device or a combination thereof. Volatile or non-volatile storage devices include but are not limited to: magnetic disks or optical disks, electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), static random-access memory (SRAM), read-only memory (ROM), magnetic memory, flash memory, and programmable read-only memory (PROM).
[0385] In an exemplary embodiment, a computer-readable storage medium is further provided, in which at least one program is stored. The at least one program is loaded and executed by the processor to implement the key generation method provided by each of the above method embodiments.
[0386] In an exemplary embodiment, a chip is further provided. The chip includes a programmable logic circuit and / or program instructions. When the chip runs on a communication device, it is used to implement the key generation method provided by each of the above method embodiments.
[0387] In an exemplary embodiment, a computer program product is further provided. When the computer program product is run on a processor of a computer device, the computer device is enabled to perform the above-mentioned key generation method.
[0388] Those skilled in the art will appreciate that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any media that facilitates the transmission of computer programs from one place to another. The storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0389] The above description is merely an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A key generation method, characterized in that: The method is applied to a station or an access point, and includes: During this association process, a first pairwise master key identifier PMKID and a first cryptographic identifier are generated for use in the next association. The first PMKID is different from the second PMKID used in this association, and the first cryptographic identifier is different from the second cryptographic identifier used in this association.
2. The method according to claim 1, characterized in that The first PMKID and the first cryptographic identifier are generated based on the same timing.
3. The method according to claim 2, characterized in that The first PMKID and the first cryptographic identifier are generated when the station and the access point complete a four-way handshake.
4. The method according to claim 2, characterized in that The first PMKID and the first cryptographic identifier are generated when an authentication phase of SAE identity authentication between the station and the access point is completed.
5. The method according to claim 4, characterized in that The first PMKID and the first cryptographic identifier are generated using the same algorithm.
6. The method according to claim 5, characterized in that The same algorithm is a first algorithm; When SAE identity authentication is adopted, the input parameters of the first algorithm include the second PMKID and the second password identifier.
7. The method according to claim 5, characterized in that The same algorithm is a first algorithm; When SAE identity authentication is not adopted, the input parameters of the first algorithm include the second PMKID and a default password identifier.
8. The method according to claim 4, characterized in that The first PMKID and the first cryptographic identifier are generated based on different algorithms.
9. The method according to claim 8, characterized in that The first PMKID is generated based on a second algorithm, and input parameters of the second algorithm include the second PMKID; And / or, the first cryptographic identifier is generated based on a third algorithm, and input parameters of the third algorithm include the second cryptographic identifier.
10. The method according to claim 8, characterized in that When the method is applied to the site, the first PMKID is generated based on a second algorithm, and input parameters of the second algorithm include the second PMKID; The first cryptographic identifier is obtained based on a management frame sent by the access point.
11. The method according to claim 10, characterized in that The management frame is obtained by encrypting the first cryptographic identifier based on the access point.
12. The method according to claim 8, characterized in that When the method is applied to the access point, the first PMKID is generated based on a second algorithm, and input parameters of the second algorithm include the second PMKID; The first cryptographic identifier is generated based on a fourth algorithm, and input parameters of the fourth algorithm include the second cryptographic identifier.
13. The method according to claim 12, characterized in that The method further comprises: The management frame is sent to the station, where the management frame includes the first password identifier and is transmitted in an encrypted manner.
14. The method according to any one of claims 1 to 4, characterized in that The first PMKID and the first cryptographic identifier are generated based on the same key.
15. The method according to claim 14, characterized in that The first PMKID and the first cryptographic identifier are generated based on the same algorithm.
16. The method according to claim 15, characterized in that In the case of SAE identity authentication, the first PMKID and the first cryptographic identifier are generated using a first algorithm based on the same key, the MAC address of the station, the MAC address of the access point, the second PMKID and the second cryptographic identifier.
17. The method according to claim 15, characterized in that When SAE identity authentication is not adopted, the first PMKID and the first cryptographic identifier are generated by applying a first algorithm based on the same key, the MAC address of the station, the MAC address of the access point, the second PMKID and a default cryptographic identifier.
18. The method according to claim 14, characterized in that The first PMKID and the first cryptographic identifier are generated based on different algorithms.
19. The method according to claim 18, characterized in that The first PMKID is generated by applying a second algorithm based on the same key, the MAC address of the station, the MAC address of the access point, and the second PMKID; And / or, the first cryptographic identifier is generated by applying a third algorithm based on the same key, the MAC address of the station, the MAC address of the access point, and the second cryptographic identifier.
20. The method according to claim 18, wherein When the method is applied to the station, the first PMKID is generated by applying a second algorithm based on the same key, the MAC address of the station, the MAC address of the access point, and the second PMKID; The first password identifier is obtained based on a management frame sent by the access point, the management frame includes the first password identifier, and the management frame is transmitted in an encrypted manner.
21. The method according to claim 18, wherein In the case where the method is applied to the access point, the first PMKID is generated based on the same key, the MAC address of the station, the MAC address of the access point, and the second PMKID; The first cryptographic identifier is generated by applying a fourth algorithm based on the same key and the second cryptographic identifier.
22. The method according to any one of claims 14 to 21, characterized in that In a case where the first PMKID and the first cryptographic identifier are generated after the station and the access point complete a four-way handshake, the identical key is a secret value derived from a PTK.
23. The method according to any one of claims 14 to 21, characterized in that In a case where the first PMKID and the first cryptographic identifier are generated after the authentication phase of the SAE identity authentication between the station and the access point is completed, the same key is a secret value derived from the PMK.
24. The method according to any one of claims 1 to 4, characterized in that The method further comprises: The first PMKID and the first cryptographic identifier are stored.
25. The method according to claim 24, characterized in that The storing the first PMKID and the first cryptographic identifier includes: Storing the first PMKID in a PMKID two-dimensional table of the station, where the PMKID two-dimensional table is used to record the PMKID used by the station to establish a wireless connection with the access point; The first password identifier is stored in a password identifier two-dimensional table of the station, where the password identifier two-dimensional table is used to record the password identifier used by the station and the access point to establish a wireless connection.
26. A key generation device, characterized in that: The device comprises: The key generation module is used to generate a first pairwise master key identifier PMKID and a first cryptographic identifier for use in the next association during the current association process, where the first PMKID is different from the second PMKID used in the current association, and the first cryptographic identifier is different from the second cryptographic identifier used in the current association.
27. A key generation device or a WiFi device, characterized in that: The device comprises: processor; a transceiver connected to the processor; a memory for storing executable instructions for the processor; The processor is configured to load the executable instructions so that the key generation device or the WiFi device implements the key generation method according to any one of claims 1 to 25.
28. A computer-readable storage medium, characterized in that The computer-readable storage medium stores executable instructions, which are loaded and executed by a key generation device or a WiFi device to implement the key generation method according to any one of claims 1 to 25.
29. A chip, characterized in that: The chip includes a programmable logic circuit or a program, and a device equipped with the chip is used to implement the key generation method according to any one of claims 1 to 25.
30. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium. A processor of a key generation device or a WiFi device reads the computer instructions from the computer-readable storage medium, and the key generation device or the WiFi device executes the computer instructions, so that the key generation device or the WiFi device performs the key generation method according to any one of claims 1 to 25.
