A keyless DDS security authentication and communication method based on OP-TEE
By safely storing and using private keys in OP-TEE, the problems of private key management and encryption key update in DDS are solved, keyless DDS secure authentication and communication are realized, and the security and performance of the system are improved.
Patent Information
- Application Number
- CN202311152420.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-07
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2043-09-07
AI Technical Summary
The scalable and loose coupling characteristics of DDS face unauthorized publish/subscribe and data information leakage, tampering and other threats. In the existing technology, the private keys are not securely stored and are prone to leakage, and the encryption key does not comply with the same-guarantee 2.0 The regular replacement requirements are not effectively controlled by unauthorized issuance.
Safely store the private key in TEE, and remove the private key part in the DDS authentication handshake protocol, use OP-TEE to complete the signature operation in a trusted environment, use the private key only during the authentication handshake, and use Diffie to generate the session key. -Hellman algorithm to avoid private keys directly participating in session key generation.
It effectively avoids private key leakage, improves data security, simplifies application configuration and deployment process, and provides higher security and encryption and decryption performance.
Smart Images

Figure CN117254916B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a data distribution service, and in particular to an OP-TEE-based keyless DDS security authentication and communication method. Background Art
[0002] DDS (Data Distribution Service) is a communication middleware protocol released by OMG (Object Management Group). DDS adopts a data-centric publish / subscribe architecture system to provide a high-performance, highly reliable, scalable, and loosely coupled solution for data transmission and reception in distributed real-time systems. However, the scalability and loose coupling characteristics of DDS make DDS face threats such as unauthorized publishing / subscription and data information leakage and tampering.
[0003] The DDS-SECURITY (DDS security authentication) standard specification proposed by OMG is based on the PKI system and implements authentication service plug-ins, access control service plug-ins, and encryption service plug-ins. In authentication service, the publisher and subscriber use digital certificates to verify each other's identities and generate session keys based on the DHE / ECDHE key exchange algorithm. Access control service uses digital signature authentication technology to authenticate publishing / subscription permissions, thereby achieving access control on domains, topics, etc. and restricting illegal publishing / subscription. Encryption service ensures data encryption and integrity based on the AES-GCM algorithm. Among them, the authentication service requires a private key file to prove the identity. If the private key is stored locally, it is very dangerous. Once the private key is leaked, malicious users can use the private key to tamper with data, impersonate identities, access sensitive information, etc.
[0004] CN112600862A proposes to configure user names and passwords for security authentication in the vehicle network. However, if the configured password is leaked, the entire security authentication system will be cracked, and changing the authentication password is extremely cumbersome. CN115051839A implements DDS access control and information encryption and decryption based on KP-ABE, but the encryption key for each session is the same, which does not meet the requirement of regular password changes in the Security Protection 2.0, and does not implement control over unauthorized releases.
[0005] In order to solve the above problems, a secure storage technology is needed to protect the private key. The secure storage function of TEE (Trusted Execution Environment) can provide a secure storage environment. It will encrypt the data that needs to be saved, and the encryption key used will be regenerated every time the file is updated. The TA (Trusted Application) in TEE runs in an isolated environment, and the encryption, decryption and key generation processes can be completed in TEE. The Linux kernel cannot directly access the data in TEE. Summary of the invention
[0006] In order to solve the deficiencies in the prior art, the object of the present invention is to provide a keyless DDS security authentication and communication method based on OP-TEE.
[0007] To achieve the purpose of the present invention, the technical solution adopted by the present invention is:
[0008] A keyless DDS secure authentication and communication method based on OP-TEE, which stores the private key securely in TEE and moves the private key-related part of the DDS authentication handshake protocol out of the DDS authentication service plug-in;
[0009] When the private key needs to be used to sign data during the handshake, the DDS authentication service plug-in forwards the necessary data to the TEE, which uses the private key to complete the signing operation and returns the signature content to the DDS authentication service plug-in. After obtaining the signature information, the DDS authentication service plug-in continues to execute the DDS authentication handshake protocol;
[0010] The DDS authentication service plug-in performs identity authentication and generates a session key; the two communicating parties communicate using the agreed session key.
[0011] Furthermore, the private key is only used once during the authentication handshake and does not participate in the generation of session keys.
[0012] Furthermore, the DDS authentication service plug-in generates session keys using the Diffie-Hellman algorithm.
[0013] Furthermore, the process of DDS authentication service plug-in identity authentication and session key generation is as follows:
[0014] (1) Participant A sends information 1, the summary of information 1, random number 1 and public key 1 to participant B;
[0015] (2) After receiving the message, participant B verifies the certificate information of participant A and generates random number 2 and public key 2;
[0016] (3) Participant B sends the digest of information 2, random number 2, public key 2, the digest of information 1, random number 1, and public key 1 to OP-TEE;
[0017] (4) OP-TEE calculates the signature using participant B’s private key in a trusted environment and returns it to participant B;
[0018] (5) After receiving the signature, participant B sends information 2, the summary of information 2, random number 2, public key 2, the summary of information 1, random number 1, public key 1 and the signature information to participant A.
[0019] (6) After receiving the message, participant A verifies participant B's certificate information, uses public key PubK2 to verify participant B's signature, and generates a session key based on public key 2;
[0020] (7) Participant A sends the digest of information 1, random number 1, public key 1, the digest of information 2, random number 2, and public key 2 to OP-TEE.
[0021] (8) OP-TEE calculates the signature using participant A’s private key in a trusted environment and returns it to participant A;
[0022] (9) After receiving the signature, participant A sends the summary of information 1, random number 1, public key 1, the summary of information 2, random number 2, public key 2 and the signature information to participant B;
[0023] (10) After receiving the message, participant B uses public key PubK1 to verify participant A's signature and generates a session key based on public key 1.
[0024] Furthermore, after the communicating parties agree on the session key, the public key and the private key are no longer used.
[0025] The beneficial effect of the present invention is that, compared with the prior art, the present invention solves the management problem of certificate private key files based on the secure storage characteristics of OP-TEE. The keyless DDS security authentication proposed by the present invention uses a private key in a trusted TEE environment. Based on the access control policy of TEE, after the private key is imported into TEE, it will be encrypted and stored, effectively avoiding the problem of private key leakage. Moreover, if TEE has encryption hardware, the encryption and decryption performance can be improved. Keyless DDS security authentication not only simplifies the configuration and deployment process of the application, but also provides higher security. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 This is the software architecture diagram of OP-TEE;
[0027] Figure 2This is a flowchart of the DDS authentication service plug-in authentication and session key generation. DETAILED DESCRIPTION
[0028] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of this application.
[0029] The present invention is based on OP-TEE (Open-source Portable Trusted Execution Environment) to ensure the confidentiality and integrity of private key files. The isolated environment provided by OP-TEE can ensure the integrity and confidentiality of code / data, and even replace the dedicated security chip with a software solution to reduce hardware costs. The encryption and decryption of the private key is completed in TEE to achieve keyless identity authentication and encrypted communication. The authentication service plug-in is implemented based on a keyless solution, and the certificate management and DDS-SECURITY are decoupled, which can not only better manage and protect the private key, but also improve the security of the system.
[0030] like Figure 1 The following is the software architecture of OP-TEE. It is necessary to develop a client application (CA) running on Linux and a trusted application (TA) running on OP-TEE. Code / data running on the secure world (such as OP-TEE) cannot be directly accessed from the normal world (such as Linux / Android). CA uses the TEE Client API interface to communicate with TA and obtain security services from it.
[0031] TEE Client API is a set of interfaces provided by TEE for client applications to interact with TEE. Client applications can call functions in TEE through TEE Client API, such as secure storage, encryption, and decryption.
[0032] TEE Internal Core API is a set of interfaces provided by TEE, including cryptographic algorithms, secure storage and other functions.
[0033] TEE Supplicant is a daemon process that runs at the Linux application layer. Its function is to process RPC requests. Its main function is to help TEE access resources on the Linux side.
[0034] The OP-TEE-based keyless DDS security authentication and communication method described in the present invention refers to securely storing the private key in the TEE, removing the part involving the private key in the DDS authentication handshake protocol from the authentication service plug-in, and performing the signing operation of the private key in the TEE.
[0035] The DDS authentication service plug-in generates session keys using the Diffie-Hellman algorithm. The private key is only used for identity authentication and does not participate in the generation of session keys. Once both parties agree on the session key, the public and private keys are no longer needed.
[0036] Keyless DDS security authentication is based on the fact that the private key is only used once during the authentication handshake. When the private key is needed to sign data during the handshake, the DDS authentication service plug-in does not directly use the private key to prove its identity, but forwards the necessary data to the TEE. The TEE uses the private key to complete the signing operation and returns the signature content to the authentication service plug-in. After obtaining the signature information, the authentication service plug-in continues to execute the handshake protocol.
[0037] The DDS authentication service plug-in performs identity authentication and generates a session key; the two communicating parties communicate using the agreed session key.
[0038] Table 1 describes the meaning of the relevant terms used in the handshake protocol.
[0039] Table 1
[0040]
[0041] like Figure 2 As shown, the process of DDS authentication service plug-in authentication and session key generation is as follows:
[0042] (1) Participant A sends information 1 (C1), the digest of information 1 (Hash(C1)), random number 1 (Challenge1), and public key 1 (DH1) to Participant B;
[0043] (2) After receiving the message, Participant B verifies Participant A's certificate and other information, and generates random number 2 (Challenge2) and public key 2 (DH2);
[0044] (3) Participant B sends a summary of Hash(C2), Challenge2, DH2, Hash(C1), Challenge1, and DH1 to OP-TEE.
[0045] (4) OP-TEE calculates the signature using Participant B’s private key in a trusted environment and returns it to Participant B.
[0046] (5) After receiving the signature, Participant B sends information such as C2, Hash(C2), Challenge1, Challenge2, DH2, Hash(C1), DH1, and Signature to Participant A.
[0047] (6) After receiving the message, Participant A verifies Participant B's certificate and other information, uses the public key PubK2 to verify Participant B's signature, and generates a session key based on DH2;
[0048] (7) Participant A sends the summary of Hash(C1), Challenge1, DH1, Challenge2, DH2, and Hash(C2) to OP-TEE;
[0049] (8) OP-TEE calculates the signature using Participant A’s private key in a trusted environment and returns it to Participant A;
[0050] (9) After receiving the signature, Participant A sends information such as Hash(C1), Hash(C2), DH1, DH2, Challenge1, Challenge2, and Signature to Participant B;
[0051] (10) After receiving the message, Participant B uses the public key PubK1 to verify Participant A's signature and generates a session key based on DH1.
[0052] The beneficial effect of the present invention is that, compared with the prior art, the present invention solves the management problem of certificate private key files based on the secure storage characteristics of OP-TEE. The keyless DDS security authentication proposed by the present invention uses a private key in a trusted TEE environment. Based on the access control policy of TEE, after the private key is imported into TEE, it will be encrypted and stored, effectively avoiding the problem of private key leakage. Moreover, if TEE has encryption hardware, the encryption and decryption performance can be improved. Keyless DDS security authentication not only simplifies the configuration and deployment process of the application, but also provides higher security.
[0053] The applicant of the present invention has made a detailed explanation and description of the implementation examples of the present invention in conjunction with the drawings in the specification. However, those skilled in the art should understand that the above implementation examples are only preferred implementation schemes of the present invention, and the detailed description is only to help readers better understand the spirit of the present invention, but not to limit the scope of protection of the present invention. On the contrary, any improvements or modifications based on the inventive spirit of the present invention should fall within the scope of protection of the present invention.
Claims
1. A keyless DDS security authentication and communication method based on OP-TEE, characterized in that: Store private keys securely in the TEE and move the private key-related part of the DDS authentication handshake protocol out of the DDS authentication service plugin. When the private key needs to be used to sign data during the handshake, the DDS authentication service plug-in forwards the necessary data to the TEE, which uses the private key to complete the signing operation and returns the signature content to the DDS authentication service plug-in. After obtaining the signature information, the DDS authentication service plug-in continues to execute the DDS authentication handshake protocol; The DDS authentication service plug-in performs identity authentication and generates session keys; The two communicating parties communicate through the agreed session key; the DDS authentication service plug-in generates the session key using the Diffie-Hellman algorithm, specifically, using the Diffie-Hellman algorithm to generate public key 1 and public key 2; The process of DDS authentication service plug-in authentication and generating session keys is as follows: (1) Participant A sends information 1, the summary of information 1, random number 1 and public key 1 to participant B; (2) After receiving the message, participant B verifies the certificate information of participant A and generates random number 2 and public key 2; (3) Participant B sends the digest of information 2, random number 2, public key 2, the digest of information 1, random number 1, and public key 1 to OP-TEE; (4) OP-TEE calculates the signature using participant B’s private key in a trusted environment and returns it to participant B; (5) After receiving the signature, participant B sends information 2, the summary of information 2, random number 2, public key 2, the summary of information 1, random number 1, public key 1 and the signature information to participant A; (6) After receiving the message, participant A verifies the certificate information of participant B, verifies the signature of participant B using the public key PubK2, and generates the session key based on public key 2; (7) Participant A sends the digest of information 1, random number 1, public key 1, the digest of information 2, random number 2, and public key 2 to OP-TEE; (8) OP-TEE calculates the signature using participant A’s private key in a trusted environment and returns it to participant A; (9) After receiving the signature, participant A sends the summary of information 1, random number 1, public key 1, the summary of information 2, random number 2, public key 2 and the signature information to participant B; (10) After receiving the message, participant B uses public key PubK1 to verify participant A's signature and generates a session key based on public key 1.
2. The keyless DDS security authentication and communication method based on OP-TEE according to claim 1 is characterized in that: The private key is used only once during the authentication handshake and does not participate in the generation of session keys.
3. The keyless DDS security authentication and communication method based on OP-TEE according to claim 1 is characterized in that: After the communicating parties agree on the session key, the public key and private key are no longer used.
