Network starting method, communication device and system
By parallel execution of authentication and key distribution during link training, the in-vehicle Ethernet startup method achieves security enhancements without prolonging startup times, adhering to automotive-grade time constraints.
Patent Information
- Application Number
- CN202310655777.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-02
- Publication Date
- 2024-12-03
AI Technical Summary
Existing in-vehicle Ethernet startup processes, when enhanced for security with authentication and key distribution, significantly increase startup time, failing to meet automotive-grade time requirements.
Implementing authentication and/or key distribution during the link training phase of the in-vehicle Ethernet startup process, allowing these security processes to run in parallel with link training, utilizing the reserved fields in training frames to carry security messages.
Ensures secure communication capabilities post-startup without significantly increasing total startup time, meeting automotive-grade startup time requirements.
Smart Images

Figure CN119071777A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Ethernet technology, and in particular to a network startup method, a communication device and a system. Background Art
[0002] With the development and application of technologies such as driver assistance systems, automatic parking, and advanced infotainment systems, users have higher and higher requirements for in-vehicle network bandwidth, which has exceeded the carrying capacity of traditional in-vehicle networks. As a result, in-vehicle Ethernet came into being and has been rapidly developed and applied.
[0003] The existing in-vehicle Ethernet startup process can include system initialization, configuration distribution, link establishment, link training and other processes. As users' demand for network security increases, the in-vehicle Ethernet startup process also needs to add authentication and key distribution processes to improve the security of in-vehicle Ethernet. However, some of the solutions currently proposed will significantly increase the total startup time of in-vehicle Ethernet, making the vehicle startup unable to meet the requirements of automotive-grade startup time, and lack feasibility. Summary of the invention
[0004] The present application provides a network startup method, a communication device and a system for adding an authentication and / or key distribution process to the vehicle Ethernet startup process to improve the security of the vehicle Ethernet.
[0005] In a first aspect, a network startup method is provided, which can be executed by a first device, or by a component of the first device, such as a processor, a chip, or a chip system of the first device, or by a logic module or software that can implement all or part of the functions of the first device. The network startup process may include at least a link training process and a security processing process. The method may include: the first device and the second device transmit a training frame, the training frame carrying a security message. The first device performs link training based on the training frame, and performs security processing based on the security message.
[0006] Based on this solution, the first device and the second device can carry security messages through the training frames used for link training, so that the first device and the second device can perform security processing based on the security messages. This method adds security processing to the network startup process, so that the first device and the second device can have secure communication capabilities after the network is started. In addition, since the security processing process is carried out in parallel with the link training process, the total duration of the network startup process will not be increased too much.
[0007] In combination with the above first aspect, in a possible implementation manner, the security processing may include authentication and / or key distribution.
[0008] In combination with the above first aspect, in a possible implementation manner, the training frame includes an information field, and the first reserved field in the information field can be used to carry a security message.
[0009] Based on this solution, the existing reserved field in the training frame can be used to carry security messages, so that the method can be compatible with the existing network startup process, and the solution can be easily implemented and promoted.
[0010] In combination with the above-mentioned first aspect, in a possible implementation manner, the length of the first reserved field may be an integer multiple of 8 bits.
[0011] Based on this solution, a security message can be completely carried by one or more training frames, which facilitates the division of training frames carrying security messages during the communication process.
[0012] In combination with the above-mentioned first aspect, in a possible implementation manner, the information field may further include a second reserved field, and the second reserved field may be used to indicate whether the training frame is a starting frame corresponding to the security message carried by the first reserved field.
[0013] Based on the scheme, the starting frame carrying the safety message is marked so that the receiver can correctly obtain the safety message from multiple training frames.
[0014] In combination with the first aspect above, in a possible implementation, during the security processing, the first device and the second device need to exchange security messages multiple times. The information field also includes a third reserved field, which is used to indicate the order of the security message carried by the first reserved field in the multiple exchanged security messages.
[0015] Based on this solution, the receiver can accurately identify the progress of the current security processing process, thereby correctly replying to the security message and avoiding errors in the security message of the security processing process interaction.
[0016] In combination with the above first aspect, in a possible implementation manner, one training frame carries one security message, or multiple training frames jointly carry one security message.
[0017] In combination with the first aspect above, in a possible implementation manner, when multiple training frames jointly carry a security message, the multiple training frames are training frames that are transmitted continuously.
[0018] In combination with the first aspect above, in a possible implementation, the security message of the first interaction between the first device and the second device during the security processing is carried in a training frame transmitted based on a preconfigured time. Alternatively, the security message of the first interaction between the first device and the second device during the security processing is carried in a preset training frame.
[0019] Based on this solution, when the first device and the second device start to transmit the safety message can be pre-configured.
[0020] In combination with the first aspect above, in a possible implementation, the first device and the second device transmit training frames, which may specifically include: the first device and the second device continuously transmit multiple training frames, and the multiple training frames carry multiple different security messages. The first device performs link training based on the training frames, and performs security processing based on the security messages, which may specifically include: the first device performs link training based on the multiple training frames, and performs security processing based on the multiple different security messages.
[0021] In combination with the first aspect above, in a possible implementation, the security processing may include authentication. The first device and the second device transmit a training frame, which may include: first, the first device sends at least one first training frame to the second device, at least one first training frame carries a first security message, and the first security message is used to indicate authentication based on PSK. Then, the first device receives at least one second training frame from the second device, at least one second training frame carries a second security message, and the second security message includes a first random number and a first identifier ID. Among them, the first random number is generated by the second device, and the first ID is the ID of the second device. Then, the first device sends at least one third training frame to the second device, at least one third training frame carries a third security message, and the third security message includes a first random number, a second random number, a second ID, a first count value, and first authentication data. Among them, the second random number and the first count value are generated by the first device, and the second ID is the ID of the first device. The first authentication data is obtained by the first device calculating the first random number, the second random number, the first ID, the second ID and the first count value according to the preconfigured algorithm and the key, and the first authentication data is used for the second device to authenticate the first device. Then, the first device receives at least one fourth training frame from the second device, the at least one fourth training frame carries a fourth security message, and the fourth security message includes a second random number, a first count value, and second authentication data. The second authentication data is obtained by the second device by calculating the second random number, the second ID, and the first count value according to a preconfigured algorithm and key, and the second authentication data is used by the first device to authenticate the second device. The preconfigured algorithms and keys of the first device and the second device are the same.
[0022] Based on this solution, the first device and the second device can complete the PSK-based authentication process by transmitting a training frame.
[0023] In combination with the first aspect above, in a possible implementation, the security processing may include authentication. The first device and the second device transmit a training frame, which may include. First, the first device sends at least one fifth training frame to the second device, at least one fifth training frame carries a fifth security message, and the fifth security message is used to indicate authentication based on a password. Then, the first device receives at least one sixth training frame from the second device, at least one sixth training frame carries a sixth security message, and the sixth security message includes a third random number, a first ID, a second count value, and third authentication data. Among them, the third random number and the second count value are generated by the second device, and the first ID is the ID of the second device. The third authentication data is obtained by the second device calculating the third random number, the first ID, and the second count value according to a preconfigured algorithm and a password, and the third authentication data is used for the first device to authenticate the second device. Then, the first device sends at least one seventh training frame to the second device, at least one seventh training frame carries a seventh security message, and the seventh security message includes a third random number, a fourth random number, a second ID, a second count value, and a fourth authentication data. Among them, the fourth random number is generated by the first device, and the second ID is the ID of the first device. The fourth authentication data is obtained by the first device calculating the third random number, the fourth random number, the first ID, the second ID and the second count value according to the preconfigured algorithm and password, and the fourth authentication data is used by the second device to authenticate the first device. The preconfigured algorithm and password of the first device and the second device are the same.
[0024] Based on this solution, the first device and the second device can complete the password-based authentication process by transmitting a training frame.
[0025] In combination with the above-mentioned first aspect, in a possible implementation, the security processing may include key distribution. The first device and the second device transmit training frames, and may also include. First, the first device receives at least one eighth training frame from the second device, at least one eighth training frame carries an eighth security message, and the eighth security message includes a start mark, a first ID, and a first security capability parameter. Among them, the start mark is used to indicate the start of key distribution, the first ID is the ID of the second device, and the first security capability parameter is the security capability parameter of the second device. Then, the first device sends at least one ninth training frame to the second device, at least one ninth training frame carries a ninth security message, and the ninth security message includes a second ID, a second security capability parameter and a security association key SAK. Among them, the second ID is the ID of the first device, the second security capability parameter is a security capability parameter determined by the first device for the first device to communicate with the second device, and SAK is a key determined by the first device for the first device to communicate with the second device.
[0026] Based on this solution, the first device and the second device can complete the key distribution process authentication process by transmitting a training frame.
[0027] In a second aspect, a network startup method is provided, which can be executed by a second device, or by a component of the second device, such as a processor, a chip, or a chip system of the second device, or by a logic module or software that can implement all or part of the functions of the second device. The network startup process may include at least a link training process and a security processing process. The method may include: the second device transmits a training frame with the first device, and the training frame carries a security message. The second device performs link training based on the training frame, and performs security processing based on the security message.
[0028] In combination with the above second aspect, in a possible implementation manner, the security processing may include authentication and / or key distribution.
[0029] In combination with the above second aspect, in a possible implementation manner, the training frame includes an information field, and the first reserved field in the information field can be used to carry a security message.
[0030] In combination with the above second aspect, in a possible implementation manner, the length of the first reserved field may be an integer multiple of 8 bits.
[0031] In combination with the above second aspect, in a possible implementation, the information field may further include a second reserved field, and the second reserved field may be used to indicate whether the training frame is a starting frame corresponding to a security message carried by the first reserved field.
[0032] In combination with the above second aspect, in a possible implementation, during the security processing, the second device and the first device need to exchange security messages multiple times. The information field also includes a third reserved field, which is used to indicate the order of the security message carried by the first reserved field in the multiple exchanged security messages.
[0033] In combination with the above second aspect, in a possible implementation manner, one training frame carries one security message, or multiple training frames jointly carry one security message.
[0034] In combination with the second aspect above, in a possible implementation manner, when multiple training frames jointly carry a security message, the multiple training frames are training frames that are transmitted continuously.
[0035] In combination with the above second aspect, in a possible implementation, the security message of the first interaction between the second device and the first device during the security processing is carried in a training frame transmitted based on a preconfigured time. Alternatively, the security message of the first interaction between the second device and the first device during the security processing is carried in a preset training frame.
[0036] In combination with the above-mentioned second aspect, in a possible implementation, the second device and the first device transmit training frames, which may specifically include: the second device and the first device continuously transmit multiple training frames, and the multiple training frames carry multiple different security messages. The second device performs link training based on the training frames, and performs security processing based on the security messages, which may specifically include: the second device performs link training based on the multiple training frames, and performs security processing based on the multiple different security messages.
[0037] In combination with the above second aspect, in a possible implementation, the security processing may include authentication. The second device and the first device transmit a training frame, which may include. First, the second device receives at least one first training frame from the first device, at least one first training frame carries a first security message, and the first security message is used to indicate authentication based on PSK. Then, the second device sends at least one second training frame to the first device, at least one second training frame carries a second security message, and the second security message includes a first random number and a first identifier ID. Among them, the first random number is generated by the second device, and the first ID is the ID of the second device. Then, the second device receives at least one third training frame from the first device, at least one third training frame carries a third security message, and the third security message includes a first random number, a second random number, a second ID, a first count value, and first authentication data. Among them, the second random number and the first count value are generated by the first device, and the second ID is the ID of the first device. The first authentication data is obtained by the first device calculating the first random number, the second random number, the first ID, the second ID and the first count value according to the preconfigured algorithm and the key, and the first authentication data is used for the second device to authenticate the first device. Then, the second device sends at least one fourth training frame to the first device, and the at least one fourth training frame carries a fourth security message, and the fourth security message includes a second random number, a first count value, and second authentication data. The second authentication data is obtained by the second device by calculating the second random number, the second ID, and the first count value according to a preconfigured algorithm and key, and the second authentication data is used by the first device to authenticate the second device. The preconfigured algorithms and keys of the first device and the second device are the same.
[0038] In combination with the above second aspect, in a possible implementation, the security processing may include authentication. The second device and the first device transmit a training frame, which may include. First, the second device receives at least one fifth training frame from the first device, at least one fifth training frame carries a fifth security message, and the fifth security message is used to indicate authentication based on a password. Then, the second device sends at least one sixth training frame to the first device, at least one sixth training frame carries a sixth security message, and the sixth security message includes a third random number, a first ID, a second count value, and a third authentication data. Among them, the third random number and the second count value are generated by the second device, and the first ID is the ID of the second device. The third authentication data is obtained by the second device calculating the third random number, the first ID, and the second count value according to a preconfigured algorithm and a password, and the third authentication data is used for the first device to authenticate the second device. Then, the second device receives at least one seventh training frame from the first device, at least one seventh training frame carries a seventh security message, and the seventh security message includes a third random number, a fourth random number, a second ID, a second count value, and a fourth authentication data. Among them, the fourth random number is generated by the first device, and the second ID is the ID of the first device. The fourth authentication data is obtained by the first device calculating the third random number, the fourth random number, the first ID, the second ID and the second count value according to the preconfigured algorithm and password, and the fourth authentication data is used by the second device to authenticate the first device. The preconfigured algorithm and password of the first device and the second device are the same.
[0039] In combination with the above-mentioned second aspect, in a possible implementation, the security processing may include key distribution. The second device transmits a training frame with the first device, and may also include: first, the second device sends at least one eighth training frame to the first device, at least one eighth training frame carries an eighth security message, and the eighth security message includes a start mark, a first ID, and a first security capability parameter. Among them, the start mark is used to indicate the start of key distribution, the first ID is the ID of the second device, and the first security capability parameter is the security capability parameter of the second device. Then, the second device receives at least one ninth training frame from the second device, at least one ninth training frame carries a ninth security message, and the ninth security message includes a second ID, a second security capability parameter, and a security association key SAK. Among them, the second ID is the ID of the first device, the second security capability parameter is a security capability parameter determined by the first device for the first device to communicate with the second device, and SAK is a key determined by the first device for the first device to communicate with the second device.
[0040] Among them, the technical effects of the above-mentioned second aspect and its various implementation methods can refer to the above-mentioned first aspect and will not be repeated here.
[0041] In a third aspect, the present application provides a communication device, which may be the first device of the first aspect above, or a chip or chip system in the first device of the first aspect above, or a functional module in the first device of the first aspect above. The communication device can implement the functions performed by the first device in any possible design of the first aspect above, and the functions can be implemented by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions. For example, the communication device may include: a transceiver module and a processing module. Among them, the transceiver module can be used to transmit a training frame with a second device, and the training frame carries a security message. The processing module can be used to perform link training based on the training frame, and perform security processing based on the security message.
[0042] In combination with the third aspect, in a possible implementation, the transceiver module transmits a training frame with the second device, which may specifically include: the transceiver module continuously transmits multiple training frames with the second device, and the multiple training frames carry multiple different security messages. The processing module performs link training based on the training frames, and performs security processing based on the security messages, which may specifically include: the processing module performs link training based on the multiple training frames, and performs security processing based on the multiple different security messages.
[0043] In combination with the third aspect above, in a possible implementation, the security processing may include authentication. The transceiver module transmits a training frame with the second device, which may include: first, the transceiver module sends at least one first training frame to the second device, at least one first training frame carries a first security message, and the first security message is used to indicate authentication based on PSK. Then, the transceiver module receives at least one second training frame from the second device, at least one second training frame carries a second security message, and the second security message includes a first random number and a first identifier ID. Among them, the first random number is generated by the second device, and the first ID is the ID of the second device. Then, the transceiver module sends at least one third training frame to the second device, at least one third training frame carries a third security message, and the third security message includes a first random number, a second random number, a second ID, a first count value, and first authentication data. Among them, the second random number and the first count value are generated by the transceiver module, and the second ID is the ID of the transceiver module. The first authentication data is obtained by the transceiver module calculating the first random number, the second random number, the first ID, the second ID and the first count value according to the preconfigured algorithm and the key, and the first authentication data is used for the second device to authenticate the transceiver module. Then, the transceiver module receives at least one fourth training frame from the second device, and the at least one fourth training frame carries a fourth security message, and the fourth security message includes a second random number, a first count value, and second authentication data. The second authentication data is obtained by the second device by calculating the second random number, the second ID, and the first count value according to a preconfigured algorithm and key, and the second authentication data is used by the transceiver module to authenticate the second device. The algorithm and key preconfigured by the transceiver module and the second device are the same.
[0044] In combination with the third aspect above, in a possible implementation, the security processing may include authentication. The transceiver module transmits a training frame with the second device, which may include: first, the transceiver module sends at least one fifth training frame to the second device, at least one fifth training frame carries a fifth security message, and the fifth security message is used to indicate authentication based on a password. Then, the transceiver module receives at least one sixth training frame from the second device, at least one sixth training frame carries a sixth security message, and the sixth security message includes a third random number, a first ID, a second count value, and a third authentication data. Among them, the third random number and the second count value are generated by the second device, and the first ID is the ID of the second device. The third authentication data is obtained by the second device calculating the third random number, the first ID, and the second count value according to a preconfigured algorithm and a password, and the third authentication data is used for the transceiver module to authenticate the second device. Then, the transceiver module sends at least one seventh training frame to the second device, at least one seventh training frame carries a seventh security message, and the seventh security message includes a third random number, a fourth random number, a second ID, a second count value, and a fourth authentication data. Among them, the fourth random number is generated by the transceiver module, and the second ID is the ID of the transceiver module. The fourth authentication data is obtained by the transceiver module calculating the third random number, the fourth random number, the first ID, the second ID and the second count value according to the preconfigured algorithm and the password, and the fourth authentication data is used by the second device to authenticate the transceiver module. The algorithm and password preconfigured by the transceiver module and the second device are the same.
[0045] In combination with the third aspect above, in a possible implementation, security processing may include key distribution. The transceiver module transmits a training frame with the second device, and may also include: first, the transceiver module receives at least one eighth training frame from the second device, at least one eighth training frame carries an eighth security message, and the eighth security message includes a start mark, a first ID, and a first security capability parameter. Among them, the start mark is used to indicate the start of key distribution, the first ID is the ID of the second device, and the first security capability parameter is the security capability parameter of the second device. Then, the transceiver module sends at least one ninth training frame to the second device, at least one ninth training frame carries a ninth security message, and the ninth security message includes a second ID, a second security capability parameter, and a security association key SAK. Among them, the second ID is the ID of the transceiver module, the second security capability parameter is a security capability parameter determined by the transceiver module for the transceiver module to communicate with the second device, and SAK is a key determined by the transceiver module for the transceiver module to communicate with the second device.
[0046] In a fourth aspect, the present application provides a communication device, which may be the first device of the second aspect, or a chip or chip system in the first device of the second aspect, or a functional module in the first device of the second aspect. The communication device can implement the function performed by the first device in any possible design of the second aspect, and the function can be implemented by hardware executing the corresponding software. The hardware or software includes one or more modules corresponding to the above functions. For example, the communication device may include: a transceiver module and a processing module. The transceiver module transmits a training frame with the first device, and the training frame carries a security message. The processing module performs link training based on the training frame, and performs security processing based on the security message.
[0047] In combination with the fourth aspect, in a possible implementation, the transceiver module transmits a training frame with the first device, which may specifically include: the transceiver module continuously transmits multiple training frames with the first device, and the multiple training frames carry multiple different security messages. The transceiver module performs link training based on the training frames and performs security processing based on the security messages, which may specifically include: the transceiver module performs link training based on the multiple training frames and performs security processing based on the multiple different security messages.
[0048] In combination with the fourth aspect above, in a possible implementation, the security processing may include authentication. The transceiver module transmits a training frame with the first device, which may include: first, the transceiver module receives at least one first training frame from the first device, at least one first training frame carries a first security message, and the first security message is used to indicate authentication based on PSK. Then, the transceiver module sends at least one second training frame to the first device, at least one second training frame carries a second security message, and the second security message includes a first random number and a first identifier ID. Among them, the first random number is generated by the transceiver module, and the first ID is the ID of the transceiver module. Then, the transceiver module receives at least one third training frame from the first device, at least one third training frame carries a third security message, and the third security message includes a first random number, a second random number, a second ID, a first count value, and first authentication data. Among them, the second random number and the first count value are generated by the first device, and the second ID is the ID of the first device. The first authentication data is obtained by the first device calculating the first random number, the second random number, the first ID, the second ID and the first count value according to the preconfigured algorithm and the key, and the first authentication data is used for the transceiver module to authenticate the first device. Then, the transceiver module sends at least one fourth training frame to the first device, and the at least one fourth training frame carries a fourth security message, and the fourth security message includes a second random number, a first count value, and a second authentication data. The second authentication data is obtained by the transceiver module by calculating the second random number, the second ID, and the first count value according to a preconfigured algorithm and key, and the second authentication data is used by the first device to authenticate the transceiver module. The first device and the transceiver module have the same preconfigured algorithm and key.
[0049] In combination with the fourth aspect above, in a possible implementation, the security processing may include authentication. The transceiver module transmits a training frame with the first device, which may include: first, the transceiver module receives at least one fifth training frame from the first device, at least one fifth training frame carries a fifth security message, and the fifth security message is used to indicate authentication based on a password. Then, the transceiver module sends at least one sixth training frame to the first device, at least one sixth training frame carries a sixth security message, and the sixth security message includes a third random number, a first ID, a second count value, and a third authentication data. Among them, the third random number and the second count value are generated by the transceiver module, and the first ID is the ID of the transceiver module. The third authentication data is obtained by the transceiver module calculating the third random number, the first ID, and the second count value according to the preconfigured algorithm and the password, and the third authentication data is used for the first device to authenticate the transceiver module. Then, the transceiver module receives at least one seventh training frame from the first device, at least one seventh training frame carries a seventh security message, and the seventh security message includes a third random number, a fourth random number, a second ID, a second count value, and a fourth authentication data. Among them, the fourth random number is generated by the first device, and the second ID is the ID of the first device. The fourth authentication data is obtained by the first device calculating the third random number, the fourth random number, the first ID, the second ID and the second count value according to the preconfigured algorithm and password, and the fourth authentication data is used by the transceiver module to authenticate the first device. The algorithm and password preconfigured by the first device and the transceiver module are the same.
[0050] In combination with the fourth aspect above, in a possible implementation, security processing may include key distribution. The transceiver module transmits a training frame with the first device, and may also include: first, the transceiver module sends at least one eighth training frame to the first device, at least one eighth training frame carries an eighth security message, and the eighth security message includes a start mark, a first ID, and a first security capability parameter. Among them, the start mark is used to indicate the start of key distribution, the first ID is the ID of the transceiver module, and the first security capability parameter is the security capability parameter of the transceiver module. Then, the transceiver module receives at least one ninth training frame from the transceiver module, at least one ninth training frame carries a ninth security message, and the ninth security message includes a second ID, a second security capability parameter, and a security association key SAK. Among them, the second ID is the ID of the first device, the second security capability parameter is a security capability parameter determined by the first device for the first device to communicate with the transceiver module, and SAK is a key determined by the first device for the first device to communicate with the transceiver module.
[0051] In a fifth aspect, a communication device is provided, comprising: a processor and a communication interface; the communication interface can be used to perform the receiving and sending operations in the network startup method of the first aspect, and the processor is used to perform the processing or control operations in the network startup method of the first aspect. Alternatively, the communication interface is used to perform the receiving and sending operations in the network startup method of the second aspect, and the processor is used to perform the processing or control operations in the network startup method of the second aspect.
[0052] In a sixth aspect, a communication device is provided, comprising: a processor and a memory; the memory is used to store computer instructions, and when the communication device is running, the processor executes the computer instructions stored in the memory to enable the communication device to perform a network startup method as described in any one of the first aspect or the second aspect above.
[0053] In conjunction with the sixth aspect, in a possible implementation, the communication device further includes a communication interface; the communication interface is used for the communication device to communicate with other devices. Exemplarily, the communication interface can be a transceiver, an input / output interface, an interface circuit, an output circuit, an input circuit, a pin or a related circuit, etc.
[0054] In a seventh aspect, a communication device is provided, comprising: a processor; the processor is used to couple with a memory, and after reading instructions in the memory, can execute a network startup method as described in any one of the first aspect or the second aspect according to the instructions.
[0055] In conjunction with the seventh aspect, in a possible implementation, the communication device further includes a communication interface; the communication interface is used for the communication device to communicate with other devices. Exemplarily, the communication interface can be a transceiver, an input / output interface, an interface circuit, an output circuit, an input circuit, a pin or a related circuit, etc.
[0056] In an eighth aspect, a chip is provided, comprising: a processor, the processor being coupled to a memory, the memory being used to store programs or instructions, and when the programs or instructions are executed by the processor, the chip executes the network startup method described in any one of the first aspect or the second aspect.
[0057] In a ninth aspect, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is executed on a computer, the computer can execute the network startup method described in any one of the first aspect or the second aspect.
[0058] In a tenth aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the network startup method described in any one of the first aspect or the second aspect.
[0059] In an eleventh aspect, a communication system is provided, which may include a first device and a second device, the first device may execute any of the network startup methods described in the first aspect, and the second device may execute any of the network startup methods described in the first aspect.
[0060] Among them, the technical effects brought about by any design method in the third aspect to the eleventh aspect can refer to the technical effects brought about by different design methods in the first aspect or the second aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 A schematic diagram of a vehicle Ethernet startup process provided in an embodiment of the present application;
[0062] Figure 2 A schematic diagram of another in-vehicle Ethernet startup process provided in an embodiment of the present application;
[0063] Figure 3 A schematic diagram of another in-vehicle Ethernet startup process provided in an embodiment of the present application;
[0064] Figure 4 A schematic diagram of a communication system provided in an embodiment of the present application;
[0065] Figure 5 A schematic diagram of an in-vehicle Ethernet provided in an embodiment of the present application;
[0066] Figure 6 A schematic diagram of the structure of a communication device provided in an embodiment of the present application;
[0067] Figure 7 A flowchart of a network startup method provided in an embodiment of the present application;
[0068] Figure 8 A schematic diagram of a frame structure of an information field of a training frame provided in an embodiment of the present application;
[0069] Fig. 9 A schematic diagram of the division of 21-bit reserved bits in the information field of a training frame provided in an embodiment of the present application;
[0070] Fig.10 A schematic diagram of a link training phase in a vehicle Ethernet startup process provided by an embodiment of the present application;
[0071] Fig.11 A schematic diagram of a state change of a device provided in an embodiment of the present application;
[0072] Fig.12 A schematic diagram of a process of transmitting a training frame between a first device and a second device provided in an embodiment of the present application;
[0073] Fig.13 A schematic diagram of a first training frame carrying a first security message provided in an embodiment of the present application;
[0074] Fig.14 A schematic diagram of a second training frame carrying a second security message provided in an embodiment of the present application;
[0075] Fig.15 A schematic diagram of a third training frame carrying a third security message provided in an embodiment of the present application;
[0076] Fig.16 A schematic diagram of a fourth training frame carrying a fourth security message provided in an embodiment of the present application;
[0077] Fig.17 A schematic diagram of a tenth training frame carrying a tenth security message provided in an embodiment of the present application;
[0078] Fig.18 A schematic diagram of an eleventh training frame carrying an eleventh security message provided in an embodiment of the present application;
[0079] Fig.19 A schematic diagram of another process of transmitting a training frame between a first device and a second device provided in an embodiment of the present application;
[0080] Fig. 20 A schematic diagram of a fifth training frame carrying a fifth security message provided in an embodiment of the present application;
[0081] Fig.21 A schematic diagram of a sixth training frame carrying a sixth security message provided in an embodiment of the present application;
[0082] Fig. 22 A schematic diagram of a seventh training frame carrying a seventh security message provided in an embodiment of the present application;
[0083] Fig.23 A schematic diagram of a twelfth training frame carrying a twelfth safety message provided in an embodiment of the present application;
[0084] Fig.24 A schematic diagram of a process of transmitting a training frame between a first device and a second device provided in another embodiment of the present application;
[0085] Fig.25 A schematic diagram of an eighth training frame carrying an eighth security message provided in an embodiment of the present application;
[0086] Fig.26 A schematic diagram of a ninth training frame carrying a ninth security message provided in an embodiment of the present application;
[0087] Fig. 27 A schematic diagram of a thirteenth training frame carrying a thirteenth safety message provided in an embodiment of the present application;
[0088] Fig.28 A schematic diagram of a fourteenth training frame carrying a fourteenth safety message provided in an embodiment of the present application;
[0089] Fig.29 A schematic diagram of a process of transmitting a training frame between a first device and a second device provided in another embodiment of the present application;
[0090] Fig.30 A schematic diagram of the structure of another communication device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0091] To facilitate understanding, first, a brief introduction is given to the technical terms and related technologies involved in this application.
[0092] Ethernet is the most common communication protocol standard used in the existing local area network. This standard defines the cable types and signal processing methods used in the local area network. Ethernet transmits information packets at a rate of 10 to 100 million bits per second (Mbps) between interconnected devices. Twisted pair cable 10Base T Ethernet has become the most widely used Ethernet technology due to its low cost, high reliability and 10Mbps rate.
[0093] As the name implies, automotive Ethernet is an in-vehicle network based on Ethernet technology. It mainly focuses on in-vehicle networking, that is, the communication between various electronic control units (ECUs) in the car. Its emergence meets the demand for high-bandwidth data in the in-vehicle network. It should be understood that with the development and application of technologies such as driver assistance systems, automatic parking, and advanced infotainment systems, the current requirements for in-vehicle network bandwidth are getting higher and higher, which has exceeded the carrying capacity of traditional vehicle networks. This has led to the application of Ethernet in the field of in-vehicle networks and has developed rapidly.
[0094] Figure 1 A schematic diagram of a vehicle Ethernet startup process is shown in FIG. Figure 1As shown in the figure, the current automotive Ethernet startup process mainly includes the following stages: system initialization stage, configuration sending stage, link establishment stage, and link training stage. Among them, the configuration sending stage can also be called the host configuration stage (HCS). According to the data in the relevant test report, the system initialization stage of the automotive Ethernet startup process takes 7 milliseconds (millisecond, ms), the configuration sending stage takes 5ms, and the link establishment and link training process takes a total of 40 milliseconds. Continue to refer to Figure 1 The in-vehicle Ethernet startup process takes a total of 52ms.
[0095] However, the current in-vehicle Ethernet startup process does not include secure startup functions (such as authentication, key distribution, etc.), so there are security risks when using the in-vehicle Ethernet after startup, which may not meet the security needs of some customers.
[0096] To meet security requirements, one possible implementation is to add existing standardized security mechanisms in the field of automotive Ethernet, such as MACsec defined in the Institute of Electrical and Electronics Engineers (IEEE) 802.1AE and IEEE 802.1X, which includes authentication, key distribution, and encryption processes. For example, Figure 2 A schematic diagram of another in-vehicle Ethernet startup process is shown, such as Figure 2 As shown, after the link training phase of the vehicle Ethernet startup process is completed, authentication and key distribution are continued, so that the started vehicle Ethernet can have a security encryption function.
[0097] However, after adding the security mechanism, the startup time of the automotive Ethernet becomes longer, which will exceed the requirements of the automotive-grade startup time. According to relevant test data, it takes 27ms to implement the authentication process in the automotive Ethernet, and it takes 29ms to implement the key distribution process. Figure 2 , when the authentication and key distribution process is added to the automotive Ethernet startup process, the automotive Ethernet startup process takes a total of 108ms. The current automotive-grade startup time requires that the vehicle network needs less than 100ms from power-on to network availability. In other words, if the authentication and key distribution process is added to the automotive Ethernet startup process, the automotive-grade startup time requirement cannot be met.
[0098] In order to meet the time requirements for vehicle network startup specified by industry standards, the embodiment of the present application provides a network startup method, which implements authentication and / or key distribution during the link training phase of the vehicle Ethernet startup process, so that the vehicle Ethernet after startup has security encryption functions. In addition, since authentication and / or key distribution are implemented during the link training phase, there is no need to allocate additional time for authentication and / or key distribution, so that the startup of the vehicle Ethernet meets the requirements of vehicle-grade startup time.
[0099] It should be understood that the authentication and / or key distribution is implemented during the link training phase, and it can be considered that the authentication and / or key distribution process is performed in parallel with the link training process. For example, Figure 3 This is a schematic diagram of another in-vehicle Ethernet startup process, such as Figure 3 As shown, at least part of the authentication and / or key distribution process can be performed in parallel with the link training process, so that the link training time can cover part of the authentication and / or key distribution time. Figure 3 In the example of FIG, the total duration of link establishment, link training, and authentication and / or key distribution may be 50 ms, and the total duration of the entire automotive Ethernet startup process is 62 ms. Figure 2 Compared with the in-vehicle Ethernet startup process shown in Figure 3 The total time required for the Automotive Ethernet startup sequence is shown to be shortened.
[0100] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. Among them, in the description of the present application, unless otherwise specified, " / " indicates that the objects associated before and after are in an "or" relationship, for example, A / B can represent A or B; "and / or" in the present application is only a description of the association relationship of the associated objects, indicating that there can be three relationships, for example, A and / or B, which can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. And, in the description of the present application, unless otherwise specified, "multiple" refers to two or more than two. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple. In addition, in order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second" and the like are used to distinguish the same items or similar items with substantially the same functions and effects. Those skilled in the art will understand that the words "first", "second" and the like do not limit the quantity and execution order, and the words "first", "second" and the like do not necessarily limit the differences. At the same time, in the embodiments of the present application, the words "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or design solutions. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete manner for ease of understanding.
[0101] Before introducing the network startup method provided in the embodiment of the present application, the communication system / service scenario to which the network startup method of the present application is applied is first introduced.
[0102] Figure 4 A schematic diagram of a communication system provided in an embodiment of the present application is shown in FIG. Figure 4 As shown, the communication system may include a first device 401 and a second device 402 , and the first device 401 is connected to the second device 402 .
[0103] Optionally, Figure 4 The communication system shown may be an in-vehicle Ethernet, and the first device 401 and the second device 402 may be in-vehicle devices in the in-vehicle Ethernet (such as an in-vehicle gateway, an in-vehicle terminal, various ECUs, etc.). Figure 4 The first device 401 or the second device 402 in the communication system shown may execute Figures 1 to 3 The startup process of the in-vehicle Ethernet is shown in FIG.
[0104] The network startup method provided in the embodiment of the present application can be applied to the above Figure 4 The first device 401 or the second device 402 in the communication system is shown. For specific implementation, reference may be made to the following method embodiment, which will not be described in detail here.
[0105] Figure 5 A schematic diagram of an in-vehicle Ethernet provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, the in-vehicle Ethernet may include a main control unit 501, which may be connected to an advanced driving assistance system (ADAS) unit 502, a body control unit 503, a powertrain unit 504, a chassis control unit 505, and an entertainment control unit 506. The ADAS 502 may be connected to devices such as a camera 507, an in-vehicle radar 508, and a satellite navigation system 509. The entertainment control unit 506 may be connected to devices such as a display 510, a speaker 511, and a television (TV) 512.
[0106] Optionally, Figure 4 The communication system shown may be an in-vehicle Ethernet, and the first device 401 and the second device 402 may be Figure 5 For example, the first device 401 may be an ADAS 502, and the second device 402 may be a camera 507, a vehicle-mounted radar 508, or a satellite navigation 509. Alternatively, the first device 401 may be an entertainment control unit 506, and the second device 402 may be a display 510, a speaker 511, or a TV 512. Alternatively, the first device 401 may be a main control unit 501, and the second device 402 may be an ADAS unit 502, a body control unit 503, a powertrain unit 504, a chassis control unit 505, or an entertainment control unit 506.
[0107] The network startup method provided in the embodiment of the present application can be applied to the above Figure 5 The various units in the vehicle Ethernet shown are connected so that the various units establish a communication link. The specific implementation can refer to the following method embodiment, which will not be repeated here.
[0108] It should be noted that Figure 5 The illustrated in-vehicle Ethernet architecture is merely exemplary, and the in-vehicle Ethernet architectures of vehicles produced by different automobile manufacturers and brands may be different.
[0109] It should be understood that the network architecture and business scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Ordinary technicians in this field can know that with the evolution of network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0110] Optionally, in the embodiment of the present application, the first device and the second device may be a communication device, and the first device and the second device may adopt Figure 6 The structure shown or includes Figure 6 Parts shown. Figure 6 A schematic diagram of the structure of a communication device provided in an embodiment of the present application is shown in FIG. Figure 6 As shown, the communication device 60 includes one or more processors 601, a communication line 602, and at least one communication interface ( Figure 6 The communication interface 603 and a processor 601 are used as examples for illustration only. Optionally, a memory 604 may also be included.
[0111] The processor 601 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application.
[0112] Communication link 602 may include a pathway for communication between different components.
[0113] The communication interface 603 may be a transceiver module for communicating with other devices or communication networks, such as Ethernet, RAN, wireless local area networks (WLAN), etc. For example, the transceiver module may be a device such as a transceiver or a transceiver. Optionally, the communication interface 603 may also be a transceiver circuit located in the processor 601 to implement signal input and signal output of the processor.
[0114] The memory 604 may be a device with a storage function. For example, it may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory may exist independently and be connected to the processor via a communication line 602. The memory may also be integrated with the processor.
[0115] The memory 604 is used to store computer-executable instructions for executing the solution of the present application, and the execution is controlled by the processor 601. The processor 601 is used to execute the computer-executable instructions stored in the memory 604, thereby realizing the multi-hop transmission method provided in the embodiment of the present application.
[0116] Alternatively, optionally, in an embodiment of the present application, the processor 601 may also perform processing-related functions in the multi-hop transmission method provided in the following embodiments of the present application, and the communication interface 603 is responsible for communicating with other devices or communication networks, which is not specifically limited in the embodiments of the present application.
[0117] Optionally, the computer-executable instructions in the embodiments of the present application may also be referred to as application code, which is not specifically limited in the embodiments of the present application.
[0118] In a specific implementation, as an embodiment, the processor 601 may include one or more CPUs, such as Figure 6 CPU0 and CPU1 in.
[0119] In a specific implementation, as an embodiment, the communication device 60 may include multiple processors, such as Figure 6601 and processor 607 in the embodiment. Each of these processors may be a single-core processor or a multi-core processor. The processors here may include but are not limited to at least one of the following: a central processing unit (CPU), a microprocessor, a digital signal processor (DSP), a microcontroller unit (MCU), or an artificial intelligence processor and other computing devices running software, each of which may include one or more cores for executing software instructions to perform calculations or processing.
[0120] In a specific implementation, as an embodiment, the communication device 60 may further include an output device 605 and an input device 606. The output device 605 communicates with the processor 601 and may display information in a variety of ways. For example, the output device 605 may be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector. The input device 606 communicates with the processor 601 and may receive user input in a variety of ways. For example, the input device 606 may be a mouse, a keyboard, a touch screen device, or a sensor device.
[0121] The communication device 60 may also be referred to as a communication device, which may be a general device or a dedicated device. For example, the communication device 60 may be a network device such as a router, a switch, a gateway, or a terminal device, or a controller in a network, or a device having Figure 6 The embodiment of the present application does not limit the type of the communication device 60.
[0122] The following will be combined Figures 1 to 6 , describes the network startup method provided in the embodiment of the present application. The actions, terms, etc. involved in the various embodiments of the present application can refer to each other without limitation. The message name or parameter name in the message in the embodiment of the present application is only an example, and other names can also be used in the specific implementation without limitation.
[0123] Figure 7 The flowchart of a network startup method provided in an embodiment of the present application is applied to a network startup process, and the network startup process may include at least a link training process and a security processing process. Figure 7 As shown, the network startup method may include the following steps:
[0124] Step 701: A first device and a second device transmit a training frame, where the training frame carries a security message.
[0125] Among them, a training frame can be used for link training, and its frame format and the information carried for link training can refer to those described in the existing standards. Optionally, the first device and the second device transmit a training frame, which may include: the first device sends a training frame to the second device, and the second device sends a training frame to the first device. It should be understood that the training frame is defined based on the function of the frame to have link training, and the frames for link training transmitted between the first device and the second device can all be called training frames. The present application does not limit the content of the training frames to be the same. For example, the training frame sent by the first device to the second device may be different from the training frame sent by the second device to the first device, the multiple training frames sent by the first device to the second device may be different, and the multiple training frames sent by the second device to the first device may be different.
[0126] Optionally, a plurality of training frames may be continuously transmitted between the first device and the second device. For example, the first device may continuously send training frames to the second device, and the second device may also continuously send training frames to the first device.
[0127] Optionally, the process of the first device sending a training frame to the second device is independently performed from the process of the second device sending a training frame to the first device, which is described here. For example, the process of the first device sending a training frame to the second device is independently performed from the process of the first device receiving a training frame from the second device. The process of the second device sending a training frame to the first device is independently performed from the process of the second device receiving a training frame from the first device.
[0128] In an embodiment of the present application, in addition to carrying information used for link training, the training frame also carries a security message. The security message carried by the training frame can be used for security processing between the first device and the second device.
[0129] Optionally, the security processing may include authentication and / or key distribution, and the training frame may carry security messages for authentication and / or key distribution.
[0130] Optionally, the multiple training frames continuously transmitted between the first device and the second device may carry multiple different security messages.
[0131] Optionally, one training frame can carry one security message, or multiple training frames can carry one security message together. It should be understood that if the length of a security message does not exceed the carrying capacity of one training frame, then one training frame can be used to carry one security message. If the length of a security message exceeds the carrying capacity of one training frame, then multiple training frames can be used to carry one security message together. For example, if the carrying capacity of one training frame is 2 bytes and the length of one security message is less than or equal to 2 bytes, then one training frame can carry one complete security message. If the carrying capacity of one training frame is 2 bytes and the length of one security message is greater than 2 bytes, then at least two training frames are required to carry one complete security message.
[0132] Optionally, in the case where multiple training frames jointly carry a security message, the multiple training frames jointly carrying a security message may be multiple training frames continuously sent by the first device or the second device. It should be understood that by transmitting the same security message through multiple data frames sent continuously, the receiving end can conveniently and correctly read the security message carried in the training frame.
[0133] Optionally, the security message of the first interaction between the first device and the second device during the security processing can be carried in a training frame transmitted based on a preconfigured time. Alternatively, the security message of the first interaction between the first device and the second device during the security processing can be carried in a preset training frame. In other words, it can be preconfigured at what time or from which training frame the security message of the first interaction starts to be transmitted.
[0134] Optionally, the frame structure of the training frame may include an information field (infofield), the information field includes at least one reserved field, and the at least one reserved field may be used to carry a security message. For example, the first reserved field in the information field may be used to carry a security message. It should be understood that the first reserved field is any reserved field or preset reserved field in the information field, without limitation.
[0135] Optionally, the length of the first reserved field in the information field of a training frame may be an integer multiple of 8 bits. The length of a security message used for security processing may be an integer multiple of 8 bits. The length of a security message may be greater than or equal to the length of the first reserved field, and a security message may be carried by one or more training frames. For example, the length of a security message is 8 bits, and the length of the first reserved field in the information field of a training frame is 8 bits. In this case, one training frame can completely carry the security message. For another example, the length of a security message is 16 bits, and the length of the first reserved field in the information field of a training frame is 8 bits. In this case, two training frames can carry the security message.
[0136] Optionally, the information field of the training frame may also include a second reserved field, which may be used to indicate whether the training frame is the starting frame corresponding to the security message carried by the first reserved field. The starting frame corresponding to the security message may refer to: a training frame carrying the starting part of the security message. In other words, if the content carried by the first reserved field of the training frame includes the starting part of the security message, then the training frame can be considered to be the starting frame corresponding to the security message carried by the first reserved field. In this way, the second reserved field can be used to determine whether the training frame carries the starting information of the security message, so that the first device or the second device can continuously receive the security message from the starting part of the security message, thereby ensuring the integrity of the received security message and improving the accuracy of receiving the security message.
[0137] As a possible implementation, when a training frame carries a security message, the second reserved field of the training frame carrying the security message can be set to the first value. In the embodiment of the present application, the value of the second reserved field is the first value indicating that the current training frame is the starting frame carrying the security message.
[0138] As a possible implementation, in the case where multiple training frames jointly carry a security message, the second reserved field of the start frame corresponding to the security message in the multiple training frames can be set to the first value, and the second reserved field of other training frames except the start frame can be set to the second value. In the embodiment of the present application, the value of the second reserved field is the second value, indicating that the current training frame is not the start frame carrying the security message.
[0139] For example, training frame a and training frame b jointly carry a safety message 1, training frame a carries the first half of the safety message 1, and training frame b carries the second half of the safety message 1. Therefore, the second reserved field of training frame a can be set to a first value (for example, a value of 0), and the second reserved field of training frame b can be set to a second value (for example, a value of 1). It should be understood that training frame a is the starting frame carrying safety message 1, so the second reserved field of training frame a is the first value. Training frame b is not the starting frame carrying safety message 1, so the second reserved field of training frame b is the second value.
[0140] Optionally, the information field of the training frame may further include a third reserved field, and the third reserved field is used to indicate the sequence number of the security message carried by the first reserved field. The sequence number of the security message is used to indicate the order of the security message in the security messages that are exchanged multiple times during the security processing process. It should be understood that during the security processing process, the first device and the second device need to exchange security messages with different contents multiple times, and the sequence number can indicate the order of each of the multiple exchanged security messages.
[0141] Figure 8 A schematic diagram of a frame structure of an information field of a training frame provided in an embodiment of the present application, such as Figure 8 As shown, the information domain may include 12 octets: octet1 to octet12. The first three octets (octet1 to octet3) may be used for frame locking. For example, the value of octet1 may be 0xBB, the value of octet2 may be 0xA7, and the value of octet3 may be 0x00. The 4th to 6th octets (octet4 to octet6) are the physical layer frame count (PFC) field, which is used to carry the count value of the training frame. The 7th octet (octet7) may be a message field, which is used to carry status information related to the link training process. The 8th to 10th octets (octet8 to octet10) are the PFC capability field, which is used to carry the device capability information exchanged during the link training process. The 11th to 12th octets (octet11 to octet12) are the cyclic redundancy check (CRC) field, which is used to carry CRC information.
[0142] Continue to refer Figure 8 In the case where the training frame is a training frame sent by the master, the message field may include a PMA_state indicator bit (2 bits in length), a Loc_revr_status indicator bit (1 bit in length), an En_slave_tx indicator bit (1 bit in length), and a reserved bit (4 bits in length). Among them, the PMA_state indicator bit is used to indicate whether the link training process has entered the countdown stage, the Loc_revr_status indicator bit is used to indicate the number of the training frame in the current stage, and the En_slave_tx indicator bit is used to indicate whether the slave device has started to send training frames. PMA refers to physical medium attachment, which is explained here.
[0143] Continue to refer Figure 8 In the case where the training frame is sent from the slave device (slave), the message field may include a PMA_state indication bit (2 bits in length), a Loc_revr_status indication bit (1 bit in length), a Timing_lock_ok indication bit (1 bit in length), and a reserved bit (4 bits in length). The functions of the PMA_state indication bit and the Loc_revr_status are as described above, and the Timing_lock_ok indication bit is used to indicate whether the slave device has completed clock synchronization.
[0144] Continue to refer Figure 8 , octet8 and octet9 in the PFC capability field are used to carry vendor specific data, which are filled by the vendor and are reserved bits. In octet10 in the PFC capability field, the first bit is a reserved bit, the second and third bits are used to indicate an increase in interleaver depth, the fourth and fifth bits are used to indicate precoding selection (precodesel), and the sixth bit is used to indicate a slow wake request (slowwakerequest). The seventh bit is used to indicate whether the energy efficient Ethernet (EEE) function is enabled, and EEE enable is referred to as EEEen. The eighth bit is used to enable the operations administration and maintenance (OAM) function, and OAM enable is referred to as OAMen.
[0145] exist Figure 8 In the information field shown, bits 5-8 of octet7, all bits of octet8 and octet9, and bit 1 of octet10 (a total of 21 bits) are reserved. Optionally, the above 21 bits of reserved bits can be used as the first reserved field, the second reserved field, and the third reserved field described above.
[0146] As a possible implementation, Fig. 9 The diagram shows the division of the 21-bit reserved bits in the information field of the training frame, wherein the first 4 bits of the 21-bit reserved bits (corresponding to Figure 8 The 5th to 8th bits of octet7 in octet7 can be used as the third reserved field, and the 5th bit of the 21-bit reserved bit (corresponding to Figure 8 The first bit of octet8 in the 21-bit reserved bit can be used as the second reserved field, and the sixth bit to the 21-bit reserved bit (corresponding to the 2nd to 8th bits of octet8, all bits of octet9, and the first bit of octet10) can be used as the first reserved field. The description of the first reserved field, the second reserved field, and the third reserved field can be found above and will not be repeated here.
[0147] Step 702: The first device performs link training based on the training frame and performs security processing based on the security message.
[0148] Optionally, the first device performs link training based on the training frame, which may include: the first device trains the first device side parameters for link communication according to the received training frame. As a possible implementation, the parameters for link communication may include clock, equalizer parameters, descrambling status, etc.
[0149] Optionally, the first device may continuously train the physical layer parameters of the first device side by continuously receiving training frames, so that the parameters used for link communication on the first device side are increasingly converged, and the performance of receiving signals is increasingly improved.
[0150] Optionally, the first device may obtain multiple different security messages by continuously receiving training frames. The first device performing security processing based on the security message may include: the first device performing security processing based on the multiple different security messages.
[0151] Optionally, the security processing may include authentication and / or key distribution. Thus, the first device performing security processing based on the security message may include: the first device performing authentication and / or key distribution based on the security message.
[0152] Optionally, the network startup method may further include: step 703, the second device performs link training based on the training frame, and performs security processing based on the security message. It should be understood that the actions of the second device can refer to the relevant description of the actions of the first device in step 702, which will not be repeated here.
[0153] Optionally, the multiple training frames continuously transmitted between the first device and the second device may carry security messages corresponding to the various steps of authentication and / or key distribution in sequence according to the steps of authentication and / or key distribution. Thus, the first device and the second device may perform the various steps of authentication and / or key distribution in sequence, thereby completing the process of authentication and / or key distribution.
[0154] It should be understood that if the first device and the second device are successfully authenticated, the first device and the second device may consider each other to be a legitimate user, so that subsequent communication between the first device and the second device will meet the security requirements of both parties.
[0155] It should be understood that if key distribution is successfully achieved between the first device and the second device, the first device and the second device can subsequently perform encrypted communication based on the negotiated key, so that subsequent communication between the first device and the second device will meet the security requirements of both parties.
[0156] Based on the network startup method provided above, the first device and the second device can carry security messages through the training frame used for link training, so that the first device and the second device can perform security processing based on the security message. This method adds security processing to the network startup process, so that the first device and the second device can have secure communication capabilities after the network is started. In addition, since the security processing process and the link training process are carried out in parallel, the total duration of the network startup process will not be increased too much.
[0157] Optionally, the first device and the second device may be devices in the vehicle Ethernet. Applying the above method to the startup process of the vehicle Ethernet can enable the vehicle Ethernet to have secure communication capabilities after startup. Moreover, since the security processing process and the link training process can be performed in parallel, adding security processing to the network startup process can still meet the startup time requirements of the vehicle Ethernet.
[0158] In the embodiment of the present application, the time period from when the link is established to when the link can normally transmit service data is divided into the link training phase, for example Figures 1 to 3 It should be understood that the state and interaction behavior of the device are constantly changing after the link is established until the link can normally transmit service data.
[0159] Optionally, the link training phase may specifically include a plurality of different sub-phases, and the states and interaction behaviors of the devices corresponding to different sub-phases are different. As a possible implementation, the training frame carrying the security message transmitted by the first device and the second device in the above embodiment may be transmitted in the sub-phase in which the first device and the second device interact with each other in the link training phase.
[0160] Fig.10 A schematic diagram of a link training phase in a vehicle Ethernet startup process provided by the present application, such as Fig.10 As shown, the link training process may include the following stages in sequence:
[0161] Phase 1: The master device's transmitter is enabled, and the master device continuously sends training frames to the slave device. The slave device's transmitter remains silent. The slave device trains the parameters of the slave device side by receiving the training frames, which may include clock, equalizer parameters, descrambling status, etc.
[0162] Phase 2: The transmitter of the slave device is enabled, and the slave device continues to send training frames to the master device. The master device can train the parameters of the master device side by receiving training frames. The parameters can refer to the description of the parameters trained on the slave device side above, which will not be repeated here. In addition, the master device continues to send training frames to the slave device, and the slave device continues to train the parameters of the slave device side by receiving training frames.
[0163] Phase 3: The master device continuously sends training frames to the slave device, and the slave device also continuously sends training frames to the master device. In addition, the master device and the slave device exchange capability information through the transmitted training frames. Both the master device and the slave device can carry the capability information of the local end in the training frames they send, thereby notifying the capability information to the other end.
[0164] In the embodiment of the present application, the security message described above may be carried in a training frame used for capability information exchange, and the method steps described above may occur in the third stage.
[0165] As a possible implementation, after the master device and the slave device train their parameters to meet certain conditions (for example, the bit error rate is lower than a certain threshold) by receiving training frames, the master device and the slave device can enter the third stage. It should be understood that if the bit error rate of the training frames received by the master device and the slave device is lower than a certain threshold, it means that the success rate and accuracy of the communication between the master device and the slave device are high, and the link is relatively stable. In this case, the master device and the slave device exchange capability information, which is relatively reliable.
[0166] It should be noted that in the third stage, in addition to exchanging capability information by sending training frames to each other, the master device and the slave device can still continue to train the parameters of the local end by receiving training frames.
[0167] Phase 4: The fourth phase is the countdown phase. After the master device and the slave device complete the capability information exchange, they can enter this phase. In this phase, the master device and the slave device can agree to stop sending training frames after continuing to send the same number of training frames to each other. For example, the master device and the slave device agree to stop sending training frames after sending 256 training frames.
[0168] In the embodiment of the present application, the first device can be Fig.10 The master device in the second device can be Fig.10 The slave device in the first device and the second device can be Fig.10 The third stage in the implementation of the above Figure 7 The network startup method described in the corresponding embodiment, Fig.10 The training frames transmitted in the third stage can carry the security messages of this application.
[0169] Fig.11 A schematic diagram of a physical layer (PHY) control state change of a device provided in this application, such as Fig.11 As shown, the change of the physical layer control state of the device can be as follows:
[0170] 1. The condition ((link_control=disable)*auto_neg_imp*mr_autoneg_enable)+((sync_link_control=disable)*!auto_neg_imp*!mr_autoneg_enable)+(pma_reset=on) is met, and the transmitter is disabled (disable transmitter) state is entered.
[0171] "link_control=disable" in the above conditions means that the link control (link_control) parameter is set to disable (disable), "sync_link_control=disable" in the above conditions means that the synchronization link control (sync_link_control) parameter is set to disable, "auto_neg_imp" in the above conditions means that the auto_neg_imp parameter is set to true, "!auto_neg_imp" in the above conditions means that the auto_neg_imp parameter is set to false, "mr_autoneg_enable" in the above conditions means that the mr_autoneg_enable parameter is set to true, "!mr_autoneg_enable" in the above conditions means that the mr_autoneg_enable parameter is set to false, and "pma_reset=on" in the above conditions means that the pma_reset parameter is set to on (on).
[0172] exist Fig.11 In the table, “*” is used to indicate an “and” relationship, and “+” indicates an “or” relationship, which are explained uniformly here.
[0173] Therefore, satisfying the condition ((link_control=disable)*auto_neg_imp*mr_autoneg_enable)+((sync_link_control=disable)*!auto_neg_imp*!mr_autoneg_enable)+(pma_reset=on) can be understood as: satisfying the situation of "the link_control parameter is set to disable, and the auto_neg_imp parameter is set to true, and the mr_autoneg_enable parameter is set to true". Or, satisfying the situation of "the sync_link_control parameter is set to disable, and the auto_neg_imp parameter is set to false, and the mr_autoneg_enable parameter is set to false". Or, satisfying the situation of "the pma_reset parameter is set to on".
[0174] In this field, the link_control parameter can be configured to two values (enable or disable), disable is used by the auto-negotiation function to disable the PHY function, and enable means that the auto-negotiation function is used to enable the PHY function. The mr_autoneg_enable parameter is used to control the enabling and disabling of the auto-negotiation function. The mr_autoneg_enable parameter can be configured to two values (true and false), false means that auto-negotiation is disabled, and true means that auto-negotiation is enabled.
[0175] like Fig.11 As shown, after entering the disable transmitter state, the physical coding sublayer (PCS) data mode (PCS_data_mode) parameter is set to false.
[0176] In this field, the PCS_data_mode parameter is used to indicate whether the PHY changes from the initialization state to the PCS data mode, and can be configured as two values (true or false). The PCS_data_mode parameter is set to false to indicate that the PHY remains in the initialization state, and the PCS_data_mode parameter is set to true to indicate that the PHY changes from the initialization state to the PCS data mode.
[0177] 2. If the condition ((link_control=enable)*auto_neg_imp*mr_autoneg_enable)+((sync_link_control=enable)*!auto_neg_imp*!mr_autoneg_enable) is met, the system enters the silent state.
[0178] "link_control=enable" in the above condition means that the link_control parameter is set to enable, and "sync_link_control=enable" in the above condition means that the sync_link_control parameter is set to enable. In addition, the meanings of "auto_neg_imp", "mr_autoneg_enable", "!auto_neg_imp" and "!mr_autoneg_enable" in the above condition have been explained above and will not be repeated here.
[0179] The condition ((link_control=enable)*auto_neg_imp*mr_autoneg_enable)+((sync_link_control=enable)*!auto_neg_imp*!mr_autoneg_enable) is satisfied, which can be understood as: satisfying the situation that "the link_control parameter is set to enable, the auto_neg_imp parameter is set to true, and the mr_autoneg_enable parameter is set to true". Or, satisfying the situation that "the sync_link_control parameter is set to enable, the auto_neg_imp parameter is set to false, and the mr_autoneg_enable parameter is set to false".
[0180] like Fig.11 As shown, after entering the silent state, the minimum wait timer (start minwait_timer) is started, and the TX_mode parameter is set to SEND_Z (ie, TX_mode = SEND_Z).
[0181] In this field, the TX_mode parameter is used to indicate the mode of data transmission on the link, and can be configured as three values: SEND_N, SEND_T, and SEND_Z. Among them, N means normal, SEND_N means sending normal data frames; T means training, SEND_T means sending training frames; Z means zero (zero, Z), SEND_Z means sending 0, which means that the sending signal energy is 0, that is, no data is sent.
[0182] 3. If the condition ((config=master)+(config=slave)*(loc_SNR_margin=OK)*(en_slave_tx=1))*minwait timer_done is met, the training state is entered.
[0183] "config=master" in the above condition means that the config parameter is set to the master device (master), "config=slave" in the above condition means that the config parameter is set to the slave device (slave), "loc_SNR_margin=OK" in the above condition means that the loc_SNR_margin parameter is set to good (OK), "en_slave_tx=1" in the above condition means that the en_slave_tx parameter is set to 1, and "minwait_timer_done" in the above condition means that the minwait_timer_done parameter is set to true.
[0184] The condition ((config=master)+(config=slave)*(loc_SNR_margin=OK)*(en_slave_tx=1))*minwait timer_done is satisfied, which can be understood as: "the config parameter is set to master, and the minimum wait timer started in the silent state times out". Alternatively, "the config parameter is set to slave, and the loc_SNR_margin parameter is set to OK, and the en_slave_tx parameter is set to 1, and the minimum wait timer started in the silent state times out".
[0185] In this field, when the config parameter is set to master, it means that the master device is trained, and when the config parameter is set to slave, it means that the slave device is trained. loc_SNR_margin is used to indicate whether the hardware of the device has enough signal to noise ratio margin (SNR margin) to continue to enter the next state, and can be configured as two values (OK or NOT_OK). When the loc_SNR_margin parameter is set to OK, it means that the hardware of the device has enough SNR margin to continue to enter the next state. When the loc_SNR_margin parameter is set to NOT_OK, it means that the hardware of the device does not have enough SNR margin to continue to enter the next state. en_slave_tx can be configured as two values (0 or 1). When the en_slave_tx parameter is set to 0, it means that the master device is not ready to send data to the slave device. When the en_slave_tx parameter is set to 1, it means that the master device is ready to send data to the slave device. The minwait_timer_done parameter is set to true to indicate that the minimum wait timer (minwait_timer) started has timed out. The minimum wait timer started here refers to the minimum wait timer started in the slient state.
[0186] like Fig.11 As shown, after entering the training state, the minimum wait timer (start minwait_timer) can be started, the TX_mode parameter is set to SEND_T (ie, TX_mode=SEND_T), and the PMA_state parameter is set to 00 (ie, PMA_state=00).
[0187] In the art, the PMA_state parameter can be configured to two values (00 or 01). When the PMA_state parameter is set to 00, it indicates the training state, and when the PMA_state parameter is set to 01, it indicates the counting state.
[0188] 4. When the conditions (loc_rcvr_status=OK)*(rem_rcvr_status=OK)*minwait_timer_done*infofield_complete are met, enter the countdown state.
[0189] "loc_rcvr_status = OK" in the above condition means that the loc_rcvr_status parameter is set to OK, "rem_rcvr_status = OK" in the above condition means that the rem_rcvr_status parameter is set to OK, and "infofield_complete" in the above condition means that the infofield_complete parameter is set to true. "minwait_timer_done" in the above condition has been introduced above and will not be repeated here.
[0190] Satisfying the condition (loc_rcvr_status=OK)*(rem_rcvr_status=OK)*minwait_timer_done*infofield_complete can be understood as: satisfying the situation where “loc_rcvr_status parameter is set to OK, rem_rcvr_status parameter is set to OK, minwait_timer_done parameter is set to true, and infofield_complete parameter is set to true”.
[0191] In this field, loc_rcvr_status is a variable set by the PMA receiving function to indicate whether the receiving function for the local PHY is normal. loc_rcvr_status can be configured to two values (OK or NOT_OK). The loc_rcvr_status parameter is set to OK to indicate that the receiving function of the local PHY is operating reliably, and the loc_rcvr_status parameter is set to NOT_OK to indicate that the receiving function of the local PHY is not operating reliably. The infofield_complete parameter is set to true to indicate that the information field (infofield) in the training frame is sent successfully.
[0192] like Fig.11 As shown, after entering the count down state, set the PMA_state parameter to 01 and wait for the countdown to complete.
[0193] 5. When the condition loc_countdown_done*infofield_complete is met, enter the TX_switch state.
[0194] The "loc_countdown_done" in the above condition means that the loc_countdown_done parameter is set to true. The "infofield_complete" in the above condition has been explained above and will not be repeated here.
[0195] The condition loc_countdown_done*infofield_complete can be understood as: the situation where "loc_countdown_done parameter is set to true and infofield_complete parameter is set to true" is satisfied.
[0196] In the art, when the PHY control state is in the disable_transmitter state, the loc_countdown_done parameter is set to false. When the device transmits the agreed last training frame in the countdown state, the loc_countdown_done parameter is immediately set to true.
[0197] like Fig.11 As shown, after entering the TX_switch state, the TX_mode parameter can be set to SEND_N (ie, TX_mode = SEND_N), and the subsequent device will send normal data frames.
[0198] It should be noted that in the TX_switch state, the master device will switch the PAM modulation order of the transmitter (TX) so that the subsequent device uses the switched PAM modulation order to send normal data frames. For example, the modulation order of the training frame sent before is PMA2, and the master device can switch the modulation order to PMA4. In addition, the master device will also inform the slave device of the switched PAM modulation order so that the slave device also switches the PMA modulation order of the transmitter.
[0199] Alternatively, if Fig.11 As shown, when loc_rcvr_status is set to NOT_OK, it means that the local PHY receiving function is not reliable and will re-enter the silent state.
[0200] 6. When the rem_countdown_done condition is met, enter the PCS_test state.
[0201] The above condition "rem_countdown_done" means that the rem_countdown_done parameter is set to true. Satisfying the condition rem_countdown_done can be understood as: satisfying the situation where "the rem_countdown_done parameter is set to true".
[0202] In the art, when the PHY control state is in the disable_transmitter state or the silent state, the rem_countdown_done parameter is set to false. Once the device completes the switching of the PMA modulation order in the TX_switch state, the rem_countdown_done parameter is immediately set to true.
[0203] After the device enters the PCS_test state, the minimum wait timer (ie, start minwait_timer) may be started.
[0204] Alternatively, if Fig.11 As shown, when loc_rcvr_status is set to NOT_OK, it means that the local PHY receiving function is not reliable and will re-enter the silent state.
[0205] 7. When the condition (loc_rcvr_status = OK)*minwait_timer_done*!hi_rfer*block_lock is met, enter the PCS_data state.
[0206] The meanings of "loc_rcvr_status=OK" and "minwait_timer_done" in the above conditions have been introduced above and will not be repeated here. "!hi_rfer" in the above conditions means that the hi_rfer parameter is set to 0, and "block_lock" in the above conditions means that the block_lock parameter is set to 1.
[0207] The condition “(loc_rcvr_status=OK)*minwait_timer_done*!hi_rfer*block_lock” can be understood as: “loc_rcvr_status is set to OK, and the minwait_timer_done parameter is set to true, and the hi_rfer parameter is set to 0, and the block_lock parameter is set to 1” is satisfied.
[0208] In this field, hi_rfer can be used to indicate the link error status, and hi_rfer can be configured to 2 values (0 or 1). The hi_rfer parameter is set to 1 to indicate that the link error rate is too high and exceeds the error correction capability of the link itself. The hi_rfer parameter is set to 0 to indicate that the link error rate does not exceed the error correction capability of the link itself. block_lock is used to indicate whether the code block is locked, and block_lock can be configured to 2 values (0 or 1). The block_lock parameter is set to 1 to indicate that the code block lock is completed, and the block_lock parameter is set to 0 to indicate that the code block lock is not completed.
[0209] It should be understood that block lock is related to the link bit error rate. If the link bit error rate is high and exceeds the error correction capability of the link itself, block lock will not be completed. Normally, if the hi_rfer parameter is set to 1, the block_lock parameter will be set to 0. If the hi_rfer parameter is set to 0, the block_lock parameter will be set to 1.
[0210] After entering the PCS_data state, the PCS_data_mode parameter is set to true (ie, PCS_data_mode=true).
[0211] Optionally, when the condition (loc_rcvr_status=NOT_OK)+(minwait_timer_done*(hi_rfer+!block_lock)) is met, the silent state will be re-entered.
[0212] "loc_rcvr_status=NOT_OK" and "minwait_timer_done" in the above conditions have been explained above and will not be repeated here. "hi_rfer" in the above conditions is used to indicate that the hi_rfer parameter is set to 1, and "!block_lock" in the above conditions indicates that the block_lock parameter is set to 0.
[0213] The condition (loc_rcvr_status=NOT_OK)+(minwait_timer_done*(hi_rfer+!block_lock)) can be understood as: the condition that "loc_rcvr_status parameter is set to NOT_OK" is satisfied. Or, the condition that "minwait_timer_done parameter is set to true, and hi_rfer parameter is set to 1" is satisfied. Or, the condition that "minwait_timer_done parameter is set to true, and block_lock parameter is set to 0" is satisfied.
[0214] It should be understood that the status of the master device and the slave device can be Fig.11 The state change process shown is carried out.
[0215] Optionally, the state change of the first device and the second device in the present application after the link is established may also be as follows: Fig.11 As an implementation method, the above Figure 7 The network startup method described in the corresponding embodiment may be that the first device and the second device are in Fig.11 Therefore, the network startup method provided by the present application is compatible with the existing network startup process and is easy to implement.
[0216] It should be understood that security processing may include authentication and / or key distribution, and both authentication and / or key distribution need to be implemented through multiple interactive processes, so the above steps 701 and 702 are implemented based on multiple interactive training frames. Fig.12 , Fig.19 , Fig.24 and Fig.29 The method provided in this application is introduced.
[0217] In one example, the security processing may include authentication, and the process of transmitting the training frame between the first device and the second device may be as follows: Fig.12 As shown, the following steps may be included:
[0218] Step 1201: A first device sends at least one first training frame to a second device, and correspondingly, the second device receives at least one first training frame from the first device.
[0219] At least one first training frame carries a first security message, and the first security message is used to indicate authentication based on a pre-shared key (PSK).
[0220] When the first device and the second device support authentication based on PSK, the first device and the second device can be pre-configured with the same key and authentication algorithm. The authentication method based on PSK can refer to the relevant definitions of security mechanisms in IEEE802.1AE and IEEE 802.1X, which are described here.
[0221] Optionally, the first security message also indicates a request to enter a username.
[0222] Optionally, the implementation method of the first training frame carrying the first security message can refer to the description of the implementation method of the training frame carrying the security message in the above step 701, which will not be repeated here. For example, the first training frame may include a first reserved field, a second reserved field, and a third reserved field. The first security message may be carried in the first reserved field of the information field of the first training frame. The second reserved field may be used to indicate whether the first training frame is a starting frame carrying the first security message. The third reserved field may indicate the message sequence number of the first security message in the authentication process.
[0223] It should be understood that the authentication process may correspond to multiple interactive security messages, and the security messages of different interactions correspond to different message sequence numbers, which are uniformly described in this application.
[0224] Exemplarily, the reserved field of the information field of the first training frame may be as follows: Fig. 9 As shown, the length of the first reserved field of the first training frame is 16 bits (2 bytes), the length of the second reserved field is 1 bit, and the length of the third reserved field is 4 bits. Assuming that the length of the first security message is 2 bytes, the first security message can be completely carried by 1 first training frame.
[0225] For example, Fig.13 A schematic diagram of a first training frame carrying a first security message. Among them, the first reserved field can completely carry the first security message. The value of the second reserved field can be 1, which can be used to indicate that the first training frame is the starting frame carrying the first security message. It should be understood that since the first security message is completely carried in a first training frame, the training frame is naturally the starting frame carrying the first security message. The value of the third reserved field can be 0x0001, which can be used to indicate that the message sequence number of the first security message in the authentication process is 1.
[0226] Step 1202: The second device sends at least one second training frame to the first device, and correspondingly, the first device receives at least one second training frame from the second device.
[0227] At least one second training frame carries a second security message, and the second security message includes a first random number and a first identifier ID. The first random number is generated by the second device, and the first ID is the ID of the second device.
[0228] Optionally, the implementation method of the second training frame carrying the second security message can refer to the description of the implementation method of the training frame carrying the security message in the above step 701, which will not be repeated here. For example, the second training frame may include a first reserved field, a second reserved field, and a third reserved field. The second security message may be carried in the first reserved field of the information field of the second training frame. The second reserved field may be used to indicate whether the second training frame is a starting frame carrying the second security message. The third reserved field may indicate the message sequence number of the second security message in the authentication process.
[0229] Exemplarily, the reserved field of the information field of the second training frame may be as follows: Fig. 9 As shown, the length of the first reserved field is 16 bits (2 bytes), the length of the second reserved field is 1 bit, and the length of the third reserved field is 4 bits. Assuming that the length of the first random number is 16 bytes, the length of the first ID is 16 bytes, and the total length of the second security message is 32 bytes, the second security message needs to be fully carried by 16 second training frames.
[0230] For example, Fig.14 Schematic diagram of 16 second training frames carrying 1 second security message. The first reserved field in each second training frame can carry part of the content of the second security message, the first random number ( Fig.14 denoted by R1 in the figure) requires 8 training frames to carry the first ID ( Fig.14 The first second training frame among the 16 second training frames may have a value of 1 for the second reserved field, indicating that the training frame is the start frame for carrying the second security message. The second reserved field of the other training frames among the 16 second training frames except the first second training frame may have a value of 0, indicating that these training frames are not the start frames for carrying the second security message. The third reserved field of the 16 second training frames may have a value of 0x0010, indicating that the message sequence number of the second security message carried by these training frames in the authentication process is 2.
[0231] It should be understood that the first security message can be used to request input of a user name, so that the first ID in the second security message can be considered as the user name that the second device responds to the first device. In addition, the first random number and the first ID in the second security message can be used to generate authentication data for the second device to authenticate the first device.
[0232] Step 1203: The first device sends at least one third training frame to the second device, and correspondingly, the second device receives at least one third training frame from the first device.
[0233] Among them, at least one third training frame carries a third security message, and the third security message includes a first random number, a second random number, a second ID, a first count value, and a first authentication data. Among them, the second random number and the first count value are generated by the first device, and the second ID is the ID of the first device. The first authentication data is obtained by the first device calculating the first random number, the second random number, the first ID, the second ID, and the first count value according to the preconfigured algorithm and the key, and the first authentication data is used by the second device to authenticate the first device.
[0234] The first random number, the second random number, the second ID and the first count value in the third security message can be used by the second device to verify the first authentication data, and can be used to generate authentication data for the first device to authenticate the second device.
[0235] Optionally, after receiving the third security message, the second device may also operate on the first random number, the second random number, the first ID, the second ID, and the first count value according to the preconfigured algorithm and key. If the operation result obtained by the second device is the same as the first authentication data, then the second device authenticates the first device. It should be understood that the preconfigured algorithms and keys of the first device and the second device are the same, and if the third security message is not transmitted incorrectly and is not illegally tampered with, the operation result obtained by the second device in the same manner should be the same as the first authentication data.
[0236] Optionally, the algorithm used to generate the first authentication data may be an advanced encryption standard (AES) algorithm, such as an AES-CMAC algorithm. As an example, the value of the first authentication data may be represented by an algorithm formula as AES-CMAC (key, ID1||ID2||R1||R2||counter1), wherein key refers to a key preconfigured by the first device and the second device, ID1 refers to a first ID, ID2 refers to a second ID, R1 refers to a first random number, R2 refers to a second random number, counter1 refers to a first count value, and "||" is a connector, and "ID1||ID2||R1||R2||counter1" means that the characters ID1, ID2, R1, R2, and counter1 are connected in sequence. For example, when the first authentication data is AES-CMAC(key, ID1||ID2||R1||R2||counter1) generated by the first device, the second device can also calculate AES-CMAC(key, ID1||ID2||R1||R2||counter1). If the value calculated by the second device is the same as the first authentication data, the second device successfully authenticates the first device.
[0237] Optionally, the implementation method of the third training frame carrying the third security message can refer to the description of the implementation method of the training frame carrying the security message in the above step 701, which will not be repeated here. For example, the third training frame may include a first reserved field, a second reserved field and a third reserved field, the third security message may be carried in the first reserved field of the information field of the third training frame, the second reserved field may be used to indicate whether the third training frame is a starting frame carrying the third security message, and the third reserved field may indicate the message sequence number of the third security message in the authentication process.
[0238] Exemplarily, the reserved field of the information field of the third training frame may be as follows: Fig. 9 As shown, the first reserved field length is 16 bits (2 bytes), the second reserved field length is 1 bit, and the third reserved field length is 4 bits. Assuming that the total length of the third safety message is 66 bytes, the third safety message needs to be fully carried by 33 third training frames.
[0239] For example, Fig.15 A schematic diagram of 33 third training frames carrying one third security message. Among them, the first reserved field in each third training frame can carry part of the content of the third security message. The value of the second reserved field of the first third training frame among the 33 third training frames can be 1, which is used to indicate that the training frame is the starting frame carrying the third security message. The value of the second reserved field of the other training frames except the first third training frame among the 33 third training frames is 0, which is used to indicate that these training frames are not the starting frames carrying the third security message. The value of the third reserved field of the 33 third training frames can all be 0x0011, which is used to indicate that the message sequence number of the third security messages carried by these training frames in the authentication process is 3. The first random number is in Fig.15 In the example, R1 is used to represent the second random number. Fig.15 In the example, R2 is used to represent the second ID. Fig.15 In the code, ID2 is used to represent the first count value. Fig.15 It is represented by counter1 in the text and is explained here.
[0240] After the second device receives the third security message and the second device authenticates the first device, step 1204 may be continued. If the second device receives the third security message but fails to authenticate the first device, the authentication process may be re-performed starting from step 1201 above.
[0241] Step 1204: The second device sends at least one fourth training frame to the first device, and correspondingly, the first device receives at least one fourth training frame from the second device.
[0242] Among them, at least one fourth training frame can carry a fourth security message, and the fourth security message includes a second random number, a first count value, and second authentication data. Among them, the second authentication data is obtained by the second device calculating the second random number, the second ID, and the first count value according to a preconfigured algorithm and a key, and the second authentication data is used by the first device to authenticate the second device. The second random number and the first count value in the fourth security message can be used by the first device to verify the second authentication data.
[0243] Optionally, after receiving the fourth security message, the first device may also operate on the second random number, the second ID and the first count value according to the preconfigured algorithm and key. If the operation result obtained by the first device is the same as the second authentication data, then the first device authenticates the second device. It should be understood that the preconfigured algorithms and keys of the first device and the second device are the same, and if the fourth security message is not transmitted incorrectly and is not illegally tampered with, the operation result obtained by the first device in the same manner should be the same as the second authentication data.
[0244] Optionally, the algorithm used to generate the second authentication data may be an AES algorithm, such as an AES-CMAC algorithm. As an example, the value of the second authentication data may be represented by an algorithm formula as AES-CMAC(key, ID2||R1||counter1), wherein key refers to the preconfigured key of the first device and the second device, ID2 refers to the second ID, R1 refers to the first random number, counter1 refers to the first count value, and "||" is a connector. "ID2||R1||counter1" means that the characters ID2, R1, and counter1 are connected in sequence. For example, in the case where the second authentication data is AES-CMAC(key, ID2||R1||counter1) generated by the second device, the first device may also calculate AES-CMAC(key, ID2||R1||counter1). If the value calculated by the first device is the same as the second authentication data, the first device successfully authenticates the second device.
[0245] Optionally, the implementation method of the fourth training frame carrying the fourth security message can refer to the description of the implementation method of the training frame carrying the security message in the above step 701, which is not repeated here. For example, the fourth training frame may include a first reserved field, a second reserved field, and a third reserved field, the fourth security message may be carried in the first reserved field of the information field of the fourth training frame, the second reserved field may be used to indicate whether the fourth training frame is a starting frame carrying the fourth security message, and the third reserved field may indicate the message sequence number of the fourth security message in the authentication process.
[0246] Exemplarily, the reserved field of the information field of the fourth training frame may be as follows: Fig. 9 As shown, the first reserved field length is 16 bits (2 bytes), the second reserved field length is 1 bit, and the third reserved field length is 4 bits. Assuming that the total length of the fourth safety message is 34 bytes, the fourth safety message needs to be fully carried by 17 fourth training frames.
[0247] For example, Fig.16 A schematic diagram of 17 fourth training frames carrying 1 fourth security message. Among them, the first reserved field in each fourth training frame can carry part of the content of the fourth security message. The value of the second reserved field of the first fourth training frame among the 17 fourth training frames can be 1, which is used to indicate that the training frame is the starting frame carrying the fourth security message. The value of the second reserved field of the other training frames except the first fourth training frame among the 17 fourth training frames is 0, which is used to indicate that these training frames are not the starting frames carrying the fourth security message. The value of the third reserved field of the 17 fourth training frames can all be 0x0100, which is used to indicate that the fourth security messages carried by these training frames in the authentication process have a message sequence number of 4. The first random number is in Fig.16 In the example, R1 is used to represent the second ID. Fig.16 In the code, ID2 is used to represent the first count value. Fig.16 It is represented by counter1 in the text and is explained here.
[0248] It should be understood that when the first device successfully authenticates the second device, and the second device successfully authenticates the first device, the first device and the second device have completed mutual authentication.
[0249] Optionally, Fig.12 The process of transmitting training frames between the first device and the second device shown may also include: step 1205, the first device sends at least one tenth training frame to the second device, and correspondingly, the second device receives at least one tenth training frame from the first device. The at least one tenth training frame carries a tenth security message, and the tenth security message is used to indicate successful authentication.
[0250] Optionally, the implementation method of the tenth training frame carrying the tenth security message can refer to the description of the implementation method of the training frame carrying the security message in the above step 701, which will not be repeated here. For example, the tenth training frame may include a first reserved field, a second reserved field, and a third reserved field, the tenth security message may be carried in the first reserved field of the information field of the tenth training frame, the second reserved field may be used to indicate whether the tenth training frame is the starting frame carrying the tenth security message, and the third reserved field may indicate the message sequence number of the tenth security message in the authentication process.
[0251] Exemplarily, the reserved field of the information field of the tenth training frame may be as follows: Fig. 9As shown, the length of the first reserved field of the tenth training frame is 16 bits (2 bytes), the length of the second reserved field is 1 bit, and the length of the third reserved field is 4 bits. Assuming that the length of the tenth security message is 2 bytes, the tenth security message can be completely carried by 1 tenth training frame.
[0252] For example, Fig.17 A schematic diagram of a tenth training frame carrying a tenth security message. Among them, the first reserved field can completely carry the tenth security message. The value of the second reserved field can be 1, which can be used to indicate that the tenth training frame is the starting frame carrying the tenth security message. It should be understood that since a tenth security message is completely carried in a tenth training frame, the training frame is naturally the starting frame carrying the tenth security message. The value of the third reserved field can be 0x0101, which can be used to indicate that the message sequence number of the tenth security message in the authentication process is 5.
[0253] Optionally, Fig.12 The process of the first device and the second device transmitting the training frame shown may also include: step 1206, the second device sends at least one eleventh training frame to the first device, and correspondingly, the first device receives at least one eleventh training frame from the second device. The at least one eleventh training frame carries the eleventh security message, and the eleventh security message is used to apply for startup authentication. Step 1206 is performed before step 1201.
[0254] Optionally, the implementation method of the eleventh training frame carrying the eleventh security message can refer to the description of the implementation method of the training frame carrying the security message in the above step 701, which will not be repeated here. For example, the eleventh training frame may include a first reserved field, a second reserved field, and a third reserved field. The eleventh security message may be carried in the first reserved field of the information field of the eleventh training frame, the second reserved field may be used to indicate whether the eleventh training frame is a starting frame carrying the eleventh security message, and the third reserved field may indicate the message sequence number of the eleventh security message in the authentication process.
[0255] Exemplarily, the reserved field of the information field of the eleventh training frame may be as follows: Fig. 9 As shown, the length of the first reserved field of the eleventh training frame is 16 bits (2 bytes), the length of the second reserved field is 1 bit, and the length of the third reserved field is 4 bits. Assuming that the length of the eleventh safety message is 2 bytes, the eleventh safety message can be completely carried by 1 eleventh training frame.
[0256] For example, Fig.18A schematic diagram of an eleventh training frame carrying an eleventh security message. Among them, the first reserved field can completely carry the eleventh security message. The value of the second reserved field can be 1, which can be used to indicate that the eleventh training frame is the starting frame carrying the eleventh security message. It should be understood that since an eleventh security message is completely carried in an eleventh training frame, the training frame is naturally the starting frame carrying the eleventh security message. The value of the third reserved field can be 0x0000, which can be used to indicate that the message sequence number of the eleventh security message in the authentication process is 0.
[0257] In another example, the security processing may include authentication, and the process of transmitting the training frame between the first device and the second device may also be as follows: Fig.19 As shown, the following steps may be included:
[0258] Step 1901: The first device sends at least one fifth training frame to the second device, and correspondingly, the second device receives at least one fifth training frame from the first device.
[0259] Among them, at least one fifth training frame carries a fifth security message, and the fifth security message is used to indicate authentication based on a password. A password can also be called a password. Compared with key-based authentication, password-based authentication has lower complexity and a faster authentication process. In the case where the first device and the second device support authentication based on a password, the first device and the second device can pre-configure the same password and authentication algorithm.
[0260] Optionally, the implementation method of the fifth training frame carrying the fifth security message can refer to the description of the implementation method of the training frame carrying the security message in the above step 701, which is not repeated here. For example, the fifth training frame may include a first reserved field, a second reserved field, and a third reserved field, and the fifth security message may be carried in the first reserved field of the information field of the fifth training frame, the second reserved field may be used to indicate whether the fifth training frame is the starting frame carrying the fifth security message, and the third reserved field may indicate the message sequence number of the fifth security message in the authentication process.
[0261] Exemplarily, the reserved field of the information field of the fifth training frame may be as follows: Fig. 9 As shown, the first reserved field length of the fifth training frame is 16 bits (2 bytes), the second reserved field length is 1 bit, and the third reserved field length is 4 bits. Assuming that the length of the fifth safety message is 2 bytes, the fifth safety message can be completely carried by 1 fifth training frame.
[0262] For example, Fig. 20A schematic diagram of a fifth training frame carrying a fifth security message. Among them, the first reserved field can completely carry the fifth security message. The value of the second reserved field can be 1, which can be used to indicate that the fifth training frame is the starting frame carrying the fifth security message. It should be understood that since one fifth security message is completely carried in one fifth training frame, the training frame is naturally the starting frame carrying the fifth security message. The value of the third reserved field can be 0x0001, which can be used to indicate that the message sequence number of the fifth security message in the authentication process is 1.
[0263] Step 1902: The second device sends at least one sixth training frame to the first device, and correspondingly, the first device receives at least one sixth training frame from the second device.
[0264] At least one sixth training frame carries a sixth security message, and the sixth security message includes a third random number, a first ID, a second count value, and third authentication data. The third random number and the second count value are generated by the second device, and the first ID is the ID of the second device. The third authentication data is obtained by the second device calculating the third random number, the first ID, and the second count value according to a preconfigured algorithm and a password, and the third authentication data is used by the first device to authenticate the second device.
[0265] The third random number, the first ID, and the second count value in the sixth security message can be used by the first device to verify the third authentication data.
[0266] Optionally, after receiving the sixth security message, the first device may operate on the third random number, the first ID, and the second count value according to the preconfigured algorithm and password. If the result of the operation by the first device is the same as the third authentication data, the first device successfully authenticates the second device. It should be understood that the preconfigured algorithms and passwords of the first device and the second device are the same, and if the sixth security message is not transmitted incorrectly or illegally tampered with, the operation result obtained by the first device using the same operation method should be the same as the third authentication data.
[0267] Optionally, the algorithm used to generate the third authentication data may be a hash algorithm, such as a SHA256 algorithm. As an example, the value of the third authentication data may be expressed as SHA256(password, ID1||R3||Counter2) using an algorithm formula, wherein password refers to a password preconfigured by the first device and the second device, ID1 refers to the first ID, R3 refers to a third random number, counter2 refers to the second count value, and "||" is a connector, and "ID1||R3||Counter2" means that the characters ID1, R3, and counter2 are connected in sequence. For example, in the case where the third authentication data is SHA256(password, ID1||R3||Counter2) generated by the second device, the first device may also calculate SHA256(password, ID1||R3||Counter2). If the value calculated by the first device is the same as the third authentication data, the first device successfully authenticates the second device.
[0268] Optionally, the implementation method of the sixth training frame carrying the sixth security message can refer to the description of the implementation method of the training frame carrying the security message in the above step 701, which is not repeated here. For example, the sixth training frame may include a first reserved field, a second reserved field, and a third reserved field. The sixth security message may be carried in the first reserved field of the information field of the sixth training frame, the second reserved field may be used to indicate whether the sixth training frame is the starting frame carrying the sixth security message, and the third reserved field may indicate the message sequence number of the sixth security message in the authentication process.
[0269] Exemplarily, the reserved field of the information field of the sixth training frame may be as follows: Fig. 9 As shown, the length of the first reserved field is 16 bits (2 bytes), the length of the second reserved field is 1 bit, and the length of the third reserved field is 4 bits. Assuming that the total length of the sixth safety message is 66 bytes, the sixth safety message needs to be fully carried by 33 sixth training frames.
[0270] For example, Fig.21A schematic diagram of 33 sixth training frames carrying one sixth security message. Among them, the first reserved field in each sixth training frame can carry part of the content of the sixth security message. The value of the second reserved field of the first sixth training frame among the 33 sixth training frames can be 1, which is used to indicate that the training frame is the starting frame carrying the sixth security message. The value of the second reserved field of the other training frames except the first sixth training frame among the 33 sixth training frames is 0, which is used to indicate that these training frames are not the starting frames carrying the sixth security message. The value of the third reserved field of the 33 sixth training frames can all be 0x0010, which is used to indicate that the message sequence number of the sixth security messages carried by these training frames in the authentication process is 2. The third random number is in Fig.21 In the example, R3 is used to represent the first ID. Fig.21 In the code, ID1 is used to represent the second count value. Fig.21 It is represented by counter2 in the text and is explained here.
[0271] After the first device receives the sixth security message and the first device authenticates the second device, step 1903 may be continued. If the first device receives the sixth security message but fails to authenticate the second device, the authentication process may be re-performed starting from step 1901 above.
[0272] Step 1903: The first device sends at least one seventh training frame to the second device, and correspondingly, the second device receives at least one seventh training frame from the first device.
[0273] Among them, at least one seventh training frame carries the seventh security message, and the seventh security message includes a third random number, a fourth random number, a second ID, a second count value and a fourth authentication data. Among them, the fourth random number is generated by the first device, and the second ID is the ID of the first device. The fourth authentication data is obtained by the first device by calculating the third random number, the fourth random number, the first ID, the second ID and the second count value according to the preconfigured algorithm and the password, and the fourth authentication data is used by the second device to authenticate the first device. The third random number, the fourth random number, the second ID and the second count value in the seventh security message can be used by the second device to verify the fourth authentication data.
[0274] Optionally, after receiving the seventh security message, the second device may calculate the third random number, the fourth random number, the first ID, the second ID, and the second count value according to the preconfigured algorithm and password. If the result of the second device's calculation is the same as the fourth authentication data, the second device authenticates the first device. It should be understood that the first device and the second device have the same preconfigured algorithm and password. If the seventh security message is not transmitted incorrectly and has not been illegally tampered with, the calculation result obtained by the second device in the same manner should be the same as the fourth authentication data.
[0275] Optionally, the algorithm used to generate the fourth authentication data may be a hash algorithm, such as a SHA256 algorithm. As an example, the value of the fourth authentication data may be represented by an algorithm formula of SHA256 (password, ID1||ID2||R3||R4||Counter2), wherein password refers to a password preconfigured by the first device and the second device, ID1 refers to the first ID, ID2 refers to the second ID, R3 refers to the third random number, R4 refers to the fourth random number, counter2 refers to the second count value, and "||" is a connector, and "ID1||ID2||R3||R4||Counter2" means that the characters ID1, ID2, R3, R4 and counter2 are connected in sequence. For example, when the fourth authentication data is SHA256(password, ID1||ID2||R3||R4||Counter2) generated by the first device, the second device can also calculate SHA256(password, ID1||ID2||R3||R4||Counter2). If the value calculated by the first device is the same as the fourth authentication data, the second device successfully authenticates the first device.
[0276] Optionally, the implementation method of the seventh training frame carrying the seventh security message can refer to the description of the implementation method of the training frame carrying the security message in the above step 701, which is not repeated here. For example, the seventh training frame may include a first reserved field, a second reserved field, and a third reserved field, the seventh security message may be carried in the first reserved field of the information field of the seventh training frame, the second reserved field may be used to indicate whether the seventh training frame is the starting frame carrying the seventh security message, and the third reserved field may indicate the message sequence number of the seventh security message in the authentication process.
[0277] Exemplarily, the reserved field of the information field of the seventh training frame may be as follows: Fig. 9 As shown, the length of the first reserved field is 16 bits (2 bytes), the length of the second reserved field is 1 bit, and the length of the third reserved field is 4 bits. Assuming that the total length of the seventh safety message is 82 bytes, the seventh safety message needs to be fully carried by 41 seventh training frames.
[0278] For example, Fig. 22A schematic diagram of 41 seventh training frames carrying one seventh security message. Among them, the first reserved field in each seventh training frame can carry part of the content of the seventh security message. The value of the second reserved field of the first seventh training frame among the 41 seventh training frames can be 1, which is used to indicate that the training frame is the starting frame carrying the seventh security message. The value of the second reserved field of the other training frames except the first seventh training frame among the 41 seventh training frames is 0, which is used to indicate that these training frames are not the starting frames carrying the seventh security message. The value of the third reserved field of the 41 seventh training frames can all be 0x0011, which is used to indicate that the message sequence number of the seventh security messages carried by these training frames in the authentication process is 3. The third random number is in Fig. 22 In the example, R3 is used to represent the fourth random number. Fig. 22 Indicated by R4, the second ID is Fig. 22 In the code, ID2 is used to represent the second count value. Fig. 22 It is represented by counter2 in the text and is explained here.
[0279] It should be understood that when the first device successfully authenticates the second device, and the second device successfully authenticates the first device, the first device and the second device have completed mutual authentication.
[0280] Optionally, Fig.19 The process of transmitting training frames between the first device and the second device shown may also include: step 1904, the second device sends at least one twelfth training frame to the first device, and accordingly, the first device receives at least one twelfth training frame from the second device. The at least one twelfth training frame carries a twelfth security message, and the twelfth security message is used to indicate successful authentication.
[0281] Optionally, the implementation method of the twelfth training frame carrying the twelfth security message can refer to the description of the implementation method of the training frame carrying the security message in the above step 701, which is not repeated here. For example, the twelfth training frame may include a first reserved field, a second reserved field, and a third reserved field. The twelfth security message may be carried in the first reserved field of the information field of the twelfth training frame, the second reserved field may be used to indicate whether the twelfth training frame is the starting frame carrying the twelfth security message, and the third reserved field may indicate the message sequence number of the twelfth security message in the authentication process.
[0282] Exemplarily, the reserved field of the information field of the twelfth training frame may be as follows: Fig. 9 As shown, the length of the first reserved field of the twelfth training frame is 16 bits (2 bytes), the length of the second reserved field is 1 bit, and the length of the third reserved field is 4 bits. Assuming that the length of the twelfth safety message is 2 bytes, the twelfth safety message can be completely carried by 1 twelfth training frame.
[0283] For example, Fig.23 A schematic diagram of a twelfth training frame carrying a twelfth security message. Among them, the first reserved field can completely carry the twelfth security message. The value of the second reserved field can be 1, which can be used to indicate that the twelfth training frame is the starting frame carrying the twelfth security message. It should be understood that since a twelfth security message is completely carried in a twelfth training frame, the training frame is naturally the starting frame carrying the twelfth security message. The value of the third reserved field can be 0x0100, which can be used to indicate that the message sequence number of the twelfth security message in the authentication process is 4.
[0284] Above Fig.12 and Fig.19 The following are two different ways to implement authentication. The first device and the second device can choose the authentication method to use according to the needs. Fig.12 and Fig.19 The illustrated method for implementing authentication is merely exemplary, and the processes of other authentication methods may also be implemented through the transmission of training frames, and this application does not impose any limitation on this.
[0285] Optionally, the above Fig.12 and Fig.19 In a corresponding embodiment, the first device may be used as a master device for authentication, and the second device may be used as a slave device for authentication.
[0286] The above is an introduction to security processing including authentication. Fig.24 , taking security processing including key distribution as an example, the method provided by this application is introduced. Fig.24 As shown, the process of transmitting the training frame between the first device and the second device may include the following steps:
[0287] Step 2401: The second device sends at least one eighth training frame to the first device, and correspondingly, the first device receives at least one eighth training frame from the second device.
[0288] At least one eighth training frame carries an eighth security message, and the eighth security message includes a start mark, a first ID, and a first security capability parameter. The start mark is used to indicate the start of key distribution, the first ID is the ID of the second device, and the first security capability parameter is the security capability parameter of the second device.
[0289] The first ID in the eighth security message can be used to indicate that the eighth security message comes from the second device, and the first security capability parameter in the eighth security message can be used by the first device to determine the security capability parameter used for encrypted communication.
[0290] Optionally, the eighth security message may also include a first message number (message number) and a first integrity check value (integrity check value, ICV), the first message number is used to prevent the eighth security message from being replayed, and the first ICV is used to perform integrity protection on the eighth security message. As a possible implementation, the first ICV can be a value obtained by the second device by calculating the start tag, the first ID, the first message number, and the first security capability parameter according to a preconfigured integrity protection algorithm and key.
[0291] Optionally, after the first device receives the eighth security message, the integrity of the eighth security message can be verified according to the first ICV. For example, the first device can also operate on the start tag, the first ID, the first message number, and the first security capability parameter according to the preconfigured integrity protection algorithm and key. If the operation result of the first device is the same as the first ICV, the eighth security message passes the integrity check.
[0292] Optionally, the implementation method of the eighth training frame carrying the eighth security message can refer to the description of the implementation method of the training frame carrying the security message in the above step 701, which is not repeated here. For example, the eighth training frame may include a first reserved field, a second reserved field, and a third reserved field, the eighth security message may be carried in the first reserved field of the information field of the eighth training frame, the second reserved field may be used to indicate whether the eighth training frame is the starting frame carrying the eighth security message, and the third reserved field may indicate the message sequence number of the eighth security message in the authentication process.
[0293] Exemplarily, the reserved field of the information field of the eighth training frame may be as follows: Fig. 9 As shown, the first reserved field length of the eighth training frame is 16 bits (2 bytes), the second reserved field length is 1 bit, and the third reserved field length is 4 bits. Assuming that the length of the eighth security message is 40 bytes, the eighth security message needs to be fully carried by 20 eighth training frames.
[0294] For example, Fig.25A schematic diagram of 20 eighth training frames carrying one eighth security message. Among them, the first reserved field in each eighth training frame can carry part of the content of the eighth security message. The value of the second reserved field of the first eighth training frame among the 20 eighth training frames can be 1, which is used to indicate that the training frame is the starting frame carrying the eighth security message. The value of the second reserved field of the other training frames except the first eighth training frame among the 20 eighth training frames is 0, which is used to indicate that these training frames are not the starting frames carrying the eighth security message. The value of the third reserved field in the 20 eighth training frames can all be 0x0001, which can be used to indicate that the message sequence number of the eighth security message in the authentication process is 1. Fig.25 In the figure, init represents a start mark, ID1 represents a first ID, MN1 represents a first message number, capability1 represents a first security capability parameter, and ICV1 represents a first ICV, which are uniformly described here.
[0295] Step 2402: The first device sends at least one ninth training frame to the second device, and correspondingly, the second device receives at least one ninth training frame from the first device.
[0296] At least one ninth training frame carries a ninth security message, and the ninth security message includes a second ID, a second security capability parameter, and a security association key (SAK). The second ID is an ID of the first device, the second security capability parameter is a security capability parameter determined by the first device for encrypted communication between the first device and the second device, and the SAK is a key determined by the first device for encrypted communication between the first device and the second device.
[0297] Optionally, the second security parameter may be determined by the first device based on the first security capability parameter and the third security capability parameter, where the third security capability parameter is the security capability parameter of the first device. That is, the first device may determine the security capability parameter for encrypted communication between the first device and the second device based on the security capability parameter of the first device and the security capability parameter of the second device.
[0298] After the first device allocates the second security capability parameter and the SAK for encrypted communication to the second device, the first device and the second device may subsequently implement encrypted communication based on the second security capability parameter and the SAK.
[0299] Optionally, the ninth security message may also include a first message number, a second message number, and a second ICV. The second message number is used to prevent the ninth security message from being replayed, the first message number may be used to indicate that the ninth security message is a response message to the eighth security message, and the second ICV may be used for data integrity protection of the ninth security message. As a possible implementation, the second ICV may be a value obtained by the first device by calculating the second ID, the first message number, the second message number, and the second security capability parameter according to a preconfigured integrity protection algorithm and key.
[0300] Optionally, after the second device receives the ninth security message, the integrity of the ninth security message can be verified according to the second ICV. For example, the second device can also operate on the second ID, the first message number, the second message number, and the second security capability parameter according to the preconfigured integrity protection algorithm and key. If the operation result of the second device is the same as the second ICV, the ninth security message passes the integrity check.
[0301] Optionally, the ninth security message may carry an encrypted SAK. After receiving the ninth security message, the second device may obtain the SAK by decryption. The algorithm and key used to encrypt and decrypt the SAK may also be a pre-configured algorithm and key for integrity protection.
[0302] Optionally, the implementation method of the ninth training frame carrying the ninth security message can refer to the description of the implementation method of the training frame carrying the security message in the above step 701, which will not be repeated here. For example, the ninth training frame may include a first reserved field, a second reserved field, and a third reserved field. The ninth security message may be carried in the first reserved field of the information field of the ninth training frame. The second reserved field may be used to indicate whether the ninth training frame is the starting frame carrying the ninth security message. The third reserved field may indicate the message sequence number of the ninth security message in the authentication process.
[0303] Exemplarily, the reserved field of the information field of the ninth training frame may be as follows: Fig. 9 As shown, the length of the first reserved field of the ninth training frame is 16 bits (2 bytes), the length of the second reserved field is 1 bit, and the length of the third reserved field is 4 bits. Assuming that the length of the ninth security message is 74 bytes, the ninth security message needs to be fully carried by 37 ninth training frames.
[0304] For example, Fig.26A schematic diagram of 37 ninth training frames carrying one ninth security message. Among them, the first reserved field in each ninth training frame can carry part of the content of the ninth security message. The value of the second reserved field of the first ninth training frame among the 37 ninth training frames can be 1, which is used to indicate that the training frame is the starting frame carrying the ninth security message. The value of the second reserved field of the other training frames except the first ninth training frame among the 37 ninth training frames is 0, which is used to indicate that these training frames are not the starting frames carrying the ninth security message. The value of the third reserved field in the 37 ninth training frames can all be 0x0010, which can be used to indicate that the message sequence number of the ninth security message in the authentication process is 2. Fig.26 In the figure, D2 represents the second ID, MN1 represents the first message number, MN2 represents the second message number, capability2 represents the second security capability parameter, and ICV2 represents the second ICV, which are uniformly described here.
[0305] Optionally, the SAK may be a key derived by the first device based on a Connectivity Association Key (CAK) using a Key Derivation Function (KDF). CAK is a root key in a Connectivity Association (CA), and all keys used by the CA may be derived from the CAK.
[0306] It should be understood that Fig.24 The key distribution process implemented in the corresponding embodiment can be implemented according to the key distribution rules defined in the MACsec standard. The above-mentioned SAK, CAK, CA, etc. can be explained in the MACsec standard, and this application will not go into details here.
[0307] Through the above steps 2401 and 2402, key distribution for encrypted communication between the first device and the second device can be achieved.
[0308] Optionally, Fig.24 The process of the first device and the second device transmitting the training frame shown may also include: step 2403, the second device sends at least one thirteenth training frame to the first device, and accordingly, the first device receives at least one thirteenth training frame from the second device. The at least one thirteenth training frame carries a thirteenth security message, and the thirteenth security message is used to indicate that the second device successfully obtains the SAK.
[0309] Optionally, the thirteenth security message may include a first ID, a second message number, a third message number, and a third ICV. The first ID may be used to indicate that the thirteenth security message comes from the second device, the second message number may be used to indicate that the thirteenth security message is a response message to the ninth security message, the third message number may be used to prevent the thirteenth security message from being replayed, and the third ICV is used to perform integrity protection on the thirteenth security message. As a possible implementation, the third ICV may be a value obtained by the second device by calculating the first ID, the second message number, and the third message number according to a preconfigured integrity protection algorithm and key. As a possible implementation, the third message number is equal to the first message number plus 1.
[0310] Optionally, the implementation method of the thirteenth training frame carrying the thirteenth security message can refer to the description of the implementation method of the training frame carrying the security message in the above step 701, which will not be repeated here. For example, the thirteenth training frame may include a first reserved field, a second reserved field, and a third reserved field, the thirteenth security message may be carried in the first reserved field of the information field of the thirteenth training frame, the second reserved field may be used to indicate whether the thirteenth training frame is a starting frame carrying the thirteenth security message, and the third reserved field may indicate the message sequence number of the thirteenth security message in the authentication process.
[0311] Exemplarily, the reserved field of the information field of the thirteenth training frame may be as follows: Fig. 9 As shown, the length of the first reserved field of the thirteenth training frame is 16 bits (2 bytes), the length of the second reserved field is 1 bit, and the length of the third reserved field is 4 bits. Assuming that the length of the thirteenth safety message is 40 bytes, the thirteenth safety message needs to be fully carried by 20 thirteenth training frames.
[0312] For example, Fig. 27 A schematic diagram of 20 thirteenth training frames carrying one thirteenth security message. Among them, the first reserved field in each thirteenth training frame can carry part of the content of the thirteenth security message. The value of the second reserved field of the first thirteenth training frame among the 20 thirteenth training frames can be 1, which is used to indicate that the training frame is the starting frame carrying the thirteenth security message. The value of the second reserved field of the other training frames except the first thirteenth training frame among the 20 thirteenth training frames is 0, which is used to indicate that these training frames are not the starting frames carrying the thirteenth security message. The value of the third reserved field in the 20 thirteenth training frames can all be 0x0011, which can be used to indicate that the message sequence number of the thirteenth security message in the authentication process is 3. Fig. 27 In the figure, ID1 represents the first ID, MN2 represents the second message number, MN3 represents the third message number (MN3=MN1+1), and ICV3 represents the third ICV, which are uniformly described here.
[0313] Optionally, Fig.24 The process of the first device and the second device transmitting training frames shown may also include: step 2404, the first device sends at least one fourteenth training frame to the second device, and correspondingly, the second device receives at least one fourteenth training frame from the first device. At least one fourteenth training frame carries a fourteenth security message, and the fourteenth security message is used to indicate that the second device successfully obtains the SAK.
[0314] Optionally, the fourteenth security message may include a second ID, a third message number, a fourth message number, and a fourth ICV. The second ID may be used to indicate that the fourteenth security message comes from the first device, the third message number may be used to indicate that the fourteenth security message is a response message to the thirteenth security message, the fourth message number may be used to prevent the fourteenth security message from being replayed, and the fourth ICV is used to perform integrity protection on the fourteenth security message. As a possible implementation, the fourth ICV may be a value obtained by the first device by calculating the second ID, the third message number, and the fourth message number according to a preconfigured integrity protection algorithm and key. As a possible implementation, the fourth message number is equal to the second message number plus 1.
[0315] Optionally, the implementation method of the fourteenth training frame carrying the fourteenth security message can refer to the description of the implementation method of the training frame carrying the security message in the above step 701, which will not be repeated here. For example, the fourteenth training frame may include a first reserved field, a second reserved field, and a third reserved field. The fourteenth security message may be carried in the first reserved field of the information field of the fourteenth training frame, the second reserved field may be used to indicate whether the fourteenth training frame is the starting frame carrying the fourteenth security message, and the third reserved field may indicate the message sequence number of the fourteenth security message in the authentication process.
[0316] Exemplarily, the reserved field of the information field of the fourteenth training frame may be as follows: Fig. 9 As shown, the length of the first reserved field of the fourteenth training frame is 16 bits (2 bytes), the length of the second reserved field is 1 bit, and the length of the third reserved field is 4 bits. Assuming that the length of the fourteenth safety message is 40 bytes, the fourteenth safety message needs to be fully carried by 20 fourteenth training frames.
[0317] For example, Fig.28A schematic diagram of 20 fourteenth training frames carrying one fourteenth security message. Among them, the first reserved field in each fourteenth training frame can carry part of the content of the fourteenth security message. The value of the second reserved field of the first fourteenth training frame among the 20 fourteenth training frames can be 1, which is used to indicate that the training frame is the starting frame carrying the fourteenth security message. The value of the second reserved field of the other training frames except the first fourteenth training frame among the 20 fourteenth training frames is 0, which is used to indicate that these training frames are not the starting frames carrying the fourteenth security message. The value of the third reserved field in the 20 fourteenth training frames can all be 0x0100, which can be used to indicate that the message sequence number of the fourteenth security message in the authentication process is 4. Fig. 27 In the figure, ID2 represents the second ID, MN3 represents the third message number (MN3=MN1+1), MN4 represents the fourth message number (MN4=MN2+1), and ICV4 represents the fourth ICV, which are uniformly described here.
[0318] Above Fig.24 The embodiment shows a scheme for implementing key distribution by transmitting training frames, but this scheme is only exemplary, and the key distribution process can also be implemented in an existing manner, such as distributing keys through Ethernet frames after link training, and this application does not impose any restrictions on this.
[0319] Optionally, in Fig.24 In a corresponding embodiment, the first device may be used as a master device for key distribution, and the second device may be used as a slave device for key distribution.
[0320] In the embodiment of the present application, the first device and the second device may only perform authentication without key distribution. Alternatively, the first device and the second device may only perform key distribution without prior authentication. Alternatively, the first device and the second device may perform both authentication and key distribution.
[0321] It should be understood that if the authentication of the first device and the second device is Fig.12 The implementation shown in the figure, then the authentication process is carried out in parallel with the link training process, saving the time of the authentication process. Fig.24 In the implementation manner shown, the key distribution process is performed in parallel with the link training process, saving the time of the key distribution process.
[0322] As a possible implementation, when the first device and the second device perform authentication and key distribution, both authentication and key distribution can be implemented during the link training process. For example, the authentication method can be adopted. Fig.12 In the implementation shown, key distribution can be achieved by Fig.24In this case, the process of transmitting the training frame between the first device and the second device can also be as follows: Fig.29 As shown, the following steps may be included:
[0323] Step 2901: The second device sends an eleventh training frame to the first device, and correspondingly, the first device receives the eleventh training frame from the second device. At least one eleventh training frame carries an eleventh security message. This step can refer to the description of step 1206, which will not be repeated here.
[0324] Step 2902: The first device sends at least one first training frame to the second device, and correspondingly, the second device receives at least one first training frame from the first device. The at least one first training frame carries a first security message. This step can refer to the description of step 1201, which will not be repeated here.
[0325] Step 2903: The second device sends at least one second training frame to the first device, and correspondingly, the first device receives at least one second training frame from the second device. The at least one second training frame carries a second security message. This step can refer to the description of step 1202, which will not be repeated here.
[0326] Step 2904: The first device sends at least one third training frame to the second device, and correspondingly, the second device receives at least one third training frame from the first device. The at least one third training frame carries a third security message. This step can refer to the description of step 1203, which will not be repeated here.
[0327] Step 2905: The second device sends at least one fourth training frame to the first device, and correspondingly, the first device receives at least one fourth training frame from the second device. The at least one fourth training frame carries a fourth security message. This step can refer to the description of step 1204, which will not be repeated here.
[0328] Step 2906: The first device sends at least one tenth training frame to the second device, and correspondingly, the second device receives at least one tenth training frame from the first device. The at least one tenth training frame carries the tenth security message. This step can refer to the description of step 1205, which will not be repeated here.
[0329] Step 2907: The second device sends at least one eighth training frame to the first device, and correspondingly, the first device receives at least one eighth training frame from the second device. The at least one eighth training frame carries the eighth security message. This step can refer to the description of step 2401, which will not be repeated here.
[0330] Step 2908: The first device sends at least one ninth training frame to the second device, and correspondingly, the second device receives at least one ninth training frame from the first device. The at least one ninth training frame carries the ninth security message. This step can refer to the description of step 2402, which will not be repeated here.
[0331] Step 2909: The second device sends at least one thirteenth training frame to the first device, and correspondingly, the first device receives at least one thirteenth training frame from the second device. The at least one thirteenth training frame carries the thirteenth security message. This step can refer to the description of step 2403, which will not be repeated here.
[0332] Step 2910: The first device sends at least one fourteenth training frame to the second device, and correspondingly, the second device receives at least one fourteenth training frame from the first device. The at least one fourteenth training frame carries a fourteenth security message. This step can refer to the description of step 2404, which will not be repeated here.
[0333] It should be noted that, when the first device and the second device perform PSK-based authentication and key distribution, the first device and the second device may pre-configure a key Key for authentication and a root key CAK for key distribution.
[0334] As another possible implementation, in the case where the first device and the second device perform authentication and key distribution, authentication can be implemented during the link training process (for example, the authentication method can be implemented using Fig.12 As shown in the implementation method), key distribution can be implemented using existing communication methods, and this application does not impose any restrictions on this.
[0335] In the above method embodiment, the action of the first device can be Figure 6 The processor 601 in the communication device 60 shown in the figure calls the application code stored in the memory 604 to instruct the first device to execute, and the action of the second device can be performed by Figure 6 The processor 601 in the communication apparatus 60 shown calls the application code stored in the memory 604 to instruct the second device to execute.
[0336] It can be understood that in the above embodiments, the methods and / or steps implemented by the first device can also be implemented by components (such as chips or circuits) that can be used for the first device, and the methods and / or steps implemented by the second device can also be implemented by components (such as chips or circuits) that can be used for the second device.
[0337] Optionally, the embodiment of the present application further provides a communication device, which is used to implement the above-mentioned various methods. The communication device can be the first device in the above-mentioned method embodiment, or a device including the above-mentioned first device, or a component that can be used for the first device. The communication device can also be the second device in the above-mentioned method embodiment, or a device including the above-mentioned second device, or a component that can be used for the second device. It can be understood that in order to realize the above-mentioned functions, the communication device includes a hardware structure and / or software module corresponding to each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
[0338] The embodiment of the present application can divide the functional modules of the communication device according to the above method embodiment. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0339] Fig.30 A schematic diagram of the structure of a communication device is shown. Fig.30 As shown, the communication device 300 includes a transceiver module 3001 and a processing module 3002. The transceiver module 3001, which may also be called a transceiver unit, is used to implement a transceiver function, and may be, for example, a transceiver circuit, a transceiver, a transceiver or a communication interface.
[0340] Wherein, the communication device 300 is taken as the first device in the above method embodiment as an example:
[0341] The transceiver module 3001 can be used to transmit a training frame with a second device, the training frame carrying a security message. The processing module 3002 can be used to perform link training based on the training frame and perform security processing based on the security message.
[0342] Optionally, the transceiver module 3001 is used to transmit a training frame with the second device, which may specifically include: the transceiver module 3001 is used to continuously transmit multiple training frames with the second device, and the multiple training frames carry multiple different security messages. The processing module 3002 is used to perform link training based on the training frames and perform security processing based on the security messages, which may specifically include: the processing module 3002 is used to perform link training based on the multiple training frames and perform security processing based on the multiple different security messages.
[0343] Optionally, the security processing may include authentication. The transceiver module 3001 is used to transmit a training frame with the second device, which may specifically include: first, the transceiver module 3001 is used to send at least one first training frame to the second device, at least one first training frame carries a first security message, and the first security message is used to indicate authentication based on PSK. Then, the transceiver module 3001 is used to receive at least one second training frame from the second device, at least one second training frame carries a second security message, and the second security message includes a first random number and a first identifier ID. Among them, the first random number is generated by the second device, and the first ID is the ID of the second device. Then, the transceiver module 3001 is used to send at least one third training frame to the second device, at least one third training frame carries a third security message, and the third security message includes a first random number, a second random number, a second ID, a first count value, and a first authentication data. Among them, the second random number and the first count value are generated by the transceiver module 3001, and the second ID is the ID used by the transceiver module 3001. The first authentication data is obtained by the transceiver module 3001 by calculating the first random number, the second random number, the first ID, the second ID and the first count value according to the preconfigured algorithm and key, and the first authentication data is used by the second device to authenticate the transceiver module 3001. Then, the transceiver module 3001 is used to receive at least one fourth training frame from the second device, and at least one fourth training frame carries a fourth security message, and the fourth security message includes a second random number, a first count value and a second authentication data. Among them, the second authentication data is obtained by the second device by calculating the second random number, the second ID and the first count value according to the preconfigured algorithm and key, and the second authentication data is used by the transceiver module 3001 to authenticate the second device. Among them, the algorithm and key preconfigured for the transceiver module 3001 and the second device are the same.
[0344] Optionally, the security processing may include authentication. The transceiver module 3001 is used to transmit a training frame with the second device, and specifically may include. First, the transceiver module 3001 is used to send at least one fifth training frame to the second device, at least one fifth training frame carries a fifth security message, and the fifth security message is used to indicate authentication based on a password. Then, the transceiver module 3001 is used to receive at least one sixth training frame from the second device, at least one sixth training frame carries a sixth security message, and the sixth security message includes a third random number, a first ID, a second count value, and a third authentication data. Among them, the third random number and the second count value are generated by the second device, and the first ID is the ID of the second device. The third authentication data is obtained by the second device calculating the third random number, the first ID, and the second count value according to a preconfigured algorithm and a password, and the third authentication data is used by the transceiver module 3001 to authenticate the second device. Then, the transceiver module 3001 is used to send at least one seventh training frame to the second device, at least one seventh training frame carries a seventh security message, and the seventh security message includes a third random number, a fourth random number, a second ID, a second count value, and a fourth authentication data. The fourth random number is generated by the transceiver module 3001, and the second ID is the ID used by the transceiver module 3001. The fourth authentication data is obtained by the transceiver module 3001 by calculating the third random number, the fourth random number, the first ID, the second ID and the second count value according to the preconfigured algorithm and password, and the fourth authentication data is used by the second device to authenticate the transceiver module 3001. The algorithm and password preconfigured by the transceiver module 3001 and the second device are the same.
[0345] Optionally, the security processing may include key distribution. The transceiver module 3001 is used to transmit a training frame with the second device, and may also include: first, the transceiver module 3001 is used to receive at least one eighth training frame from the second device, at least one eighth training frame carries an eighth security message, and the eighth security message includes a start mark, a first ID, and a first security capability parameter. Among them, the start mark is used to indicate the start of key distribution, the first ID is the ID of the second device, and the first security capability parameter is the security capability parameter of the second device. Then, the transceiver module 3001 is used to send at least one ninth training frame to the second device, at least one ninth training frame carries a ninth security message, and the ninth security message includes a second ID, a second security capability parameter, and a security association key SAK. Among them, the second ID is the ID used by the transceiver module 3001, the second security capability parameter is the security capability parameter used by the transceiver module 3001 to determine the transceiver module 3001 for communicating with the second device, and SAK is the key used by the transceiver module 3001 to determine the transceiver module 3001 for communicating with the second device.
[0346] Take the communication device 300 as the second device in the above method embodiment as an example:
[0347] The transceiver module 3001 can be used to transmit a training frame with the first device, the training frame carrying a security message. The processing module 3002 can be used to perform link training based on the training frame and perform security processing based on the security message.
[0348] Optionally, the transceiver module 3001 is used to transmit a training frame with the first device, which may specifically include: the transceiver module 3001 is used to continuously transmit multiple training frames with the first device, and the multiple training frames carry multiple different security messages. The transceiver module 3001 is used to perform link training based on the training frames and perform security processing based on the security messages, which may specifically include: the transceiver module 3001 is used to perform link training based on multiple training frames and perform security processing based on multiple different security messages.
[0349] Optionally, the security processing may include authentication. The transceiver module 3001 is used to transmit a training frame with the first device, which may include: first, the transceiver module 3001 is used to receive at least one first training frame from the first device, at least one first training frame carries a first security message, and the first security message is used to indicate authentication based on PSK. Then, the transceiver module 3001 is used to send at least one second training frame to the first device, at least one second training frame carries a second security message, and the second security message includes a first random number and a first identifier ID. Among them, the first random number is generated by the transceiver module 3001, and the first ID is the ID used by the transceiver module 3001. Then, the transceiver module 3001 is used to receive at least one third training frame from the first device, at least one third training frame carries a third security message, and the third security message includes a first random number, a second random number, a second ID, a first count value, and a first authentication data. Among them, the second random number and the first count value are generated by the first device, and the second ID is the ID of the first device. The first authentication data is obtained by the first device calculating the first random number, the second random number, the first ID, the second ID and the first count value according to the preconfigured algorithm and the key, and the first authentication data is used by the transceiver module 3001 to authenticate the first device. Then, the transceiver module 3001 is used to send at least one fourth training frame to the first device, and the at least one fourth training frame carries a fourth security message, and the fourth security message includes a second random number, a first count value and a second authentication data. Among them, the second authentication data is obtained by the transceiver module 3001 calculating the second random number, the second ID and the first count value according to the preconfigured algorithm and the key, and the second authentication data is used by the first device to authenticate the transceiver module 3001. Among them, the first device and the transceiver module 3001 use the same preconfigured algorithm and key.
[0350] Optionally, the security processing may include authentication. The transceiver module 3001 is used to transmit a training frame with the first device, which may include: first, the transceiver module 3001 is used to receive at least one fifth training frame from the first device, at least one fifth training frame carries a fifth security message, and the fifth security message is used to indicate authentication based on a password. Then, the transceiver module 3001 is used to send at least one sixth training frame to the first device, at least one sixth training frame carries a sixth security message, and the sixth security message includes a third random number, a first ID, a second count value, and a third authentication data. Among them, the third random number and the second count value are generated by the transceiver module 3001, and the first ID is the ID used by the transceiver module 3001. The third authentication data is obtained by the transceiver module 3001 by calculating the third random number, the first ID, and the second count value according to a preconfigured algorithm and a password, and the third authentication data is used by the first device to authenticate the transceiver module 3001. Then, the transceiver module 3001 is used to receive at least one seventh training frame from the first device, and the at least one seventh training frame carries the seventh security message, and the seventh security message includes a third random number, a fourth random number, a second ID, a second count value, and a fourth authentication data. Among them, the fourth random number is generated by the first device, and the second ID is the ID of the first device. The fourth authentication data is obtained by the first device calculating the third random number, the fourth random number, the first ID, the second ID, and the second count value according to the preconfigured algorithm and password, and the fourth authentication data is used by the transceiver module 3001 to authenticate the first device. Among them, the first device and the transceiver module 3001 use the same preconfigured algorithm and password.
[0351] Optionally, the security processing may include key distribution. The transceiver module 3001 is used to transmit a training frame with the first device, and may also include: first, the transceiver module 3001 is used to send at least one eighth training frame to the first device, at least one eighth training frame carries an eighth security message, and the eighth security message includes a start mark, a first ID, and a first security capability parameter. Among them, the start mark is used to indicate the start of key distribution, the first ID is the ID of the transceiver module 3001, and the first security capability parameter is the security capability parameter of the transceiver module 3001. Then, the transceiver module 3001 is used to receive at least one ninth training frame from the transceiver module 3001, at least one ninth training frame carries a ninth security message, and the ninth security message includes a second ID, a second security capability parameter, and a security association key SAK. Among them, the second ID is the ID of the first device, the second security capability parameter is the security capability parameter determined by the first device for the first device to communicate with the transceiver module 3001, and SAK is the key determined by the first device for the first device to communicate with the transceiver module 3001.
[0352] It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, which will not be repeated here. Since the communication device 300 provided in this embodiment can execute the above network startup method, the technical effects that can be obtained can refer to the above method embodiment, which will not be repeated here.
[0353] In this embodiment, the communication device 300 is presented in the form of dividing various functional modules in an integrated manner. The "module" here may refer to a specific ASIC, a circuit, a processor and a memory that executes one or more software or firmware programs, an integrated logic circuit, and / or other devices that can provide the above functions. In a simple embodiment, those skilled in the art can imagine that the communication device 300 can be used Figure 6 The form of the communication device 60 is shown.
[0354] for example, Figure 6 The processor 601 in the communication device 60 shown can call the computer-executable instructions stored in the memory 604 to enable the communication device 60 to execute the network startup method in the above method embodiment.
[0355] Specifically, Fig.10 The functions / implementation process of the transceiver module 3001 and the processing module 3002 can be achieved by Figure 6 The processor 601 in the communication device 60 shown calls the computer execution instructions stored in the memory 604 to implement. Or, Fig.10 The function / implementation process of the transceiver module 3001 can be achieved by Figure 6 The communication interface 603 in the communication device 60 shown in FIG. Fig.10 The function / implementation process of the processing module 3002 in can be Figure 6 The processor 601 in the communication device 60 shown calls the computer execution instructions stored in the memory 604 to implement.
[0356] Since the communication device 300 provided in this embodiment can execute the above-mentioned network startup method, the technical effects that can be obtained can refer to the above-mentioned method embodiment, which will not be repeated here.
[0357] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0358] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0359] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0360] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0361] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0362] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0363] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loading and executing a computer program instruction on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (Digital Subscriber Line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or may contain one or more servers, data centers and other data storage devices that can be integrated with a medium. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)).
[0364] As used in this application, the terms "component", "module", "system", etc. are intended to refer to a computer-related entity, which can be hardware, firmware, a combination of hardware and software, software, or software in operation. For example, a component can be, but is not limited to: a process running on a processor, a processor, an object, an executable file, a thread in execution, a program, and / or a computer. As an example, an application running on a computing device and the computing device can both be components. One or more components can exist in a process and / or thread in execution, and a component can be located in a computer and / or distributed between two or more computers. In addition, these components can be executed from various computer-readable media with various data structures thereon. These components can communicate in a local and / or remote process manner, such as according to a signal with one or more data packets (for example, data from a component that interacts with another component in a local system, a distributed system, and / or interacts with other systems in a signal manner through a network such as the Internet).
[0365] The present application presents various aspects, embodiments, or features around a system that may include multiple devices, components, modules, etc. It should be understood and appreciated that each system may include additional devices, components, modules, etc., and / or may not include all of the devices, components, modules, etc. discussed in conjunction with the figures. In addition, combinations of these schemes may also be used.
[0366] In addition, in the embodiments of the present application, the word "exemplary" is used to indicate an example, illustration or description. Any embodiment or design described as "exemplary" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present concepts in a concrete way.
[0367] In the embodiments of the present application, information, signal, message, and channel can sometimes be used interchangeably. It should be noted that when the distinction between them is not emphasized, the meanings they intend to express are consistent. "Of," "corresponding," and "corresponding" can sometimes be used interchangeably. It should be noted that when the distinction between them is not emphasized, the meanings they intend to express are consistent. "System" and "network" can sometimes be used interchangeably. When the distinction between them is not emphasized, the meanings they intend to express are consistent. For example, "communication network" also refers to "communication system."
[0368] The network architecture and business scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. A person of ordinary skill in the art can appreciate that with the evolution of the network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0369] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A network startup method, characterized in that: The network startup process at least includes a link training process and a security processing process; the method includes: The first device transmits a training frame with the second device, where the training frame carries a security message; The first device performs link training based on the training frame, and performs security processing based on the security message.
2. The method according to claim 1, characterized in that The security processing includes authentication and / or key distribution.
3. The method according to claim 1 or 2, characterized in that: The training frame includes an information field infofield, and the first reserved field in the information field is used to carry the safety message.
4. The method according to claim 3, characterized in that The length of the first reserved field is an integer multiple of 8 bits.
5. The method according to claim 3 or 4, characterized in that: The information domain also includes a second reserved field; the second reserved field is used to indicate whether the training frame is a starting frame corresponding to a security message carried by the first reserved field.
6. The method according to any one of claims 3 to 5, characterized in that: During the security processing, the first device and the second device need to exchange security messages multiple times; the information domain also includes a third reserved field, and the third reserved field is used to indicate the order of the security message carried by the first reserved field in the multiple exchanged security messages.
7. The method according to any one of claims 1 to 6, characterized in that: One training frame carries one security message, or multiple training frames carry one security message together.
8. The method according to claim 7, characterized in that The multiple training frames are training frames that are transmitted continuously.
9. The method according to any one of claims 1 to 8, characterized in that: The security message of the first interaction between the first device and the second device during the security processing is carried in a training frame transmitted based on a preconfigured time; Alternatively, the security message of the first interaction between the first device and the second device during the security processing process is carried in a preset training frame.
10. The method according to any one of claims 1 to 9, characterized in that: The first device and the second device transmit a training frame, including: the first device and the second device continuously transmit a plurality of training frames, the plurality of training frames carrying a plurality of different security messages; The first device performs link training based on the training frame and performs security processing based on the security message, including: The first device performs link training based on the multiple training frames, and performs security processing based on the multiple different security messages.
11. The method according to any one of claims 1 to 10, characterized in that: The security processing includes authentication; the first device and the second device transmit a training frame, including: The first device sends at least one first training frame to the second device, where the at least one first training frame carries a first security message, where the first security message is used to indicate authentication based on a pre-shared key PSK; The first device receives at least one second training frame from the second device, the at least one second training frame carries a second security message, and the second security message includes a first random number and a first identifier ID; wherein the first random number is generated by the second device, and the first ID is the ID of the second device; The first device sends at least one third training frame to the second device, the at least one third training frame carries a third security message, the third security message includes the first random number, the second random number, the second ID, the first count value, and the first authentication data; wherein the second random number and the first count value are generated by the first device, and the second ID is the ID of the first device; the first authentication data is obtained by the first device calculating the first random number, the second random number, the first ID, the second ID and the first count value according to a preconfigured algorithm and a key, and the first authentication data is used for the second device to authenticate the first device; The first device receives at least one fourth training frame from the second device, where the at least one fourth training frame carries a fourth security message, where the fourth security message includes the second random number, the first count value, and second authentication data; wherein the second authentication data is obtained by the second device calculating the second random number, the second ID, and the first count value according to a preconfigured algorithm and a key, and the second authentication data is used by the first device to authenticate the second device; The algorithm and key pre-configured for the first device and the second device are the same.
12. The method according to any one of claims 1 to 11, characterized in that: The security processing includes authentication; the first device and the second device transmit a training frame, including: The first device sends at least one fifth training frame to the second device, where the at least one fifth training frame carries a fifth security message, where the fifth security message is used to indicate authentication based on a password; The first device receives at least one sixth training frame from the second device, the at least one sixth training frame carries a sixth security message, the sixth security message includes a third random number, a first ID, a second count value and third authentication data; wherein the third random number and the second count value are generated by the second device, the first ID is the ID of the second device; the third authentication data is obtained by the second device calculating the third random number, the first ID and the second count value according to a preconfigured algorithm and a password, and the third authentication data is used by the first device to authenticate the second device; The first device sends at least one seventh training frame to the second device, the at least one seventh training frame carries a seventh security message, the seventh security message includes the third random number, the fourth random number, the second ID, the second count value and fourth authentication data; wherein the fourth random number is generated by the first device, and the second ID is the ID of the first device; the fourth authentication data is obtained by the first device calculating the third random number, the fourth random number, the first ID, the second ID and the second count value according to a preconfigured algorithm and a password, and the fourth authentication data is used by the second device to authenticate the first device; The pre-configured algorithms and passwords of the first device and the second device are the same.
13. The method according to any one of claims 1 to 12, characterized in that: The security processing includes key distribution; the first device and the second device transmit a training frame, and further includes: The first device receives at least one eighth training frame from the second device, where the at least one eighth training frame carries an eighth security message, where the eighth security message includes a start marker, a first ID, and a first security capability parameter; wherein the start marker is used to indicate starting key distribution, the first ID is an ID of the second device, and the first security capability parameter is a security capability parameter of the second device; The first device sends at least one ninth training frame to the second device, and the at least one ninth training frame carries a ninth security message, and the ninth security message includes a second ID, a second security capability parameter and a security association key SAK; wherein the second ID is the ID of the first device, the second security capability parameter is a security capability parameter determined by the first device for communication between the first device and the second device, and the SAK is a key determined by the first device for communication between the first device and the second device.
14. A network startup method, characterized in that: The network startup process at least includes a link training process and a security processing process; the method includes: The second device transmits a training frame with the first device, where the training frame carries a security message; The second device performs link training based on the training frame, and performs security processing based on the security message.
15. The method according to claim 14, characterized in that The security processing includes authentication; the second device and the first device transmit a training frame, including: The second device receives at least one first training frame from the second device, where the at least one first training frame carries a first security message, where the first security message is used to indicate authentication based on a pre-shared key PSK; The second device sends at least one second training frame to the first device, where the at least one second training frame carries a second security message, and the second security message includes a first random number and a first identifier ID; wherein the first random number is generated by the second device, and the first ID is an ID of the second device; The second device receives at least one third training frame from the second device, the at least one third training frame carries a third security message, the third security message includes the first random number, the second random number, the second ID, the first count value, and the first authentication data; wherein the second random number and the first count value are generated by the first device, and the second ID is the ID of the first device; the first authentication data is obtained by the first device calculating the first random number, the second random number, the first ID, the second ID and the first count value according to a preconfigured algorithm and a key, and the first authentication data is used for the second device to authenticate the first device; The second device sends at least one fourth training frame to the second device, where the at least one fourth training frame carries a fourth security message, where the fourth security message includes the second random number, the first count value, and second authentication data; wherein the second authentication data is obtained by the second device calculating the second random number, the second ID, and the first count value according to a preconfigured algorithm and a key, and the second authentication data is used by the first device to authenticate the second device; The algorithm and key pre-configured for the first device and the second device are the same.
16. The method according to claim 14, characterized in that The security processing includes authentication; the second device and the first device transmit a training frame, including: The second device receives at least one fifth training frame of the first device, where the at least one fifth training frame carries a fifth security message, where the fifth security message is used to indicate authentication based on a password; The second device sends at least one sixth training frame to the first device, the at least one sixth training frame carries a sixth security message, the sixth security message includes a third random number, a first ID, a second count value and third authentication data; wherein the third random number and the second count value are generated by the second device, the first ID is the ID of the second device; the third authentication data is obtained by the second device calculating the third random number, the first ID and the second count value according to a preconfigured algorithm and a password, and the third authentication data is used by the first device to authenticate the second device; The second device receives at least one seventh training frame from the first device, the at least one seventh training frame carries a seventh security message, the seventh security message includes the third random number, the fourth random number, the second ID, the second count value and fourth authentication data; wherein the fourth random number is generated by the first device, and the second ID is the ID of the first device; the fourth authentication data is obtained by the first device calculating the third random number, the fourth random number, the first ID, the second ID and the second count value according to a preconfigured algorithm and a password, and the fourth authentication data is used by the second device to authenticate the first device; The pre-configured algorithms and passwords of the first device and the second device are the same.
17. The method according to any one of claims 14 to 16, characterized in that: The security processing includes key distribution; the second device and the first device transmit a training frame, and further includes: The second device sends at least one eighth training frame to the first device, where the at least one eighth training frame carries an eighth security message, where the eighth security message includes a start marker, a first ID, and a first security capability parameter; wherein the start marker is used to indicate starting key distribution, the first ID is an ID of the second device, and the first security capability parameter is a security capability parameter of the second device; The second device receives at least one ninth training frame from the first device, and the at least one ninth training frame carries a ninth security message, and the ninth security message includes a second ID, a second security capability parameter and a security association key SAK; wherein the second ID is the ID of the first device, the second security capability parameter is a security capability parameter determined by the first device for the first device to communicate with the second device, and the SAK is a key determined by the first device for the first device to communicate with the second device.
18. A communication device, characterized in that: The communication device comprises: a processor and a memory; The memory is used to store computer-executable instructions. When the processor executes the computer-executable instructions, the communication device executes the network startup method as described in any one of claims 1-13 or 14-17.
19. A computer-readable storage medium, characterized in that: The method comprises instructions which, when executed on a computer, cause the computer to execute the network startup method according to any one of claims 1 to 13 or 14 to 17.
20. A communication system, characterized in that: comprising a first device and a second device, The first device is used to execute the network startup method according to any one of claims 1 to 13, and the second device is used to execute the network startup method according to any one of claims 14 to 17.
Citation Information
Cited By
Data transmission method and device, electronic equipment and storage medium
CN121644697A
