CTCS-3 level train control system train-to-ground session key generation method and system
By using mask keys and ternary cipher tables to generate public and private keys in the CTCS-3 level train control system, the key management center is cancelled, and RBC and OBU share key management, solving the CTCS-3 level vehicle-to-ground communication The security and efficiency issues of the key management system in China have improved the reliability of communication security and key management.
Patent Information
- Application Number
- CN202111493972.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-08
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2041-12-08
AI Technical Summary
In CTCS-3 level vehicle-local communication, the key management system has problems such as low key quality, easy encryption algorithms to be cracked, unsafe key distribution process, high key replacement cost and lack of centralized management.
Using the public and private key generation method based on mask key and ternary cipher table, the public key is generated through XOR processing and hashing functions, and the private key is generated using ternary cipher table, canceling the key management center, RBC and OBU shares key management functions and uses domestic SM4 and SM3 algorithms to enhance security.
It improves the security of vehicle-local communication, reduces the cost of key replacement, enhances the secretness and cracking of session keys, and realizes centralized management and secure allocation of keys.
Smart Images

Figure CN114173303B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicle-ground security communication, and in particular to a method and system for generating a vehicle-ground session key for a CTCS-3 level train control system. Background Art
[0002] In the CTCS (China Train Control System)-3 level train control system, the OBU (On board Unit) and the ground RBC (Raid Block Center) realize two-way data information interaction based on an open wireless network through the GSM-R system (an integrated dedicated digital mobile communication system specially designed for railway communications).
[0003] In order to ensure the safe transmission of key information of train-to-ground train control, a CTCS-3 level train-to-ground communication protocol based on the 3DES symmetric encryption algorithm is constructed according to the EN50159 safety communication standard. The protocol provides security services, namely, the establishment of a secure connection and the secure transmission of application data during the connection lifetime. Among them, the premise of establishing a secure connection is to start the peer entity authentication procedure before the device makes a call, which is used to authenticate the identity of the devices of both communicating parties. The implementation of this security process depends on the authentication key shared between devices. The authentication key is encrypted and shared based on the transmission key, and during the authentication process, the devices of both communicating parties will automatically generate a shared session key based on the authentication key to protect the security-related data between devices. It can be seen that the authentication key, transmission key and effective key management required for peer entity authentication are the key to ensuring the security of CTCS-3 level train-to-ground communication.
[0004] At present, CTCS-3 level vehicle-to-ground communication uses a key management system (KMC) to generate and distribute transmission keys and authentication keys. However, the use of a key management system (KMC) for vehicle-to-ground communication has the following shortcomings:
[0005] 1): Key production uses pseudo-random numbers generated by software, so the key quality is not high;
[0006] 2): All encryption and decryption algorithms use non-domestic 3DES algorithms, which may have a backdoor that can be quickly cracked, increasing the risk of being stolen or tampered with;
[0007] 3): During the key distribution process, the carriers of the plaintext transmission key and the ciphertext authentication key are non-professional media such as CDs, which may cause the risk of key loss and leakage;
[0008] 4): Key injection requires personnel to go to the device site to replace the key, which is very costly. In addition, the authentication key appears in plain text, which increases the risk of key exposure.
[0009] 5): The security equipment did not feedback the key installation results to the key management center, there was no consistency check between the two signal devices involved in the authentication key, and the system lacked centralized management of the key execution status of the entire circuit. Summary of the invention
[0010] In view of the problems existing in the prior art, the embodiments of the present invention provide a method and system for generating a vehicle-to-ground session key for a CTCS-3 level train control system, which overcomes the above problems or at least partially solves the above problems.
[0011] In a first aspect, an embodiment of the present invention provides a method for generating a train-to-ground session key in a CTCS-3 train control system, wherein the CTCS-3 train control system includes a ground radio block center RBC and an on-board train control device OBU, and the method includes:
[0012] Generate a public key based on the mask key and send the public key to the OBU associated with itself;
[0013] Utilize ternary cipher table and mask key to generate private key, and use private key as session key between described OBU;
[0014] The ternary cipher table and mask key are generated offline and stored in the RBC and its associated OBU.
[0015] According to the method for generating a vehicle-to-ground session key for a CTCS-3 level train control system provided by the present invention, the generation of a public key based on a mask key includes:
[0016] Generate a first key T; wherein the first key T and the mask key are both binary numbers of a first preset length;
[0017] XOR the first key T with the mask key to obtain the second key B;
[0018] Processing the second key B using a hash function to obtain a third key A of a fixed length;
[0019] The first key T and the third key A are concatenated, and the concatenated key is used as the public key.
[0020] According to the method for generating a vehicle-to-ground session key for a CTCS-3 level train control system provided by the present invention, the method of generating a private key using a ternary password table and a mask key includes:
[0021] Divide the second key B equally according to a second preset length to obtain a plurality of binary sequences;
[0022] Determine the grid pointed to by each binary sequence in the ternary password table; wherein the binary sequence can read the row and column number of the grid;
[0023] According to the ternary state stream reading method agreed with the OBU, the surrounding grid values of the grids pointed to by each binary sequence are read on the ternary password table, and the ternary state stream corresponding to each binary sequence is converted;
[0024] Combine the ternary state streams corresponding to the binary sequences, and use the combined ternary state stream as the private key;
[0025] The ternary state stream is a binary number of a second preset length; the grid has three grid values, representing "ignore", binary "1" and binary "0" respectively.
[0026] In a second aspect, the present invention further provides an RBC, comprising:
[0027] A public key generation and sending module, used for generating a public key based on a mask key, and sending the public key to an OBU associated with itself;
[0028] A first session key generation module, for generating a private key using a ternary cipher table and a mask key, and using the private key as a session key with the OBU;
[0029] The ternary cipher table and mask key are generated offline and stored in the RBC and its associated OBU.
[0030] In a third aspect, the present invention further provides a method for generating a train-to-ground session key for a CTCS-3 train control system, wherein the CTCS-3 train control system includes a ground radio block center RBC and an on-board train control device OBU, and the method includes:
[0031] Upon receiving the public key sent by the RBC, generating a private key based on the ternary cipher table, the mask key and the public key;
[0032] Using the private key as a session key with the RBC;
[0033] The ternary cipher table and mask key are generated offline and stored in the RBC and its associated OBU.
[0034] According to the method for generating a vehicle-to-ground session key for a CTCS-3 level train control system provided by the present invention, the private key is generated based on a ternary password table, a mask key and the public key, including:
[0035] Split the received public key to obtain the fourth key T′ and the sixth key A′;
[0036] XOR the fourth key T′ with the mask key to obtain the fifth key B′;
[0037] The fifth key B′ is processed by a hash function to obtain the seventh key A of unchanged length. * ;
[0038] The sixth key A′ and the seventh key A * Under the same circumstances, it is determined that there is no abnormality in the public key transmission, and the private key is generated based on the ternary password table and the fifth key B′.
[0039] According to the method for generating a vehicle-to-ground session key for a CTCS-3 level train control system provided by the present invention, the generation of a private key based on a ternary password table and a fifth key B′ includes:
[0040] Divide the fifth key B′ equally according to the second preset length to obtain a plurality of binary sequences;
[0041] Determine the grid pointed to by each binary sequence in the ternary password table; wherein the binary sequence can read the row and column number of the grid;
[0042] According to the ternary state stream reading method agreed with the RBC, the surrounding grid values of the grids pointed to by each binary sequence are read on the ternary password table, and the ternary state stream corresponding to each binary sequence is converted;
[0043] Combine the ternary state streams corresponding to the binary sequences, and use the combined ternary state stream as the private key;
[0044] The ternary state stream is a binary number of a second preset length; the grid has three grid values, representing "ignore", binary "1" and binary "0" respectively.
[0045] In a fourth aspect, the present invention further provides an OBU, wherein the OBU comprises:
[0046] A private key generation module, for generating a private key based on a ternary cipher table, a mask key and the public key upon receiving a public key sent by the RBC;
[0047] A second session key generation module, configured to use a private key as a session key between the RBC;
[0048] The ternary cipher table and mask key are generated offline and stored in the RBC and its associated OBU.
[0049] In a fifth aspect, the present invention further provides a CTCS-3 level train control system vehicle-ground session key generation system, the system comprising: a security module, an RBC, and an OBU associated with the RBC;
[0050] Wherein, the OBU is as shown in the second aspect;
[0051] The RBC is as shown in the fourth aspect;
[0052] The security module is used to generate the ternary password table and mask key offline and store them in the RBC and its associated OBU.
[0053] According to a CTCS-3 level train control system train-to-ground session key generation system provided by the present invention, the ternary password table and mask key in the RBC and its associated OBU are automatically lost after power failure, and are automatically generated and stored in the memory using physical unclonable technology after power-on.
[0054] The present invention provides a method for generating a vehicle-to-ground session key for a CTCS-3 train control system. An RBC generates a public key with a hidden specific address of a ternary cipher table using a mask key, and sends the public key to an OBU. A specific private key is then generated based on the ternary cipher table and the specific address. The key management center required by the vehicle-to-ground safety communication protocol for the CTCS-3 train control system is cancelled, and the key management function required by the vehicle-to-ground safety communication protocol is shared by the RBC and OBU devices in the CTCS-3 train control system. The confidentiality of the session key (private key) between the RBC and the OBU is guaranteed based on the mask key and the ternary cipher table, thereby improving the security of communication between the RBC and the OBU.
[0055] The vehicle-to-ground session key generation method for a CTCS-3 level train control system provided by the present invention generates a private key in a manner consistent with the RBC private key generation process based on a received public key, a ternary cipher table and a mask key, thereby ensuring the consistency of the RBC and OBU private keys and further ensuring the confidentiality of the session key (private key) between the RBC and the OBU, thereby improving the security of communication between the RBC and the OBU.
[0056] The CTCS-3 level train control system vehicle-to-ground session key generation system provided by the present invention cancels the key management center required by the CTCS-3 level train control system vehicle-to-ground security communication protocol, and the RBC and OBU devices in the CTCS-3 level train control system share the key management function required by the vehicle-to-ground security communication protocol, and enhances the difficulty of cracking the session key between the RBC and the OBU. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0058] Figure 1 It is a flow chart of a method for generating a train-to-ground session key for a CTCS-3 level train control system applicable to RBC provided by the present invention;
[0059] Figure 2 This is a ternary password representation provided by the present invention;
[0060] Figure 3 It is a schematic diagram of the structure of RBC provided by the present invention;
[0061] Figure 4 It is a flow chart of a method for generating a vehicle-to-ground session key for a CTCS-3 level train control system applicable to an OBU provided by the present invention;
[0062] Figure 5 It is a structural schematic diagram of the OBU provided by the present invention;
[0063] Figure 6 The present invention provides a system structure diagram for generating a train-to-ground session key for a CTCS-3 level train control system. DETAILED DESCRIPTION
[0064] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0065] In the CTCS-3 level train control system, the safety equipment (including OBU and RBC) realizes two-way information exchange through the GSM-R system. According to the requirements of IEC 62280 (EN50159), the GSM-R system based on the open network needs to be protected from damage and camouflage threats to ensure the security of key information of vehicle-ground interaction. Therefore, the safety equipment in the CTCS train control system uses password-based encryption technology for data transmission to ensure the authenticity and integrity of the interactive messages between the two parties. Specifically, the transmission key (KTRANS) is used to import the authentication key into the OBU and RBC offline. Each time a secure communication is established, the communicating parties use the authentication key (KMAC) for identity authentication, and generate a session key (KSMAC) based on the authentication key to protect the data of the vehicle-ground interactive messages.
[0066] The transmission key, authentication key and session key are the three-level key mechanism used by the CTCS-3 level train control system. As shown in Table 1, the transmission key belongs to the upper key, the authentication key belongs to the middle key, and the session key is the bottom key; the upper key is protected by physical means, the middle key is encrypted by the upper key and protected by the upper key; the lower key is protected by the middle key, so a significant feature of the three-level key mechanism is that the upper key determines the security of the lower key, but the decryption of the lower key will not affect the security of the upper key; because the session key is automatically generated between security devices, the confidentiality of the transmission key and the authentication key is the key to communication security. The CTCS-3 level train control system ensures the confidentiality of the transmission key and the authentication key through the key management system (KMC).
[0067] Table 1
[0068]
[0069] KMC is responsible for the generation, storage, secure distribution, release, destruction and application of transmission keys and authentication keys. The entire process should ensure the authenticity and confidentiality of transmission keys and authentication keys during key transmission.
[0070] KMC mainly performs three tasks: key generation, key distribution and key injection.
[0071] Key generation: The KMC generates the transmission key and authentication key used by the security device. Both keys are 3DES keys.
[0072] Key distribution: It is divided into first-level distribution and second-level distribution; the first-level distribution is responsible for distributing written transmission keys and encrypted authentication keys to signal manufacturers in an offline manner (using offline mobile media to store keys), and then decrypting the authentication keys using the signal manufacturers' respective key file generation tools; the second-level distribution is for each signal manufacturer to use its own dedicated key file generation tool to convert the authentication key into a key format file dedicated to the corresponding signal device; the technical means of this level of transmission process are device-specific, and most of the converted key format files are distributed in plain text or simple transformation of plain text, and a few are protected by the 3DES algorithm.
[0073] Key injection is the process by which signal vendors use special tools to inject authentication keys into security devices. Each signal device uses a device-specific key injection tool, and each signal vendor completes the key injection work.
[0074] KMC specifically performs the following functions:
[0075] (1) Generation and authentication of transmission keys and authentication keys: The KMC is responsible for calculating and generating keys in a secure environment by authorized personnel and programs to make the keys random and unpredictable. The KMC also checks and authenticates the generated keys to ensure that the keys have the same strength.
[0076] (2) Distribution of transmission keys: The KMC determines which pair of security devices in the domain the key is used for, and the key is installed in the device by authorized personnel (such as KC administrators). Unauthorized personnel do not have the authority to change the key. The receiving device will confirm receipt and take necessary measures to make the transmission key effective.
[0077] (3) KMC determines which pair of security devices in the domain the key is used for, and then KMC encrypts the key using the transmission key, sends it confidentially, and installs it to the corresponding security entity in a secure manner. The security entity device will confirm receipt and take necessary measures to make the authentication key effective, and the key should be stored reliably and securely.
[0078] (4) Update the authentication key: The KMC administrator updates the authentication key according to a pre-defined update plan or when it is detected that the key is invalid or not confidential.
[0079] Analysis of the current encryption communication technology of the CTCS-3 level train control system shows that the 3DES encryption algorithm has high security, but the premise is that the communicating parties can distribute the shared key securely and reliably. Table 2 provides four common methods of key sharing and their corresponding characteristics (the communicating parties are security device A and security device B);
[0080] Table 2
[0081]
[0082] Among the three levels of keys under the security protocol, the transmission key is shared through method two (that is, the key management center selects the key and transmits it to A and B through physical means (such as USB shield)), the authentication key is shared through method four (that is, the key management center determines the key to be shared by A and B, and then the key management center encrypts it with the transmission key between A and B and sends it to A and B respectively), and the session key is generated by the authentication key shared between security devices through the key generation algorithm to achieve sharing.
[0083] As can be seen from the above, the transmission key needs to be distributed through an offline secure physical channel, and is shared between the two communicating parties for a long time. It has a permanent characteristic, and its distribution process usually requires the participation of operators. Therefore, the following situations may occur when distributing shared transmission keys: the operator does not meet the requirements or makes an operational error, the physical channel is not secure enough, or the key is cracked and leaked due to long-term invariance. These situations will cause the transmission key to lose security protection, resulting in all subsequent processes related to the key losing security protection. In addition, the distribution, update, and storage of upper-layer keys and intermediate-layer keys all rely on the key management center to complete. If the key management center collapses, is threatened by attacks, or the channel between the key management center and the security device is destroyed, or even the key management center is replaced by other centers with malicious disguises, then the entire secure communication will no longer be secure.
[0084] Looking at the encryption communication technology of the CTCS-3 level train control system, it has the following shortcomings:
[0085] 1): Key production uses pseudo-random numbers generated by software, so the key quality is not high;
[0086] 2) All encryption and decryption algorithms use non-domestic 3DES algorithms, which may contain backdoors that can be quickly cracked, increasing the risk of theft or tampering;
[0087] 3): During the key distribution process, the carriers of the plaintext transmission key and the ciphertext authentication key are non-professional media such as CDs, which may cause the risk of key loss and leakage;
[0088] 4): Key injection requires personnel to go to the device site to replace the key, which is very costly. In addition, the authentication key appears in plain text, which increases the risk of key exposure.
[0089] 5): The security equipment did not feedback the key installation results to the key management center, there was no consistency check between the two signal devices involved in the authentication key, and the system lacked centralized management of the key execution status of the entire circuit.
[0090] In view of this, the present invention proposes a method and system for generating a train-to-ground session key for a CTCS-3 level train control system. Figure 1-Figure 6 The present invention is described.
[0091] First, as Figure 1 As shown, the present invention provides a method for generating a train-to-ground session key for a CTCS-3 level train control system, which is used in a ground radio block center RBC, comprising:
[0092] S11, generating a public key based on the mask key, and sending the public key to the OBU associated with itself; the OBU is the vehicle-mounted train control device OBU;
[0093] Considering that in the current CTCS-3 train control system, the management of transmission keys requires not only a dedicated key management center, but also a secure closed environment and strictly authorized personnel for their generation, offline distribution and installation. The GSM-R network is an open network environment, so the transmission key management needs to set up a secure closed environment and assign management personnel. In addition, in the same key management area, the same transmission key is usually used uniformly, and the same authentication key value can also be used uniformly between different communication interfaces, and the authentication key is encrypted and protected by the transmission key. Since the transmission key remains unchanged for a long time, the transmission key is likely to be cracked, and as long as there is a If the transmission key between the communication interfaces is cracked, the communication in the entire area will lose security; the present invention cancels the key management center required by the vehicle-ground security communication protocol of the CTCS-3 level train control system, and the RBC and OBU devices in the CTCS-3 level train control system share the key management function required by the vehicle-ground security communication protocol; that is, the public key carrying the binary private key information is transmitted between the RBC and the OBU to exchange the binary private key, and only the OBU and the RBC device can independently generate the binary private key; the private key after the key exchange is used to encrypt and decrypt the message, and perform the identity authentication cycle to establish a secure communication environment between the servers. The present invention is explained with RBC as the public key sending end and OBU as the public key receiving end, but it can be understood that the role exchange between RBC and OBU can also realize the secure transmission of information between RBC and OBU.
[0094] It should be understood that the mask key K is generated offline by the security module and preset in the RBC and OBU that need to communicate, that is, only the RBC and OBU know the mask key K, and others have no way of knowing it; the public key generated by the RBC using the mask key hides the private key information serving as the session key, and after the OBU receives the public key, it needs to be decrypted using the mask key K before the private key information can be further extracted; this means that in the case of an unknown mask key K, even if the public key is cracked, the private key information cannot be extracted from it, thereby ensuring the confidentiality of the private key; the security module mentioned here has a secure key generation environment, and the mask key K provides the first level of protection for the security of the session key between the PBC and the OBU.
[0095] In addition, the mask key K is actually a string of binary numbers with a specific length, and the specific length is determined by the security module based on actual working conditions; for example: the mask key K is set to a 256-bit binary number; in the field of communications, binary numbers are generally selected as keys for simplicity, but this scheme can also be reproduced in other bases in a reasonable way.
[0096] S12, utilize ternary cipher table and mask key to generate private key, and use private key as session key between described OBU;
[0097] The ternary password table provided by the present invention is as follows Figure 2 As shown, it is composed of ternary true random numbers (T-TRN) with a specific number of rows and columns; the grid value of the grid in the ternary password table has three different forms, representing "ignore", binary number "1" and binary number "0" respectively; for example: a ternary password table has a format of 256 rows and 256 columns, with a total of 64K (2^16) grids; the ternary password table adopts balanced ternary logic, that is, the grid value of each grid is one of the "-" state, "0" state or "+" state; the "0" state set here represents ignore, the "-" state represents binary "0", and the "+" state represents binary "1".
[0098] Like the mask key K, the security module generates a ternary password table offline for each OBU associated with it based on RBC, and places it in the RBC and OBU accordingly, that is, only the communicating RBC and OBU know the ternary password table, and other parties have no way of knowing it; RBC uses both the mask key and the ternary password table to generate a private key. After the OBU receives the public key, the ternary password table is also required to obtain the private key from the public key. This means that in the case of an unknown ternary password table, even if the public key is cracked, the private key information cannot be extracted from it, thereby ensuring the confidentiality of the private key; the ternary password table provides a second level of protection for the security of the session key between PBC and OBU.
[0099] The ternary cipher table and mask key are generated offline and stored in the RBC and its associated OBU.
[0100] In the actual application of the present invention, the offline generated ternary password table and mask key can be securely stored in the RBC first, and then the RBC and each of its connected OBUs are initialized (i.e., data generation and transmission) so that there is a dedicated and highly secure transmission environment between the RBC and each of its connected OBUs, and then the ternary password table and mask key stored in the RBC are securely downloaded to the secure storage of each OBU connected to the RBC; the secure storage can be a terminal device, a secure microcontroller, a memory and a smart card.
[0101] It is understandable that each OBU connected to the RBC is pre-embedded with a secure storage for storing the ternary password table and the mask key. Of course, the secure storage for storing the ternary password table and the mask key may not be the same; the secure storage here must have two characteristics: one is security, and the other is non-volatility.
[0102] In addition, the present invention stores not "private keys" but "ternary password tables and mask keys", which increases the difficulty of cracking the private keys and ensures the confidentiality of the session keys between the RBC and the OBU.
[0103] The RBC of the present invention generates a public key with a hidden specific address of a ternary cipher table by using a mask key, and sends the public key to the OBU; then generates a specific private key based on the ternary cipher table and the specific address; the key management center required by the vehicle-ground safety communication protocol of the CTCS-3 level train control system is cancelled, and the key management function required by the vehicle-ground safety communication protocol is shared by the RBC and OBU equipment in the CTCS-3 level train control system, and the confidentiality of the session key (private key) between the RBC and the OBU is guaranteed based on the mask key and the ternary cipher table, thereby improving the security of the communication between the RBC and the OBU.
[0104] Based on the above embodiments, as an optional embodiment, generating a public key based on a mask key includes:
[0105] Generate a first key T; wherein the first key T and the mask key are both binary numbers of a first preset length;
[0106] In the present invention, the first key T is randomly generated, and the first key T and the mask key are both binary numbers of a specific length; that is, if the mask key is a 256-bit binary number, then the first key T is also a 256-bit binary number; this setting can provide a basis for subsequent XOR processing.
[0107] The first key T and the mask key are XORed to obtain the second key B; it should be noted that the length of the second key B obtained after XOR processing is the same as the first key T and the mask key, that is, if the first key T and the mask key are 256-bit binary numbers, then the second key B is also a 256-bit binary number. The second key B can represent the address of a specific grid in the ternary cipher table, and the grid address is used to generate the necessary information for a specific private key. Therefore, the second key B is the top priority.
[0108] In addition, the replacement of the second key B only requires RBC to regenerate a set of first keys T, and then perform an XOR operation on the newly generated first key T. The replacement of the second key B will directly lead to the replacement of the corresponding private key. The entire key replacement process is simple, the cost is extremely low and its security is guaranteed.
[0109] The second key B is processed by using a hash function to obtain a third key A of unchanged length;
[0110] In order to improve the security level of the second key B in the present invention, a hash function (also called a hash function and a hash function, including algorithms such as SM3, SM4, SHA, SHA-2 and SHA-3) is used to protect the second key B and attach a password. A hash function is a one-way encryption function that converts an input message into a hash summary. Changes in the algorithm and / or password selected for the hash function, as well as changes in a single bit in the input message, will result in a completely different hash summary.
[0111] Of course, in the present invention, if the second key B is a 256-bit binary number, the generated third key A (hash summary) is also 256 bits.
[0112] The first key T and the third key A are concatenated, and the concatenated key is used as the public key.
[0113] The public key transmitted in the present invention is composed of the first key T and the third key A, that is, the transmission content of the public key is the publicly available coordinate information (first key T) and the corresponding hash value (third key A). Using such a structure, a third party cannot directly extract the second key B from the public key without simultaneously cracking the mask key, the algorithm used by the hash function, and the password used by the hash function. In this case, the obtained public key is meaningless, but the possibility of simultaneously cracking the mask key, the algorithm used by the hash function, and the password used by the hash function is very small, so there is no need to worry about the leakage of the second key B.
[0114] The second key B can represent the address of a specific grid in the ternary cipher table, and the grid address is used to generate the necessary information for a specific private key. Assuming that a third party cracks the ternary cipher table, the private key will not be leaked if the second key B is not known. In addition, assuming that a malicious party possesses the user terminal device, the public key obtained by the malicious party alone will be useless unless the malicious party also has the mask key, the algorithm used by the hash function, and the password used by the hash function.
[0115] The XOR operation, the selection of the hash function and the architecture of using the first key T and the third key A as the public key together provide a third layer of protection for the security of the session key between the PBC and the OBU.
[0116] In addition, all encryption and decryption algorithms used in the present invention are domestic SM4 and SM3 algorithms, and there is no risk of being stolen or tampered with after being quickly cracked; the present invention can also add an additional level of protection through multi-factor authentication, such as a method of biometric authentication of users. In this method, the first key T can be dynamically changed to a different key before the parties communicate, which in turn leads to the generation of different public and private keys, thereby enhancing security.
[0117] Based on the above embodiments, as an optional embodiment, the method of generating a private key by using a ternary password table and a mask key includes:
[0118] Divide the second key B equally according to a second preset length to obtain a plurality of binary sequences;
[0119] The second key B can represent the address of a specific grid in the ternary cipher table, and the grid address is used to generate the necessary information of the specific private key; therefore, it needs to be found out first. The present invention sets a plurality of specific grids, and the plurality of grids together are the necessary information for generating the specific private key.
[0120] It should be noted that the private key and the second key B are both binary numbers with a specific length, for example, both are binary numbers of 256.
[0121] The present invention mentions that the second key B will be equally divided according to the second preset length. Assuming that the density of the ternary password table is 256×256, a 6-bit binary number can represent a grid address, so the second preset length is selected as 16; assuming that the second key B is 256 bits at this time, the 256-bit binary number is divided into 16 binary sequences.
[0122] The division form of the binary sequence can be jointly agreed upon by the RBC and the OBU, for example: the second key B having a 256-bit binary number is divided in order from front to back, that is, the first 16 binary digits are divided into a binary sequence, and the next 16 binary digits are divided into a binary sequence, and so on until all binary sequences are obtained.
[0123] Determine the grid pointed to by each binary sequence in the ternary password table; wherein the binary sequence can read the row and column number of the grid;
[0124] In the present invention, each binary sequence points to a grid address of the ternary password table. The binary sequence is described as a 16-bit binary number. The combination of 8 binary numbers in the binary sequence points to the row where the ternary password table grid is located, and the other 8 binary numbers point to the column where the ternary password table grid is located. The specific formulation is agreed upon by RBC and OBU. For example, the first 8 binary numbers point to the row where the ternary password table grid is located, and the last 8 binary numbers point to the column where the ternary password table grid is located.
[0125] According to the ternary state stream reading method agreed with the OBU, the surrounding grid values of the grids pointed to by each binary sequence are read on the ternary password table, and the ternary state stream corresponding to each binary sequence is converted;
[0126] The ternary state stream is a binary number of a second preset length; the grid has three grid values, representing "ignore", binary "1" and binary "0" respectively.
[0127] The present invention refers to a ternary state stream reading method agreed upon with the OBU, for example: if the grid address is located at the end of a row, a ternary state stream of a second preset length can be extracted from a subsequent row scrolled in a table; if the grid address is located at the bottom of the table, the subsequent row scrolled can be located at the top of the table, so that the ternary state stream of the second preset length can always be extracted; the agreed ternary state stream reading method provides a fourth level of protection for the security of the session key between the PBC and the OBU.
[0128] Assume that the cell values of the ternary password table are "0", "-" and "1", "0" represents ignore, "-" represents binary "0", and "+" represents binary "1". Then when the cell value read is 0, it is automatically skipped, when the cell value read is "-", it is recorded as "0", and when the cell value read is "+", it is recorded as "1" until the ternary state stream of the second preset length is read;
[0129] Combine the ternary state streams corresponding to the binary sequences, and use the combined ternary state stream as the private key;
[0130] Because the ternary state stream is the same length as the binary sequence, the generated private key is the same length as the public key.
[0131] The present invention can extract the same private key from the same public key only when the RBC and OBU have the same mask key and ternary password table at the same time and agree on the algorithm selected by the hash function, the password selected by the hash function and the ternary state stream reading method.
[0132] The entire private key production uses a large number of random processes to ensure the random distribution of the private key, thereby ensuring the security of the private key. In addition, the OBU has the function of feeding back the key negotiation results to the RBC, and the two signal devices involved in the key have a consistency check. The system can centrally manage the execution of the key for the entire route.
[0133] In the second aspect, the RBC provided by the present invention is described. The RBC described below and the method for generating a vehicle-to-ground session key for a CTCS-3 level train control system described in the first aspect can be referenced to each other. Figure 3 An example of a schematic diagram of the structure of RBC is shown below. Figure 3 As shown, the RBC includes: a public key generation and sending module 21 and a first session key generation module 22;
[0134] Wherein, the public key generation and sending module 21 is used to generate a public key based on the mask key and send the public key to the OBU associated with itself;
[0135] The first session key generation module 22 is used to generate a private key using a ternary password table and a mask key, and use the private key as a session key between the OBU;
[0136] The ternary cipher table and mask key are generated offline and stored in the RBC and its associated OBU.
[0137] The RBC of the present invention generates a public key with a hidden specific address of a ternary cipher table by using a mask key, and sends the public key to the OBU; then generates a specific private key based on the ternary cipher table and the specific address; the key management center required by the vehicle-ground safety communication protocol of the CTCS-3 level train control system is cancelled, and the key management function required by the vehicle-ground safety communication protocol is shared by the RBC and OBU equipment in the CTCS-3 level train control system, and the confidentiality of the session key (private key) between the RBC and the OBU is guaranteed based on the mask key and the ternary cipher table, thereby improving the security of the communication between the RBC and the OBU.
[0138] Based on the above embodiments, as an optional embodiment, the public key generation and sending module 21 includes:
[0139] A first key T generating unit, used to generate a first key T; wherein the first key and the mask key are both binary numbers of a first preset length;
[0140] A second key B generating unit, used for performing an XOR process on the first key T and the mask key to obtain a second key B;
[0141] A third key A generating unit, used for processing the second key B using a hash function to obtain a third key A of unchanged length;
[0142] The public key generation unit is used to concatenate the first key T and the third key A, and use the concatenated key as the public key.
[0143] Based on the above embodiments, as an optional embodiment, the first session key generation module 22 includes:
[0144] a dividing unit, configured to equally divide the second key B according to a second preset length to obtain a plurality of binary sequences;
[0145] A determination unit, used to determine the grid pointed to by each binary sequence in the ternary password table; wherein the binary sequence can read the row and column number of the grid;
[0146] A reading unit, configured to read surrounding grid values of grids pointed to by each binary sequence on the ternary password table according to the ternary state stream reading method agreed with the BU, and obtain a ternary state stream corresponding to each binary sequence;
[0147] A combining unit, used for combining the ternary state streams corresponding to the binary sequences, and using the combined ternary state streams as a private key;
[0148] The ternary state stream is a binary number of a second preset length; the grid has three grid values, representing "ignore", binary "1" and binary "0" respectively.
[0149] Thirdly, Figure 4 As shown, the present invention provides a method for generating a vehicle-to-ground session key for a CTCS-3 level train control system, which is used for an on-board train control device OBU, comprising:
[0150] S31. upon receiving the public key sent by the RBC, generating a private key based on the ternary cipher table, the mask key and the public key;
[0151] The public key generated by RBC using the mask key hides the second key B that can represent the address of a specific grid in the ternary cipher table. Correspondingly, OBU needs to use the mask key and extract the second key B from the public key in the same way as RBC. Because RBC uses the second key B and the ternary cipher table to generate a private key, in order to ensure that the private key generated by OBU is consistent with the private key generated by RBC, OBU needs to use the ternary cipher book and generate a private key in the same way as RBC.
[0152] It should be emphasized here that the mask key and ternary codebook used by RBC and OBU must be consistent.
[0153] S32, using the private key as a session key between the RBC;
[0154] The ternary cipher table and mask key are generated offline and stored in the RBC and its associated OBU.
[0155] The present invention generates a private key based on a received public key, a ternary cipher table and a mask key in a manner consistent with an RBC private key generation process, thereby ensuring the consistency of the RBC and OBU private keys and further ensuring the confidentiality of the session key (private key) between the RBC and the OBU, thereby improving the security of communication between the RBC and the OBU.
[0156] Based on the above embodiments, as an optional embodiment, the generating of the private key based on the ternary password table, the mask key and the public key includes:
[0157] Split the received public key to obtain the fourth key T′ and the sixth key A′;
[0158] XOR the fourth key T′ with the mask key to obtain the fifth key B′;
[0159] The fifth key B′ is processed by a hash function to obtain the seventh key A of unchanged length. * ;
[0160] The sixth key A′ and the seventh key A * Under the same circumstances, it is determined that there is no abnormality in the public key transmission, and the private key is generated based on the ternary password table and the fifth key B′.
[0161] Theoretically, if the public key is transmitted correctly, the fourth key T' is consistent with the first key T generated by RBC, and the sixth key A' is consistent with the third key A generated by RBC. However, in order to prevent the failure of information transmission between RBC and OBU caused by public key transmission errors, the public key needs to be verified: the present invention uses the same processing process as RBC to process the fourth key T', that is, the fourth key T' is XOR-processed with the mask key to obtain the fifth key B', and the fifth key B' is processed using a hash function to obtain the seventh key A with unchanged length. * ; It is easy to understand that in the seventh key A * In the same case as the sixth key A′, it means that the fourth key T′ is consistent with the first key T generated by RBC, and the fifth key B′ is consistent with the second key B generated by RBC. At this time, OBU can use the fifth key B′ to generate a private key. If they are inconsistent, then terminate.
[0162] The present invention ensures the accuracy of private key generation by verifying the public key sent by the RBC, thereby ensuring the effectiveness of information transmission between the RBC and the OBU.
[0163] Based on the above embodiments, as an optional embodiment, the generating of the private key based on the ternary password table and the fifth key B′ includes:
[0164] Divide the fifth key B′ equally according to the second preset length to obtain a plurality of binary sequences;
[0165] Determine the grid pointed to by each binary sequence in the ternary password table; wherein the binary sequence can read the row and column number of the grid;
[0166] According to the ternary state stream reading method agreed with the RBC, the surrounding grid values of the grids pointed to by each binary sequence are read on the ternary password table, and the ternary state stream corresponding to each binary sequence is converted;
[0167] Combine the ternary state streams corresponding to the binary sequences, and use the combined ternary state stream as the private key;
[0168] The ternary state stream is a binary number of a second preset length; the grid has three grid values, representing "ignore", binary "1" and binary "0" respectively.
[0169] In the present invention, the process of generating the private key by RBC and OBU is the same, which will not be described in detail here.
[0170] The OBU of the present invention has the same mask key and ternary password table as RBC, and can extract the private key identical to the private key of RBC from the public key sent by RBC only when the algorithm selected by the hash function, the password selected by the hash function and the ternary state stream reading method are agreed with RBC. The entire private key production uses a large number of random processes, which ensures the random distribution of the private key, and further ensures the security of the private key. In addition, the OBU has the function of feeding back the key negotiation result to RBC, and the two signal devices involved in the key have consistency check, and the system can centrally manage the execution of the key of the whole road.
[0171] In a fourth aspect, the OBU provided by the present invention is described. The OBU described below and the method for generating a vehicle-to-ground session key for a CTCS-3 level train control system described in the third aspect can refer to each other. Figure 5 An example of an OBU structure diagram is shown below: Figure 5 As shown, the OBU includes: a private key generation module 41 and a second session key generation module 42;
[0172] The private key generation module 41 is used to generate a private key based on the ternary password table, the mask key and the public key when receiving the public key sent by the RBC;
[0173] The second session key generating module 42 is used to use the private key as the session key between the RBC;
[0174] The ternary cipher table and mask key are generated offline and stored in the RBC and its associated OBU.
[0175] The present invention generates a private key based on a received public key, a ternary cipher table and a mask key in a manner consistent with an RBC private key generation process, thereby ensuring the consistency of the RBC and OBU private keys and further ensuring the confidentiality of the session key (private key) between the RBC and the OBU, thereby improving the security of communication between the RBC and the OBU.
[0176] Based on the above embodiments, as an optional embodiment, the private key generation module 41 includes:
[0177] A fourth key T′ and a sixth key A′ generating unit, used for splitting the received public key to obtain a fourth key T′ and a sixth key A′;
[0178] a fifth key B′ generating unit, configured to perform an XOR process on the fourth key T′ and the mask key to obtain a fifth key B′;
[0179] Seventh Key A * A generating unit, used to process the fifth key B' using a hash function to obtain a seventh key A of unchanged length * ;
[0180] A private key generating unit, used to generate a private key between the sixth key A′ and the seventh key A * Under the same circumstances, it is determined that there is no abnormality in the public key transmission, and the private key is generated based on the ternary password table and the fifth key B′.
[0181] Based on the above embodiments, as an optional embodiment, the private key generation unit includes:
[0182] a dividing subunit, used for equally dividing the fifth key B′ according to a second preset length to obtain a plurality of binary sequences;
[0183] A determination subunit is used to determine the grid pointed to by each binary sequence in the ternary password table; wherein the binary sequence can read the row and column number of the grid;
[0184] A reading subunit is used to read the surrounding grid values of the grids pointed to by each binary sequence on the ternary password table according to the ternary state stream reading method agreed with the RBC, and convert it to obtain the ternary state stream corresponding to each binary sequence;
[0185] A combining subunit, used for combining the ternary state streams corresponding to the binary sequences, and using the combined ternary state stream as a private key;
[0186] The ternary state stream is a binary number of a second preset length; the grid has three grid values, representing "ignore", binary "1" and binary "0" respectively.
[0187] In a fifth aspect, the CTCS-3 level train control system vehicle-ground session key generation system provided by the present invention is described as follows: Figure 6 As shown, the system includes: a security module, an RBC, and an OBU associated with the RBC;
[0188] Wherein, the OBU is as shown in the second aspect; the RBC is as shown in the fourth aspect;
[0189] The security module is used to generate the ternary password table and mask key offline and store them in the RBC and its associated OBU.
[0190] The CTCS-3 level train control system vehicle-to-ground session key generation system provided by the present invention cancels the key management center required by the CTCS-3 level train control system vehicle-to-ground security communication protocol, and the RBC and OBU devices in the CTCS-3 level train control system share the key management function required by the vehicle-to-ground security communication protocol, and enhances the difficulty of cracking the session key between the RBC and the OBU.
[0191] Based on the above embodiments, as an optional embodiment, the ternary password table and mask key in the RBC and its associated OBU are automatically lost after power failure, and are automatically generated and stored in the memory using physical unclonable technology after power-on.
[0192] The present invention cuts off the possibility of externally stealing the ternary password table and the mask key when the RBC and its associated OBU lose power by means of a power-off mode.
[0193] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0194] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0195] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for generating a train-to-ground session key for a CTCS-3 train control system, wherein the CTCS-3 train control system includes a ground radio block center (RBC) and an onboard train control unit (OBU), characterized in that: The method comprises: Generate a public key based on the mask key and send the public key to the OBU associated with itself; Utilize ternary cipher table and mask key to generate private key, and use private key as session key between described OBU; The ternary cipher table and mask key are generated offline and stored in the RBC and its associated OBU.
2. The method for generating a vehicle-to-ground session key for a CTCS-3 level train control system according to claim 1, characterized in that: The generating of a public key based on a masked key comprises: Generate the first key ; Wherein, the first key The mask key and the binary number are both of a first preset length; The first key XOR with the mask key to get the second key ; The second key is hashed using a hash function Processing to obtain a third key of fixed length ; Concatenate the first key With the third key , and use the concatenated key as the public key.
3. The method for generating a vehicle-to-ground session key for a CTCS-3 level train control system according to claim 2, characterized in that: The method of generating a private key by using a ternary password table and a mask key includes: Divide the second key into equal parts according to a second preset length , and obtain multiple binary sequences; Determine the grid pointed to by each binary sequence in the ternary password table; wherein the binary sequence can read the row and column number of the grid; According to the ternary state stream reading method agreed with the OBU, the surrounding grid values of the grids pointed to by each binary sequence are read on the ternary password table, and the ternary state stream corresponding to each binary sequence is converted; Combine the ternary state streams corresponding to the binary sequences, and use the combined ternary state stream as the private key; Wherein, the ternary state stream is a binary number of a second preset length; the grid has three grid values, representing "ignore", binary "1" and binary "0" respectively.
4. An RBC, characterized in that The RBC includes: A public key generation and sending module, used for generating a public key based on a mask key, and sending the public key to an OBU associated with itself; A first session key generation module, for generating a private key using a ternary cipher table and a mask key, and using the private key as a session key with the OBU; The ternary cipher table and mask key are generated offline and stored in the RBC and its associated OBU.
5. A method for generating a train-to-ground session key for a CTCS-3 train control system, wherein the CTCS-3 train control system includes a ground radio block center (RBC) and an onboard train control device (OBU), characterized in that: The method comprises: Upon receiving the public key sent by the RBC, generating a private key based on the ternary cipher table, the mask key and the public key; Using the private key as a session key with the RBC; The ternary cipher table and mask key are generated offline and stored in the RBC and its associated OBU.
6. The method for generating a vehicle-to-ground session key for a CTCS-3 level train control system according to claim 5, characterized in that: The generating of a private key based on a ternary password table, a mask key and the public key comprises: Split the received public key to obtain the fourth key And the Sixth Key ; The fourth key XOR with the mask key to get the fifth key ; The fifth key is hashed using a hash function Processing to obtain the seventh key of fixed length ; In the Sixth Key With the Seventh Key Under the same circumstances, it is determined that there is no abnormality in the public key transmission, based on the ternary password table and the fifth key Generate a private key.
7. The method for generating a vehicle-to-ground session key for a CTCS-3 level train control system according to claim 6, characterized in that: The method is based on the ternary password table and the fifth key Generate a private key, including: Divide the fifth key into equal parts according to the second preset length , and obtain multiple binary sequences; Determine the grid pointed to by each binary sequence in the ternary password table; wherein the binary sequence can read the row and column number of the grid; According to the ternary state stream reading method agreed with the RBC, the surrounding grid values of the grids pointed to by each binary sequence are read on the ternary password table, and the ternary state stream corresponding to each binary sequence is converted; Combine the ternary state streams corresponding to the binary sequences, and use the combined ternary state stream as the private key; Wherein, the ternary state stream is a binary number of a second preset length; the grid has three grid values, representing "ignore", binary "1" and binary "0" respectively.
8. An OBU, characterized in that: The OBU includes: A private key generation module, for generating a private key based on a ternary cipher table, a mask key and the public key upon receiving a public key sent by the RBC; A second session key generation module, configured to use a private key as a session key between the RBC; The ternary cipher table and mask key are generated offline and stored in the RBC and its associated OBU.
9. A CTCS-3 level train control system train-to-ground session key generation system, characterized in that: The system includes: a security module, an RBC, and an OBU associated with the RBC; Wherein, the OBU is as shown in claim 8; the RBC is as shown in claim 4; The security module is used to generate the ternary password table and mask key offline and store them in the RBC and its associated OBU.
10. The CTCS-3 level train control system vehicle-ground session key generation system according to claim 9, characterized in that: The ternary password table and mask key in the RBC and its associated OBU are automatically lost after power failure, and are automatically generated and stored in the memory using physical unclonable technology after power-on.
