Security verification method and device
By generating public and private keys through a key exchange symmetric algorithm and performing two-way verification, combined with runtime environment information for dual security verification, the problem of lax authentication in cross-system data calls is solved, thus improving the security and reliability of data calls.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-25
- Publication Date
- 2026-03-24
AI Technical Summary
In existing technologies, cross-system data calls lack a secure verification process, resulting in insufficient authentication of the data caller and potential issues such as impersonation or low security in data calls.
A key-swapping symmetric algorithm is used to generate public and private keys for bidirectional verification. The public and private keys generated by the key-swapping symmetric algorithm are used to encrypt information, and combined with the operating environment information, a dual security verification is performed to ensure bidirectional verification between the data providing system and the data calling system.
It implements dual verification between the data providing system and the data calling system, improving the security and reliability of cross-system data calls and ensuring the reliability of the verification results of target information and dynamic operating environment.
Smart Images

Figure CN121727730A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to a security verification method, apparatus, computer-readable storage medium, and electronic device. Background Technology
[0002] With the continuous development of computer technology, various computer systems have emerged. There is a need for cross-system data access between multiple computer systems in the same scenario. For example, a low-security in-vehicle infotainment system might send a data request to a high-security advanced driver assistance system. Summary of the Invention
[0003] Currently, there is a lack of security verification processes for computer systems that act as data callers, which could lead to situations where data callers are impersonated and data calls are made, resulting in low security for cross-system data calls.
[0004] To address the aforementioned technical problems, this disclosure provides a security verification method, apparatus, computer-readable storage medium, and electronic device, which can achieve secure verification of data access systems and improve the security of subsequent cross-system data access.
[0005] The first aspect of this disclosure provides a security verification method applied to a data providing system, comprising: determining first verification information of a data calling system; determining a first security verification result based on the first verification information; the data calling system determining a first public key and a first private key based on a key-switching symmetric algorithm, the first verification information including the first public key; if the first security verification result is successful, determining a second public key and a second private key based on the key-switching symmetric algorithm; determining a target ciphertext corresponding to target information based on the first public key and the second private key; sending the target ciphertext and the second public key to the data calling system; determining second verification information of the data calling system, the second verification information being determined by the data calling system based on the second public key, the first private key, the target ciphertext, and the operating environment information of the data calling system; and determining a second security verification result based on the second verification information, the first public key, the second private key, and preset verification rules.
[0006] A second aspect of this disclosure provides another security verification method applied to a data retrieval system, comprising: determining a first public key and a first private key based on a key-exchange symmetric algorithm; sending first verification information to a data providing system, so that the data providing system determines a first security verification result based on the first verification information; if the first security verification result is successful, determining a second public key and a second private key based on the key-exchange symmetric algorithm, and determining a target ciphertext corresponding to the target information based on the first public key and the second private key; the first verification information includes the first public key; obtaining the target ciphertext and the second public key from the data providing system, and determining second verification information based on the second public key, the first private key, the target ciphertext, and the operating environment information of the data retrieval system; sending the second verification information to the data providing system, so that the data providing system determines a second security verification result based on the second verification information, the first public key, the second private key, and a preset verification rule.
[0007] A third aspect of this disclosure provides a security verification device applied to a data providing system, comprising: a first verification module, configured to determine first verification information of a data calling system, and determine a first security verification result based on the first verification information; the data calling system determines a first public key and a first private key based on a key exchange symmetric algorithm, the first verification information including the first public key; a first determining module, configured to, if the first security verification result is passed, determine a second public key and a second private key based on the key exchange symmetric algorithm, and determine a target ciphertext corresponding to target information based on the first public key and the second private key; a sending module, configured to send the target ciphertext and the second public key to the data calling system; a second determining module, configured to determine second verification information of the data calling system, the second verification information being determined by the data calling system based on the second public key, the first private key, the target ciphertext, and the operating environment information of the data calling system; and a second verification module, configured to determine a second security verification result based on the second verification information, the first public key, the second private key, and preset verification rules.
[0008] A fourth aspect of this disclosure provides a security verification device applied to a data retrieval system, comprising: a first determining module, configured to determine a first public key and a first private key based on a key exchange symmetric algorithm; a first sending module, configured to send first verification information to a data providing system, so that the data providing system determines a first security verification result based on the first verification information, and if the first security verification result is successful, determines a second public key and a second private key based on the key exchange symmetric algorithm, and determines target ciphertext corresponding to target information based on the first public key and the second private key; the first verification information includes the first public key; a second determining module, configured to obtain the target ciphertext and the second public key from the data providing system, and determine second verification information based on the second public key, the first private key, the target ciphertext, and the operating environment information of the data retrieval system; and a second sending module, configured to send the second verification information to the data providing system, so that the data providing system determines a second security verification result based on the second verification information, the first public key, the second private key, and a preset verification rule.
[0009] The fifth aspect of this disclosure provides a computer-readable storage medium storing a computer program for performing the security verification method provided in the first or second aspect.
[0010] The sixth aspect of this disclosure provides an electronic device comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to read executable instructions from the memory and execute the executable instructions to implement the security verification method provided in the first or second aspect.
[0011] Using the security verification method provided in this disclosure, the data retrieval system generates a first public key and a first private key using a key-exchange symmetric algorithm, and the data providing system generates a second public key and a second private key using the same key-exchange symmetric algorithm. After key exchange, the information encrypted by the data providing system using the first public key and the second private key should be identical to the information encrypted by the data retrieval system using the second public key and the first private key. Based on this, the data providing system first performs a first security verification based on the first information to be verified, including the first public key, to determine the first security verification result. If the first security verification result is successful, the data providing system then determines the target ciphertext corresponding to the target information based on the first public key and the second private key, and sends the target ciphertext to the data retrieval system. The data retrieval system determines the second information to be verified based on the second public key, the first private key, the target ciphertext, and the operating environment information of the data retrieval system, and returns the second information to be verified to the data providing system. The data providing system performs a second security verification based on the second information to be verified, the first public key, the second private key, and preset verification rules to determine the second security verification result. Thus, based on the key exchange symmetric algorithm and target information, bidirectional verification between the data providing system and the data retrieving system is achieved, and the entire verification process is a dual verification process, ensuring high reliability. Furthermore, not only the target information is verified, but also the dynamic operating environment information, further improving the reliability of the verification results and enhancing the security of subsequent cross-system data retrieval. Attached Figure Description
[0012] Figure 1 This is a schematic diagram of the composition architecture of an electronic device provided in an exemplary embodiment of the present disclosure.
[0013] Figure 2A This is a flowchart illustrating a security verification method provided in an exemplary embodiment of this disclosure.
[0014] Figure 2B This is a flowchart illustrating a data retrieval method provided in an exemplary embodiment of this disclosure.
[0015] Figure 2C This is a flowchart illustrating the process for determining the first security verification result provided in an exemplary embodiment of this disclosure.
[0016] Figure 2D This is a flowchart illustrating the target information determination process provided in an exemplary embodiment of this disclosure.
[0017] Figure 2E This is a flowchart illustrating the target information determination process provided in an exemplary embodiment of this disclosure.
[0018] Figure 2F This is a schematic diagram of the process for returning target data provided in an exemplary embodiment of this disclosure.
[0019] Figure 3A This is a flowchart illustrating a security verification method provided in an exemplary embodiment of this disclosure.
[0020] Figure 3B This is a schematic diagram of a data retrieval method provided in an exemplary embodiment of this disclosure.
[0021] Figure 3C This is a flowchart illustrating the first verification information sending process provided in an exemplary embodiment of this disclosure.
[0022] Figure 3D This is a flowchart illustrating the first verification information sending process provided in an exemplary embodiment of this disclosure.
[0023] Figure 3E This is a flowchart illustrating the first verification information sending process provided in an exemplary embodiment of this disclosure.
[0024] Figure 4A This is a flowchart illustrating a security verification method provided in an exemplary embodiment of this disclosure.
[0025] Figure 4B This is a flowchart illustrating a data retrieval method provided in an exemplary embodiment of this disclosure.
[0026] Figure 5A This is a schematic diagram of the structure of a security verification device provided in an exemplary embodiment of the present disclosure.
[0027] Figure 5B This is a schematic diagram of the structure of a security verification device provided in another exemplary embodiment of this disclosure.
[0028] Figure 6 This is a structural diagram of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0029] To explain this disclosure, exemplary embodiments of the disclosure will now be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the disclosure, and not all of them. It should be understood that the disclosure is not limited to exemplary embodiments.
[0030] It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values of the components and steps set forth in these embodiments do not limit the scope of this disclosure.
[0031] Application Overview
[0032] When multiple systems run on the same electronic device, a large number of cross-operating system remote procedure calls (RPCs) may be needed to collaboratively achieve certain functions. Data calls between different systems can be achieved through cross-process communication middleware such as gRPC (Google RPC) and eRPC (Embedded RPC). However, these communication middlewares only provide the basic communication channels for implementing remote function calls between operating systems and lack necessary security and privacy protections, thus posing risks of security and privacy leaks.
[0033] Especially in vehicles, when the security level of the data retrieval system is lower than that of the data provider system—for example, when the data retrieval system is an in-vehicle infotainment system and the data provider system is an advanced driver assistance system (ADAS)—it's possible for the in-vehicle infotainment system to impersonate the ADAS and send RPCs to the ADAS. If the ADAS accepts all RPCs from the in-vehicle infotainment system without proper identification, it could affect the safety and stability of the ADAS's operation.
[0034] To address this issue, this disclosure provides two security verification methods, one of which can be executed by a data providing system and the other by a data calling system.
[0035] The method executed by the data providing system includes: determining first verification information to be verified by the data calling system; determining a first security verification result based on the first verification information; the data calling system determining a first public key and a first private key based on a key exchange symmetric algorithm, wherein the first verification information includes the first public key; if the first security verification result is successful, determining a second public key and a second private key based on the key exchange symmetric algorithm; determining a target ciphertext corresponding to the target information based on the first public key and the second private key; sending the target ciphertext and the second public key to the data calling system; determining second verification information to be verified by the data calling system, wherein the second verification information is determined by the data calling system based on the second public key, the first private key, the target ciphertext, and the operating environment information of the data calling system; and determining a second security verification result based on the second verification information, the first public key, the second private key, and a preset verification rule.
[0036] Accordingly, the method executed by the data retrieval system includes: determining a first public key and a first private key based on a key exchange symmetric algorithm; sending first verification information to a data providing system, so that the data providing system can determine a first security verification result based on the first verification information; if the first security verification result is successful, determining a second public key and a second private key based on the key exchange symmetric algorithm; determining the target ciphertext corresponding to the target information based on the first public key and the second private key; the first verification information includes the first public key; obtaining the target ciphertext and the second public key from the data providing system; determining second verification information based on the second public key, the first private key, the target ciphertext, and the operating environment information of the data retrieval system; sending the second verification information to the data providing system, so that the data providing system can determine a second security verification result based on the second verification information, the first public key, the second private key, and a preset verification rule.
[0037] Using the security verification method provided in this disclosure, the data retrieval system generates a first public key and a first private key using a key-exchange symmetric algorithm, and the data providing system generates a second public key and a second private key using the same key-exchange symmetric algorithm. After key exchange, the information encrypted by the data providing system using the first public key and the second private key should be identical to the information encrypted by the data retrieval system using the second public key and the first private key. Based on this, the data providing system first performs a first security verification based on the first information to be verified, including the first public key, to determine the first security verification result. If the first security verification result is successful, the data providing system then determines the target ciphertext corresponding to the target information based on the first public key and the second private key, and sends the target ciphertext to the data retrieval system. The data retrieval system determines the second information to be verified based on the second public key, the first private key, the target ciphertext, and the operating environment information of the data retrieval system, and returns the second information to be verified to the data providing system. The data providing system performs a second security verification based on the second information to be verified, the first public key, the second private key, and preset verification rules to determine the second security verification result. Thus, based on the key exchange symmetric algorithm and target information, bidirectional verification between the data providing system and the data retrieving system is achieved, and the entire verification process is a dual verification process, ensuring high reliability. Furthermore, not only the target information is verified, but also the dynamic operating environment information, further improving the reliability of the verification results and enhancing the security of subsequent cross-system data retrieval.
[0038] Exemplary System
[0039] Figure 1 This is a schematic diagram of the composition architecture of an electronic device provided in an exemplary embodiment of this disclosure, such as... Figure 1 As shown, the electronic device 10 includes a data retrieval system 101 and a data provision system 102.
[0040] The data retrieval system 101 and the data providing system 102 can run on the same system-on-chip (SoC) 103, or they can run on different SoCs. The security levels of the data retrieval system and the data providing system can be the same or different. The data retrieval system and the data providing system can communicate directly, or through gRPC, eRPC cross-process communication middleware, or through other public or private protocols; this disclosure does not limit the scope of such communication.
[0041] In the technical solutions described in this disclosure, the data retrieval system and the data provision system can exist as two different systems running on the same device. This disclosure does not impose any particular limitation on the "same device" referred to herein; it can be any electronic device with computing capabilities. Furthermore, the data retrieval system and the data provision system have a certain degree of flexibility in terms of security levels; their security levels can be set to the same standard or different standards according to actual needs.
[0042] In some application scenarios, the devices running the data retrieval system and the data provision system can be vehicles. In these scenarios, the data retrieval system and the data provision system are different systems running on the vehicle. They can run on the same hardware or on different hardware. The data retrieval system can be an in-vehicle infotainment system (IVI), and the data provision system can be an advanced driver assistance system (ADAS). The IVI primarily provides multimedia entertainment, navigation, and communication functions for drivers and passengers, enriching the driving experience. The ADAS system, on the other hand, uses various sensors to perceive the vehicle's surroundings, providing drivers with driver assistance functions such as adaptive cruise control, lane keeping assist, and automatic emergency braking, improving driving safety and comfort.
[0043] In this disclosure, the data retrieval system may also be referred to as the first system, and the data providing system may be referred to as the second system. This disclosure does not specify which system the first system or the second system is.
[0044] Exemplary methods
[0045] Figure 2A This is a schematic flowchart of a security verification method provided in an exemplary embodiment of this disclosure. This embodiment can be applied to an electronic device and executed by a second system on the electronic device. Figure 2A As shown, it includes the following steps:
[0046] Step 201: Determine the first information to be verified in the first system, and determine the first security verification result based on the first information to be verified; the first system determines the first public key and the first private key based on the key exchange symmetric algorithm, and the first information to be verified includes the first public key.
[0047] When the first system needs to access data from the second system, it first determines a first public key and a first private key based on a preset key exchange symmetric algorithm, then generates first verification information and sends it to the second system. The first verification information includes the first public key.
[0048] After receiving the first verification information, the second system uses a preset verification method to generate a first security verification result corresponding to the first verification information. The first security verification result can be either pass or fail.
[0049] It should be noted that, in this disclosure, the key exchange symmetric algorithm can also be referred to as a key exchange protocol. Determining the first public key and the first private key based on the key exchange symmetric algorithm can refer to generating the first public key and the first private key using a key generation algorithm that conforms to the requirements of the key exchange protocol.
[0050] Step 202: If the first security verification result is passed, determine the second public key and the second private key based on the key exchange symmetric algorithm, and determine the target ciphertext corresponding to the target information based on the first public key and the second private key.
[0051] If the first security verification result is passed, the second system can first determine the target information, and determine the second public key and the second private key based on the preset key exchange symmetric algorithm, and then determine the target ciphertext corresponding to the target information based on the first public key and the second private key.
[0052] For example, the target information in this embodiment of the disclosure may be a secure random number generated by the second system.
[0053] If the first security verification result is unsuccessful, it means that the access request comes from an unreliable first system, and the second system can reject the data call request from the first system.
[0054] Step 203: Send the target ciphertext and the second public key to the first system.
[0055] After the target ciphertext is generated, the second system sends the target ciphertext and the second public key to the first system for subsequent use. The second system can send the target ciphertext and the second public key simultaneously, or they can send them separately. For example, the second system can carry the target ciphertext and the second public key in a feedback message containing the first verification information.
[0056] Step 204: Determine the second verification information of the first system.
[0057] After sending the target ciphertext and the second public key to the first system, the second system receives the second verification information sent by the first system.
[0058] The second information to be verified is determined by the first system based on the second public key, the first private key, the target ciphertext, and the operating environment information of the first system. The specific determination method can be found in subsequent embodiments and will not be detailed here.
[0059] Step 205: Determine the second security verification result based on the second information to be verified, the first public key, the second private key, and the preset verification rules.
[0060] After obtaining the second information to be verified, the second system generates a second security verification result corresponding to the second information to be verified based on the content carried in the second information to be verified and according to a preset verification method. The second security verification result can be either pass or fail.
[0061] In some implementations, after obtaining the second information to be verified, the second system uses a shared key generated from the first public key and the second private key to perform security verification on the content carried in the second information to be verified according to preset verification rules, thereby generating a second security verification result. The method for generating the second security verification result varies depending on the content carried in the second information to be verified.
[0062] In this embodiment, through key exchange and verification of the information to be verified twice, the second system first confirms the identity of the first system, and then the first system proves in reverse that its own operating environment has not been tampered with and is secure, forming a closed-loop trust chain. This effectively blocks forgery or replay attacks during cross-system calls. The target information always flows across systems in target ciphertext form, and the ciphertext is encrypted using a shared key derived instantly from the first public key and the second private key. Even if the message is intercepted, it cannot be decrypted, achieving the goal of making the target information usable but invisible.
[0063] Figure 2BThis is a flowchart illustrating a data retrieval method provided in an exemplary embodiment of this disclosure. This embodiment can be applied to an electronic device and executed by a second system on the electronic device. Figure 2B As shown, the process may include steps 206 to 207. Steps 206 to 207 may be performed after step 205.
[0064] Step 206: If the second security verification result is passed, the target data is returned to the first system in response to the remote call request of the first system.
[0065] If the second security verification passes, it means the first system can access data on the second system. In this case, if the second system receives a remote call request from the first system, it can respond to the request and return the target data to the first system. This allows for cross-system data access between the first and second systems while ensuring information security.
[0066] Step 207: Based on the information clearing instruction, clear the first security verification information.
[0067] After completing one or more remote calls, the first system can generate and send an information clearing command to the second system, indicating that the remote call has ended. Upon receiving the information clearing command, the second system clears the first security verification information.
[0068] The information clearing instruction includes a remote call termination instruction or a first system restart instruction; the first security verification information includes the first public key, the first private key and the second public key, and may also include the second security verification result, the shared key, the first ciphertext, etc.
[0069] It should be noted that the second system can also automatically clear the first security verification information when the predetermined clearing conditions are met, so as to avoid storing the first security verification information for a long time due to the lack of information clearing instructions.
[0070] In some implementations, if the second system does not receive a new remote call request or the information clearing instruction within a predetermined time after sending the target data, it can automatically clear the first security verification information; or, if no remote call request is received within a predetermined time after the second security verification result is generated, it can also automatically clear the first security verification information. When automatically clearing the first security verification information, the second system can generate the information clearing instruction, then clear the first security verification information based on the information clearing instruction, and send the information clearing instruction to the first system.
[0071] In this embodiment, relying solely on a key exchange symmetric algorithm, it requires no CA, certificate chain, or third-party authorization, resulting in extremely low computational and storage overhead. This allows for rapid integration into various resource-constrained scenarios. Simultaneously, the process and business logic are decoupled, allowing the second system to provide data services to multiple types of the first system through a unified verification interface, thus ensuring ecosystem scalability. In this way, highly secure data access can be achieved at minimal cost in cross-system and cross-security domain scenarios.
[0072] The following description, in conjunction with the accompanying drawings, further illustrates the scheme disclosed herein.
[0073] Figure 2C This is a flowchart illustrating the first security verification result determination process provided in an exemplary embodiment of this disclosure. Figure 2C As shown, step 201 may include the following steps 2011 to 2016:
[0074] Step 2011: The second system obtains the first information to be verified.
[0075] When the first system needs to obtain target data from the second system, it first generates a first public key and a first private key based on a preset key exchange symmetric algorithm. Then, it sends first verification information carrying the first public key and the current timestamp of the first system to the second system. The second system receives the first verification information sent by the first system.
[0076] Step 2012: Based on the first information to be verified, the second system determines the first public key of the first system and the current timestamp of the first system.
[0077] After receiving the first information to be verified, the second system extracts the first public key and the first timestamp from the first information to be verified. The first timestamp is the timestamp carried by the first information to be verified. The first timestamp is used to indicate the time when the first system generates or sends the first information to be verified. The first timestamp can also be referred to as the current timestamp of the first system.
[0078] Step 2013: The second system determines the current timestamp of the second system.
[0079] After receiving the first information to be verified, the second system can also determine a second timestamp, wherein the second timestamp is used to indicate the time when the second system receives the first information to be verified or processes the first information to be verified, and the second timestamp can also be referred to as the current timestamp of the second system.
[0080] Step 2014: The second system determines the third result based on the current timestamp of the first system and the current timestamp of the second system.
[0081] The third result is a verification result obtained by verifying the current timestamp of the first system and the current timestamp of the second system.
[0082] In some implementations, if the difference between the time indicated by the first timestamp and the time indicated by the second timestamp does not exceed a pre-configured predetermined error value, then a third result of passing can be generated; if the difference between the two exceeds the pre-configured predetermined error value, then a third result of failing can be generated.
[0083] In some implementations, if the first timestamp cannot be determined, for example, if the first information to be verified does not carry a timestamp, then a third result indicating failure can be generated.
[0084] Step 2015: The second system determines the fourth result based on the key type of the first public key.
[0085] The fourth result is the verification result obtained by verifying the key type of the first public key.
[0086] In some implementations, the second system first extracts the first public key from the first information to be verified, and then verifies whether the key type of the first public key supports a key exchange protocol. In other implementations, the first information to be verified may directly carry the key type of the first public key. The second system can directly obtain the key type of the first public key from the first information to be verified. If the key type of the first public key supports a key exchange protocol, a fourth result indicating success can be generated; if the key type of the first public key does not support a key exchange protocol, a fourth result indicating failure can be generated.
[0087] In some implementations, if the first public key cannot be determined, for example, if the first information to be verified does not carry the first public key, then a fourth result indicating failure can be generated.
[0088] Step 2016: The second system determines the first security verification result based on the third result and the fourth result.
[0089] When determining the first security verification result, if both the third and fourth results are passed, then the first security verification result is also passed; if either the third or fourth result is failed, then the first security verification result is failed.
[0090] It should be noted that the above implementation methods are only examples of determining the first security verification result. In practical applications, the specific method for determining the first security verification result will vary depending on the information carried in the first verification information. It can be a combination of the above implementation methods or an extension based on the above implementation methods, which will not be listed or described in detail here.
[0091] In this implementation, time-algorithm two-dimensional verification can be embedded in the first step without adding extra hardware, forming a low-cost, high-precision, and easily scalable pre-verification, laying a clean and reliable input environment for subsequent key exchange and data encryption.
[0092] Figure 2D This is a flowchart illustrating the target information determination process provided in an exemplary embodiment of this disclosure. For example... Figure 2D As shown, step 202 may include the following steps 2021 to 2024:
[0093] Step 2021: If the first security verification result is passed, the second system determines the second public key and the second private key based on the key exchange symmetric algorithm.
[0094] After generating the first security verification result, if the first security verification result passes, the second system generates a second public key and a second private key based on a preset key exchange symmetric algorithm. The key exchange symmetric algorithm used by the second system to generate the second public key and the second private key can be the same as the key exchange symmetric algorithm used by the first system to generate the first public key and the first private key.
[0095] Step 2022: The second system calculates a shared key based on the first public key and the second private key.
[0096] After generating the second public key and the second private key, the second system calculates a shared key based on the first public key and the second private key. The method for generating the shared key can be determined according to the aforementioned key-exchange symmetric algorithm. For example, the shared key can be obtained by multiplying the first public key and the second private key.
[0097] In some implementations, after generating the shared key, the second system can further derive encryption keys using a key derivation function (KDF). The key derivation function is used to derive one or more more secure keys, better suited for encryption operations, from a secret value (such as a master key, password, or passphrase).
[0098] Step 2023: The second system determines the target information.
[0099] If the first security verification passes, in addition to generating the shared key, target information also needs to be generated. This disclosure does not limit the method of generating the target information. For example, the target information may be a secure random number generated by the second system.
[0100] Step 2024: The second system uses the shared key to generate the target ciphertext corresponding to the target information.
[0101] After the shared key and the target information are determined, the second system can use the shared key to encrypt the target information, thereby obtaining target ciphertext corresponding to the target information. In some implementations, if the second system derives an encryption key based on the shared key, it can use the encryption key to generate target ciphertext corresponding to the target information. Subsequently, whenever the second system uses the shared key, it can replace the derived encryption key with the shared key.
[0102] When encrypting the target information using the shared key, the encryption algorithm employed can be a symmetric encryption algorithm, meaning the target ciphertext needs to be decrypted using the shared key. The encryption algorithm can be pre-agreed upon by the first system and the second system, or it can be specified by either the first system or the second system. For example, the first system can indicate the encryption algorithm used to encrypt the target information in the algorithm instruction information.
[0103] For example, the second system can use AES-GCM to encrypt the target information while ensuring confidentiality and integrity. Alternatively, it can use encryption algorithms such as AES-CCM, AES-OCB, ChaCha20-Poly1305, and XChaCha20-Poly1305 to encrypt the target information. This disclosure does not limit the scope of the encryption.
[0104] In this implementation, by calculating the shared key in real time and encrypting the target information, it can be ensured that the key is independent and the ciphertext is not repeated for each call, thus eliminating the risk of replay and man-in-the-middle from the source.
[0105] Figure 2E This is a flowchart illustrating the target information determination process provided in an exemplary embodiment of this disclosure. For example... Figure 2E As shown, step 205 may include the following steps 2051 to 2055:
[0106] Step 2051: The second system extracts the first ciphertext and the second ciphertext from the second information to be verified.
[0107] After obtaining the second information to be verified, the second system first extracts the first ciphertext and the second ciphertext from it. If the second verification information carries integrity verification information, the second system can first verify whether the second information to be verified is complete based on the integrity verification information. If the second information to be verified is confirmed to be complete, then the first ciphertext and the second ciphertext are extracted from it to prevent tampered second information from affecting the security of the second system.
[0108] Wherein, the first ciphertext is determined by the first system after obtaining the target ciphertext and the second public key, based on the second public key, the first private key and the target ciphertext; and the second ciphertext is determined based on the second public key, the first private key and the operating environment information of the first system.
[0109] If the second verification information carries integrity verification information, the second system can first verify whether the second information to be verified is complete based on the integrity verification information. If the second information to be verified is determined to be complete, then the first ciphertext and the second ciphertext are extracted from it to prevent the tampered second information to be verified from affecting the security of the second system.
[0110] Step 2052: The second system uses the shared key to decrypt the first ciphertext to obtain the plaintext information to be verified; and uses the shared key to decrypt the second ciphertext to obtain the operating environment information.
[0111] After extracting the first ciphertext and the second ciphertext, the second system can first verify whether the first ciphertext and the second ciphertext are complete based on the integrity verification information. If it is determined that both the first ciphertext and the second ciphertext are complete, the first ciphertext is decrypted using the shared key to obtain the plaintext information to be verified, and the second ciphertext is decrypted using the shared key to obtain the operating environment information.
[0112] In some implementations, if the second system derives an encryption key based on the shared key, the encryption key can be used to decrypt the first ciphertext.
[0113] Step 2053: The second system determines the first result based on the plaintext information to be verified and the first preset verification rule in the preset verification rules.
[0114] After obtaining the plaintext information to be verified and the operating environment information, the second system determines a first result based on the plaintext information to be verified and the first preset verification rule among the preset verification rules. The verification rules, including the first and second preset verification rules, can be set as needed.
[0115] In some implementations, the first preset verification rule is whether the plaintext information to be verified is consistent with the result of the target information after being processed by a predetermined processing method, such as an inversion operation. If they are consistent, a first result of passing is generated; if they are inconsistent, a first result of failing is generated.
[0116] Step 2054: The second system determines the second result based on the operating environment information and the second preset verification rule in the preset verification rules.
[0117] When determining the second result based on the operating environment information and the second preset verification rule in the preset verification rules, the generation method of the second verification result may vary depending on the different environment information.
[0118] In some implementations, determining a second result based on the runtime environment information and a second preset verification rule in the preset verification rules includes: if the runtime environment information includes system version information, determining a version verification result based on verifying the system version information and the target system version information in the second preset verification rule; if the runtime environment information includes system status information, determining a status verification result based on verifying the system status information and the target status information in the second preset verification rule; and determining a second result based on one or more of the version verification result and the status verification result.
[0119] Understandably, version verification results and status verification results can prove whether the operating environment of the first system is secure. Security verification of the first system's operating environment helps improve the security of subsequent cross-system data calls.
[0120] In one example, if the runtime environment information includes system version information, then it is verified whether the system version information and the target system version information are consistent or match; if they are consistent or match, a version verification result of passing is generated; if they are inconsistent or do not match, a version verification result of failing is generated.
[0121] For example, system version information may include the hardware version information, system version information, and software version information of the first system. In one example, the target system version information is the unexpired hardware version information, unexpired system version information, and unexpired software version information of the first system; in another example, the target system version information may also be the hardware version information, system version information, and software version information of the first system that are free of security vulnerabilities. Here, "expired" refers to the end of the system's lifecycle or the cessation of security updates. The second system can determine the target system version information through publicly available lifecycle data from the vendor, security version repositories associated with the version information, etc.; this is merely an example.
[0122] Based on this, if the system version information and the target system version information are consistent, it indicates that the system version is an unexpired and usable version or a secure version, and the generated result is a passed version verification result, which improves the security of subsequent cross-system data calls.
[0123] In another example, if the runtime environment information includes system status information, then it is verified whether the system status information and the target status information are consistent; if they are consistent, a successful status verification result is generated; if they are inconsistent, a failed status verification result is generated.
[0124] Based on this, if the runtime environment information only includes system version information, then the version verification result can be used as the second result. If the runtime environment information only includes system status information, then the status verification result can be used as the second result. If the runtime environment information includes both system version information and system status information, then when determining the second result, if both the version verification result and the status verification result are passed, then the second result is also passed; if either the version verification result or the status verification result is failed, then the second result is also failed.
[0125] Furthermore, the method for determining the status verification result varies depending on the content contained in the system status information.
[0126] In some implementations, if the system status information includes system business information, then the system business information and target business information are verified to determine the business verification result; if the system status information includes system resource information, then the system resource information and target resource information are verified to determine the resource verification result; if the system status information includes system dependency environment information, then the system dependency environment information and target dependency environment information are verified to determine the dependency environment verification result; and then, based on one or more of the business verification result, the resource verification result, and the dependency environment verification result, the status verification result is determined.
[0127] For example, the system status information may include system business information such as the business type and task type of the RPC service initiated in the first system, as well as system resource information such as process ID, timestamp, and CPU utilization; it may also include system dependent environment information such as the geographical location and device status information of the electronic device. For example, when the electronic device is a vehicle, the device status information may include information such as the vehicle's brand, model, VIN number, and speed.
[0128] Specifically, if the system status information includes system business information, then it verifies whether the system business information and the target business information are consistent or match; if they are consistent or match, a successful business verification result is generated; if they are inconsistent or mismatched, a failed business verification result is generated. If the system status information includes system resource information, then it verifies whether the system resource information and the target resource information are consistent or match; if they are consistent or match, a successful resource verification result is generated; if they are inconsistent or mismatched, a failed resource verification result is generated. If the system status information includes system dependency environment information, then it verifies whether the system dependency environment information and the target dependency environment information are consistent or match; if they are consistent or match, a successful dependency environment verification result is generated; if they are inconsistent or mismatched, a failed dependency environment verification result is generated.
[0129] For example, if the data retrieval system and the data provision system are different systems operating on the vehicle:
[0130] Regarding system business information, taking business type as an example, the target business information can be a target business type related to intelligent driving of vehicles. For example, lane keeping assist, automatic parking, and adaptive cruise control. Business types unrelated to intelligent driving of vehicles include music playback and video playback. That is, the second system only supports business types in the first system that are related to intelligent driving of vehicles. Based on this, if the system business information and the target business information are consistent or match, then the second system's requirements for the first system in terms of business information are met, and the generated result is a passed business verification result. The target business information can also be determined according to actual circumstances; this is only an example and not a limitation.
[0131] Regarding system resource information, taking the CPU utilization of the first system as an example, the target resource information is the CPU utilization range that is less than or equal to the CPU utilization threshold. If the CPU utilization matches the CPU utilization range, it indicates that the first system is operating normally and has not gone out of control, and the generated result is a passed resource verification result. This is only an example and is not intended to be a limitation; it can be set according to the actual situation.
[0132] Regarding system dependency environment information, taking geographical location as an example, the target dependency environment information is the target geographical area where vehicle functions can be used. It's understandable that some vehicle functions are prohibited in certain geographical areas and can only be used in the target geographical area. Therefore, if the geographical location matches the target geographical area, it means the second system has successfully verified the vehicle's geographical location, and the generated result is a passed dependency environment verification result. Similarly, taking vehicle speed as an example, the target dependency environment information is the speed range less than or equal to a speed threshold. If the vehicle speed matches the speed range, it means the vehicle is currently in a relatively safe state, and the generated result is a passed dependency environment verification result. This is merely an example and not a limitation; settings can be adjusted according to actual circumstances.
[0133] Based on this, when determining the status verification result, the method for determining the status verification result can be selected according to the information included in the system status information. If the system status information includes only one of system business information, system resource information, or system dependency environment information, then the business verification result, resource verification result, or environment verification result can be used as the status verification result accordingly. If the system status information includes only two or more of system business information, system resource information, or system dependency environment information, a "passed" status verification result can be generated if all corresponding results are passed; and a "failed" status verification result can be generated if any one of the results is failed.
[0134] Step 2055: After obtaining the plaintext information to be verified and the operating environment information, the second system determines the second security verification result based on the first result and the second result.
[0135] When determining the second security verification result, if both the first and second results are passed, then the second security verification result is also passed; if either the first or the second result is failed, then the second security verification result is also failed.
[0136] In this embodiment, multiple pieces of information are verified simultaneously during decryption, thereby further reducing the possibility of data leakage due to the first system being counterfeited.
[0137] Figure 2F This is a schematic diagram of a process for returning target data provided in an exemplary embodiment of this disclosure. For example... Figure 2F As shown, step 206 may include the following steps 2061 to 2065:
[0138] Step 2061: If the second security verification result is passed, the second system determines the third ciphertext based on the first public key, the second private key, and the target information.
[0139] After obtaining a successful second security verification result, the second system can generate a third ciphertext.
[0140] In some implementations, when generating the third ciphertext, the second system can use a shared key generated based on the first public key and the second private key to encrypt the target information, thereby obtaining the third ciphertext. For example, the target information can be inverted, and then the inverted target information can be encrypted using the shared key to obtain the third ciphertext. For instance, if the target information is a secure random number, the secure random number can be inverted, and then the inverted secure random number can be encrypted to obtain the third ciphertext. Specifically, the inversion operation involves bitwise inversion of each bit in the binary representation of the secure random number, i.e., 0 becomes 1, and 1 becomes 0.
[0141] In some implementations, if the second system derives an encryption key based on the shared key, the encryption key can be used to encrypt the target information.
[0142] Step 2062: The second system obtains the first ciphertext and remote call information from the first system.
[0143] The remote call information is used to indicate the target data that the first system wants to call from the data.
[0144] In some implementations, the first system may send a remote call request to the second system, the remote call request carrying the first ciphertext and remote call information. Upon receiving the remote call request from the first system, the second system extracts the first ciphertext and the remote call information from it.
[0145] Step 2063: The second system determines the fifth result based on the first ciphertext and the third ciphertext.
[0146] The second system can determine the fifth result based on the first ciphertext and the third ciphertext according to a preset determination method.
[0147] In some implementations, after obtaining the first ciphertext, the second system can compare the first ciphertext with the third ciphertext. If the first ciphertext and the third ciphertext match, it indicates that the first ciphertext was generated by the first system using the correct shared key to encrypt the correct target information, and therefore a successful fifth result can be generated. If the first ciphertext and the third ciphertext do not match, it indicates that either the first system did not use the correct shared key or the first system did not encrypt the correct target information. In this case, it indicates that there is a security risk in this remote call, and therefore a failed fifth result can be generated.
[0148] It is understandable that if the third ciphertext is obtained by inverting the target information and then encrypting the inverted target information based on the shared key, then the first ciphertext must also be obtained by encrypting the inverted target information by the first system. This is only an example and is not intended to be a limitation.
[0149] Step 2064: If the fifth result is passed, the second system performs a legality verification on the remote call information.
[0150] After obtaining the fifth result, which indicates approval, the second system can further verify the legality of the remote call information. By verifying the legality of the remote call information, it determines whether the first system has the authority to obtain the target data. Verifying the legality of the remote call information prevents the first system from accessing the target data without authorization or necessity, thereby preventing the target data from being leaked.
[0151] Step 2065: If the legality verification result is successful, the second system returns the target data to the data calling system.
[0152] If the legality verification result is passed, it means that the first system has the authority and necessity to call the target data. In this case, the second system returns the target data to the first system, thereby completing the remote call.
[0153] If the validity check fails, it means that the first system does not have the authority or need to call the target data in this instance, and the second system may refuse to return the target data to the first system.
[0154] In this embodiment, a third ciphertext is generated using a shared key (or a derived encryption key) and compared with the first ciphertext to ensure that the caller possesses the same key and that it has not been tampered with. Subsequently, the remote call information is verified for authorization and legitimacy. Only after both verifications are passed is the target data provided, thereby reducing the risk of target data leakage.
[0155] Figure 3A This is a flowchart illustrating a security verification method provided in an exemplary embodiment of this disclosure. This embodiment can be applied to an electronic device and executed by a first system on the electronic device, such as... Figure 3A As shown, it includes the following steps 301-304:
[0156] Step 301: Determine the first public key and the first private key based on the key exchange symmetric algorithm.
[0157] When the first system needs to obtain target data from the second system, it first generates a first public key and a first private key based on a preset key-exchange symmetric algorithm. The key-exchange symmetric algorithm used by the first system to generate the first public key and the first private key can be the same as the key-exchange symmetric algorithm used by the second system to generate the second public key and the second private key. The generation algorithm used by the first system to generate the first public key and the first private key can be the same as the generation algorithm used by the second system to generate the second public key and the second private key.
[0158] In some instances, the key-exchange symmetric algorithm can be the Elliptic Curve Diffie-Hellman (ECDH) key exchange algorithm. The encryption principle of the ECDH algorithm is that the dot product operation on an elliptic curve satisfies the commutative law. In the ECDH algorithm, the elliptic curve can be referred to as the ECDH curve. The type of ECDH curve can be any special curve such as the Weierstrass curve, Montgomery curve, Edwards curve, Koblitz curve, or national cryptographic standards like Brainpool, and this disclosure does not limit this.
[0159] For example, based on the same set of publicly available elliptic curve parameters, the first system and the second system independently generate private keys (such as random numbers), i.e., the first system generates a first private key and the second system generates a second private key; then, the corresponding public keys are obtained through the elliptic curve dot product operation, i.e., the first system generates a first public key and the second system generates a second public key. The first public key and the first private key, as well as the second public key and the second private key, are all ECDH type key pairs.
[0160] Step 302: Send the first verification information to the second system.
[0161] After the first public key and the first private key are generated, the first system generates first verification information and sends the first verification information to the second system. The first verification information carries the first public key.
[0162] In addition to carrying the first public key, the first information to be verified may also carry information that can assist in verification or enhance the verification effect, such as the current timestamp of the first system and algorithm indication information. For example, the algorithm indication information may include information indicating the curve type used in ECDH, or it may include indication information of the encryption algorithm used by the second device to encrypt the target information. For example, the algorithm indication information may be the ECDH curve type, such as the name information of Weierstrass curve, Montgomery curve, Edwards curve, Koblitz curve, etc. For example, the algorithm indication information may also be the name information of encryption algorithms such as AES-GCM, AES-CCM, AES-OCB, ChaCha20-Poly1305, XChaCha20-Poly1305, etc.
[0163] Step 303: Obtain the target ciphertext and the second public key from the second system, and determine the second information to be verified based on the second public key, the first private key, the target ciphertext, and the operating environment information of the first system.
[0164] After generating the second public key, the second private key, and the target ciphertext, the second system sends the second private key and the target ciphertext to the first system. Upon receiving the target ciphertext and the second public key, the first system first determines the first ciphertext based on the second public key, the first private key, and the target ciphertext; then determines the second ciphertext based on the second public key, the first private key, and the operating environment information of the first system; and finally determines the second information to be verified based on the first ciphertext and the second ciphertext.
[0165] In some implementations, the first system can package the first ciphertext and the second ciphertext and sign them to form the second information to be verified. This disclosure does not limit the specific packaging method used when packaging the first ciphertext and the second ciphertext. It should be further noted that the second information to be verified only needs to contain the first ciphertext and the second ciphertext; the specific generation method will not be detailed here.
[0166] Step 304: Send the second verification information to the second system.
[0167] After the second verification information is generated, the first system sends the second verification information to the second system, so that the second system can determine the second security verification result based on the second verification information, the first public key, the second private key, and the preset verification rules. The specific sending method will not be described in detail here.
[0168] In this embodiment, through key exchange and verification of the information to be verified twice, the second system first confirms the identity of the first system, and then the first system reversely proves that its own operating environment has not been tampered with and is secure, forming a closed-loop trust chain. This can block forgery or replay attacks during cross-system calls. The target information always flows across systems in the form of target ciphertext, which is encrypted by a shared key derived from the first public key and the second private key in real time. Even if the message is intercepted, it cannot be decrypted, achieving the goal of making the target information usable but invisible.
[0169] Figure 3B This is a schematic flowchart of a data retrieval method provided in an exemplary embodiment of this disclosure. This embodiment can be applied to an electronic device and executed by a second system on the electronic device. Figure 3B As shown, the process may include steps 305 to 307. Steps 305 to 307 may be performed after step 304.
[0170] Step 305: Send the first ciphertext and remote call information to the second system.
[0171] The remote call information is used to indicate the target data that the first system wants to call from the data.
[0172] It should be noted that this disclosure does not limit the timing of when the first system sends the first ciphertext and remote call information. The first system may send the first ciphertext and remote call information only after receiving the second security verification result from the second system and confirming that the second security verification result is successful. Using this method, sensitive ciphertext is only released after confirming that the second system is "trustworthy" or that the "channel is secure," preventing the ciphertext from being intercepted or replayed prematurely. If verification fails, the first system can directly terminate the process, avoiding premature transmission of large amounts of ciphertext and saving bandwidth and computing resources. The verification phase and the data phase are decoupled, facilitating auditing and fault location.
[0173] The first system can also send the first ciphertext and remote call information after sending the second verification information, or simultaneously with sending the second verification information. This approach reduces round-trip time, making it suitable for latency-sensitive scenarios (such as high-frequency microservice calls). The second system can handle verification and decryption in one step, eliminating the need to maintain an intermediate state of "waiting for ciphertext," thus reducing implementation complexity. If the verification mechanism is designed to "allow ciphertext to be temporarily stored even if verification fails," asynchronous retries or offline review can be supported, improving availability.
[0174] In some implementations, the first system may send a remote call request to the second system, the remote call request carrying the first ciphertext and remote call information.
[0175] Step 306: Receive the target data sent by the second system.
[0176] After receiving the first ciphertext and the remote call information, the second system responds to the remote call request from the first system and returns the target data to the first system. The first system receives the target data sent by the second system. The specific method by which the second system sends the target data can be found in the foregoing embodiments, and will not be repeated here.
[0177] Step 307: Based on the information clearing instruction, clear the second security verification information.
[0178] After completing one or more remote calls, the first system can generate an information clearing command and clear the second security verification information based on the information clearing command.
[0179] The information clearing instruction includes a remote call termination instruction or a first system restart instruction; the first security verification information includes the second public key, the second private key and the first public key, and may also include the shared key, the first ciphertext, etc.
[0180] In some implementations, the first system may also receive an information clearing instruction sent by the second system, and then clear the second security verification information based on the information clearing instruction.
[0181] In this embodiment, relying solely on a key exchange symmetric algorithm, it requires no CA, certificate chain, or third-party authorization, resulting in extremely low computational and storage overhead. This allows for rapid embedding into various resource-constrained scenarios. Simultaneously, the process and business logic are decoupled, allowing the second system to provide data services to multiple types of the first system through a unified verification interface, thus ensuring ecosystem scalability. Highly secure data access can be achieved at minimal cost in cross-system and cross-security domain scenarios.
[0182] The following description, in conjunction with the accompanying drawings, further illustrates the scheme disclosed herein.
[0183] Figure 3C This is a flowchart illustrating the first verification information sending process provided in an exemplary embodiment of this disclosure. Figure 3C As shown, step 302 may include the following steps 3021 to 3022:
[0184] Step 3021: The first system generates first verification information including the first public key and the current timestamp of the first system.
[0185] In some implementations, the first verification information may carry not only the first public key but also the current timestamp of the first system, so that the second system can verify the first information to be verified based on the current timestamp. The current timestamp can be the timestamp of the first public key, indicating the generation time of the first public key, or it can be the timestamp of the first information to be verified, indicating the generation time of the first information to be verified.
[0186] In some implementations, the first verification information may carry algorithm indication information in addition to the first public key. The algorithm indication information is used to indicate the key-exchange symmetric algorithm, so that the second system can determine whether it can generate a first security verification result based on the first information to be verified, and that the second system can use the same key-exchange symmetric algorithm to generate the second public key and the second private key. For example, when the first public key and the first private key are generated using the ECDH algorithm, the first verification information may also carry ECDH algorithm type information, which indicates the type of ECDH algorithm used by the first system.
[0187] Step 3022: The first system sends the first verification information to the second system.
[0188] After the first verification information is generated, the first system sends the first verification information to the second system.
[0189] Figure 3D This is a flowchart illustrating the first verification information sending process provided in an exemplary embodiment of this disclosure. Figure 3D As shown, step 303 may include the following steps 3031 to 3036:
[0190] Step 3031: The first system obtains the target ciphertext and the second public key.
[0191] The first system receives the target ciphertext and the second public key sent by the second system.
[0192] Step 3032: After obtaining the target ciphertext and the second public key, the first system first uses the second public key and the first private key to calculate the shared key.
[0193] Since the first system uses the same key exchange symmetric algorithm to generate the first public key and the first private key as the second system uses to generate the second public key and the second private key, the first system can use the first private key and the second public key to calculate the shared key.
[0194] In some implementations, after generating the shared key, the first system can further use the key derivation function KDF to derive the decryption key.
[0195] Step 3033: The first system uses the shared key to decrypt the target ciphertext, thereby obtaining the target information.
[0196] After calculating the shared key, the first system can use the shared key to decrypt the target ciphertext, thereby obtaining the target information. The encryption algorithm used by the first system to decrypt the target ciphertext is the same as the encryption algorithm used by the second system to encrypt the target information to generate the target ciphertext. The encryption algorithm used by the first system to decrypt the target ciphertext using the shared key is consistent with the encryption algorithm used by the second system to encrypt the target information.
[0197] In some implementations, if the first system derives a decryption key based on the shared key, the first system can use the decryption key to decrypt the target ciphertext. Subsequently, whenever the first system uses the shared key, it can replace the derived decryption key with the shared key.
[0198] Step 3034: The first system generates plaintext information to be verified based on the target information.
[0199] After obtaining the target information, the first system can generate plaintext information to be verified based on the target information. This disclosure does not limit the method of generating the plaintext information to be verified; any generation method that ensures a unique correspondence between the target information and the plaintext information to be verified is acceptable. For example, the target information can be inverted to obtain the plaintext information to be verified.
[0200] Step 3035: The first system uses the shared key to encrypt the plaintext to be verified, thereby obtaining the first ciphertext.
[0201] After obtaining the plaintext information to be verified, the shared key can be used to encrypt the plaintext to obtain the first ciphertext.
[0202] In some implementations, if the first system derives a decryption key based on the shared key, the first system can use the decryption key to encrypt the plaintext to be verified.
[0203] Step 3036: The first system uses the shared key to encrypt the operating environment information of the first system, thereby obtaining the second ciphertext.
[0204] In addition to generating the first ciphertext, the first system can also use the shared key to encrypt the operating environment information of the first system, thereby obtaining the second ciphertext.
[0205] In some implementations, if the first system derives a decryption key based on the shared key, the first system can use the decryption key to encrypt the operating environment information of the first system.
[0206] The operating environment information of the first system may include system version information, system status information, etc. The system status information may further include system business information, system resource information, system dependency environment information, etc.
[0207] In one example, the system version information may include the hardware version information, system version information, and software version information of the first system. The system status information may include system business information such as the business type and task type of the RPC service initiated in the first system, and may also include system resource information such as process ID, timestamp, and CPU utilization; it may also include system dependency environment information such as the geographical location and device status information of the electronic device. For example, when the electronic device is a vehicle, the device status information may include information such as the vehicle's brand, model, VIN number, and speed.
[0208] Figure 3E This is a flowchart illustrating the first verification information sending process provided in an exemplary embodiment of this disclosure. Figure 3EAs shown, step 304 may include the following steps 3041 to 3042:
[0209] Step 3041: The first system generates second verification information containing the first ciphertext and the second ciphertext.
[0210] After both the first ciphertext and the second ciphertext are generated, the first system can package and sign the first ciphertext and the second ciphertext to form the second information to be verified. This disclosure does not limit the specific packaging method used when packaging the first ciphertext and the second ciphertext. It should be further noted that the second information to be verified only needs to contain the first ciphertext and the second ciphertext; the specific generation method will not be detailed here.
[0211] Step 3042: The first system sends the second verification information to the second system.
[0212] After the second verification information is generated, the first system sends the second verification information to the second system.
[0213] Figure 4A This is a flowchart illustrating a security verification method provided in an exemplary embodiment of this disclosure. The following is in conjunction with... Figure 4A The security verification method disclosed herein will be further explained from the perspective of the interaction between the first system and the second system. For example... Figure 4A As shown, steps 401 to 427 are included:
[0214] Step 401: The first system determines the first public key and the first private key based on a key exchange symmetric algorithm.
[0215] It should be noted that the relevant content of step 401 can be found in the aforementioned step 301, and the details will not be repeated here.
[0216] Step 402: The first system generates first verification information including the first public key and the current timestamp of the first system.
[0217] Step 403: The first system sends the first verification information to the second system.
[0218] It should be noted that the relevant content of steps 402 and 403 can be found in steps 3021 and 3022 mentioned above, and the details will not be repeated here.
[0219] Step 404: Based on the first information to be verified, the second system determines the first public key of the first system and the current timestamp of the first system.
[0220] After receiving the first verification information, the second system determines the first public key and the current timestamp of the first system based on the content carried by the first verification information.
[0221] Step 405: The second system determines the current timestamp of the second system.
[0222] Step 406: The second system determines the third result based on the current timestamp of the first system and the current timestamp of the second system.
[0223] Step 407: The second system determines the fourth result based on the key type of the first public key.
[0224] Step 408: The second system determines the first security verification result based on the third result and the fourth result.
[0225] It should be noted that the relevant content of steps 404 to 408 can be found in the aforementioned steps 2011 to 2016, and the details will not be repeated here.
[0226] Step 409: If the first security verification result is passed, the second system determines the second public key and the second private key based on the key exchange symmetric algorithm.
[0227] Step 410: The second system calculates a shared key based on the first public key and the second private key.
[0228] Step 411: The second system determines the target information.
[0229] Step 412: The second system uses the shared key to generate the target ciphertext corresponding to the target information.
[0230] It should be noted that the relevant content of steps 409 to 412 can be found in the aforementioned steps 2021 to 2024, and the details will not be repeated here.
[0231] Step 413: The second system sends the target ciphertext and the second public key to the first system.
[0232] It should be noted that the relevant content of step 413 can be found in step 203 above, and the details will not be repeated here.
[0233] Step 414: After obtaining the target ciphertext and the second public key, the first system uses the second public key and the first private key to calculate the shared key.
[0234] Step 415: The first system uses the shared key to decrypt the target ciphertext, thereby obtaining the target information.
[0235] Step 416: The first system generates plaintext information to be verified based on the target information.
[0236] Step 417: The first system uses the shared key to encrypt the plaintext to be verified, thereby obtaining the first ciphertext.
[0237] Step 418: The first system uses the shared key to encrypt the operating environment information of the first system, thereby obtaining the second ciphertext.
[0238] It should be noted that the relevant content of steps 414 to 408 can be found in the aforementioned steps 3031 to 3036, and the details will not be repeated here.
[0239] Step 419: The first system generates second verification information containing the first ciphertext and the second ciphertext.
[0240] Step 420: The first system sends the second verification information to the second system.
[0241] It should be noted that the relevant content of steps 419 to 420 can be found in the aforementioned steps 3041 to 3042, and the details will not be repeated here.
[0242] Step 421: The second system extracts the first ciphertext and the second ciphertext from the second information to be verified.
[0243] Step 422: The second system uses the shared key to decrypt the first ciphertext to obtain the plaintext information to be verified; and uses the shared key to decrypt the second ciphertext to obtain the operating environment information.
[0244] Step 423: The second system determines the first result based on the plaintext information to be verified and the first preset verification rule in the preset verification rules.
[0245] Step 424: The second system determines the second result based on the operating environment information and the second preset verification rule in the preset verification rules.
[0246] Step 425: After obtaining the plaintext information to be verified and the operating environment information, the second system determines the second security verification result based on the first result and the second result.
[0247] It should be noted that the relevant content of steps 421 to 425 can be found in the aforementioned steps 2051 to 2055, and the details will not be repeated here.
[0248] Figure 4BThis is a flowchart illustrating a data retrieval method provided in an exemplary embodiment of this disclosure. The following is a combination of... Figure 4B The data retrieval method disclosed herein will be further explained. For example... Figure 4B As shown, steps 426 to 431 are included:
[0249] Step 426: The first system sends the first ciphertext and remote call information to the second system.
[0250] The remote call information is used to indicate the target data that the first system wants to call from the data.
[0251] In some implementations, the first system may send a remote call request to the second system, the remote call request carrying the first ciphertext and remote call information.
[0252] It should be noted that this disclosure does not limit the timing of when the first system sends the first ciphertext and remote call information. The first system may send the first ciphertext and remote call information only after receiving the second security verification result from the second system and confirming that the second security verification result is successful. Using this method, sensitive ciphertext can only be released after confirming that the second system is "trustworthy" or that the "channel is secure," preventing the ciphertext from being intercepted or replayed prematurely. If verification fails, the first system can directly terminate the process, avoiding premature transmission of large volumes of ciphertext and saving bandwidth and computing resources. The verification phase and the data phase are decoupled, facilitating auditing and fault location.
[0253] The first system can also send the first ciphertext and remote call information after sending the second verification information, or simultaneously with sending the second verification information. This approach reduces round-trip time, making it suitable for latency-sensitive scenarios (such as high-frequency microservice calls). The second system can handle verification and decryption in one step, eliminating the need to maintain an intermediate state of "waiting for ciphertext," thus reducing implementation complexity. If the verification mechanism is designed to "allow ciphertext to be temporarily stored even if verification fails," asynchronous retries or offline review can be supported, improving availability.
[0254] Step 427: If the second security verification result is passed, the second system determines the third ciphertext based on the first public key, the second private key, and the target information.
[0255] Step 428: The second system obtains the first ciphertext and remote call information from the first system.
[0256] Step 429: The second system determines the fifth result based on the first ciphertext and the third ciphertext.
[0257] Step 430: If the fifth result is passed, the second system performs a legality verification on the remote call information.
[0258] Step 431: If the legality verification result is successful, the second system returns the target data to the data calling system.
[0259] After receiving the first ciphertext and the remote call information, the second system responds to the remote call request from the first system and returns the target data to the first system. The first system receives the target data sent by the second system. The specific method by which the second system sends the target data can be found in the foregoing embodiments, and will not be repeated here.
[0260] It should be noted that the relevant content of steps 427 to 431 can be found in steps 2061 to 2065 mentioned above, and the details will not be repeated here.
[0261] Exemplary device
[0262] Figure 5A This is a schematic diagram of the structure of a security verification device provided in an exemplary embodiment of this disclosure. For example... Figure 5A As shown, the security verification device includes: a first verification module 511, a first determination module 512, a sending module 513, a second determination module 514, and a second verification module 515.
[0263] The first verification module 511 is used to determine the first verification information of the data call system and determine the first security verification result based on the first verification information; the data call system determines the first public key and the first private key based on the key exchange symmetric algorithm, and the first verification information includes the first public key.
[0264] The first determining module 512 is used to determine the second public key and the second private key based on the key exchange symmetric algorithm if the first security verification result is passed, and to determine the target ciphertext corresponding to the target information based on the first public key and the second private key.
[0265] The sending module 513 is used to send the target ciphertext and the second public key to the data retrieval system.
[0266] The second determining module 514 is used to determine the second verification information of the data calling system. The second verification information is determined by the data calling system based on the second public key, the first private key, the target ciphertext, and the operating environment information of the data calling system.
[0267] The second verification module 515 is used to determine the second security verification result based on the second information to be verified, the first public key, the second private key and the preset verification rules.
[0268] In some embodiments, the second verification module 515 is specifically used to determine a first ciphertext and a second ciphertext based on the second information to be verified. The first ciphertext is determined by the data retrieval system based on the second public key, the first private key, and the target ciphertext. The second ciphertext is determined by the data retrieval system based on the second public key, the first private key, and the operating environment information of the data retrieval system. Based on the first ciphertext, the second ciphertext, the first public key, the second private key, and preset verification rules, a second security verification result is determined.
[0269] In some embodiments, the second verification module 515 is further configured to: decrypt the first ciphertext using the first public key and the second private key to obtain plaintext information to be verified; and decrypt the second ciphertext using the first public key and the second private key to obtain runtime environment information; determine a first result based on the plaintext information to be verified and a first preset verification rule in the preset verification rules; determine a second result based on the runtime environment information and a second preset verification rule in the preset verification rules; and determine a second security verification result based on the first result and the second result.
[0270] In some embodiments, the second verification module 515 is further configured to: if the operating environment information includes system version information, determine a version verification result based on verifying the system version information and the target system version information in the second preset verification rules; if the operating environment information includes system status information, determine a status verification result based on verifying the system status information and the target status information in the second preset verification rules; and determine a second result based on one or more of the version verification result and the status verification result.
[0271] In some embodiments, the second verification module 515 is further configured to: if the system status information includes system service information, verify the system service information and target service information to determine a service verification result; if the system status information includes system resource information, verify the system resource information and target resource information to determine a resource verification result; if the system status information includes system dependency environment information, verify the system dependency environment information and target dependency environment information to determine a dependency environment verification result; and determine a status verification result based on one or more of the service verification result, the resource verification result, and the dependency environment verification result.
[0272] In some embodiments, the first verification module 511 is specifically configured to: determine the first public key of the data retrieval system and the current timestamp of the data retrieval system based on the first information to be verified; determine the current timestamp of the data providing system; determine a third result based on the current timestamp of the data retrieval system and the current timestamp of the data providing system; determine a fourth result based on the key type of the first public key; and determine a first security verification result based on the third result and the fourth result.
[0273] In some embodiments, the security verification device further includes a third verification module, which is configured to: determine a third ciphertext based on the first public key, the second private key, and the target information if the second security verification result is passed; obtain the first ciphertext and remote call information from the data retrieval system; determine a fifth result based on the first ciphertext and the third ciphertext; and perform a legality verification on the remote call information if the fifth result is passed. The sending module 513 is further configured to: return target data to the data retrieval system if the legality verification result is passed.
[0274] In some embodiments, the security verification device further includes a clearing module, which is used to clear first security verification information based on an information clearing instruction; the information clearing instruction includes a remote call end instruction or a data call system restart instruction; the first security verification information includes the second public key, the second private key and the first public key.
[0275] Figure 5B This is a schematic diagram of the structure of a security verification device provided in another exemplary embodiment of this disclosure. For example... Figure 5B As shown, the security verification device includes: a first determining module 521, a first sending module 522, a second determining module 523, and a second sending module 524.
[0276] The first determining module 521 is used to determine the first public key and the first private key based on a key exchange symmetric algorithm;
[0277] The first sending module 522 is used to send first verification information to the data providing system, so that the data providing system can determine a first security verification result based on the first verification information. If the first security verification result is successful, the system determines a second public key and a second private key based on the key exchange symmetric algorithm, and determines the target ciphertext corresponding to the target information based on the first public key and the second private key. The first verification information includes the first public key.
[0278] The second determining module 523 is used to obtain the target ciphertext and the second public key from the data providing system, and determine the second information to be verified based on the second public key, the first private key, the target ciphertext and the operating environment information of the data calling system;
[0279] The second sending module 524 is used to send the second information to be verified to the data providing system, so that the data providing system can determine the second security verification result based on the second information to be verified, the first public key, the second private key and the preset verification rules.
[0280] In some embodiments, the second determining module 523 is specifically used to determine a first ciphertext based on the second public key, the first private key, and the target ciphertext; determine a second ciphertext based on the second public key, the first private key, and the operating environment information of the data call system; and determine second information to be verified based on the first ciphertext and the second ciphertext.
[0281] In some embodiments, the first determining module 521 is specifically used to decrypt the target ciphertext based on the second public key and the first private key to determine target information; to invert the target information to determine plaintext information to be verified; and to encrypt the plaintext information to be verified based on the second public key and the first private key to determine the first ciphertext.
[0282] In some embodiments, the security verification device further includes a clearing module, which is used to clear second security verification information based on an information clearing instruction; the information clearing instruction includes a remote call end instruction or a data call system restart instruction, and the second security verification information includes the first public key, the first private key, and the second public key.
[0283] The beneficial technical effects corresponding to the exemplary embodiments of this device can be found in the corresponding beneficial technical effects of the exemplary method section above, and will not be repeated here.
[0284] The beneficial technical effects corresponding to the exemplary embodiments of this device can be found in the corresponding beneficial technical effects of the exemplary method section above, and will not be repeated here.
[0285] Exemplary electronic devices
[0286] Figure 6 This is a structural diagram of an electronic device provided in an embodiment of the present disclosure. The electronic device 610 includes at least one processor 611 and a memory 612.
[0287] The processor 611 may be a central processing unit (CPU) or other form of processing unit with data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 610 to perform desired functions.
[0288] The memory 612 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 610 may execute one or more computer program instructions to implement the security verification method, data retrieval method, and / or other desired functions of the various embodiments of this disclosure described above.
[0289] In one example, the electronic device 610 may also include an input device 613 and an output device 614, which are interconnected via a bus system and / or other forms of connection mechanism (not shown).
[0290] The input device 613 may also include, for example, a keyboard, a mouse, etc.
[0291] The output device 614 can output various information to the outside, including, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, etc.
[0292] Of course, for the sake of simplicity, Figure 6 Only some of the components of the electronic device 610 relevant to this disclosure are shown, omitting components such as buses, input / output interfaces, etc. In addition, the electronic device 610 may include any other suitable components depending on the specific application.
[0293] Exemplary computer program products and computer-readable storage media
[0294] In addition to the methods and devices described above, embodiments of this disclosure may also provide a computer program product, including computer program instructions, which, when executed by a processor, cause the processor to perform the steps of the security verification method and data retrieval method of the various embodiments of this disclosure described in the "Exemplary Methods" section above.
[0295] Computer program products can be written in any combination of one or more programming languages to perform the operations of embodiments of this disclosure. These programming languages include object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on a user's computing device, partially on a user's computing device, as a standalone software package, partially on a user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0296] Furthermore, embodiments of this disclosure may also be computer-readable storage media storing computer program instructions thereon, which, when executed by a processor, cause the processor to perform the steps of the security verification method or data retrieval method of the various embodiments of this disclosure described in the "Exemplary Methods" section above.
[0297] Computer-readable storage media may take the form of any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may include, but is not limited to, systems, apparatuses, or devices that are electrical, magnetic, optical, electromagnetic, infrared, or semiconductor, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0298] The basic principles of this disclosure have been described above with reference to specific embodiments. However, the advantages, benefits, and effects mentioned in this disclosure are merely examples and not limitations, and should not be considered as essential features of each embodiment of this disclosure. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the scope of this disclosure to the necessity of employing the aforementioned specific details for implementation.
[0299] Various modifications and variations can be made to this disclosure without departing from its spirit and scope. Therefore, this disclosure is also intended to include such modifications and variations if they fall within the scope of the claims of this disclosure and their equivalents.
Claims
1. A security verification method applied to a data provision system, comprising: Determine the first information to be verified in the data call system, and determine the first security verification result based on the first information to be verified; The data retrieval system determines the first public key and the first private key based on a key exchange symmetric algorithm, and the first information to be verified includes the first public key; If the first security verification result is passed, the second public key and the second private key are determined based on the key exchange symmetric algorithm, and the target ciphertext corresponding to the target information is determined based on the first public key and the second private key. Send the target ciphertext and the second public key to the data retrieval system; The second information to be verified by the data retrieval system is determined, and the second information to be verified is determined by the data retrieval system based on the second public key, the first private key, the target ciphertext, and the operating environment information of the data retrieval system; Based on the second information to be verified, the first public key, the second private key, and the preset verification rules, the second security verification result is determined.
2. The method according to claim 1, wherein, The step of determining the second security verification result based on the second information to be verified, the first public key, the second private key, and the preset verification rules includes: Based on the second information to be verified, a first ciphertext and a second ciphertext are determined. The first ciphertext is determined by the data retrieval system based on the second public key, the first private key, and the target ciphertext. The second ciphertext is determined by the data retrieval system based on the second public key, the first private key, and the operating environment information of the data retrieval system. Based on the first ciphertext, the second ciphertext, the first public key, the second private key, and the preset verification rules, a second security verification result is determined.
3. The method according to claim 2, wherein, The determination of the second security verification result based on the first ciphertext, the second ciphertext, the first public key, the second private key, and the preset verification rules includes: The first ciphertext is decrypted using the first public key and the second private key to obtain the plaintext information to be verified, and the second ciphertext is decrypted using the first public key and the second private key to obtain the runtime environment information; Based on the plaintext information to be verified and the first preset verification rule in the preset verification rules, a first result is determined; Based on the operating environment information and the second preset verification rule in the preset verification rules, the second result is determined; Based on the first result and the second result, a second security verification result is determined.
4. The method according to claim 3, wherein, The determination of the second result based on the operating environment information and the second preset verification rule in the preset verification rules includes: If the operating environment information includes system version information, the version verification result is determined based on the verification of the system version information and the target system version information in the second preset verification rule; If the operating environment information includes system status information, the status verification result is determined based on the verification of the system status information and the target status information in the second preset verification rule; The second result is determined based on one or more of the version verification result and the status verification result.
5. The method according to claim 4, wherein, If the operating environment information includes system status information, the status verification result is determined based on the verification of the system status information and the target status information in the second preset verification rule, including: If the system status information includes system service information, verify the system service information and the target service information, and determine the service verification result; If the system status information includes system resource information, verify the system resource information and the target resource information, and determine the resource verification result; If the system status information includes system dependency environment information, verify the system dependency environment information and the target dependency environment information, and determine the dependency environment verification result; The status verification result is determined based on one or more of the business verification result, the resource verification result, and the dependent environment verification result.
6. The method according to claim 1, wherein, The step of determining the first security verification result based on the first information to be verified includes: Based on the first information to be verified, the first public key of the data access system and the current timestamp of the data access system are determined; Determine the current timestamp of the data providing system, and based on the current timestamp of the data retrieval system and the current timestamp of the data providing system, determine a third result; Based on the key type of the first public key, determine the fourth result; Based on the third and fourth results, the first security verification result is determined.
7. The method according to claim 2, wherein, Also includes: If the second security verification result is successful, the third ciphertext is determined based on the first public key, the second private key, and the target information; The first ciphertext and remote call information are obtained from the data retrieval system; Based on the first ciphertext and the third ciphertext, the fifth result is determined; If the fifth result is passed, the legality of the remote call information is verified. If the validity verification result is successful, the target data is returned to the data calling system.
8. The method according to any one of claims 1-7, wherein, Also includes: Based on the information clearing command, the first security verification information is cleared; the information clearing command includes a remote call end command or a data call system restart command. The first security verification information includes the second public key, the second private key, and the first public key.
9. A security verification method applied to a data retrieval system, comprising: The first public key and the first private key are determined based on a key exchange symmetric algorithm; A first verification message is sent to a data providing system so that the data providing system can determine a first security verification result based on the first verification message. If the first security verification result is successful, a second public key and a second private key are determined based on the key exchange symmetric algorithm. The target ciphertext corresponding to the target information is determined based on the first public key and the second private key. The first verification message includes the first public key. The target ciphertext and the second public key are obtained from the data providing system, and the second information to be verified is determined based on the second public key, the first private key, the target ciphertext, and the operating environment information of the data calling system. The second verification information is sent to the data providing system so that the data providing system can determine the second security verification result based on the second verification information, the first public key, the second private key, and the preset verification rules.
10. The method according to claim 9, wherein, The step of determining the second information to be verified based on the second public key, the first private key, the target ciphertext, and the operating environment information of the data retrieval system includes: Based on the second public key, the first private key, and the target ciphertext, the first ciphertext is determined; Based on the second public key, the first private key, and the operating environment information of the data retrieval system, the second ciphertext is determined; Based on the first ciphertext and the second ciphertext, the second information to be verified is determined.
11. The method according to claim 10, wherein, The step of determining the first ciphertext based on the second public key, the first private key, and the target ciphertext includes: The target ciphertext is decrypted based on the second public key and the first private key to determine the target information; The target information is inverted to determine the plaintext information to be verified; The plaintext information to be verified is encrypted using the second public key and the first private key to determine the first ciphertext.
12. The method according to claim 9, wherein, Also includes: Based on the information clearing instruction, the second security verification information is cleared; the information clearing instruction includes a remote call end instruction or a data call system restart instruction, and the second security verification information includes the first public key, the first private key and the second public key.
13. A security verification device, applied to a data provision system, comprising: The first verification module is used to determine the first information to be verified in the data calling system and to determine the first security verification result based on the first information to be verified. The data retrieval system determines the first public key and the first private key based on a key exchange symmetric algorithm, and the first information to be verified includes the first public key; The first determining module is configured to, if the first security verification result is passed, determine the second public key and the second private key based on the key exchange symmetric algorithm, and determine the target ciphertext corresponding to the target information based on the first public key and the second private key; The sending module is used to send the target ciphertext and the second public key to the data retrieval system; The second determining module is used to determine the second verification information of the data calling system. The second verification information is determined by the data calling system based on the second public key, the first private key, the target ciphertext, and the operating environment information of the data calling system. The second verification module is used to determine the second security verification result based on the second information to be verified, the first public key, the second private key, and the preset verification rules.
14. A security verification device, applied to a data retrieval system, comprising: The first determining module is used to determine the first public key and the first private key based on a key exchange symmetric algorithm; A first sending module is configured to send first verification information to a data providing system, so that the data providing system can determine a first security verification result based on the first verification information. If the first security verification result is successful, a second public key and a second private key are determined based on the key exchange symmetric algorithm, and the target ciphertext corresponding to the target information is determined based on the first public key and the second private key. The first verification information includes the first public key. The second determining module is used to obtain the target ciphertext and the second public key from the data providing system, and determine the second information to be verified based on the second public key, the first private key, the target ciphertext and the operating environment information of the data calling system; The second sending module is used to send the second information to be verified to the data providing system, so that the data providing system can determine the second security verification result based on the second information to be verified, the first public key, the second private key and the preset verification rules.
15. A computer-readable storage medium storing a computer program for performing the security verification method according to any one of claims 1-8, or performing the security verification method according to any one of claims 9-12.
16. An electronic device, the electronic device comprising: processor; Memory used to store the processor's executable instructions; The processor is configured to read the executable instructions from the memory and execute the instructions to implement the security verification method according to any one of claims 1-8, or to implement the security verification method according to any one of claims 9-12.