Wireless communication method, station device, and access point device
A wireless communication, a station (STA) device, and an access point (AP) device are disclosed. The method includes: sending, by the STA device, a first frame by a randomized media access control MAC address that is encrypted or signed to the AP device. The first frame is configured to carry a first sequence number, the first sequence number is configured to obtain a MAC address identity recognition key of the STA device by the AP device, and the MAC address identity recognition key is configured to verify the randomized MAC address. Alternatively, the method includes: sending, by a STA device, a first message to an AP device. The first message includes a list of candidate MAC addresses encrypted by a public key of the AP device, and the list of candidate MAC addresses includes at least one randomized MAC address generated by the STA device.
1 . A wireless communication method, comprising:
sending, by a station (STA) device, a first frame by a randomized media access control (MAC) address to an access point (AP) device;
wherein the first frame is configured to carry a first sequence number; the first sequence number is configured to obtain a MAC address identity recognition key of the STA device by the AP device; and the MAC address identity recognition key is configured to verify the randomized MAC address;
wherein the first sequence number is a sequence number randomly selected by the STA device from a set of sequence numbers;
wherein the method further comprises:
receiving, by the STA device, a first message sent from the AP device; wherein the first message comprises sequence number information; and the sequence number information comprises a sequence number in the set of sequence numbers, or the sequence number information comprises a range of sequence numbers, and the range of sequence numbers comprises at least a sequence number in the set of sequence numbers;
wherein the first message is sent through a first authentication frame; and the first authentication frame comprises a first field, and the first field is configured to indicate the sequence number information;
wherein the first field comprises n key sequence fields; each of the n key sequence fields is configured to indicate a sequence number; each of the n key sequence fields corresponds to a sequence number in the sequence number information; and n is a positive integer; or
the first field comprises a lower limit field and an upper limit field; the lower limit field is configured to indicate a starting sequence number in the sequence number information; and the upper limit field is configured to indicate an ending sequence number in the sequence number information.
2 . A station (STA) device, comprising a processor and a memory, wherein the memory is configured to store a computer program; when the computer program stored in the memory is called and run by the processor, the processor is caused to perform a wireless communication method and the method comprises:
sending, by the STA device, a first frame by a randomized media access control (MAC) address to an access point (AP) device;
wherein the first frame is configured to carry a first sequence number; the first sequence number is configured to obtain a MAC address identity recognition key of the STA device by the AP device; and the MAC address identity recognition key is configured to verify the randomized MAC address;
wherein the first sequence number is a sequence number randomly selected by the STA device from a set of sequence numbers;
wherein the method further comprises:
receiving, by the STA device, a first message sent from the AP device; wherein the first message comprises sequence number information; and the sequence number information comprises a sequence number in the set of sequence numbers, or the sequence number information comprises a range of sequence numbers, and the range of sequence numbers comprises at least a sequence number in the set of sequence numbers;
wherein the first message is sent through a first authentication frame; and the first authentication frame comprises a first field, and the first field is configured to indicate the sequence number information;
wherein the first field comprises n key sequence fields; each of the n key sequence fields is configured to indicate a sequence number; each of the n key sequence fields corresponds to a sequence number in the sequence number information; and n is a positive integer; or
the first field comprises a lower limit field and an upper limit field; the lower limit field is configured to indicate a starting sequence number in the sequence number information; and the upper limit field is configured to indicate an ending sequence number in the sequence number information.
3 . The STA device as claimed in claim 2 , wherein the sequence number in the set of sequence numbers corresponds to the MAC address identity recognition key of the STA device; the set of sequence numbers comprises consecutive sequence numbers, or the set of sequence numbers comprises non-consecutive sequence numbers; sequence numbers corresponding to different MAC address identity recognition keys share at least one sequence number, or sequence numbers corresponding to different MAC address identity recognition keys are different.
4 . The STA device as claimed in claim 2 , wherein the first authentication frame comprises a second field; the second field comprises first identification information, second identification information, and third identification information; and the first identification information is configured to indicate whether the first field exists, the second identification information is configured to indicate a type of content in the first field, and the third identification information is configured to indicate the number of sequence numbers indicated by the first field; wherein
in response to the second identification information taking a first value, the second identification information is configured to indicate that the first field comprises a field that is configured to indicate a value of the sequence number; and
in response to the second identification information taking a second value, the second identification information is configured to indicate that the first field comprises a field that is configured to indicate a range of the sequence numbers.
5 . The STA device as claimed in claim 4 , wherein the first field is a key sequence list field, and the second field is a key sequence control field; and the key sequence list field and the key sequence control field belong to a key sequence information field of the first authentication frame.
6 . The STA device as claimed in claim 2 , wherein the set of sequence numbers is assigned by the AP device according to the MAC address identity recognition key of the STA device;
wherein before the receiving, by the STA device, a first message sent from the AP device, the method further comprises:
sending, by the STA device, a second message to the AP device; wherein the second message comprises the MAC address identity recognition key and a public key of the STA device;
wherein the second message is sent through a second authentication frame; the second authentication frame comprises an identity key field, and the identity key field comprises a public key field and an address key field; the public key field is configured to indicate the public key of the STA device, and the address key field is configured to indicate the MAC address identity recognition key.
7 . The STA device as claimed in claim 2 , wherein in response to the STA device sending the first frame to the AP device by the randomized MAC address, the set of sequence numbers is assigned by the AP device according to a public key of the STA device;
wherein before the receiving, by the STA device, a first message sent from the AP device, the method further comprises:
sending, by the STA device, a third message to the AP device; wherein the third message comprises the public key of the STA device;
the third message is sent through a third authentication frame; the third authentication frame comprises an identity key field, and the identity key field comprises a public key field; and the public key field is configured to indicate the public key of the STA device.
8 . The STA device as claimed in claim 2 , wherein the first frame is configured to carry first indication information, and the first indication information is configured to indicate that the AP device needs to perform identity recognition on the STA device;
wherein before the sending, by a STA device, a first frame by a randomized MAC address to an AP device, the method further comprises:
sending, by the STA device, a disassociation frame by a MAC address of the STA device to the AP device; wherein the disassociation frame is configured to disassociate the STA device from the AP device; the disassociation frame comprises a third field, and the third field is configured to indicate that the STA device is about to change the MAC address;
and the third field is a reason code field.
9 . The STA device as claimed in claim 2 , wherein before the sending, by a STA device, a first frame by a randomized MAC address to an AP device, the method further comprises:
sending, by the STA device, a fourth message by a MAC address of the STA device to the AP device; wherein the fourth message is configured to request the AP device to turn on an identity recognition program, or the fourth message is configured to notify the AP device to turn on an identity recognition program;
wherein in response to the AP device turning on the identity recognition program, the AP device verifies the randomized MAC address according to the MAC address identity recognition key.
10 . The STA device as claimed in claim 9 , wherein the STA device receives a fifth message sent from the AP device, and the fifth message is configured to indicate that the AP device turns on the identity recognition program; the fifth message is sent through a third frame; a frame control field of the third frame comprises a fifth field, and the fifth field is configured to indicate that the AP device turns on the identity recognition program; wherein
in a case where the fourth message is configured to request the AP device to turn on the identity recognition program, the third frame is a randomized and changing MAC address (RCM) identify response frame.
11 . The STA device as claimed in claim 9 , wherein the fourth message is sent through a second frame; a frame control field of the second frame comprises a fourth field; and the fourth field is configured to request the AP device to turn on the identity recognition program, or the fourth field is configured to notify the AP device to turn on the identity recognition program; wherein
in a case where the fourth message is configured to request the AP device to turn on the identity recognition program, the second frame is a RCM identify request frame; or
in a case where the fourth message is configured to notify the AP device to turn on the identity recognition program, the second frame is a management frame.
12 . The STA device as claimed in claim 10 , wherein the method further comprises:
in response to the AP device turning on the identity recognition program for a first period of time, the AP device turns off the identity recognition program; or
in response to no randomized MAC address passing verification within a second period of time after the AP device turning on the identity recognition program, the AP device turns off the identity recognition program.
13 . The STA device as claimed in claim 2 , wherein the first frame is one of: an association request frame, a reassociation request frame, and a data frame; and the first frame comprises a key sequence field, and the key sequence field is configured to indicate the first sequence number.
14 . An access point (AP) device, comprising a processor and a memory, wherein the memory is configured to store a computer program; when the computer program stored in the memory is called and run by the processor, the processor is caused to perform a wireless communication method and the method comprises:
receiving, by the AP device, a first frame sent from a station (STA) device by a randomized media access control (MAC) address; wherein the first frame is configured to carry a first sequence number;
obtaining, by the AP device, a MAC address identity recognition key of the STA device according to the first sequence number; and
verifying, by the AP device, the randomized MAC address according to the MAC address identity recognition key;
wherein the first sequence number is a sequence number randomly selected by the STA device from a set of sequence numbers;
wherein the method further comprises:
sending, by the AP device, a first message to the STA device; wherein the first message comprises sequence number information; and the sequence number information comprises a sequence number in the set of sequence numbers, or the sequence number information comprises a range of sequence numbers, and the range of sequence numbers comprises at least a sequence number in the set of sequence numbers;
wherein the first message is sent through a first authentication frame; and the first authentication frame comprises a first field, and the first field is configured to indicate the sequence number information;
wherein the first field comprises n key sequence fields; each of the n key sequence fields is configured to indicate a sequence number; each of the n key sequence fields corresponds to a sequence number in the sequence number information; and n is a positive integer; or
the first field comprises a lower limit field and an upper limit field; the lower limit field is configured to indicate a starting sequence number in the sequence number information; and the upper limit field is configured to indicate an ending sequence number in the sequence number information.
15 . The wireless communication method as claimed in claim 1 , wherein the sequence number in the set of sequence numbers corresponds to the MAC address identity recognition key of the STA device; the set of sequence numbers comprises consecutive sequence numbers, or the set of sequence numbers comprises non-consecutive sequence numbers; sequence numbers corresponding to different MAC address identity recognition keys share at least one sequence number, or sequence numbers corresponding to different MAC address identity recognition keys are different.
16 . The wireless communication method as claimed in claim 1 , wherein the first authentication frame comprises a second field; the second field comprises first identification information, second identification information, and third identification information; and the first identification information is configured to indicate whether the first field exists, the second identification information is configured to indicate a type of content in the first field, and the third identification information is configured to indicate the number of sequence numbers indicated by the first field; wherein
in response to the second identification information taking a first value, the second identification information is configured to indicate that the first field comprises a field that is configured to indicate a value of the sequence number; and
in response to the second identification information taking a second value, the second identification information is configured to indicate that the first field comprises a field that is configured to indicate a range of the sequence numbers.
17 . The wireless communication method as claimed in claim 16 , wherein the first field is a key sequence list field, and the second field is a key sequence control field; and the key sequence list field and the key sequence control field belong to a key sequence information field of the first authentication frame.
18 . The wireless communication method as claimed in claim 1 , wherein the set of sequence numbers is assigned by the AP device according to the MAC address identity recognition key of the STA device;
wherein before the receiving, by the STA device, a first message sent from the AP device, the method further comprises:
sending, by the STA device, a second message to the AP device; wherein the second message comprises the MAC address identity recognition key and a public key of the STA device;
wherein the second message is sent through a second authentication frame; the second authentication frame comprises an identity key field, and the identity key field comprises a public key field and an address key field; the public key field is configured to indicate the public key of the STA device, and the address key field is configured to indicate the MAC address identity recognition key.