Remote security verification method, system and electronic equipment
By implementing remote security verification methods between the server and the client, using the signature algorithm to verify data and exchange protocol verification data for authentication, and two-way security verification through the remote security proof report, the problem of security verification in the existing technology relying on third-party platforms is solved, and security and reliability are improved.
Patent Information
- Application Number
- CN202411604557.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-11-11
AI Technical Summary
In the prior art, security verification between the server and the client relies on a third-party security verification platform, resulting in lower security.
By implementing a remote security verification method between the server and the client, the server receives the client's registration data and sends the signature algorithm verification data and the exchange protocol verification data. After the client verifies the server's identity legitimacy, the server performs security verification based on the client's remote security proof report to achieve two-way security verification.
Improves security verification security between server and client, eliminates dependence on third-party security verification platforms, and enhances the security and reliability of the verification process.
Smart Images

Figure CN119155105B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data encryption technology, and in particular to a remote security verification method, system and electronic device. Background Art
[0002] In the process of establishing a secure channel between the server and the client, both parties need to perform security authentication to verify the accuracy of the other party's identity and the security of the execution environment. Only when the authentication is passed can a secure channel between the two be established. However, the authentication between the server and the client currently relies on a third-party security authentication platform. Different authentication platforms may bring certain security risks, resulting in low security of security authentication between the server and the client. Summary of the invention
[0003] Based on the above problems, in order to improve the security of security verification between the server and the client, the embodiments of the present application provide a remote security verification method, system and electronic device.
[0004] The embodiments of the present application disclose the following technical solutions:
[0005] In a first aspect, an embodiment of the present application provides a remote security verification method, which is applied to a server, and the method includes:
[0006] Receiving registration data from a client; the client runs based on a trusted execution environment;
[0007] In response to the security verification request of the client, the server's signature algorithm verification data and exchange protocol verification data are sent to the client, so that the client can verify the identity security of the server; the signature algorithm verification data is used to characterize the integrity of the first signature public key of the server; the exchange protocol verification data is used to characterize the legitimacy of the identity of the server;
[0008] After the client verifies that the identity of the server is legitimate, the trusted execution environment of the client is security verified according to the remote security certification report for the trusted execution environment from the client and the registration data.
[0009] In a possible implementation, the registration data includes: a target integrity measurement value and a device public key of the client; the remote security attestation report includes: a report signature for the remote security attestation report, a signature verification public key for the report signature, and an actual integrity measurement value;
[0010] The step of performing security verification on the trusted execution environment of the client according to the remote security attestation report for the trusted execution environment from the client and the registration data includes:
[0011] Verifying the integrity of the actual integrity measurement value and the signature verification public key according to the device public key of the client;
[0012] When the integrity verification of the actual integrity measurement value and the signature verification public key passes, verifying the integrity of the report signature through the signature verification public key;
[0013] When the integrity verification of the report signature passes, it is determined whether the actual integrity metric value is the same as the target integrity metric value.
[0014] In a possible implementation manner, after determining whether the actual integrity metric value is the same as the target integrity metric value, the method further includes:
[0015] If the actual integrity metric value is the same as the target integrity metric value, it is determined that the environment state of the trusted execution environment is a secure state.
[0016] In a possible implementation, the trusted execution environment includes: a keystone trusted execution environment; when the trusted execution environment is the keystone, the step of generating the remote security report includes:
[0017] Determine a report signature private key, a signature verification public key, and a second protocol public key used to generate the report signature; the second protocol public key is generated by the same exchange protocol as the server;
[0018] Calculate an actual integrity measurement value of the client, and a first verification signature of the device private key on the actual integrity measurement value and the second signature public key;
[0019] Calculate the report signature private key against the first verification signature, the actual integrity measurement value, and the second signature public key to obtain the report signature;
[0020] The remote security attestation report is determined based on the report signature, the first verification signature, the actual integrity metric value, and the second signature public key.
[0021] In a possible implementation, the signature algorithm verification data includes the first signature public key of the signature algorithm key pair, and a second verification signature for the first signature public key; the exchange protocol verification data includes the first protocol public key of the exchange protocol key pair, and a third verification signature for the first protocol public key;
[0022] The second verification signature is a signature of the device private key of the client for the first signature public key; the third verification signature is a signature of the first protocol private key of the server for the first protocol public key; the first protocol private key is the private key of the protocol key pair;
[0023] In a possible implementation, the step of performing identity security verification on the server by the client includes:
[0024] Verifying the integrity of the first signature public key and the second verification signature according to the device public key of the client;
[0025] When the integrity verification of the first signature public key and the second verification signature passes, the integrity of the first protocol public key and the third verification signature is verified based on the first signature public key.
[0026] In a possible implementation manner, before sending the signature algorithm verification data and the exchange protocol verification data of the server to the client, the method further includes:
[0027] The signature algorithm verification data and the exchange protocol verification data are optimized according to a randomly generated random number sequence.
[0028] In a possible implementation, the integrity measurement value includes: an SM measurement value and an Enclave measurement value; and the client is a RISC-V device.
[0029] In a second aspect, an embodiment of the present application provides a remote security verification system, which is applied to a server, and the system includes:
[0030] A receiving module, configured to receive registration data from a client; the client runs based on a trusted execution environment;
[0031] A sending module, configured to send the signature algorithm verification data and the exchange protocol verification data of the server to the client in response to the security verification request of the client, so that the client can verify the identity security of the server; the signature algorithm verification data is used to characterize the integrity of the first signature public key of the server; the exchange protocol verification data is used to characterize the legitimacy of the identity of the server;
[0032] The verification module is used to perform security verification on the trusted execution environment of the client according to the remote security certification report for the trusted execution environment from the client and the registration data after the client verifies that the identity of the server is legitimate.
[0033] In a third aspect, an embodiment of the present application provides an electronic device, the device comprising: a processor, a memory, and a system bus;
[0034] The processor and the memory are connected via the system bus;
[0035] The memory is used to store one or more programs, and the one or more programs include instructions. When the instructions are executed by the processor, the processor executes any possible remote security verification method in the first aspect.
[0036] Compared with the prior art, the present application has the following beneficial effects: The embodiments of the present application provide a remote security verification method, system and electronic device. The method is applied to a server. First, the server receives registration data from a client. When the server responds to the client's security verification request, it sends the server's signature algorithm verification data and exchange protocol verification data to the client. Among them, the signature algorithm verification data can characterize the integrity of the server's first signature public key, and the exchange protocol verification data can characterize the legitimacy of the server's identity. Therefore, the client can first determine whether the first signature public key sent by the server is complete through the first signature public key. When the first signature public key is complete, the exchange protocol verification data is further verified through the first signature public key, thereby verifying the legitimacy of the server's identity and completing the security verification for the server.
[0037] When the client verifies that the server's identity is legitimate, the server performs security verification on its internal trusted execution environment based on the remote security proof report from the client and the registration data sent by the client during the registration phase. In this way, when the server client has registered, it proves its identity security to the client through the signature algorithm verification data and the exchange protocol verification data. At the same time, since the client runs based on the trusted execution environment and uses the remote proof mechanism of the trusted execution environment, the server can also directly verify the security of the client's execution environment through the remote security proof report fed back by the client and the registration data during the registration phase, thereby realizing remote two-way security verification between the server and the client, no longer needing to rely on a third-party security verification platform, and eliminating the potential security risks of security verification between the server and the client. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the embodiments of the present application 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 application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0039] Figure 1 A flowchart of a remote security verification method provided in an embodiment of the present application;
[0040] Figure 2 A flowchart of another remote security verification method provided in an embodiment of the present application;
[0041] Figure 3 A flowchart of a remote security certification report generation method provided in an embodiment of the present application;
[0042] Figure 4 A schematic diagram of the structure of a remote security verification system provided in an embodiment of the present application;
[0043] Figure 5 A schematic diagram of the structure of a remote security verification electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical solutions and advantages of this application more clear, the following is a further detailed description of this application in combination with specific embodiments and with reference to the accompanying drawings. It should be noted that the embodiments described in the embodiments of this application are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0045] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should be understood by people with ordinary skills in the field to which the present application belongs. The "first", "second" and similar words used in the embodiments of the present application do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "include" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right", etc. are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0046] As described above, currently the verification between the server and the client relies on a third-party security verification platform. Different verification platforms may bring certain security risks, resulting in low security of security verification between the server and the client.
[0047] In order to solve the above problems, the embodiments of the present application provide a remote security verification method, system and electronic device. The method is applied to a server. First, the server receives registration data from a client. When the server responds to the security verification request of the client, it sends the server's signature algorithm verification data and exchange protocol verification data to the client. Among them, the signature algorithm verification data can characterize the integrity of the server's first signature public key, and the exchange protocol verification data can characterize the legitimacy of the server's identity. Therefore, the client can first determine whether the first signature public key sent by the server is complete through the first signature public key. When the first signature public key is complete, the exchange protocol verification data is further verified through the first signature public key, thereby verifying the legitimacy of the server's identity and completing the security verification for the server.
[0048] When the client verifies that the server's identity is legitimate, the server performs security verification on its internal trusted execution environment based on the remote security proof report from the client and the registration data sent by the client during the registration phase. In this way, when the server client has registered, it proves its identity security to the client through the signature algorithm verification data and the exchange protocol verification data. At the same time, since the client runs based on the trusted execution environment and uses the remote proof mechanism of the trusted execution environment, the server can also directly verify the security of the client's execution environment through the remote security proof report fed back by the client and the registration data during the registration phase, thereby realizing remote two-way security verification between the server and the client, no longer needing to rely on a third-party security verification platform, and eliminating the potential security risks of security verification between the server and the client.
[0049] In order to facilitate understanding of the remote security verification method provided in the embodiment of the present application, the private key, public key, and corresponding different signatures and data involved in the scheme will be described using the variables shown in the following table:
[0050]
[0051] Next, the remote security verification method provided in the embodiment of the present application will be introduced in conjunction with the specific embodiment drawings.
[0052] See also Figure 1 , which is a flow chart of a remote security verification method provided by an embodiment of the present application, and specifically includes the following steps:
[0053] S101: receiving registration data from a client; the client runs based on a trusted execution environment.
[0054] In order to establish a trust basis between the client and the server and realize two-way security verification between the two, the server needs to first receive the registration data of the client so that the client can be registered in the server.
[0055] Before the client and the server establish registration, the client uses its own device private key and device public key as the signature public key and signature private key of its own signature algorithm key pair. That is:
[0056]
[0057] Among them, the private key is the client's device private key, which is generated when the client device leaves the factory, stored in a read-only memory, cannot be modified, and is only accessible to the SM in machine mode.
[0058] During the registration phase between the client and the server, when the server receives the registration request from the client, the server will feedback its first signature public key to the client to indicate the signature algorithm used by the server. In order to show its trust in the server, the client will use its own device private key to sign the server's first signature public key, thereby indicating the client's trust in the server: .
[0059] Subsequently, the client sends the registration data consisting of the expected target integrity measurement value, its own device public key, and the signature for the first signature public key to the server, thereby completing the registration.
[0060] Among them, the signature of the client's device private key on the first signature public key can serve as the client's trust anchor for the server, indicating that the client can trust the signature generated by the signature algorithm corresponding to the server's first signature public key.
[0061] It should be noted that the client has its own corresponding device key pair, which includes the client's device private key and device public key. The client's device key pair can also be understood as a trusted root, which is a unique identifier or key generated and stored by hardware to identify and authenticate the device itself. Device keys are usually non-extractable and are used to ensure the identity of the device or for encrypted communications.
[0062] In particular, the client runs based on a trusted execution environment. In the remote security verification method of this embodiment, the client is a RISC-V device. RISC-V is an open source instruction set architecture (ISA) that is used in customized and high-security scenarios. In terms of security applications, RISC-V can provide strong security protection in the processing of sensitive data by supporting technologies such as a trusted execution environment.
[0063] In one possible implementation, the trusted execution environment run by the client can be Keystone. The Keystone project is an open source trusted execution environment implementation that provides developers with a trusted computing environment that isolates the execution environment of applications to ensure that sensitive data is not affected by external threats during processing. Keystone's root of trust is a core component of its security architecture. Its hardware-based immutability and secure storage of keys enable the system to resist various physical and software attacks.
[0064] Therefore, by setting the client as a RISC-V device and configuring the client to run based on a trusted execution environment, it is beneficial to the subsequent remote attestation mechanism based on the trusted execution environment, so that the client can generate a remote security attestation report for its own trusted execution environment, thereby realizing the server's security verification of the client.
[0065] S102: In response to the security verification request of the client, the signature algorithm verification data and the exchange protocol verification data of the server are sent to the client, so that the client can verify the identity security of the server; the signature algorithm verification data is used to characterize the integrity of the first signature public key of the server; the exchange protocol verification data is used to characterize the legitimacy of the identity of the server.
[0066] After the server receives the registration data from the client, it indicates that the client has completed registration on the server. The client can send a security verification request to the server at any time to verify the identity security of the server.
[0067] When the server responds to the client's security verification request, it sends its own signature algorithm verification data and exchange protocol verification data to the client to verify its own identity security to the client. The signature algorithm verification data includes the first signature public key in the signature algorithm key pair and the second verification signature for the first signature public key. Correspondingly, the exchange protocol verification data includes the first protocol public key of the exchange protocol key pair and the third verification signature for the first protocol public key.
[0068] The signature algorithm and key exchange protocol in the server and client have their corresponding key pairs. When the server sends a message containing signature algorithm verification data and exchange protocol verification data to the client, in order to prove its own identity, the server will use the first signature private key in its own signature key pair to calculate the signature for the first protocol public key to obtain the third verification signature, that is:
[0069]
[0070] The third verification signature contains the second protocol public key generated by the server The third verification signature indicates the key exchange protocol used by the server, thereby proving the legitimacy of the server's identity. At the same time, the third verification signature is signed based on the previous first signature public key, thereby proving that this server is the server registered by the client.
[0071] After the client receives the signature algorithm verification data and exchange protocol verification data sent by the server, the client will perform two signature verifications.
[0072] First, the client verifies the integrity of the first signature public key and the second verification signature based on its own device public key, thereby ensuring the integrity and non-repudiation of the first signature public key sent by the server, namely:
[0073]
[0074] Subsequently, when the integrity verification of the first signature public key and the second verification signature passes, while ensuring the integrity of the first signature public key, the integrity of the first protocol public key and the third verification signature is further verified based on the first signature public key, thereby verifying the legitimate identity of the server, that is:
[0075]
[0076] In one possible implementation, the random numbers r1 and r2 can be used to further optimize the signature algorithm verification data and the exchange protocol verification data. The addition of random numbers can effectively ensure the freshness of the transmitted data and prevent the remote security authentication process from being replayed, thereby improving the security of the remote security authentication process.
[0077] In another possible implementation, the signature algorithm between the server and the client can adopt the ED25519 signature algorithm, and the exchange protocol can adopt the X25519 key exchange protocol. Among them, the signature algorithm can be replaced with the RSA signature algorithm or the EDDSA signature algorithm, and the X22519 key exchange protocol can adopt the Diffie-Hellman key exchange protocol, which is not limited in the embodiment of the present application.
[0078] S103: After the client verifies that the identity of the server is legitimate, perform security verification on the trusted execution environment of the client according to a remote security certification report for the trusted execution environment from the client and the registration data.
[0079] After the client confirms the legitimacy of the server's identity, the client generates a remote security attestation report based on the remote attestation mechanism of its own trusted execution environment. The server performs security verification on the client's trusted execution environment based on the remote security attestation report from the client and the registration data sent by the client during the registration phase, thereby achieving remote two-way security verification between the client and the server.
[0080] In a possible implementation, after the two-way remote security authentication between the server and the client is passed, the two can combine their own exchange protocol key pairs to negotiate and generate a shared key between the server and the client.
[0081] For example, when the exchange protocol key pair between the server and the client is a key pair of the X25519 protocol, the server can generate a shared key using the private key in its own X25519 protocol key pair and the public key of the client's X25519 protocol key pair. Similarly, the client needs to generate a shared key based on the private key in its own X25519 protocol key pair and the public key of the server's X25519 protocol key pair. When the shared keys generated by both parties are the same, a secure channel between the server and the client can be generated based on this shared key to facilitate communication between the two.
[0082] Next, the method of performing security verification on the trusted execution environment of the client through the remote security attestation report in step S103 will be introduced in conjunction with the drawings of specific embodiments.
[0083] See also Figure 2 , which is a flow chart of another remote security verification method provided by an embodiment of the present application, specifically comprising the following steps:
[0084] S201: Verify the integrity of the actual integrity measurement value and the integrity of the signature verification public key according to the device public key of the client.
[0085] First of all, it should be noted that the actual integrity measurement value includes the actual SM measurement value. And the actual Enclave measurement value The client's remote security attestation report includes a report signature that ensures the integrity of the remote security attestation report. And the public key to ensure the integrity of the report signature .
[0086] When the client generates a remote security attestation report based on its own trusted execution environment, since the remote security attestation report includes the actual SM measurement value and the actual Enclave measurement value, in order to ensure that the SM measurement value and the actual Enclave measurement value are actually measured by the client itself, the client will sign the actual SM measurement value and the actual Enclave measurement value with its own device private key, thereby proving that the actual integrity measurement value has not been tampered with.
[0087] Similarly, when the client generates a remote security proof report, in order to prove that the remote security proof report has not been tampered with, it also needs to sign the remote security proof report with its own device private key to form a signature .
[0088] Therefore, when the server receives the remote security proof report from the client, it first needs to verify the integrity of the actual integrity measurement value and the signature verification public key through the client's device public key to ensure the actual SM measurement value , Actual Enclave Measurement Value And the signature verification public key Has not been tampered with.
[0089] S202: When the integrity verification of the actual integrity measurement value and the signature verification public key passes, verify the integrity of the report signature through the signature verification public key.
[0090] After the integrity verification of the actual integrity measurement value and the signature verification public key is passed, the signature of the remote security proof report is further verified by the signature verification public key to ensure that the remote security proof report is completely generated by the client and has not been tampered with by the outside.
[0091] S203: When the integrity verification of the report signature passes, determine whether the actual integrity metric value is the same as the target integrity metric value.
[0092] During the registration phase between the client and the server, the registration data sent by the client includes the target integrity metric of the client, namely and The target integrity metric of the client is used to characterize the client's trusted execution environment, the expected level of data integrity, and the level of data confidentiality.
[0093] Therefore, after determining that the client's actual integrity measurement value and the remote security attestation report are both complete, by judging whether the client's target integrity measurement value is consistent with the actual integrity measurement value actually measured by the target client, it is possible to ensure that the client's trusted execution environment is consistent with its expected trusted execution environment, thereby confirming that the client's trusted execution environment has not been maliciously modified.
[0094] Since the consistency judgment between the target integrity measurement value and the actual integrity measurement value is performed only after the signature verification public key, the actual integrity measurement value and the device public key are confirmed to be correct, when the target integrity measurement value of the client is consistent with the actual integrity measurement value, it indicates that the trusted execution environment of the client is secure, and the environment state of the trusted execution environment of the client can be determined as a secure state.
[0095] To further understand the process by which the server verifies the security of the client's execution environment through a remote security attestation report, the specific verification process can be found in the following table:
[0096]
[0097] From the foregoing description, it can be seen that the trusted execution environment in the embodiment of the present application is the Keystone trusted execution environment. Next, in conjunction with the specific embodiment drawings, the method for generating a remote security report of the trusted execution environment of the client when the trusted execution environment is Keystone will be introduced.
[0098] See also Figure 3 , which is a flow chart of a method for generating a remote security proof report provided in an embodiment of the present application, and specifically includes the following steps:
[0099] S301: Determine a report signature private key, a signature verification public key, and a second protocol public key used to generate the report signature; the second protocol public key is generated through the same exchange protocol as the server.
[0100] As can be seen from the previous text, when the server has verified the security of its own identity to the client, the client generates a remote security attestation report for the trusted execution environment through the remote attestation mechanism of the trusted execution environment, and sends the remote security attestation report to the server to verify the security of its own execution environment.
[0101] Therefore, in order to prove the integrity of the remote security proof report to the server, the client needs to sign the remote security proof report with the signature private key. Therefore, the client first needs to generate a report signature private key for signing the remote security proof report, a signature verification public key used by the server to verify the private key, and a second protocol public key used to indicate its own legal identity. Among them, the signature algorithm to which the report signature private key belongs is the same as the signature algorithm of the server. When the server uses the ED25519 algorithm to generate the signature private key, the client also uses the ED25519 algorithm to generate the report signature private key.
[0102] S302: Calculate the actual integrity measurement value of the client and a first verification signature of the device private key on the actual integrity measurement value and the second signature public key.
[0103] Subsequently, the client calculates its own actual integrity measurement value, and signs the actual integrity measurement value and the second signature public key with its own device private key to obtain a first verification signature, thereby proving the data integrity of the actual integrity measurement value and the second signature public key.
[0104] S303: Calculate the report signature private key against the first verification signature, the actual integrity measurement value, and the second signature public key to obtain the report signature.
[0105] S304: Determine the remote security attestation report based on the report signature, the first verification signature, the actual integrity measurement value, and the second signature public key.
[0106] On the premise of ensuring that the actual integrity measurement value and the second signature public key used to verify the report have not been tampered with, the previously generated report signature private key is used to sign all previously constructed data to form a remote security attestation report to prove that the overall remote security attestation report has not been tampered with.
[0107] To further understand the process of building a remote security attestation report, please refer to the following table for details:
[0108]
[0109] An embodiment of the present application provides a remote security verification method. The method is applied to a server. First, the server receives registration data from a client. When the server responds to the client's security verification request, it sends the server's signature algorithm verification data and exchange protocol verification data to the client. Among them, the signature algorithm verification data can characterize the integrity of the server's first signature public key, and the exchange protocol verification data can characterize the legitimacy of the server's identity. Therefore, the client can first determine whether the first signature public key sent by the server is complete through the first signature public key. When the first signature public key is complete, the exchange protocol verification data is further verified through the first signature public key, thereby verifying the legitimacy of the server's identity and completing the security verification for the server.
[0110] When the client verifies that the server's identity is legitimate, the server performs security verification on its internal trusted execution environment based on the remote security proof report from the client and the registration data sent by the client during the registration phase. In this way, when the server client has registered, it proves its identity security to the client through the signature algorithm verification data and the exchange protocol verification data. At the same time, since the client runs based on the trusted execution environment and uses the remote proof mechanism of the trusted execution environment, the server can also directly verify the security of the client's execution environment through the remote security proof report fed back by the client and the registration data during the registration phase, thereby realizing remote two-way security verification between the server and the client, no longer needing to rely on a third-party security verification platform, and eliminating the potential security risks of security verification between the server and the client.
[0111] A remote security verification system provided in an embodiment of the present application is introduced below. The remote security verification system described below and the remote security verification method described above can refer to each other.
[0112] See also Figure 4 , which is a schematic diagram of the structure of a remote security verification system provided in an embodiment of the present application, specifically including the following modules:
[0113] The receiving module 100 is used to receive registration data from a client; the client runs based on a trusted execution environment;
[0114] The sending module 200 is used to send the signature algorithm verification data and the exchange protocol verification data of the server to the client in response to the security verification request of the client, so that the client can verify the identity security of the server; the signature algorithm verification data is used to characterize the integrity of the first signature public key of the server; the exchange protocol verification data is used to characterize the legitimacy of the identity of the server;
[0115] The verification module 300 is used to perform security verification on the trusted execution environment of the client according to the remote security certification report for the trusted execution environment from the client and the registration data after the client verifies that the identity of the server is legitimate.
[0116] See also Figure 5 , which is a schematic diagram of the structure of a remote security verification electronic device provided in an embodiment of the present application, including:
[0117] A memory 11, used for storing computer programs;
[0118] The processor 12 is used to implement the steps of a remote security verification method described in any of the above method embodiments when executing the computer program.
[0119] In this embodiment, the device may be a vehicle-mounted computer, a PC (Personal Computer), or a terminal device such as a smart phone, a tablet computer, a PDA, or a portable computer.
[0120] The device may include a memory 11 , a processor 12 , and a bus 13 .
[0121] Among them, the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of the device, such as a hard disk of the device. In other embodiments, the memory 11 can also be an external storage device of the device, such as a plug-in hard disk equipped on the device, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Further, the memory 11 can also include both an internal storage unit of the device and an external storage device. The memory 11 can not only be used to store application software installed in the device and various types of data, such as program codes for executing fault prediction methods, etc., but can also be used to temporarily store data that has been output or is to be output. The processor 12 can be a central processing unit (CPU) in some embodiments.
[0122] In some embodiments, the processor 12 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor or other data processing chip, used to run program codes or process data stored in the memory 11, such as program codes for executing remote security verification methods.
[0123] The bus 13 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0124] Furthermore, the device may also include a network interface 14, which may optionally include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the device and other electronic devices.
[0125] Optionally, the device may further include a user interface 15, which may include a display (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 15 may also include a standard wired interface and a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device, etc. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the device and to display a visual user interface.
[0126] Figure 5 Only the device with components 11-15 is shown, and it can be understood by those skilled in the art that Figure 5 The structure shown does not constitute a limitation of the device, and may include fewer or more components than shown, or combine certain components, or arrange the components differently.
[0127] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, an embodiment of the present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the remote security verification method described in any of the above embodiments.
[0128] The computer-readable media of the embodiments of the present application include permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0129] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the remote security verification method described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0130] It should be noted that each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for methods, systems and electronic devices, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments. The methods, systems and electronic devices described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components indicated 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. A person of ordinary skill in the art can understand and implement it without creative work.
[0131] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A remote security verification method, characterized in that: Applied to a server, the method comprises: Receiving registration data from a client; the client runs based on a trusted execution environment; In response to the security verification request of the client, the server's signature algorithm verification data and exchange protocol verification data are sent to the client, so that the client can verify the identity security of the server; the signature algorithm verification data is used to characterize the integrity of the first signature public key of the server; the exchange protocol verification data is used to characterize the legitimacy of the identity of the server; After the client verifies that the identity of the server is legitimate, performing security verification on the trusted execution environment of the client according to a remote security certification report for the trusted execution environment from the client and the registration data; The registration data includes the signature of the client for the first signature public key and the device public key of the client itself; The signature algorithm verification data includes the first signature public key of the signature algorithm key pair, and a second verification signature for the first signature public key; the exchange protocol verification data includes the first protocol public key of the exchange protocol key pair, and a third verification signature for the first protocol public key; The second verification signature is a signature of the device private key of the client for the first signature public key; the third verification signature is a signature of the first protocol private key of the server for the first protocol public key; the first protocol private key is the private key of the protocol key pair; The execution step of the client performing identity security verification on the server includes: Verifying the integrity of the first signature public key and the second verification signature according to the device public key of the client; When the integrity verification of the first signature public key and the second verification signature passes, the integrity of the first protocol public key and the third verification signature is verified based on the first signature public key.
2. The method according to claim 1, characterized in that The registration data includes: a target integrity measurement value and a device public key of the client; the remote security attestation report includes: a report signature for the remote security attestation report, a signature verification public key for the report signature, and an actual integrity measurement value; The step of performing security verification on the trusted execution environment of the client according to the remote security attestation report for the trusted execution environment from the client and the registration data includes: Verifying the integrity of the actual integrity measurement value and the signature verification public key according to the device public key of the client; When the integrity verification of the actual integrity measurement value and the signature verification public key passes, verifying the integrity of the report signature through the signature verification public key; When the integrity verification of the report signature passes, it is determined whether the actual integrity metric value is the same as the target integrity metric value.
3. The method according to claim 2, characterized in that After determining whether the actual integrity metric value is the same as the target integrity metric value, the method further includes: If the actual integrity metric value is the same as the target integrity metric value, it is determined that the environment state of the trusted execution environment is a secure state.
4. The method according to claim 3, characterized in that The trusted execution environment includes: a keystone trusted execution environment; when the trusted execution environment is the keystone, the step of generating the remote security attestation report includes: Determine a report signature private key, a signature verification public key, and a second protocol public key used to generate the report signature; the second protocol public key is generated by the same exchange protocol as the server; Calculate an actual integrity measurement value of the client, and a first verification signature of the device private key on the actual integrity measurement value and a second signature public key; Calculate the report signature private key against the first verification signature, the actual integrity measurement value, and the second signature public key to obtain the report signature; The remote security attestation report is determined based on the report signature, the first verification signature, the actual integrity metric value, and the second signature public key.
5. The method according to claim 1, characterized in that Before sending the signature algorithm verification data and the exchange protocol verification data of the server to the client, the method further includes: The signature algorithm verification data and the exchange protocol verification data are optimized according to a randomly generated random number sequence.
6. The method according to claim 2, characterized in that The integrity measurement value includes: an SM measurement value and an Enclave measurement value; the client is a RISC-V device.
7. A remote security verification system, characterized in that: Applied to a server, the system comprises: A receiving module, configured to receive registration data from a client; the client runs based on a trusted execution environment; A sending module, configured to send the signature algorithm verification data and the exchange protocol verification data of the server to the client in response to the security verification request of the client, so that the client can verify the identity security of the server; the signature algorithm verification data is used to characterize the integrity of the first signature public key of the server; the exchange protocol verification data is used to characterize the legitimacy of the identity of the server; A verification module, configured to perform security verification on the trusted execution environment of the client according to a remote security certification report for the trusted execution environment from the client and the registration data after the client verifies that the identity of the server is legitimate; The registration data includes the signature of the client for the first signature public key and the device public key of the client itself; The signature algorithm verification data includes the first signature public key of the signature algorithm key pair, and a second verification signature for the first signature public key; the exchange protocol verification data includes the first protocol public key of the exchange protocol key pair, and a third verification signature for the first protocol public key; The second verification signature is a signature of the device private key of the client for the first signature public key; the third verification signature is a signature of the first protocol private key of the server for the first protocol public key; the first protocol private key is the private key of the protocol key pair; The execution step of the client performing identity security verification on the server includes: Verifying the integrity of the first signature public key and the second verification signature according to the device public key of the client; When the integrity verification of the first signature public key and the second verification signature passes, the integrity of the first protocol public key and the third verification signature is verified based on the first signature public key.
8. An electronic device, characterized in that: The device comprises: a processor, a memory and a system bus; The processor and the memory are connected via the system bus; The memory is used to store one or more programs, wherein the one or more programs include instructions, and when the instructions are executed by the processor, the processor executes the remote security verification method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Method and system for establishing encrypted communication based on remote authentication of trusted hardware, and medium
CN118074919A
Data transmission method and system based on bidirectional identity authentication
CN118646586A