Communication System, Method for Generating Network Layer Address, and Related Device
Abstract
Disclosed are a communication system. All nodes in the communication system belong to a same layer 2 network. Well-known information of the layer 2 network can be obtained by the node. The node obtains the well-known information and forms a well-known key based on the well-known information and a preset key derivation algorithm; obtains a local MAC address of a first node and forms a first random number; forms first plaintext data based on the local MAC address and the first random number; and encrypts the first plaintext data based on the well-known key and a symmetric encryption algorithm, to form a first network layer address. Each node forms the well-known key based on the well-known information and the key derivation algorithm, and forms the network layer address based on the well-known key, the local MAC address, and the symmetric encryption algorithm.
Claims
exact text as granted — not AI-modified1 . A communication system comprising:
at least two nodes belonging to a layer 2 network, configured to communicate with each other, and comprising a first node, wherein the at least two nodes are configured to obtain the well-known information, and wherein the first node is configured to:
obtain well-known information of the communication system;
form a well-known key based on the well-known information and a preset key derivation algorithm;
obtain a first media access control (MAC) address of the first node;
form a first random number;
form first plaintext data based on the first MAC address and the first random number;
encrypt the first plaintext data based on the well-known key and a preset symmetric encryption algorithm to obtain first encrypted data; and
form a first network layer address based on the first encrypted data.
2 . The communication system of claim 1 , further comprising a subnet center coupled to the at least two nodes and configured to send a first broadcast message to the at least two nodes, wherein the first broadcast message carries the well-known information, and wherein the first node is further configured to:
receive the first broadcast message from the subnet center; and further obtain the well-known information by parsing the first broadcast message.
3 . The communication system of claim 2 , wherein the subnet center is further configured to:
form a second random number; and send a second broadcast message to the at least two nodes, wherein the second broadcast message carries the second random number, and wherein the first node is further configured to further form the well-known key by:
receiving the second broadcast message from the subnet center;
setting the second random number as a salt of the preset key derivation algorithm; and
forming the well-known key based on the salt.
4 . The communication system of claim 1 , wherein the first node is further configured to:
obtain first information about a routing table, wherein the first information comprises globally unique identifiers of the at least two nodes and target network layer addresses corresponding to the globally unique identifiers; and when the routing table comprises a first target network layer address that is the same as the first network layer address:
form a second random number;
form second plaintext data based on the first MAC address and the second random number;
encrypt the second plaintext data based on the well-known key and the preset symmetric encryption algorithm to obtain second encrypted data; and
form a second network layer address based on the second encrypted data.
5 . The communication system of claim 1 , wherein the at least two nodes further comprise a target node, and wherein the first node is further configured to:
obtain a second network layer address of the target node; and decrypt the second network layer address based on the well-known key and the preset symmetric encryption algorithm to obtain a second MAC address of the target node.
6 . The communication system of claim 5 , wherein the first node is further configured to form a correspondence between the second MAC address and the second network layer address.
7 . The communication system of claim 1 , wherein the at least two nodes further comprise a target node, and wherein the first node is further configured to:
obtain a second MAC address of a target node, wherein the target node is a primary node; and set the second MAC address as the well-known information.
8 . The communication system of claim 7 , wherein the target node is a communication initiator, and wherein the first node is further configured to further set the target node as the primary node in response to the target node being the communication initiator.
9 . The communication system of claim 2 , wherein the well-known information is a second MAC address of the subnet center.
10 . The communication system of claim 2 , wherein the subnet center is a WI-FI access point, and wherein the at least two nodes are stations.
11 . A method implemented by a first node of a layer 2 network, and wherein the method comprises:
obtaining well-known information of the layer 2 network; forming a well-known key based on the well-known information and a preset key derivation algorithm; obtaining a first media access control (MAC) address of the first node, and; forming a first random number; forming first plaintext data based on the first MAC address of the node and the first random number; encrypting the first plaintext data based on the well-known key and a preset symmetric encryption algorithm to obtain first encrypted data; and forming a first network layer address based on the first encrypted data.
12 . The method of claim 11 , further comprising:
receiving a first broadcast message from a subnet center in the layer 2 network, wherein the first broadcast message carries the well-known information; and further obtaining the well-known information by parsing the first broadcast message.
13 . The method of claim 12 , wherein forming the well-known key comprises:
receiving a second broadcast message from the subnet center, wherein the second broadcast message carries a second random number of the subnet center; setting the second random number as a salt of the preset key derivation algorithm; and forming the well-known key based on the salt.
14 . The method of claim 11 , further comprising:
obtaining first information about a routing table, wherein the first information comprises globally unique identifiers of nodes on the layer 2 network and target network layer addresses corresponding to the globally unique identifiers; and when the routing table comprises a first target network layer address that is the same as the first network layer address:
forming a second random number;
forming second plaintext data based on the first MAC address and the second random number;
encrypting the second plaintext data based on the well-known key and the preset symmetric encryption algorithm to obtain second encrypted data; and
forming a second network layer address based on the second encrypted data.
15 . The method of claim 11 , further comprising:
obtaining a second network layer address of a target node on the layer 2 network; and decrypting the second network layer address based on the well-known key and the preset symmetric encryption algorithm to obtain a second MAC address of the target node.
16 . The method of claim 15 , further comprising forming a correspondence between the second MAC address and the second network layer address.
17 . The method of claim 11 , further comprising:
obtaining a second MAC address of a target node, wherein the target node is a primary node; and setting the second MAC address as the well-known information.
18 . The method of claim 17 , wherein the target node is a communication initiator, and wherein setting the target node as the primary node comprises setting the target node as the primary node in response to the target node being the communication initiator.
19 . The method of claim 11 , wherein the first network layer address is an Internet Protocol (IP) version 6 (IPv6) local link address, and wherein forming the first network layer address comprises:
setting high 64 bits of the IPV6 local link address; setting low 64 bits of the IPV6 local link address based on the first encrypted data; and forming the IPV6 local link address based on the high 64 bits and the low 64 bits.
20 . An electronic device comprising:
a memory configured to store instructions; and one or more processors coupled to the memory and configured to execute the instructions to cause the electronic device to:
obtain well-known information of a layer 2 network;
form a well-known key based on the well-known information and a preset key derivation algorithm;
obtain a media access control (MAC) address of the electronic device;
form a random number;
form plaintext data based on the MAC address and the first random number;
encrypt the plaintext data based on the well-known key and a preset symmetric encryption algorithm to obtain encrypted data; and
form a network layer address based on the encrypted data.Join the waitlist — get patent alerts
Track US2024406722A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.