Method and apparatus for managing a communication channel
By building and encrypting the management frame on the wireless access point AP device side and setting its MAC address and key for each client, the problems of Beacon frame forgery and playback are solved, encrypted transmission is realized, and the security of WiFi communication is improved.
Patent Information
- Application Number
- CN202110957050.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-19
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2041-08-19
AI Technical Summary
In existing WiFi communication, the openness of Beacon frames leads to attackers being able to forge and replay information related to communication channels, resulting in network connection interruption or system crash, threatening user information security.
The wireless access point AP device side builds a management frame carrying the target information element, and sets its MAC address and corresponding key for each connection client for encryption to generate an encrypted management frame to prevent unauthorized decryption.
It realizes encrypted transmission of information related to communication channel management between AP devices and clients, prevents attackers from forgery and playback, and improves the security of WiFi communication.
Smart Images

Figure CN113613245B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this specification relate to the field of computer technologies, and in particular, to a method and apparatus for managing communication channels. Background Art
[0002] With the development of wireless communication, more and more devices are connected to the network through WiFi to achieve intelligent functions. The open feature of WiFi communication provides convenience for terminal devices to connect to the wireless network, but also provides opportunities for attackers. Attackers can forge and replay any frames on the wireless network, posing a great threat to user information security. For example, the Beacon frame, as the beacon frame of a wireless AP (Wireless Access Point), is usually transmitted in plain text, and anyone can eavesdrop and forge it. When an attacker forges and replays the information related to the communication channel in the Beacon frame, it will cause an attack on the clients connected to the WiFi network. For example, after a client receives the deformed information related to the communication channel in the Beacon frame, the network connection may be interrupted or the system may crash due to data parsing errors. Another example is that when a client receives the forged information related to the communication channel in the Beacon frame, it will execute incorrect instructions to switch channels, resulting in connection interruption or man-in-the-middle attacks.
[0003] Therefore, it is desirable to have an improved solution that can improve the security of WiFi communication. Summary of the Invention
[0004] The embodiments of this specification describe a method and apparatus for managing communication channels. An original management frame carrying target information elements is constructed at the wireless access point AP device end, and the target information elements include information elements related to communication channel management. For each client connected to the AP device, the target address of the constructed original management frame is set to the MAC address of the client, and the information in the target information elements is encrypted using the key corresponding to the client to obtain an encrypted management frame. Then, the encrypted management frame is sent. Thus, the encrypted transmission of information related to communication channel management between the AP device and the client is achieved, preventing attackers from forging and replaying the information related to communication channel management carried in the management frame, and improving the security of WiFi communication.
[0005] According to a first aspect, there is provided a method for managing a communication channel, which is executed by a wireless access point (AP) device and includes: constructing an original management frame carrying a target information element, where the target information element includes an information element related to communication channel management; in a case where it is determined that there is a client connected to the AP device, for each of the connected clients, performing the following steps: setting the destination address of the original management frame to the MAC address of the client; encrypting the information in the target information element using the key corresponding to the client to obtain an encrypted management frame; and sending the encrypted management frame within the WiFi network for the connected clients within the WiFi network to determine whether to process the received management frame according to the destination address.
[0006] In one embodiment, the method further includes: in a case where it is determined that no client has established a connection with the AP device, broadcasting the original management frame in the WIFI network.
[0007] In one embodiment, the encrypting the information in the target information element using the key corresponding to the client includes: obtaining a dedicated key generated during the handshake process when establishing a connection with the client; and encrypting the information in the target information element using the dedicated key.
[0008] In one embodiment, the target information element is stored in a tag-length-value data format; and the encrypting the information in the target information element using the key corresponding to the client includes: encrypting the value in the target information element using the key corresponding to the client.
[0009] In one embodiment, the original management frame includes a beacon frame and a probe response frame.
[0010] In one embodiment, the target information element includes one of the following: a channel switch announcement element, a channel switch encapsulation element, a wideband channel switch element, a mesh network channel switch parameter element, a channel switch time element, a maximum channel switch time element, and a future channel guidance element.
[0011] In one embodiment, when the original management frame is a beacon frame and the target information element is a channel switch announcement element, the method further includes: in response to determining that the channel switch is completed, sending a beacon frame with a destination address being a broadcast address and not carrying the channel switch announcement element in the WiFi network.
[0012] According to a second aspect, a method for managing a communication channel is provided, which is executed by a client and includes: receiving an encrypted management frame sent by a wireless access point (AP) device, where the encrypted target information element is carried, and the target information element includes information elements related to communication channel management; determining whether to process the encrypted management frame according to the destination address of the encrypted management frame; in response to determining to process the encrypted management frame, decrypting the target information element using a pre-stored key; and managing the communication channel according to the decryption result.
[0013] In one embodiment, the determining whether to process the encrypted management frame according to the destination address of the encrypted management frame includes: when the destination address of the encrypted management frame is the MAC address of the client, determining to process the encrypted management frame.
[0014] In one embodiment, the decrypting the target information element using a pre-stored key includes: decrypting the target information element using the exclusive key generated during the handshake process when establishing a connection with the wireless access point (AP) device.
[0015] In one embodiment, the encrypted management frame is an encrypted beacon frame, and the target information element is a channel switch announcement element; the managing the communication channel according to the decryption result includes: performing a channel switch according to the decrypted channel switch announcement element.
[0016] According to a third aspect, a device for managing a communication channel is provided, which is disposed in a wireless access point (AP) device and includes: a construction unit configured to construct an original management frame carrying a target information element, where the target information element includes information elements related to communication channel management; an execution unit configured to, when it is determined that there is a client connected to the AP device, perform a preset step for each of the connected clients, where the execution unit includes: a setting module configured to set the destination address of the original management frame to the MAC address of the client; an encryption module configured to encrypt the information in the target information element using the key corresponding to the client to obtain an encrypted management frame; and a sending module configured to send the encrypted management frame within the WiFi network for the connected clients within the WiFi network to determine whether to process the received management frame according to the destination address.
[0017] According to a fourth aspect, there is provided an apparatus for managing a communication channel, which is disposed in a client and includes: a receiving unit configured to receive an encrypted management frame sent by a wireless access point (AP) device, where the encrypted management frame carries an encrypted target information element, and the target information element includes an information element related to communication channel management; a determining unit configured to determine whether to process the encrypted management frame according to the destination address of the encrypted management frame; a decrypting unit configured to, in response to determining to process the encrypted management frame, decrypt the target information element using a pre-stored key; and a management unit configured to manage the communication channel according to the decryption result.
[0018] According to a fifth aspect, there is provided a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method according to any one of the first aspects is implemented.
[0019] According to a sixth aspect, there is provided a wireless access point (AP) device, including a memory and a processor. The feature is that an executable code is stored in the memory, and when the processor executes the executable code, the method according to any one of the first aspects is implemented.
[0020] According to a seventh aspect, there is provided a computer-readable storage medium, on which a computer program is stored. When the computer program is executed on a computer, the computer is made to execute the method according to any one of the second aspects.
[0021] According to an eighth aspect, there is provided a terminal device, including a memory and a processor. The feature is that an executable code is stored in the memory, and when the processor executes the executable code, the method according to any one of the second aspects is implemented.
[0022] According to the method and apparatus for managing a communication channel provided in the embodiments of the present specification, at the wireless access point (AP) device side, first, an original management frame carrying a target information element is constructed, and the target information element includes an information element related to communication channel management. For each client connected to the AP device, the destination address of the constructed original management frame is set to the MAC address of the client, and the information in the target information element is encrypted using the key corresponding to the client to obtain an encrypted management frame. Then, the encrypted management frame is sent. Since different keys are used for different clients during the encryption process by the AP device, a client can only decrypt the information of the target information element in the management frame whose destination address is the same as its own MAC address, and cannot decrypt the information of the target information element in other management frames. Thus, encrypted transmission of information related to communication channel management between the AP device and the client is achieved, preventing an attacker from forging and replaying the information related to communication channel management carried in the management frame, and improving the security of WiFi communication. Description of the Drawings
[0023] Figure 1 Schematic diagram of the implementation scenario of an embodiment disclosed in this specification;
[0024] Figure 2 Schematic flow chart showing a method for managing a communication channel according to an embodiment;
[0025] Figure 3 Schematic diagram showing the main structure of a Beacon frame;
[0026] Figure 4 Schematic diagram showing the format of CSA;
[0027] Figure 5 Schematic flow chart showing the four-way handshake process;
[0028] Figure 6 Schematic diagram showing the TLV data format;
[0029] Figure 7 Schematic flow chart showing a method for managing a communication channel according to another embodiment;
[0030] Figure 8 Schematic block diagram showing an apparatus for managing a communication channel according to an embodiment;
[0031] Figure 9 Schematic block diagram showing an apparatus for managing a communication channel according to another embodiment. Detailed implementation manners
[0032] The technical solutions provided in this specification will be further described in detail below through the accompanying drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the relevant invention and are not intended to limit the invention. Additionally, it should be noted that for the sake of description, only parts related to the relevant invention are shown in the accompanying drawings. It should be noted that, without conflict, the embodiments of this specification and the features in the embodiments can be combined with each other.
[0033] Figure 1 Schematic diagram of the implementation scenario of an embodiment disclosed in this specification. As Figure 1 shown, in Figure 1In the implementation scenario, it includes a wireless AP device 101 and multiple clients 102. When the wireless AP device 101 needs to manage the communication channel (for example, switch channels), in order to notify the connected clients 102, it will construct an original management frame carrying target information elements, and the target information elements include information elements related to communication channel management. For each of the connected clients 102, the destination address of the constructed original management frame is set to the MAC address of this client 102, and the information in the target information elements is encrypted using the key corresponding to this client 102 to obtain an encrypted management frame. Due to the openness of the WiFi network, the data frames transmitted in the WiFi network will be received by all the clients 102 in the network. Therefore, in order to prevent the encrypted information in the management frame from being cracked by other clients, different clients use different keys during encryption. Finally, the wireless AP device 101 sends the set address and the encrypted management frame within the WiFi network. After the clients 102 in the WiFi network receive this encrypted management frame, they will determine whether the destination address of this encrypted management frame is the same as their own MAC address. If it is the same, they will use the pre-stored key to decrypt, parse, etc. the target information elements of this encrypted management frame, and finally obtain the information related to communication channel management, and manage the communication channel according to the obtained information related to communication channel management. Thus, the encrypted transmission of the information related to communication channel management between the AP device 101 and the clients 102 is realized, preventing attackers from forging and replaying the information related to communication channel management carried in the management frame, and improving the security of WiFi communication. The following describes the specific implementation method of the above process.
[0034] Figure 2 FIG. shows a method for managing a communication channel according to an embodiment. This method can be executed by a wireless access point AP device. For example, the AP device can include a wireless router. As Figure 2 shown, the method for managing a communication channel can include the following steps:
[0035] Step 201, construct an original management frame carrying target information elements.
[0036] In this embodiment, the AP device can construct a management frame carrying target information elements as the original management frame. Here, the target information elements can include information elements related to communication channel management.
[0037] In one embodiment, the above original management frame can include a beacon frame and a probe response frame.
[0038] Generally, a wireless client can obtain information about the surrounding wireless networks through passive scanning and active scanning. Passive scanning means that the client obtains wireless network information by listening to the Beacon frames periodically sent by AP devices. Active scanning means that the client actively sends Probe Request frames, and obtains network signals through the Probe Response frames sent back by AP devices in response to the Probe Request frames.
[0039] The Beacon frame is one of the management frames in the IEEE 802.11-based wireless local area network, and it contains the description information of the network. The Beacon frame is periodically transmitted by the wireless access point (AP) device in the infrastructure Basic Service Set (BSS). The Beacon frame is used to announce the existence of the wireless local area network and synchronize the members of the basic service set. Figure 3 The schematic diagram showing the main structure of the Beacon frame is presented. It can be understood that the numbers above the boxes in the figure can represent the space occupied by the information, with the unit being octet, and octets being the plural form of octet. As Figure 3 shown, the Beacon beacon frame includes an 802.11 MAC Header (MAC header), a variable-length Frame Body, and a Frame Check Sequence (FCS). As an example, the MAC header can include the following contents: Frame Control, Duration / ID, Address, Sequence Control, QoS Control, HT (High-throughput) Control, and so on. The Frame Body part of the Beacon frame can include a fixed-length field and multiple information elements. Among them, the fixed-length field can include Timestamp, Beacon interval, Capability information, etc.
[0040] Similar to the structure of the Beacon frame, the Frame Body part of the Probe Response frame can also include a fixed-length field and multiple information elements.
[0041] In one embodiment, the above-mentioned target information element may include one of the following: Channel Switch Announcement (CSA) element, Channel Switch Wrapper element, Wide Bandwith Channel Switch element, MeshChannel Switch Parameters element, Channel Switch Timing element, Max Channel Switch Time element, and Future ChannelGuidance element. The above-mentioned target information element may be related to communication channel management. For example, in order to warn the clients in the WiFi network that the channel is about to change, the AP may add the corresponding CSA field in the management frame (such as, Beacon frame, probe response frame, etc.) to notify the clients of the channel to which they will switch, so that the clients can switch to the new channel in time. Figure 4 The format schematic diagram of the CSA is shown, as Figure 4 The CSA shown includes Element ID, Length, Channel Switch Mode, New Channel Number, and ChannelSwitch Count. It can be understood that the functions and formats of the above-mentioned target information elements are described and recorded in detail in the WiFi wireless network 802.11 technical standard, and will not be elaborated here. According to actual needs, the above-mentioned target information elements can all appear in the Beacon frame and the probe response frame.
[0042] As an example, constructing a management frame carrying the target information element may refer to writing the target information element in the frame body of the management frame, so as to obtain a management frame carrying the target information element.
[0043] Step 202, when it is determined that there is a client connected to the AP device, for each client among the connected clients, execute the following steps 2021-2023. Specifically:
[0044] Step 2021, set the destination address of the original management frame to the MAC address of the client.
[0045] In this embodiment, for each client that has been connected to the AP device, the AP device may set the destination address of the above-mentioned original management frame carrying the target information element to the MAC address of the client.
[0046] In step 2022, the information in the target information element is encrypted using the key corresponding to the client to obtain an encrypted management frame.
[0047] In this embodiment, a set of keys can be pre-exchanged or negotiated between each client connected to the AP device and the AP device. For example, the key can be a symmetric key or an asymmetric key. To prevent the encrypted information in the management frame from being cracked, the keys corresponding to different clients are different.
[0048] In one embodiment, step 2022 can also be specifically implemented as follows: First, the exclusive key generated during the handshake process when establishing a connection with the client is determined as the key corresponding to the client. Then, the information in the target information element is encrypted using the exclusive key.
[0049] Generally, when the AP device establishes a connection with the client, keys are exchanged through the handshake process. After the process is successful, a key for communication between the AP device and the client is generated to encrypt communication data. Taking the four-way handshake process as an example, Figure 5 shows a schematic flow diagram of the four-way handshake process, as Figure 5 shown, the specific process includes:
[0050] For the first handshake, the AP device generates a random number ANonce and sends information such as ANonce, Service Set Identifier (SSID), and its own MAC address to the client. After receiving it, the client can calculate the PTK (pairwise transient key). Among them, the PTK can be calculated by the following formula (1):
[0051] PTK = HMAC(PMK + ANonce + SNonce + MAC A + MAC s ) (1)
[0052] where HMAC represents the HMAC algorithm, SNonce is the random number generated by the client, MAC A represents the MAC address of the AP device, and MAC s represents the MAC address of the client. Here, PMK is related to the authentication method. If it is the PSK (pre-shared key) authentication method, then PMK is calculated by the following formula (2):
[0053] PMK = PBKDF2(Passphrase, SSID) (2)
[0054] Among them, PBKDF2 represents the PBKDF2 algorithm, and Passphrase represents the login password entered by the user.
[0055] In the second handshake, the client sends information such as SNonce, its own MAC address, and MIC (Message Integrity Code) to the AP device. After receiving it, the AP device also calculates the value of PTK using formula (1).
[0056] In the third handshake, the AP device sends a message carrying GTK (Group Transient Key) and MIC to the client. Among them, GTK is encrypted using KEK (key Encryption key), and KEK is used to encrypt the key generation message. MIC is encrypted using KCK (key confirmation key), and MIC is used to calculate the integrity of the key generation message. After receiving the above message, the client will perform the verification of MIC. If the verification is successful, the client obtains GTK.
[0057] In the fourth handshake, the client sends a confirmation message to the AP device. The AP device authenticates the message successfully, and both parties install PTK and GTK. It can be understood that this specification only briefly describes the four-way handshake process. The calculations in the actual handshake process are more complex and will not be elaborated here.
[0058] In this embodiment, the AP device can determine the PTK generated during the four-way handshake with the client as the key corresponding to the client, and use PTK to encrypt the information in the target information element. Compared with the GTK shared by multiple clients, PTK is a dedicated key negotiated between the AP device and a single client, and different dedicated keys are negotiated between each client and the AP. This implementation method can reuse the dedicated key generated during the handshake to encrypt information without the need to exchange or negotiate keys additionally, thus simplifying the key determination step and improving the efficiency.
[0059] In one embodiment, the above target information element can be stored in the data format of tag-length-value, that is, TLV (Tag, Length, Value). Figure 6 The schematic diagram showing the TLV data format is as Figure 6 shown. The target information element represented in the TLV data format includes an element identifier (Element ID), a length (Length), and information (Information). Among them, the element identifier, length, and information correspond to the tag, length, and value in the TLV data format respectively.
[0060] Based on this data format of the target information element, step 2022 can also be implemented specifically as follows: Use the key corresponding to the client to encrypt the values in the target information element. Taking the target information element as CSA as an example, only the channel switching mode, new channel number, and channel switching timing need to be encrypted. In this implementation method, only the values in the target information element are encrypted, rather than all the information in the target information element, thus reducing the data calculation amount in the encryption and decryption processes while ensuring that the values are not leaked, and improving the efficiency.
[0061] In step 2023, send the encrypted management frame obtained after setting the address and encryption processing within the WiFi network for the connected clients within the WiFi network to determine whether to process the received management frame according to the destination address.
[0062] In this embodiment, the AP device can send the encrypted management frame obtained after setting the address and encryption processing within the WiFi network. Due to the openness of the WiFi network, all clients within the WiFi network can receive this encrypted management frame. The connected clients within the WiFi network can determine whether to process the received encrypted management frame according to the destination address of the encrypted management frame. Specifically, the client can determine whether the destination address of the encrypted management frame is the same as its own MAC address. If the same, perform operations such as decrypting and parsing the management frame, and manage the channel according to the communication channel management-related information obtained by decryption and parsing. For example, when the target information element is a channel switching declaration element, channel switching can be performed according to the channel switching declaration obtained by decryption and parsing.
[0063] In one embodiment, the above method for managing the communication channel may further include Figure 2 the following steps not shown in the figure: When it is determined that no client is connected to the AP device, broadcast the original management frame in the WIFI network.
[0064] In this embodiment, if no client is connected to the AP device, the AP device can set the destination address of the constructed original management frame (for example, beacon frame) as the broadcast address and broadcast the original management frame in the WiFi network. This original management frame carries the original unencrypted target information element. Taking the beacon frame as an example, when no client is connected to the AP device, the sent beacon frame can be an unencrypted beacon frame.
[0065] In one embodiment, when the above original management frame is a beacon frame and the above target information element is a channel switching declaration element, the above method for managing the communication channel may further include Figure 2The following steps shown: In response to determining that the channel switch is completed, send a beacon frame with the destination address being the broadcast address and without carrying a channel switch announcement element in the WiFi network.
[0066] In this embodiment, according to the information in the channel switch announcement element, after the channel switch of the AP device and the client is completed, the AP device will continue to send a beacon frame with the destination address being the broadcast address and without carrying a channel switch announcement element in the WiFi network to announce the existence of the wireless local area network.
[0067] Figure 7 The flowchart shows a method for managing a communication channel according to an embodiment. This method can be executed by a client. Here, the client can refer to various devices capable of establishing a connection with the WiFi network, including but not limited to smart phones, tablet computers, e-book readers, laptop computers, and so on. As Figure 7 shown, the method for managing a communication channel can include the following steps:
[0068] Step 701, receive an encrypted management frame sent by a wireless access point AP device, which carries an encrypted target information element.
[0069] In this embodiment, the client can receive a management frame sent by the connected wireless access point AP device, which carries an encrypted target information element. Here, the management frame can include a beacon frame and a probe response frame. The above-mentioned target information element can include an information element related to communication channel management. For example, the target information element can include one of the following: a Channel Switch Announcement (CSA) element, a Channel Switch Announcement (CSA) element, a Channel Switch Wrapper element, a Wide Bandwith Channel Switch element, a Mesh Channel Switch Parameters element, a Channel Switch Timing element, a Max Channel Switch Time element, and a Future Channel Guidance element. The above-mentioned target information element is located in the frame body part of the management frame.
[0070] Step 702, determine whether to process the encrypted management frame according to the destination address of the received encrypted management frame.
[0071] In this embodiment, for each client already connected to the AP device, the AP device can set the destination address of the encrypted management frame carrying the encrypted target information element to the MAC address of the client. In this way, the clients within the WiFi network can determine whether the received encrypted management frame is sent by the AP device for themselves based on the destination address of the received encrypted management frame. If so, the client processes the encrypted management frame. Specifically, the client can determine whether the destination address of the received encrypted management frame is the same as its own MAC address. If they are the same, it is determined that the management frame is sent by the AP device for itself, and thus it is determined to process the encrypted management frame.
[0072] Step 703, in response to determining to process the above-mentioned encrypted management frame, decrypt the target information element using the pre-stored key.
[0073] In this embodiment, a set of keys can be pre-exchanged or negotiated between each client connected to the AP device and the AP device. For example, the key can be a symmetric key or an asymmetric key. To prevent the encrypted information in the management frame from being cracked, the keys corresponding to different clients are different. In this way, if the client determines to process the received management frame, it decrypts the target information element using the pre-stored key exchanged or negotiated with the AP device. It can be understood that after decrypting the target information element, the client can also parse the management frame in the conventional manner of parsing management frames currently.
[0074] In one embodiment, the above-mentioned decrypting the target information element using the pre-stored key can be specifically carried out as follows: Use the exclusive key generated during the handshake process when establishing a connection with the wireless access point AP device to decrypt the target information element.
[0075] Generally, when the AP device and the client establish a connection, they will exchange keys through the handshake process. After this process is successful, a key for communication between the AP device and the client will be generated to encrypt communication data. Taking the four-way handshake process as an example, as described in combination with Figure 5 it can be known that a PTK (pairwise transient key) will be generated during the four-way handshake process as the exclusive key between the AP device and a single client.
[0076] In this embodiment, the client can use the PTK generated during the four-way handshake process when establishing a connection with the AP device to decrypt the target information element. This implementation method can reuse the key generated during the handshake process to encrypt information, without the need to exchange or negotiate keys additionally, thus simplifying the key determination step and improving the efficiency.
[0077] Step 704, manage the communication channel according to the decryption result.
[0078] In this embodiment, the client manages the channel information according to the decryption result of the target information element and the parsing result of the management frame. For example, when the encrypted management frame is an encrypted beacon frame and the target information element is a channel switching announcement element, channel switching can be performed according to the channel switching announcement obtained by decryption and parsing.
[0079] The method for managing a communication channel provided by the above embodiment of the present application realizes the encrypted transmission of information related to communication channel management between the AP device and the client, prevents attackers from forging and replaying the information related to communication channel management carried in the management frame, and improves the security of WiFi communication.
[0080] According to an embodiment of another aspect, a device for managing a communication channel is provided. The above device for managing a communication channel can be arranged in a wireless access point AP device.
[0081] Figure 8 The schematic block diagram of a device for managing a communication channel according to an embodiment is shown. As Figure 8 shown, the device 800 for managing a communication channel includes: a construction unit 801 configured to construct an original management frame carrying a target information element, where the target information element includes an information element related to communication channel management; an execution unit 802 configured to, when it is determined that there is a client connected to the above AP device, execute a preset step for each of the connected clients, where the execution unit 802 includes: a setting module 8021 configured to set the destination address of the original management frame to the MAC address of the client; an encryption module 8022 configured to encrypt the information in the target information element with the key corresponding to the client to obtain an encrypted management frame; a sending module 8023 configured to send the encrypted management frame within the WiFi network for the connected clients within the WiFi network to determine whether to process the received management frame according to the destination address.
[0082] In some optional implementation manners of this embodiment, the device 800 further includes: a broadcast unit (not shown in the figure) configured to broadcast the original management frame in the WIFI network when it is determined that no client is connected to the above AP device.
[0083] In some optional implementation manners of this embodiment, the encryption module 8022 is further configured to: obtain the exclusive key generated during the handshake process when establishing a connection with the client; use the exclusive key to encrypt the information in the target information element.
[0084] In some alternative implementation manners of this embodiment, the above target information element is stored in a tag-length-value data format; and the above encryption module 8022 is further configured to: encrypt the value in the above target information element by using the key corresponding to this client.
[0085] In some alternative implementation manners of this embodiment, the above original management frame includes a beacon frame and a probe response frame.
[0086] In some alternative implementation manners of this embodiment, the above target information element includes one of the following: a channel switch announcement element, a channel switch encapsulation element, a wideband channel switch element, a mesh network channel switch parameter element, a channel switch time element, a maximum channel switch time element, and a future channel guidance element.
[0087] In some alternative implementation manners of this embodiment, the above device 800 further includes: a beacon frame sending unit (not shown in the figure), configured to, in response to determining that the channel switch is completed, send a beacon frame with a destination address being a broadcast address and not carrying a channel switch announcement element in the above WiFi network.
[0088] According to an embodiment of another aspect, a device for managing a communication channel is provided. The above device for managing a communication channel may be disposed in a client.
[0089] Figure 9 A schematic block diagram of a device for managing a communication channel according to still another embodiment is shown. As Figure 9 shown, the device 900 for managing a communication channel includes: a receiving unit 901, configured to receive an encrypted management frame sent by a wireless access point AP device, where the encrypted target information element is carried, and the above target information element includes an information element related to communication channel management; a determining unit 902, configured to determine whether to process the encrypted management frame according to the destination address of the above encrypted management frame; a decrypting unit 903, configured to, in response to determining to process the encrypted management frame, decrypt the above target information element by using a pre-stored key; and a management unit 904, configured to manage the communication channel according to the decryption result.
[0090] In some alternative implementation manners of this embodiment, the above determining unit 902 is further configured to: determine to process the encrypted management frame when the destination address of the above encrypted management frame is the MAC address of the above client.
[0091] In some alternative implementation manners of this embodiment, the above decrypting unit 903 is further configured to: decrypt the above target information element by using a dedicated key generated during the handshake process when establishing a connection with the above wireless access point AP.
[0092] In some alternative implementation manners of this embodiment, the above management unit 904 is further configured to: perform channel switching according to the decrypted channel switching declaration element.
[0093] According to an embodiment of another aspect, there is also provided a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method described as Figure 2 is implemented.
[0094] According to an embodiment of still another aspect, there is also provided a wireless access point AP device, including a memory and a processor. It is characterized in that an executable code is stored in the above memory. When the above processor executes the above executable code, the method described as Figure 2 is implemented.
[0095] According to an embodiment of another aspect, there is also provided a computer-readable storage medium, on which a computer program is stored. When the computer program is executed in a computer, the computer is made to execute the method described as Figure 7 is implemented.
[0096] According to an embodiment of still another aspect, there is also provided a terminal device, including a memory and a processor. It is characterized in that an executable code is stored in the above memory. When the above processor executes the above executable code, the method described as Figure 7 is implemented.
[0097] Those of ordinary skill in the art should further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described according to their functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those of ordinary skill in the art can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of this application.
[0098] The steps of the method or algorithm described in combination with the embodiments disclosed herein can be implemented by hardware, a software module executed by a processor, or a combination of the two. The software module can be placed in a random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, register, hard disk, removable disk, CD-ROM, or any other form of storage medium well-known in the technical field.
[0099] The specific embodiments described above further elaborate on the objective, technical solution and beneficial effects of the present invention. It should be understood that the above description is only for the specific embodiments of the present invention and is not used to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A method for managing a communication channel, which is executed by a wireless access point AP device, includes: Constructing an original management frame carrying a target information element, where the target information element includes an information element related to communication channel management; The original management frame is a Beacon frame; Determining whether there is a client connected to the AP device; In the case of determining that no client is connected to the AP device, setting the destination address of the original management frame to the broadcast address, so as to broadcast the original management frame in the WIFI network; In the case of determining that there is a client connected to the AP device, for each client among the connected clients, the following steps are all executed: Setting the destination address of the original management frame to the MAC address of this client; Using the key corresponding to this client to encrypt the information in the target information element to obtain an encrypted management frame; Sending the encrypted management frame within the WiFi network for the connected clients within the WiFi network to determine whether to process the received management frame according to the destination address, and the processing includes decrypting the target information element.
2. The method according to claim 1, wherein The encrypting the information in the target information element using the key corresponding to this client includes: Obtaining the exclusive key generated during the handshake process when establishing a connection with this client; Using the exclusive key to encrypt the information in the target information element.
3. The method according to claim 1, wherein, The target information element is stored in a tag-length-value data format; And The encrypting the information in the target information element using the key corresponding to this client includes: Using the key corresponding to this client to encrypt the value in the target information element.
4. The method according to claim 1, wherein, The target information element includes one of the following: a channel switch announcement element, a channel switch encapsulation element, a wideband channel switch element, a mesh network channel switch parameter element, a channel switch time element, a maximum channel switch time element, and a future channel guidance element.
5. The method according to claim 4, wherein When the target information element is a channel switch announcement element, the method further includes: In response to determining that the channel switch is completed, sending a Beacon frame with the destination address being the broadcast address and not carrying the channel switch announcement element in the WiFi network.
6. A method for managing a communication channel, which is executed by a client, includes: Receiving an encrypted management frame sent by a wireless access point AP device, where the encrypted target information element is carried, and the target information element includes an information element related to communication channel management; The encrypted management frame is one of the encrypted management frames obtained by the AP device by setting the destination address of the original management frame to the MAC address of each client among the connected clients and encrypting the information in the above target information element using the key corresponding to this client in the case of determining that there is a client connected to the AP device; Determining whether to process this encrypted management frame according to the destination address of the encrypted management frame; In response to determining to process this encrypted management frame, decrypting the target information element using the pre-stored key; Manage the communication channel according to the decryption result.
7. The method according to claim 6, wherein, Determining whether to process the encrypted management frame according to the destination address of the encrypted management frame includes: When the destination address of the encrypted management frame is the MAC address of the client, determine to process the encrypted management frame.
8. The method according to claim 6, wherein Decrypting the target information element using a pre-stored key includes: Using the exclusive key generated during the handshake process when establishing a connection with the wireless access point AP device to decrypt the target information element.
9. The method according to claim 6, wherein, The encrypted management frame is an encrypted beacon frame, and the target information element is a channel switch announcement element; Managing the communication channel according to the decryption result includes: Perform channel switching according to the decrypted channel switch announcement element.
10. A device for managing a communication channel, disposed in a wireless access point AP device, includes: A construction unit configured to construct an original management frame carrying a target information element, where the target information element includes an information element related to communication channel management; The original management frame is a beacon frame; A determination unit configured to determine whether there is a client establishing a connection with the AP device; A broadcast unit configured to, when it is determined that there is no client establishing a connection with the AP device, set the destination address of the original management frame to a broadcast address and broadcast the original management frame in the WIFI network; An execution unit configured to, when it is determined that there is a client connected to the AP device, perform a preset step for each of the connected clients, where the execution unit includes: A setting module configured to set the destination address of the original management frame to the MAC address of the client; An encryption module configured to encrypt the information in the target information element using the key corresponding to the client to obtain an encrypted management frame; A sending module configured to send the encrypted management frame in the WiFi network for the connected clients in the WiFi network to determine whether to process the received management frame according to the destination address, and the processing includes decrypting the target information element.
11. A device for managing a communication channel, disposed in a client, includes: A receiving unit configured to receive an encrypted management frame sent by a wireless access point AP device, which carries an encrypted target information element, where the target information element includes an information element related to communication channel management; the encrypted management frame is the result of encrypting a beacon frame; the encrypted management frame is one of the encrypted management frames obtained by the AP device when it is determined that there is a client establishing a connection with the AP device, setting the destination address of the original management frame to the MAC address of each of the connected clients, and encrypting the information in the above target information element using the key corresponding to the client; A determination unit configured to determine whether to process the encrypted management frame according to the destination address of the encrypted management frame; A decryption unit, configured to decrypt the target information element using a pre-stored key in response to determining that the encrypted management frame is to be processed; A management unit, configured to manage a communication channel according to a decryption result.
12. A computer-readable storage medium, having stored thereon a computer program, which, when executed by a processor, implements the method according to any one of claims 1-5.
13. A wireless access point AP device, comprising a memory and a processor, characterized in that, Executable code is stored in the memory, and when the processor executes the executable code, the method according to any one of claims 1-5 is implemented.
14. A computer-readable storage medium, having stored thereon a computer program, which, when executed on a computer, causes the computer to execute the method according to any one of claims 6-9.
15. A terminal device, comprising a memory and a processor, characterized in that, Executable code is stored in the memory, and when the processor executes the executable code, the method according to any one of claims 6-9 is implemented.
Citation Information
Patent Citations
Method for protecting management frame based on wireless local area network authentication and privacy infrastructure (WAPI)
CN101986726A
Message identification processing method and device, monitoring device and readable storage medium
CN108282551A
Method for managing data transmission, reception, and communication of frames using wifi
CN109104744A
Wireless communication system and wireless LAN access point
US20030063593A1