Test result tamper-proofing method based on hardware trusted computing environment
By using a hardware trusted computing environment in an intelligent connected vehicle system, using SGX technology and elliptic curve digital signature algorithm to encrypt the test results, the problem that the simulation test results cannot prove its integrity and security is solved, ensuring that data is transmitted and security and integrity in stored procedures.
Patent Information
- Application Number
- CN202411117814.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-15
- Publication Date
- 2024-11-29
AI Technical Summary
In simulation tests, intelligent connected vehicles face the problem that test results cannot effectively prove their integrity and security, and client data is easily tampered with or stolen during transmission and storage.
Using a method based on a trusted hardware computing environment, the trusted execution environment of SGX is established, and the elliptic curve digital signature algorithm is used to digitally sign the test results with hash encryption algorithm, and the signature data is encrypted using SGX's sealing function. Ensure the security and integrity of data during transmission and storage.
In the intelligent connected vehicle system, it ensures that the test results are not accessed or tampered with unauthorized data, improves data security and credibility, prevents access to privileged software and hardware attacks, and supports flexible configuration and upgrade and maintenance of simulation software.
Smart Images

Figure CN119046152A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to intelligent networked vehicle testing, and in particular to a test result tamper-proofing method based on a hardware trusted computing environment. Background Art
[0002] With the rapid development of autonomous driving technology, while intelligent connected vehicles are improving travel efficiency, new safety risks such as expected functional safety are becoming increasingly prominent. Intelligent connected vehicles face the challenge of massive scenario testing. Compared with real vehicle testing methods, simulation testing has become one of the important pillars of testing and verifying system safety with its advantages of high efficiency, low cost, high safety, and high coverage.
[0003] Existing simulation tools or online simulation platforms focus more on the use scenarios of R&D testing, that is, the test results are for internal reference and viewing by the enterprise. When an enterprise needs to use the test process and test results to prove the testability of its own system to other institutions or the public, it is impossible to effectively disclose the test information on the basis of protecting its own intellectual property rights, nor can it prove that the disclosed test result information has not been tampered with. At the same time, a large amount of data generated in the client may be controlled, stolen, tampered with, damaged, etc. during the backup, transmission, storage, etc. of hardware and software, and the data collected on the client needs to be uploaded to the data storage blockchain. Due to data security and other issues, data sharing often makes it difficult to control people's access to this data.
[0004] Trusted computing technology is a computer system based on secure hardware. Through the combined action of hardware and software, the trustworthiness and security of the computing process and computing results are ensured. Hardware trusted computing environment is a key technology. For example, Intel's SGX (Software Guard Extensions) isolates sensitive operations and data by establishing a protected execution environment (Enclave) to prevent unauthorized access and tampering. At present, the data tampering methods based on trusted computing technology mainly include data signatures, hash algorithms and data encryption. Digital signature is a technology that transforms original data into a fixed-length data string to indicate the source and integrity of the data. Through digital signature, it can be verified whether the data has been tampered with or forged. Hash algorithm is a technology that converts data into a hash value of fixed length. By comparing the hash value, it can be determined whether the data has been modified. Data encryption is a technology that encrypts data before storing or transmitting it, which can ensure the confidentiality and integrity of the data. Based on the problems existing in the prior art, the present invention proposes a method for ensuring that test results cannot be tampered with in a hardware trusted computing environment, which can ensure that the client's software and hardware data are not tampered with under the overall intelligent connected vehicle architecture, while not affecting the flexible configuration and upgrade maintenance of the simulation software and the normal upgrade of the object under test. Summary of the Invention
[0005] The present invention provides a method for preventing the tampering of test results based on a hardware trusted computing environment to overcome at least one technical problem existing in the prior art.
[0006] The present invention provides a method for preventing the tampering of test results based on a hardware trusted computing environment, including:
[0007] Establish a trusted execution environment Enclave of SGX and write test code for processing test data;
[0008] In the intelligent connected vehicle system, load the trusted execution environment Enclave and run the test code to obtain test results;
[0009] Use the elliptic curve digital signature algorithm combined with the hash encryption algorithm to digitally sign the test results to obtain signature data;
[0010] Call the sealing function provided by SGX to seal the signature data to obtain sealed data;
[0011] Transmit the test results and the sealed data to the enterprise receiving end or save them to a storage medium;
[0012] Receive the test results and the sealed data from the transmission channel or read them from the storage medium, and call the unsealing function provided by SGX to decrypt the sealed data to obtain the decrypted signature data;
[0013] Use the received test results to verify the signature of the decrypted signature data.
[0014] Optionally, using the elliptic curve digital signature algorithm combined with the hash encryption algorithm to digitally sign the test results to obtain signature data, specifically:
[0015] Select an elliptic curve and a base point G;
[0016] Randomly generate a key pair, the key pair includes a private key k and a public key K, where K = kG;
[0017] Select a random integer r, where r < n, n represents the order of G, and calculate the point rG = (x, y);
[0018] Perform a hash process on the test results to obtain a hash value h1;
[0019] According to r, h1, and the private key k, calculate s = (h1 + kx) / r;
[0020] Take {rG, s} as the signature data.
[0021] Optionally, the decrypted signature data is verified using the received test result, specifically:
[0022] Perform hash processing on the received test result to obtain a hash value h2;
[0023] Using the public key K, calculate P = h2 / sG + x / sK;
[0024] Compare the P value with rG. When P=rG, it means that the signature verification is successful.
[0025] Optionally, the test result and the sealed data are transmitted to an enterprise receiving end, specifically:
[0026] The intelligent connected vehicle system initiates an SSL / TLS handshake request to the server;
[0027] The server selects security parameters and responds to the intelligent connected vehicle system;
[0028] Generate a shared key according to the selected key exchange algorithm, and generate a session key using the shared key;
[0029] The test result and the sealed data are symmetrically encrypted using the session key and a message authentication code MAC is generated, and then sent to the enterprise receiving end.
[0030] Optionally, receiving the test result and the sealing data from a transmission channel is specifically:
[0031] Decrypting the test result and the sealed data after symmetric encryption and message authentication code generation using the session key to obtain decrypted data;
[0032] The decrypted data is verified using the message authentication code MAC to obtain the test result and the sealed data.
[0033] Optionally, reading the test result and the sealing data from a storage medium is specifically:
[0034] The visitor is authenticated to determine whether the visitor is authorized in the intelligent connected vehicle system. If so, reading the test results and the sealed data is allowed; if not, reading the test results and the sealed data is not allowed.
[0035] Optionally, authenticate the visitor, including username and password authentication or token authentication.
[0036] Optionally, trusted logging is also included, specifically:
[0037] Determine the events and operations that need to be recorded in the intelligent connected vehicle system, design and define the format of log records, and determine the information that should be included in each log entry, including timestamp, event type, event description, and initiator;
[0038] Insert logging function calls in the enclave, write relevant information of the event to a log file or send it to a secure log server in a predetermined format, and write the generated log entries to a local log file;
[0039] Add security attributes to log files in the intelligent connected vehicle system, audit logs regularly, and analyze recorded events and operations.
[0040] Optionally, physical protection of the SGX device is also included, including:
[0041] One or more of limiting physical access to the SGX device, placing the SGX device in a secure and monitored location, and regularly checking the physical security status of the SGX device.
[0042] The innovative features of the embodiments of the present invention include:
[0043] 1. In this embodiment, a hardware-level security isolation zone is established through SGX technology, which can ensure that test data and test code are not subject to unauthorized access during operation and viewing, and ensure that the client hardware and software are not tampered with. At the same time, it does not affect the flexible configuration and upgrade maintenance of the simulation software and the normal upgrade of the object under test. This is one of the innovative points of the embodiment of the present invention.
[0044] 2. In this embodiment, through the application of hardware trusted computing technology, the data encryption and decryption mechanism of the test results generated on the client is strengthened, so that the data can be better protected, the security, integrity and confidentiality of the test results can be ensured, and the user test result data in the intelligent connected vehicle system can be prevented from being accessed by privileged software or being attacked based on hardware. This is one of the innovations of the embodiment of the present invention.
[0045] 3. In this embodiment, the use of hardware trusted computing technology under the intelligent connected vehicle platform can achieve access control and data encryption protection in a safe and trusted environment, thereby improving the credibility and reuse rate of client test data and protecting the rapid development of enterprises and users. This is one of the innovations of the embodiment of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only 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.
[0047] Figure 1 A flow chart of the anti-tampering method provided by an embodiment of the present invention;
[0048] Figure 2 A flow chart of a digital signature provided by an embodiment of the present invention;
[0049] Figure 3 A flow chart of signature verification provided by an embodiment of the present invention;
[0050] Figure 4 A flow chart of data transmission provided by an embodiment of the present invention;
[0051] Figure 5 A flow chart of trusted logging provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0052] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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.
[0053] It should be noted that the terms "including" and "having" and any variations thereof in the embodiments of the present invention and the accompanying drawings are intended to cover non-exclusive inclusions. For example, a process, method, device, product or equipment including a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or equipment.
[0054] The embodiment of the present invention discloses a test result tamper-proof method and device based on a hardware trusted computing environment, which are described in detail below.
[0055] Figure 1 For a flowchart of the anti-tampering method provided by an embodiment of the present invention, please refer to Figure 1 The test result tamper-proof method based on a hardware trusted computing environment provided in this embodiment includes:
[0056] Step 1: Establish the SGX trusted execution environment Enclave and write test code to process test data;
[0057] Step 2: In the intelligent connected vehicle system, load the trusted execution environment Enclave, run the test code, and obtain the test results;
[0058] Step 3: Use the elliptic curve digital signature algorithm combined with the hash encryption algorithm to digitally sign the test results to obtain signature data;
[0059] Step 4: Call the sealing function provided by SGX to seal the signature data and obtain the sealed data;
[0060] Step 5: Transmit the test results and sealed data to the enterprise receiving end or save them to storage media;
[0061] Step 6: Receive the test results and sealed data from the transmission channel or read them from the storage medium, and call the decryption function provided by SGX to decrypt the sealed data to obtain the decrypted signature data;
[0062] Step 7: Use the received test result to verify the decrypted signature data.
[0063] Specifically, please refer to Figure 1 SGX technology can establish a hardware-level security isolation zone to prevent unauthorized access and tampering. Therefore, the test result tamper-proof method based on a hardware trusted computing environment provided in an embodiment of the present invention first establishes an SGX trusted execution environment Enclave through step 1, writes test code for processing test data in this environment, and ensures that these codes can run in the SGX security environment. Since Enclave is an isolated execution environment protected by SGX, it can ensure that test data and test code are not subject to unauthorized access during operation and viewing, thereby preventing user test result data from being accessed by privileged software or being attacked based on hardware in the intelligent connected vehicle system, ensuring that the client's software and hardware are not tampered with, and does not affect the flexible configuration and upgrade maintenance of the simulation software and the normal upgrade of the object under test.
[0064] In step 2, the trusted execution environment Enclave is loaded into the intelligent connected vehicle system. In order to ensure the normal operation of the program and the hardware-level protection during operation, the Enclave needs to be loaded into the hardware environment supported by SGX under the intelligent connected vehicle system. Here, the hardware environment supported by SGX can be, for example, the navigation system. After loading is complete, start the Enclave and run the test code, and the test results can be obtained by processing the test data.
[0065] In trusted computing technology, digital signatures can be used to verify whether data has been tampered with or forged. Based on this, the present invention digitally signs the test results through step 3. After the receiving end receives the data, the integrity and authenticity of the received data can be verified, thereby ensuring that the source of the test results is credible. In the present invention, the test results are digitally signed using an elliptic curve digital signature algorithm combined with a hash encryption algorithm. First, the hash algorithm is applied to the test results to generate a hash value of the test results. Then, the hash value is digitally signed using the private key k inside the Enclave, and the signature data is jointly generated in combination with the elliptic curve digital signature. Using a method combining two signature algorithms to sign the test results can further enhance the strength and security of the digital signature, which is beneficial to improving the security of data transmission.
[0066] After the signature is completed, in order to further enhance data security, the present invention encrypts the signature data through step 4. In this embodiment, the sealing function provided by SGX is directly called inside the intelligent connected vehicle Enclave to seal the signature data and obtain the sealed data. The sealing function of SGX is: sgx_status_t sgx_seal_data(constuint32_t add_mac_txt, const uint32_ttext2encrypt_length, const uint8_t*p_text2encrypt, const uint32_tsealed_data_size, sgx_sealed_data_t*p_sealed_data).
[0067] After obtaining the sealed data, the test results and sealed data are transmitted to the external system or storage device of the enterprise receiving end through step 5. In addition to being transmitted to the enterprise receiving end, it can also be directly saved to a protected storage medium, such as a hardware security module, SGX, etc. When it is necessary to transmit to the enterprise receiving end, a secure communication protocol (such as TLS / SSL) is used for transmission, so that the confidentiality and integrity of the data during transmission can be ensured, and encryption technology is used to protect the data to prevent unauthorized access and theft.
[0068] After the transmission or storage is completed, the enterprise receiving end obtains the data through step 6. When the intelligent connected vehicle system directly transmits data to the enterprise receiving end, it needs to receive the data from the transmission channel. When the intelligent connected vehicle system saves the data to a secure storage medium, the enterprise receiving end needs to read the data from the storage medium.
[0069] Since the intelligent connected vehicle system provides encrypted data, after the enterprise receiving end obtains the data, it needs to call the decryption function provided by SGX to decrypt the sealed data to obtain the decrypted signature data. The decryption function of SGX is as follows: sgx_status_tsgx_unseal_data(const sgx_sealed_data_t*p_sealed_data,uint32_t*p_text_length,uint8_t*p_decrypted_text,uint32_t additional_data_length,uint8_t*p_additional_data).
[0070] By using hardware trusted computing technology for encryption and decryption, the data encryption and decryption mechanism of the test results generated on the client can be strengthened, so that the data can be better protected and the security, integrity and confidentiality of the test results can be ensured.
[0071] After obtaining the decrypted signature data, it is necessary to perform signature verification on the decrypted signature data in step 7 to confirm the authenticity and integrity of the data. When performing signature verification, signature verification is performed based on the received test results. By using signature verification to determine whether the data has been tampered with, the credibility and reuse rate of the user client test data can be improved, thereby protecting the rapid development of enterprises and users.
[0072] The test result anti-tampering method based on hardware trusted computing environment provided by the present invention establishes a hardware-level security isolation zone through SGX technology under the intelligent networked vehicle platform, which solves the problem that the client software and hardware are not tampered with under the overall architecture of the intelligent networked vehicle, while not affecting the flexible configuration and upgrade maintenance of the simulation software and the normal upgrade of the object under test. At the same time, through the application of hardware trusted computing technology, the data encryption and decryption mechanism of the test results generated on the client is strengthened, so that the data is better protected, the security, integrity and confidentiality of the test results are ensured, and the user test result data in the intelligent networked vehicle system is prevented from being accessed by privileged software or being attacked based on hardware.
[0073] Optionally, Figure 2 For a flowchart of a digital signature provided by an embodiment of the present invention, please refer to Figure 2, in step 3, the elliptic curve digital signature algorithm is combined with the hash encryption algorithm to digitally sign the test result to obtain signature data. Specifically: In step 31, an elliptic curve and a base point G are selected; in step 32, a key pair is randomly generated, and the key pair includes a private key k and a public key K, where K = kG; in step 33, a random integer r is selected, where r < n, and n represents the order of G, and the point rG = (x, y) is calculated; in step 34, the test result is hashed to obtain a hash value h1; in step 35, according to r, h1, and the private key k, s = (h1 + kx) / r is calculated; in step 36, {rG, s} is used as the signature data.
[0074] Specifically, an elliptic curve is a set of points on a finite field, and these points satisfy specific mathematical properties. Elliptic curve cryptography uses the points on the elliptic curve for encryption and decryption operations. Compared with other cryptographic methods, it provides a higher level of security with the same key length. The core idea of the elliptic curve digital signature algorithm is to hash the original data and then sign the hash value using the private key. The recipient can use the public key to verify the validity of the signature.
[0075] Please refer to Figure 2 , when performing digital signature, in this embodiment, first in step 31, an elliptic curve and a base point G are selected. Then, a key pair is generated through step 32. The key pair includes a private key k and a public key K. Among them, the private key k is a random number, and the public key K is a point on the elliptic curve, which can be expressed as K = kG.
[0076] Generally, a signature consists of two parts, one part is R and the other part is s, that is, (R, s) together form the digital signature. To calculate R, in step 33, a random integer r is randomly selected, where r < n, and n represents the order of G, and the point rG = (x, y) can be calculated. The obtained point rG here is R. In step 34, the test result is hashed to obtain a hash value h1. In step 35, according to the selected integer r, hash value h1, and private key k, s = (h1 + kx) / r is calculated. After obtaining rG and s, in step 36, the signature data {rG, s} can be combined using rG and s.
[0077] Optionally, Figure 3 For a flowchart of signature verification provided by an embodiment of the present invention, please refer to Figure 1 and Figure 3In step 7, the decrypted signature data is verified using the received test result, specifically: step 71, hashing the received test result to obtain a hash value h2; step 72, using the public key K, calculating P = h2 / sG+x / sK; step 73, comparing the P value with rG, when P = rG, it indicates that the signature verification is successful.
[0078] Specifically, please refer to Figure 3 After the enterprise side obtains the signature data, it needs to verify the signature data to determine the authenticity and reliability of the data. When performing signature verification in this embodiment, through step 71, the received test result is hashed to obtain the hash value h2. In step 72, the point P=h2 / sG+x / sK is calculated using the public key K. It should be noted that the public key K here is the public key K generated in step 3. Therefore, after obtaining the public key in step 3, it is necessary to synchronously share the public key with the enterprise receiving end. After obtaining point P, in step 73, the signature verification can be completed by comparing the P value with rG. For example, when P=rG, it means that the signature verification is successful and the data is valid. Otherwise, it means that the signature verification fails and the data source is unreliable.
[0079] Optionally, Figure 4 For a flow chart of data transmission provided by an embodiment of the present invention, please refer to Figure 1 and Figure 4 In step 5, the test results and sealed data are transmitted to the enterprise receiving end, specifically: step 51, the intelligent connected vehicle system initiates an SSL / TLS handshake request to the server; step 52, the server selects security parameters and responds to the intelligent connected vehicle system; step 53, according to the selected key exchange algorithm, a shared key is generated, and the shared key is used to generate a session key; step 54, the test results and sealed data are symmetrically encrypted and a message authentication code MAC is generated using the session key, and then sent to the enterprise receiving end.
[0080] Specifically, please refer to Figure 4 In order to ensure the confidentiality and integrity of data during transmission and prevent unauthorized access and theft, when transmitting data to the enterprise receiving end, the present invention adopts a secure communication protocol (such as TLS / SSL) for transmission.
[0081] In the intelligent connected vehicle system, the TLS / SSL secure communication protocol first needs to negotiate security parameters. Therefore, in this embodiment, the intelligent connected vehicle system first sends an SSL / TLS handshake request to the server in step 51. After receiving the handshake signal, the server selects security parameters in step 52 and responds to the intelligent connected vehicle system, thereby establishing a connection between the intelligent connected vehicle system and the server.
[0082] After the handshake is successful, in step 53, the intelligent connected vehicle system and the server side negotiate to generate a shared key according to the selected key exchange algorithm, and use the shared key to generate a session key. After obtaining the session key, the intelligent connected vehicle system uses the generated session key to symmetric encrypt the test results and sealed data and generate a message authentication code MAC in step 54, and sends the symmetric encrypted test results and sealed data, as well as the message authentication code MAC to the enterprise receiving end. During the data transmission process, communication through encrypted and authenticated data can ensure the confidentiality and integrity of the data transmission process and prevent risks such as data leakage and tampering during transmission.
[0083] Furthermore, when the test results and sealed data are transmitted to the enterprise receiving end, the enterprise receiving end needs to receive them from the transmission channel. When receiving the test results and sealed data from the transmission channel, since the transmitted data is encrypted, it is necessary to first use the session key to decrypt the encrypted and authenticated test results and sealed data to obtain decrypted data. Then, the decrypted data is verified using the message authentication code MAC to obtain the test results and sealed data.
[0084] Optionally, the test results and sealed data are read from the storage medium, specifically: the visitor's identity is authenticated to determine whether the visitor is authorized in the intelligent connected vehicle system. If so, reading the test results and sealed data is allowed; if not, reading the test results and sealed data is not allowed.
[0085] Specifically, in this embodiment, a hardware security module such as SGX is used as a secure storage medium. When the test results and sealed data are stored in the secure storage medium, the enterprise receiving end can directly read the data from the storage medium. However, in order to avoid data leakage caused by unauthorized access to data, when the enterprise receiving end reads the data, it is necessary to authenticate the visitor and determine whether the visitor is authorized in the intelligent connected vehicle system. If authorized, the reading of test results and sealed data is allowed; otherwise, if unauthorized, the reading of test results and sealed data is not allowed.
[0086] Furthermore, this embodiment adopts an identity-based access control method to determine the permissions of the visitor, ensuring that only authorized users or systems in the intelligent connected vehicle system can access the test results, or only users or systems with specific permissions are allowed to access specific test results. Here, the identity authentication method can be, for example, username and password authentication, token authentication, etc.
[0087] Optionally, Figure 5 For a flow chart of trusted logging provided by an embodiment of the present invention, please refer to Figure 5, also includes trusted logging, specifically: Step 10, determine the events and operations that need to be recorded in the intelligent connected vehicle system, design and define the format of the log records, and determine the information that should be included in each log entry, including timestamp, event type, event description, and initiator; Step 11, insert a logging function call in the Enclave, write the relevant information of the event into the log file in a predetermined format or send it to a secure log server, and write the generated log entries into the local log file; Step 12, add security attributes to the log file in the intelligent connected vehicle system, audit the log regularly, and analyze the recorded events and operations.
[0088] Specifically, in order to ensure the transparency and authenticity of the intelligent connected vehicle testing process, the present invention records all operations and events related to the test results, such as all access events to the test results, including access time, visitor identity and other information, for subsequent auditing and verification.
[0089] When recording trusted logs, first determine the events and operations that need to be recorded in the intelligent connected vehicle system through step 10, and design and define the format of log records to determine the information that should be included in each log entry, such as timestamp, event type, event description, initiator, etc. Then, insert the logging function call in the Enclave through step 11, write the relevant information of the event into the log file or send it to a secure log server in the format designed in step 10, and write the generated log entries into the local log file to ensure the persistent storage of data. At the same time, the log files can be stored in a restricted and secure directory to prevent unauthorized access.
[0090] After the log file is generated, through step 12, security attributes are added to the log file in the intelligent connected vehicle system to ensure that only authorized users can access and modify the log file, and the log is audited regularly to analyze the recorded events and operations to promptly discover potential security issues and abnormal behaviors. At the same time, log analysis tools are used to analyze the logs and generate reports to identify potential security threats, abnormal behaviors or performance issues. Here, regular auditing refers to auditing every predetermined time period, and the value of the predetermined time period can be specifically set as needed, and the present invention does not limit it.
[0091] It should be noted that trusted logging runs through the entire process. For example, all operations from test result generation (including the operation of the Enclave), signing, sealing, transmission to storage need to be recorded to ensure the transparency and traceability of the entire process.
[0092] Optionally, physical protection of the SGX device is also included, including one or more of: limiting physical access to the SGX device, placing the SGX device in a secure and monitored location, and regularly checking the physical security status of the SGX device.
[0093] Specifically, in order to further enhance security, this embodiment also protects the security of the hardware environment through physical means to prevent the hardware from being tampered with or unauthorized access. Physical protection means can, for example, be to equip the cabinet with a remote-controlled electronic lock to limit physical access to the SGX device and related hardware devices, ensuring that only authorized personnel can access and operate the SGX device; or the SGX device can be placed in a safe and monitored location, using a locked cabinet to prevent unauthorized access; the device integrity check can also be performed regularly to ensure that the hardware and firmware of the device have not been damaged or tampered with, and the SGX device can be regularly maintained, inspected and repaired to ensure the physical security status of the device. It should be noted that when protecting hardware devices, any of the above-mentioned physical protection methods can be used, or multiple methods can be combined for protection.
[0094] In addition, in the case of multi-party collaboration, MPC technology can be used to ensure that the calculation process of the test results is not affected by a single participant, and to ensure the credibility and consistency of the results. Determine the multi-party secure computing protocol to be executed, convert the calculation to be performed into a secure circuit, design it to comply with the selected MPC protocol, and compile and optimize the secure circuit to improve computing efficiency and reduce computing and communication costs. Prepare your own test results on the user client, encrypt or split these data to ensure the privacy of the data, and share the encrypted or split data with other user clients.
[0095] When the enterprise receives the client's input for verification, it ensures the legitimacy and integrity of the input test results. Bind the input data to the security circuit to ensure that each client's input is correctly input into the circuit. According to the selected MPC protocol, the calculation protocol is executed inside the SGX to protect each client's input from being leaked, ensuring the security and privacy of the calculation. The results calculated by all parties are merged and the results are decrypted to ensure that only legitimate enterprises can obtain the correct calculation results, and finally the verified calculation results are released to the intelligent connected vehicle system.
[0096] Those skilled in the art can understand that the accompanying drawings are only schematic diagrams of an embodiment, and the modules or processes in the accompanying drawings are not necessarily required to implement the present invention.
[0097] Those skilled in the art can understand that the modules in the device in the embodiment can be distributed in the device in the embodiment according to the description of the embodiment, or can be changed accordingly and located in one or more devices different from the embodiment. The modules in the above embodiment can be combined into one module, or can be further divided into multiple sub-modules.
[0098] 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 test result tamper-proof method based on a hardware trusted computing environment, characterized in that: including: establishing a trusted execution environment Enclave of SGX and writing test code for processing test data; in an intelligent connected vehicle system, loading the trusted execution environment Enclave and running the test code to obtain test results; using an elliptic curve digital signature algorithm combined with a hash encryption algorithm to digitally sign the test results to obtain signature data; invoking the sealing function provided by SGX to seal the signature data to obtain sealed data; transmitting the test results and the sealed data to an enterprise receiving end or saving them to a storage medium; receiving the test results and the sealed data from a transmission channel or reading them from a storage medium, and invoking the unsealing function provided by SGX to decrypt the sealed data to obtain decrypted signature data; using the received test results to perform signature verification on the decrypted signature data.
2. The test result tamper-proof method based on a hardware trusted computing environment according to claim 1, characterized in that: using an elliptic curve digital signature algorithm combined with a hash encryption algorithm to digitally sign the test results to obtain signature data, specifically: selecting an elliptic curve and a base point G; randomly generating a key pair, the key pair including a private key k and a public key K, where K = kG; selecting a random integer r, where r < n, n represents the order of G, and calculating the point rG = (x, y); performing a hash processing on the test results to obtain a hash value h1; calculating s = (h1 + kx) / r according to r, h1, and the private key k; taking {rG, s} as signature data.
3. The test result tamper-proof method based on a hardware trusted computing environment according to claim 2, characterized in that: using the received test results to perform signature verification on the decrypted signature data, specifically: performing a hash processing on the received test results to obtain a hash value h2; using the public key K to calculate P = h2 / sG + x / sK; comparing the P value with rG, when P = rG, it indicates that the signature verification is successful.
4. The test result tamper-proof method based on a hardware trusted computing environment according to claim 1, characterized in that: transmitting the test results and the sealed data to an enterprise receiving end, specifically: an intelligent connected vehicle system initiating an SSL / TLS handshake request to a server; the server side selecting security parameters and responding to the intelligent connected vehicle system; generating a shared key according to the selected key exchange algorithm and generating a session key using the shared key; performing symmetric encryption and generating a message authentication code MAC on the test results and the sealed data using the session key, and then sending them to an enterprise receiving end.
5. The test result tamper-proof method based on a hardware trusted computing environment according to claim 4, characterized in that: receiving the test results and the sealed data from a transmission channel, specifically: using the session key to decrypt the test results and the sealed data after symmetric encryption and message authentication code generation to obtain decrypted data; using the message authentication code MAC to verify the decrypted data to obtain the test results and the sealed data.
6. The test result tamper-proof method based on a hardware trusted computing environment according to claim 1, characterized in that: reading the test results and the sealed data from a storage medium, specifically: performing an authentication on a visitor to determine whether the visitor is authorized in the intelligent connected vehicle system. If so, allowing the reading of the test results and the sealed data; if not, not allowing the reading of the test results and the sealed data.
7. The test result tamper-proof method based on a hardware trusted computing environment according to claim 6, characterized in that: performing an authentication on a visitor includes username / password verification or token verification.
8. The test result tamper-proof method based on a hardware trusted computing environment according to claim 1, characterized in that: It also includes trusted logging, specifically: Identify the events and operations that need to be recorded in the intelligent connected vehicle system, design and define the log record format, and determine the information that should be included in each log entry, including timestamp, event type, event description, and initiator; Insert logging function calls into the enclave, write relevant information about the event to a log file in a predetermined format or send it to a secure log server, and write the generated log entries to a local log file; Add security attributes to log files in intelligent connected vehicle systems, audit logs regularly, and analyze recorded events and operations.
9. The test result tamper-proof method based on a hardware trusted computing environment according to claim 1, characterized in that: This also includes physical protection of SGX devices, including: One or more of: limiting physical access to the SGX device, placing the SGX device in a secure and monitored location, and regularly performing physical security status checks on the SGX device.
Citation Information
Cited By
Working condition data visualization method based on hardware trust root and medium
CN122595378A
