Communication processing method and computing node

By using data exchange and verification mechanisms between TEEs, the security issues of privacy-preserving data transmission between different computing nodes are resolved, ensuring the authenticity and integrity of data, preventing man-in-the-middle attacks, and achieving secure privacy-preserving data transmission.

CN115766272BActive Publication Date: 2025-12-16ANT BLOCKCHAIN TECHNOLOGY (SHANGHAI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211521968.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-30
Publication Date
2025-12-16
Estimated Expiration
2042-11-30

AI Technical Summary

Technical Problem

When securely transferring private values ​​between TEEs on different computing nodes, it is difficult to ensure that both the provider and the receiver of the private values ​​are TEEs, which poses a risk of man-in-the-middle attacks.

Method used

Data is generated through a key negotiation algorithm and random number calculation. TEEs exchange data and generate proofs. A verification mechanism is used to ensure the authenticity and integrity of the data, ensuring that only TEEs can decrypt the ciphertext data.

Benefits of technology

Ensure that both the provider and receiver of privacy data are TEEs to prevent man-in-the-middle attacks and the theft of privacy data, thus achieving secure transmission of privacy data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115766272B_ABST
    Figure CN115766272B_ABST
Patent Text Reader

Abstract

A communication processing method and a computing node. The method comprises: a TEE of a first computing node exchanges first data and second data with a TEE of a second computing node, the first data being calculated based on a key agreement algorithm and a first random number, and the second data being calculated based on the key agreement algorithm and a second random number; the TEE of the first computing node generates a first proof based on the first data and the second data, and sends the first proof to the second computing node; the TEE of the second computing node sends a second proof and ciphertext data to the first computing node if the first proof is verified, the second proof being generated based on the first data and the second data, and the ciphertext data being obtained by encrypting a private value by using a target key calculated based on the first data and the second random number; and the TEE of the first computing node decrypts the ciphertext data by using the target key calculated based on the second data and the first random number to obtain the private value if the second proof is verified.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present specification belong to the field of blockchain, and particularly relate to a communication processing method and a computing node. BACKGROUND

[0002] A trusted execution environment (TEE) is a secure trusted area in a processor, which can guarantee the security, confidentiality and integrity of the code and data put into it. In some technical scenarios, TEEs deployed in different computing nodes may need to securely transfer private values, and in this process, it is necessary to ensure that both the provider and the receiver of the private values are TEEs deployed in the computing nodes, so as to avoid man-in-the-middle attacks or theft of private values by intruders. SUMMARY

[0003] The purpose of the present application is to provide a communication processing method and a computing node.

[0004] In a first aspect, a communication processing method is provided, which includes: a TEE of a first computing node exchanging first data and second data with a TEE of a second computing node, the first data being calculated based on a key agreement algorithm and a first random number, and the second data being calculated based on the key agreement algorithm and a second random number; the TEE of the first computing node generating a first proof based on the first data and the second data, and sending the first proof to the second computing node; the TEE of the second computing node verifying the first proof, and in the case that the first proof passes the verification, sending a second proof and ciphertext data to the first computing node, wherein the second proof is generated based on the first data and the second data, and the ciphertext data is obtained by encrypting a private value using a target key calculated based on the first data and the second random number; the TEE of the first computing node verifying the second proof, and in the case that the second proof passes the verification, decrypting the ciphertext data using a target key calculated based on the second data and the first random number to obtain the private value.

[0005] In a second aspect, a communication processing method is provided, and is applied to a first computing node deployed with a TEE. The method comprises: a TEE of the first computing node and a TEE of a second computing node exchanging first data and second data, the first data being calculated based on a key agreement algorithm and a first random number, and the second data being calculated based on the key agreement algorithm and a second random number; the TEE of the first computing node generating a first proof based on the first data and the second data, and sending the first proof to the TEE of the second computing node, so that the TEE of the second computing node returns a second proof and ciphertext data to the TEE of the first computing node in a case where the first proof passes verification; the TEE of the first computing node verifying the second proof, and in a case where the second proof passes verification, decrypting the ciphertext data by using a target key calculated based on the second data and the first random number to obtain the private value.

[0006] In a third aspect, a communication processing method is provided, and is applied to a second computing node deployed with a TEE. The method comprises: a TEE of the second computing node and a TEE of a first computing node exchanging second data and first data, the first data being calculated based on a key agreement algorithm and a first random number, and the second data being calculated based on the key agreement algorithm and a second random number; receiving a first proof from the TEE of the first computing node; the TEE of the second computing node verifying the first proof, and in a case where the first proof passes verification, sending the second proof and the ciphertext data to the first computing node, wherein the second proof is generated based on the first data and the second data, and the ciphertext data is obtained by encrypting a private value by using a target key calculated based on the first data and the second random number.

[0007] In a fourth aspect, a first computing node is provided, comprising a communication processing unit and a TEE, wherein: the TEE of the first computing node is configured to exchange, with a TEE of a second computing node via the communication processing unit, first data and second data, the first data being calculated based on a key agreement algorithm and a first random number, and the second data being calculated based on the key agreement algorithm and a second random number; the TEE of the first computing node is further configured to generate a first proof based on the first data and the second data, and send the first proof to the TEE of the second computing node via the communication processing unit, so that the TEE of the second computing node returns a second proof and ciphertext data if the first proof passes verification; and the TEE of the first computing node is further configured to verify the second proof, and decrypt the ciphertext data using a target key calculated based on the second data and the first random number to obtain the private value if the second proof passes verification.

[0008] In a fifth aspect, a second computing node is provided, comprising a communication processing unit and a TEE, wherein: the TEE of the second computing node is configured to exchange, with a TEE of a first computing node via the communication processing unit, second data and first data, the first data being calculated based on a key agreement algorithm and a first random number, and the second data being calculated based on the key agreement algorithm and a second random number; the communication processing unit is further configured to receive a first proof from the TEE of the first computing node; and the TEE of the second computing node is further configured to verify the first proof, and send, to the TEE of the first computing node via the communication processing unit, a second proof and ciphertext data if the first proof passes verification, wherein the second proof is generated based on the first data and the second data, and the ciphertext data is obtained by encrypting a private value using a target key calculated based on the first data and the second random number.

[0009] In the scheme of the embodiments of the present disclosure, the first proof that passes verification can only be generated in a TEE based on correct first data and second data, and the second proof that passes verification can only be generated in a TEE based on correct first data and second data, and verifying the first proof and the second proof can ensure that both parties currently requesting to obtain a private value and providing a private value are TEEs; in addition, an intruder cannot forge ciphertext data or calculate a correct target key to decrypt the ciphertext data because the intruder cannot obtain the first random number and the second random number generated in different TEEs that can be used to calculate the same target key. In this way, it can be ensured that both parties providing a private value and obtaining a private value are TEEs, and a man-in-the-middle attack or theft of a private value by an intruder can be avoided, so that TEEs deployed in different computing nodes can securely transmit a private value. BRIEF DESCRIPTION OF DRAWINGS

[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present specification, the drawings required to be used in the embodiment description will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments described in the present specification, and other drawings can be obtained by those skilled in the art without creative labor.

[0011] Figure 1 The system framework diagram of the technical solutions provided in the embodiments of the present specification;

[0012] Figure 2 The flow chart of a communication processing method provided in the embodiments of the present specification;

[0013] Figure 3 The structural schematic diagram of a computing node provided in the embodiments of the present specification;

[0014] Figure 4 The structural schematic diagram of a computing node provided in the embodiments of the present specification. DETAILED DESCRIPTION

[0015] In order to make the person skilled in the art better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be described clearly and completely in the following with reference to the drawings in the embodiments of the present specification. Obviously, the described embodiments are only some embodiments of the present specification, not all the embodiments. Based on the embodiments in the present specification, all other embodiments obtained by those skilled in the art without creative labor should be within the scope of protection of the present specification.

[0016] Currently, the industry is very concerned about the solution of TEE technology, and almost all mainstream chips and software alliances have their own independent TEE solutions, such as TPM (Trusted Platform Module) in software and Intel SGX (Software Guard Extensions), ARM Trustzone and AMD PSP (Platform Security Processor) in hardware. TEE can play a black box role. The code and data in TEE cannot be snooped even by the operating system layer, and can only be operated through the pre-defined interface in the code. In terms of efficiency, due to the black box nature of TEE, the data operated in TEE is plaintext data, not the complex cryptography operation in homomorphic encryption, and the computing process efficiency is almost not lost.

[0017] In the TEE technology, Intel SGX (Intel Software Guard Extension, hereinafter referred to as SGX) technology is taken as an example for illustration. The computing node can create an enclave based on the SGX technology to serve as a TEE for executing a specific application. In the computing node, a processor instruction is added in the CPU, and a part of the EPC (Enclave Page Cache or enclave page cache) in the memory can be allocated to reside in the above-mentioned enclave. The memory area corresponding to the above-mentioned EPC is encrypted by the MEE (Memory Encryption Engine) in the CPU, and the content (code and data in the enclave) in the memory area can only be decrypted in the CPU core, and the key for encryption and decryption is generated only when the EPC is started and stored in the CPU. It can be seen that the security boundary of the enclave only contains itself and the CPU, and neither privileged software nor unprivileged software can access the enclave, even the operating system administrator and the VMM (Virtual Machine Monitor, or Hypervisor) cannot affect the code and data in the enclave, so it has very high security. Under the premise of the above-mentioned security guarantee, the CPU can process data in the enclave, which has very high operation efficiency, so as to balance the data security and the computing efficiency. In addition, the data entering and exiting the TEE can be encrypted, so as to guarantee the security of the private data.

[0018] The CPU supporting SGX will burn the provisioning key and the sealing key into the fuse register in the CPU before leaving the factory. The fuse register is a one-time programming register, and once the data is burned, the fuse is melted, so that the content in the register can only be read but not written. Intel promises that the key burned into the fuse register is randomly generated; in addition, it also promises that all backups about the burned key will be destroyed, that is, even Intel itself does not know the burned key. The provisioning key can represent part of the information in the CPU, such as the code of the CPU (for example, the sixth generation of cool, the seventh generation of cool, etc.), the model (such as desktop, mobile, etc.). For security considerations, the provisioning key is not directly used for encryption, signature and other operations, but a proof key derived from the provisioning key is used, so the provisioning key plays a deployment role.

[0019] The service provider can initiate remote attestation to the TEE in the compute node. Before the service provider initiates remote attestation to the TEE in the compute node, the CPU in the compute node can detect whether there is an attestation key. If not, it initiates initialization. In the process of initialization, it can generate an EPID (Enhanced Privacy IDentification) as the attestation key based on a key generation protocol, through interaction with the Intel server, and according to the generation rule of the Provisioning Key, which is generally used as a private key sk1 in an asymmetric encryption key. The EPID can be stored in the TEE for subsequent signature. Thus, the Intel can obtain the public key pk1 corresponding to the EPID through the interaction process. It needs to be particularly pointed out that the public key pk1 corresponding to the EPID is not public, but is only kept by the Intel server. Such a feature is suitable for subsequent authentication by the server of Intel (also known as IAS, Intel Attestation Server) in the remote attestation process.

[0020] For example, after the TEE of the compute node 11 is ready with sk1 and pk1, the service provider can initiate a remote attestation process to the TEE, which can include some or all of the following steps.

[0021] Step 1: The service provider initiates a challenge request to the TEE in the compute node, requiring the TEE of the compute node to present proof to show the correctness of the program code or other data included in the TEE in the compute node;

[0022] Step 2: After receiving the challenge request, the TEE in the compute node generates a report report, which can include the measurement of the program code running in the TEE and other state information related to security, such as including the hash value hash1 of the program code running in the TEE, and then signs the report using the aforementioned private key sk1 through quoting enclave (QE) to obtain the signature sig1, generates a proof quote containing the report and sig1, and sends the quote to the service provider;

[0023] Step 3: Since the service provider can not have the public key pk1 corresponding to sk1, after receiving the quote containing the report and sig1, the service provider can send the quote to the IAS;

[0024] Step 4: The IAS verifies the signature sig1 in the quote using the public key pk1, and returns the verification result to the service provider. In order to prevent the verification result from being intercepted or modified by an intermediate, the IAS can sign the verification result using its own private key to obtain a signature sig2, and send the verification result and the signature sig2 to the service provider together.

[0025] Step 5: After receiving the verification result, if the verification result indicates that sig1 is correct, the service provider verifies the report according to the pre-obtained verification data, for example, whether the correct hash value of the program code running in the TEE pre-obtained by the service provider is consistent with hash1 in the report. If the report passes the verification, that is, the quote passes the verification, the TEE in the computing node completes the remote attestation, and then the service provider can jointly execute a specific transaction with the TEE in the computing node.

[0026] For example, the TEE in the computing node and the service provider can also obtain the public key pk2 through the Diffie-Hellman key exchange (DH) algorithm or the Elliptic Curve Diffie-Hellman key exchange (ECDH) algorithm in step 1 and step 2, or after step 1 and step 2. In this case, the quote provided by the TEE of the computing node can also include the public key pk2 and the hash value hash2 of pk2. Correspondingly, the service provider can generate a private key sk2 corresponding to the public key pk2 after the quote passes the verification, symmetrically encrypt the private key sk2 using the public key pk2 to obtain a ciphertext private key, and send the ciphertext private key to the TEE of the computing node. The TEE of the computing node can decrypt the ciphertext private key using the public key pk2 to obtain the private key sk2, and store the private key sk2 and the public key pk2 in the TEE. Further, other computing nodes can use the public key pk2 to encrypt business data to be sent to obtain a ciphertext, and send the ciphertext to the TEE of the corresponding computing node, so that the TEE of the corresponding computing node can decrypt the ciphertext based on the private key sk2 to obtain the business data.

[0027] The foregoing exemplary description describes a process of initiating remote attestation for the TEE in the computing node and negotiating the private key sk2 and the public key pk2, so that other computing nodes can use the public key pk2 to securely communicate with the TEE in the corresponding computing node. However, in some technical scenarios, there is a need for secure transmission of private values between TEEs deployed in different computing nodes, and it is difficult to ensure that both the provider and the receiver of the private values are TEEs deployed in computing nodes, and there is a risk of man-in-the-middle attack.

[0028] In view of the above problems, at least one communication processing method and a computing node are provided in the embodiments of the present specification. The TEE of the first computing node and the TEE of the second computing node can exchange first data and second data, the first data being calculated based on a key agreement algorithm and a first random number, and the second data being calculated based on the key agreement algorithm and a second random number; the TEE of the first computing node can further generate a first proof based on the first data and the second data, and send the first proof to the TEE of the second computing node; the TEE of the second computing node can verify the first proof, and in the case that the first proof passes the verification, send a second proof and ciphertext data to the TEE of the first computing node, wherein the second proof is generated based on the first data and the second data, and the ciphertext data is obtained by encrypting a private value using a target key calculated based on the first data and the second random number; and further, the TEE of the first computing node can verify the second proof, and in the case that the second proof passes the verification, decrypt the ciphertext data using the target key calculated based on the second data and the first random number to obtain the private value.

[0029] The first proof that can pass the verification can only be generated in the TEE based on correct first data and second data, and the second proof that can pass the verification can only be generated in the TEE based on correct first data and second data, and verifying the first proof and the second proof can ensure that both parties currently requesting to obtain the private value and providing the private value are TEEs; in addition, an intruder cannot forge the ciphertext data or calculate the correct target key to decrypt the ciphertext data because the intruder cannot obtain the first random number and the second random number generated in different TEEs that can be used to calculate the same target key. In this way, it can be ensured that both parties providing the private value and obtaining the private value are TEEs, and the man-in-the-middle attack or the private value being stolen by the intruder can be avoided, so that the TEEs deployed in different computing nodes can securely transmit the private value.

[0030] Figure 1 A system framework diagram of the technical solutions provided in the embodiments of the present specification is shown in FIG. 1. Referring to FIG. 1, the system framework diagram includes a first computing node 100 and a second computing node 200. Figure 1As shown, application A can be compiled into untrusted part A1 and trusted part A2, after untrusted part A1 is started in computing node 11, TEE A can be created in computing node 11, and trusted part A2 will be loaded into TEE A to run. Similarly, application B can be compiled into untrusted part B1 and trusted part B2, after untrusted part B1 is started in computing node 13, TEE B can be created in computing node 13, and trusted part B2 will be loaded into TEE B to run. Among them, a point-to-point communication connection can be established between untrusted part A1 and untrusted part B1, such as a transmission control protocol (TCP) connection; trusted part A2 can need to obtain a privacy value from trusted part B2 and use the privacy value to perform certain transactions. The foregoing privacy value can be a session key required to be used in the process of trusted part A2 and trusted part B2 jointly performing a specific business, or can be business data required to be transmitted in the process of trusted part A2 and trusted part B2 jointly performing a specific business. In addition, it can be understood that the communication between TEE A and TEE B, including the communication between trusted part A2 and trusted part B2, can need to rely on the communication connection established between untrusted part A1 and untrusted part A2.

[0031] The following describes the technical solutions provided in the embodiments of the present specification in conjunction with Figure 1 The system framework shown exemplarily describes the technical solutions provided in the embodiments of the present specification.

[0032] Figure 2 A flowchart of a communication processing method provided in the embodiments of the present specification. In the method, the process of TEE A in computing node 11 securely receiving a privacy value from TEE B in the computing node is exemplarily described; see Figure 2 As shown, the method can include, but is not limited to, some or all of the following steps S201-S214.

[0033] In step S201, computing node 11 sends a data acquisition request to computing node 13.

[0034] The untrusted part A1 can trigger the computing node 11 to send a data acquisition request to the untrusted part B1 in the computing node 13 according to business requirements or in response to a request initiated by the TEE A, and the data acquisition request is used to request the trusted part B2 in the TEE B to provide a privacy value to the trusted part A2 in the TEE A. It needs to be particularly pointed out that if the privacy value is business data required to be transmitted in the process of the trusted part A2 and the trusted part B2 jointly performing a specific business, the identity of the privacy value can also be indicated in the data acquisition request; the untrusted part B1 can provide the data acquisition request or the identity of the privacy value to the TEE B, that is, provide the data acquisition request or the identity of the privacy value to the trusted part B2.

[0035] In step S202, the computing node 13 sends a challenge request to the computing node 11 based on the data acquisition request.

[0036] The untrusted part B1 can discover that the data acquisition request is used to request the trusted part B2 in the TEE B to provide a privacy value to the trusted part A2 in the TEE A by analyzing the data acquisition request, and then the untrusted part B1 can trigger the computing node 13 to send a challenge request to the untrusted part in the computing node 11. Among them, the untrusted part A1 can trigger the TEE A to perform the following step 2031 by providing the challenge request to the TEE A or by other means.

[0037] In step 2031, the TEE A generates a random number a and calculates data X based on a key agreement algorithm and the random number a.

[0038] Corresponding to step 2031, the TEE B can perform step 2033 to generate a random number b and calculate data Y based on a key agreement algorithm and the random number b in response to the data acquisition request or the identity of the privacy value provided by the untrusted part B1.

[0039] The foregoing key agreement algorithm can be the DH algorithm or the ECDH algorithm described in the foregoing. Taking the DH algorithm as an example, the TEE A and the TEE B can know the same base g and prime number p; the TEE A can calculate the data X by the formula X = g a mod p after generating the random number a; the TEE B can calculate the data Y by the formula Y = g b mod p after generating the random number b. For the ECDH algorithm, the foregoing random number a and the random number b can be replaced by points on an elliptic curve mapped based on corresponding random numbers, and the power operation in the foregoing two formulas can be replaced by point multiplication operation. In addition, it needs to be pointed out that, for example, the random number a can be generated by the trusted part A2 and the data X can be calculated, and the random number b can be generated by the trusted part B2 and the data Y can be calculated.

[0040] At step 204, TEE A and TEE B exchange data X and data Y.

[0041] After TEE A obtains random number a and data X, TEE A can store random number a locally and provide data X to untrusted part Al, and untrusted part Al can trigger computing node 11 to send data X to untrusted part Bl in computing node 13, and data X is provided to TEE B by untrusted part Bl, and the sending of data X from TEE A to TEE B is completed. After TEE B obtains random number b and data Y, TEE B can store random number b locally and provide data Y to untrusted part Bl, and untrusted part Bl can trigger computing node 13 to send data Y to untrusted part Al in computing node 11, and data Y is provided to TEE A by untrusted part Al, and the sending of data Y from TEE B to TEE A is completed. In turn, TEE A and TEE B complete the exchange of data X and data Y calculated by each other.

[0042] TEE B can also complete the receiving of data X from computing node 11 at step 204, and perform the aforementioned step S2033.

[0043] At step S205, TEE A generates a first proof based on data X and data Y.

[0044] In the following, the first proof is expressed as quote A. quote A includes, for example, a report report A, and the report A is signed by using the attestation key (denoted as attestation key A) of computing node 11 through QE to obtain a signature sig1A; wherein report A is generated based on data X and data Y, for example, report A can include data X and data Y, or report A can include the hash value HA of data X and data Y.

[0045] At step S206, TEE A sends the first proof to TEE B.

[0046] At step S207, TEE B verifies the first proof.

[0047] TEE B can send quote A to IAS after receiving quote A containing report A and sig1A, IAS verifies sig1A in quote A using the public key corresponding to attestation key A, and returns the verification result to TEE B; in order to prevent the verification result from being intercepted or modified by an intermediate, IAS can sign the verification result using its own private key to obtain a signature sig2A, and send the verification result and its signature sig2A to TEE B. After receiving the verification result, if the verification result indicates that sig1A is correct, TEE B verifies report A based on its own stored data X and data Y, for example, verifies whether the correct hash of its own stored data X and data Y is consistent with HA in report A, and if report A passes the verification, that is, quote A passes the verification, the remote attestation of TEE A is completed.

[0048] After quote A from the computing node 11 passes the verification, TEE B can then perform steps S208-S211.

[0049] In step S208, TEE B calculates a target key based on random number b and data X.

[0050] Taking the DH algorithm as an example, the target key can be calculated by the expression X b mod p.

[0051] In step S209, TEE B encrypts the private value using the target key to obtain ciphertext data.

[0052] If the private value is business data required to be transmitted in the process of trusted part A2 and trusted part B2 jointly performing a specific business, that is, if TEE B can obtain a data acquisition request provided by untrusted part B1 or an identifier of the private value, TEE B can determine the private value to be transmitted based on the data acquisition request or the identifier of the private value. If the private value is not business data required to be transmitted in the process of trusted part A2 and trusted part B2 jointly performing a specific business, the private value can be a random number or data generated by TEE B based on a certain predetermined strategy.

[0053] In step S210, a second proof is generated based on data X and data Y.

[0054] The second quote is denoted as quote B hereinafter. Quote B includes, for example, a report report B, and a signature sig1B of report B by using a proof key (denoted as attestation key B) of the computing node 13 by QE; wherein report B is generated based on data X and data Y, for example, report B can include data X and data Y, or report B can include hash values HB of data X and data Y.

[0055] It should be particularly noted that part or all of the foregoing steps S208-S210 can also be executed before TEE B completes the execution of step S206, as long as TEE B executes the following step S210 only when quote A is verified.

[0056] In step S211, TEE B sends the ciphertext data and the second quote to TEE A.

[0057] In step S212, TEE A verifies the second quote.

[0058] For example, after receiving quote B containing report B and sig1B, TEE A can send quote B to IAS, and IAS verifies the signature sig1B in quote B using the public key corresponding to attestation key B, and returns the verification result to TEE A. In order to prevent the verification result from being intercepted or modified by an intermediate, IAS can sign the verification result using its own private key to obtain a signature sig2B, and send the verification result and its signature sig2B to TEE A together. After receiving the verification result, if the verification result indicates that sig1B is correct, TEE A verifies report B based on its own stored data X and data Y, for example, it verifies whether the correct hash of its own calculated data X and data Y is consistent with HB in report B, and if report B is verified, that is, quote B is verified, the remote proof of TEE B is completed.

[0059] After quote B from the computing node 13 is verified, TEE A can then execute the following steps S213-S214.

[0060] In step S213, TEE A calculates the target key based on the random number a and data Y.

[0061] For example, using the DH algorithm, the target key can be calculated by the expression Y a mod p.

[0062] It should be noted that the aforementioned step S213 can also be performed before TEE A completes the execution of step S212, as long as TEE A only performs the following step S214 if quote B is verified.

[0063] At step S214, TEE A decrypts the ciphertext data with the target key to obtain the privacy value.

[0064] where Y a mod p is equal to X b mod p, so the target key calculated by the expression Y a mod p can be used to symmetrically decrypt the ciphertext data to obtain the correct privacy value that trusted part A2 expects to obtain.

[0065] Based on the same concept as the aforementioned method embodiment, the present specification embodiment also provides a first computing node. As shown in Figure 3 The first computing node includes a communication processing unit 31 and a TEE 33. The TEE 33 of the first computing node is configured to exchange first data and second data with the TEE of the second computing node through the communication processing unit 31, the first data being calculated based on a key agreement algorithm and a first random number, and the second data being calculated based on the key agreement algorithm and a second random number. The TEE 33 of the first computing node is further configured to generate a first proof based on the first data and the second data, and send the first proof to the second computing node through the communication processing unit 31, so that the TEE of the second computing node returns a second proof and ciphertext data if the first proof is verified. The TEE 33 of the first computing node is further configured to verify the second proof, and decrypt the ciphertext data with a target key calculated based on the second data and the first random number to obtain the privacy value if the second proof is verified.

[0066] Based on the same concept as the aforementioned method embodiment, the present specification embodiment also provides a second computing node. As shown in Figure 3As shown, the second computing node includes a communication processing unit 41 and a TEE 43. The TEE 43 of the second computing node is configured to exchange, with the TEE of the first computing node, second data and first data via the communication processing unit 41, the first data being calculated based on a key agreement algorithm and a first random number, and the second data being calculated based on the key agreement algorithm and a second random number. The communication processing unit 41 is further configured to receive a first proof from the TEE of the first computing node. The TEE 43 of the second computing node is further configured to verify the first proof, and in a case where the first proof passes the verification, send, to the first computing node via the communication processing unit 41, a second proof and ciphertext data, wherein the second proof is generated based on the first data and the second data, and the ciphertext data is obtained by encrypting a private value using a target key calculated based on the first data and the second random number.

[0067] The embodiments of the present specification also provide a computer readable storage medium, which stores a computer program. When the computer program is executed in a computer, the computer is caused to perform each method step performed by the computing node 11 or the computing node 13 in the foregoing method embodiments.

[0068] In the 1990s, it was quite obvious to distinguish whether an improvement in a technology was in hardware (e.g., improvement in circuit structures of diodes, transistors, switches, etc.) or in software (improvement in method flow). However, as technology has evolved, many improvements in method flow today can be considered as direct improvements in hardware circuit structures. Designers almost always obtain the corresponding hardware circuit structures by programming the improved method flow into hardware circuits. Therefore, it cannot be said that an improvement in a method flow cannot be implemented by hardware entity modules. For example, a programmable logic device (PLD) (e.g., a field programmable gate array (FPGA)) is an integrated circuit whose logic function is determined by user programming of the device. A digital system is "integrated" on a PLD by the designer programming it, rather than by asking a chip manufacturer to design and fabricate a custom integrated circuit chip. Moreover, instead of manually fabricating integrated circuit chips, this programming is now mostly implemented by "logic compiler" software, which is similar to software compilers used in program development, and the original code to be compiled is written in a specific programming language, which is called a hardware description language (HDL), and there are many such languages, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., and the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should be aware that, as long as the method flow is logically programmed in the above-mentioned hardware description languages and programmed into an integrated circuit, a hardware circuit implementing the logical method flow can be easily obtained.

[0069] The controller can be implemented in any suitable way, for example, the controller can take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code, such as software or firmware, executable by the (micro)processor, logic gates, switches, an application specific integrated circuit (ASIC), a programmable logic controller and an embedded microcontroller, examples of which include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320, the memory controller can also be implemented as part of the control logic of the memory. The skilled person will also appreciate that, in addition to implementing the controller in pure computer readable program code, it is possible to implement the controller in the form of logic gates, switches, an application specific integrated circuit, a programmable logic controller and an embedded microcontroller, etc. to perform the same functions by logically programming the method steps. Such a controller can therefore be considered to be a hardware component, and the means included therein to perform the various functions can also be considered to be structures within the hardware component. Alternatively, or even additionally, the means to perform the various functions can be considered to be both a software module implementing the method and a structure within a hardware component.

[0070] The systems, apparatuses, modules or units illustrated by the above embodiments can be specifically implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a server system. Of course, the present application does not rule out that with the development of future computer technology, computers implementing the functions of the above embodiments can be personal computers, laptop computers, vehicle human-computer interaction devices, cellular phones, camera phones, smart phones, personal digital assistants, media players, navigation devices, email devices, game consoles, tablet computers, wearable devices, or combinations of any of these devices.

[0071] Although the method operations of the embodiments of the present specification are described in sequential order, some of the operations can in practical implementations be performed concurrently, in parallel, or in a different order. The above description of the embodiments of the present specification is provided as an example only and is not intended to be limiting. For example, the steps recited in the examples or flow charts can include more, fewer, or different steps than those described. The order in which the steps are presented is merely one example and is not intended to be limiting. The steps can be performed in an order different than presented, or performed in parallel, or in a different order, for example in a parallel processor or multi-threaded processing environment, or even in a distributed data processing environment. The terms "comprise", "comprising", or any other variation thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. Exclusion of such elements is only present if it is expressly stated that these elements are excluded. For example, use of the terms "first", "second", or the like does not denote any order or importance, but rather the terms are used to distinguish one element from another.

[0072] For ease of description, the above apparatuses are described in various modules with different functions. Of course, when implementing one or more of the present specification, the functions of the modules can be implemented in one or more software and / or hardware, or the modules implementing the same function can be implemented by a combination of sub-modules or sub-units. The above-described apparatus embodiments are only illustrative, for example, the division of the units is only a logical function division, and in actual implementation, another division mode can be used, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed each other can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or other forms.

[0073] The present application is described with reference to flowcharts and / or block diagrams of methods, apparatus (system) and computer program products according to embodiments of the application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing apparatus to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing apparatus produce a means for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1 The functions of a flow or multiple flows and / or blocks Figure 1 The apparatuses specified in one or more flows and / or blocks.

[0074] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the Figure 1 function specified in the flow or flows and / or blocks Figure 1 of the block or blocks.

[0075] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the Figure 1 function specified in the flow or flows and / or blocks Figure 1 of the block or blocks.

[0076] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0077] The memory can include non-persistent memory and / or volatile memory, such as a random access memory (RAM) including a cache area for the temporary storage of data. The memory can also include non-volatile memory, such as read only memory (ROM), electrically programmable read only memory (EPROM), electrically erasable programmable read only memory (EEPROM), flash memory, or non-volatile random access memory (NVRAM), for the storage of information, such as data files or program

[0078] Computer readable media includes permanent and non-permanent, removable and non-removable media implemented in any method or technology for the storage of information. The information can be computer readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), electrically programmable read only memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital versatile discs (DVDs) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, graphene storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to computing devices. According to the definition herein, computer readable media does not include transitory media, such as modulated data signals and carrier waves.

[0079] Those skilled in the art will appreciate that the one or more embodiments described herein can be provided as a method, a system or a computer program product. Accordingly, the one or more embodiments described herein can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the one or more embodiments described herein can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) embodying computer readable code.

[0080] The one or more embodiments described herein can be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform particular tasks or implement particular abstract data types. The one or more embodiments described herein can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules can be located in both local and remote computer storage media including memory storage devices.

[0081] The various embodiments described in this specification can be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform particular tasks or implement particular abstract data types. The various embodiments described in this specification can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules can be located in both local and remote computer storage media including memory storage devices.

[0082] The above description is only some embodiments of the one or more embodiments described in this specification and is not intended to limit the one or more embodiments described in this specification. Those skilled in the art can make various modifications and changes to the one or more embodiments described in this specification. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the one or more embodiments described in this specification shall be included in the scope of the claims.

Claims

1. A communication processing method, the method comprising: The Trusted Execution Environment (TEE) of the first computing node exchanges first data and second data with the TEE of the second computing node. The first data is calculated based on the key negotiation algorithm and the first random number, and the second data is calculated based on the key negotiation algorithm and the second random number. The TEE of the first computing node generates a first proof based on the first data and the second data, and sends the first proof to the second computing node. The TEE of the second computing node verifies the first proof, and if the first proof passes the verification, sends a second proof and ciphertext data to the first computing node, wherein the second proof is generated based on the first data and the second data, and the ciphertext data is obtained by encrypting a privacy value using a target key calculated based on the first data and the second random number; The TEE of the first computing node verifies the second proof, and if the second proof passes verification, it decrypts the ciphertext data using the target key calculated based on the second data and the first random number to obtain the privacy value.

2. The method according to claim 1, wherein the key negotiation algorithm includes the Diffie-Hellman algorithm or the Elliptic Curve Diffie-Hellman algorithm.

3. The method according to claim 1, further comprising: The first computing node sends a data acquisition request to the second computing node; The second computing node sends a challenge request to the first computing node based on the data acquisition request; The first computing node generates the first random number and the first data in its TEE based on the challenge request.

4. The method according to claim 3, wherein the privacy value is determined based on the data acquisition request.

5. The method according to claim 1, further comprising: After receiving the first data from the first computing node, the TEE of the second computing node generates the second random number and the second data.

6. The method according to any one of claims 1-5, wherein the TEE of the first computing node is an Enclave created based on SGX technology; the first proof includes a first report generated based on the first data and the second data, and a first signature of the first report generated based on the first proof key in the first computing node; And / or, the TEE of the second computing node is an Enclave created based on SGX technology; the second proof includes a second report generated based on the first data and the second data, and a second signature of the second report generated based on the second proof key in the second computing node.

7. A communication processing method, applied to a first computing node deployed with a Trusted Execution Environment (TEE), comprising: The TEE of the first computing node exchanges first data and second data with the TEE of the second computing node. The first data is calculated based on the key negotiation algorithm and the first random number, and the second data is calculated based on the key negotiation algorithm and the second random number. The first computing node's TEE generates a first proof based on the first data and the second data, and sends the first proof to the second computing node, so that the second computing node's TEE verifies the first proof. If the first proof passes the verification, the second computing node's TEE returns a second proof and ciphertext data to the first computing node's TEE. The second proof is generated based on the first data and the second data, and the ciphertext data is obtained by encrypting a privacy value using a target key calculated based on the first data and the second random number. The TEE of the first computing node verifies the second proof, and if the second proof passes verification, it decrypts the ciphertext data using the target key calculated based on the second data and the first random number to obtain the privacy value.

8. The method according to claim 7, wherein the key negotiation algorithm includes the Diffie-Hellman algorithm or the Elliptic Curve Diffie-Hellman algorithm.

9. The method according to claim 7, further comprising: Send a data acquisition request to the second computing node; Receive the challenge request returned by the second computing node based on the data acquisition request; Based on the challenge request, the first random number and the first data are generated in the TEE of the first computing node.

10. The method according to claim 9, wherein the privacy value is determined based on the data acquisition request.

11. The method according to any one of claims 7-10, wherein the TEE of the first computing node is an Enclave created based on SGX technology; the first proof includes a first report generated based on the first data and the second data, and a first signature of the first report generated based on the first proof key in the first computing node; And / or, the TEE of the second computing node is an Enclave created based on SGX technology; the second proof includes a second report generated based on the first data and the second data, and a second signature of the second report generated based on the second proof key in the second computing node.

12. A communication processing method applied to a second computing node deployed with a Trusted Execution Environment (TEE), comprising: The TEE of the second computing node exchanges second data and first data with the TEE of the first computing node. The first data is calculated based on the key negotiation algorithm and the first random number, and the second data is calculated based on the key negotiation algorithm and the second random number. Receive a first proof from the TEE of the first computing node, wherein the first proof is generated by the TEE of the first computing node based on the first data and the second data; The TEE of the second computing node verifies the first proof, and if the first proof passes verification, sends a second proof and ciphertext data to the first computing node, so that the TEE of the first computing node verifies the second proof. If the second proof passes verification, the ciphertext data is decrypted using a target key calculated based on the second data and the first random number to obtain a privacy value. The second proof is generated based on the first data and the second data, and the ciphertext data is obtained by encrypting the privacy value using a target key calculated based on the first data and the second random number.

13. The method according to claim 12, wherein the key negotiation algorithm includes the Diffie-Hellman algorithm or the Elliptic Curve Diffie-Hellman algorithm.

14. The method according to claim 12, further comprising: Receive a data acquisition request from the first computing node; A challenge request is sent to the first computing node based on the data acquisition request.

15. The method according to claim 14, wherein the privacy value is determined based on the data acquisition request.

16. The method according to claim 12, further comprising: After receiving the first data from the first computing node, the TEE of the second computing node generates the second random number and the second data.

17. The method according to any one of claims 12-16, wherein the TEE of the first computing node is an Enclave created based on SGX technology; the first proof includes a first report generated based on the first data and the second data, and a first signature of the first report generated based on the first proof key in the first computing node; And / or, the TEE of the second computing node is an Enclave created based on SGX technology; the second proof includes a second report generated based on the first data and the second data, and a second signature of the second report generated based on the second proof key in the second computing node.

18. A first computing node, comprising a communication processing unit and a trusted execution environment (TEE), wherein: The TEE of the first computing node is used to exchange first data and second data with the TEE of the second computing node through the communication processing unit. The first data is calculated based on the key negotiation algorithm and the first random number, and the second data is calculated based on the key negotiation algorithm and the second random number. The TEE of the first computing node is further configured to generate a first proof based on the first data and the second data, and send the first proof to the second computing node through the communication processing unit, so that the TEE of the second computing node verifies the first proof, and if the first proof passes the verification, returns a second proof and ciphertext data to the TEE of the first computing node, wherein the second proof is generated based on the first data and the second data, and the ciphertext data is obtained by encrypting the privacy value using a target key calculated based on the first data and the second random number; The TEE of the first computing node is also used to verify the second proof, and if the second proof is verified, to decrypt the ciphertext data using the target key calculated based on the second data and the first random number to obtain the privacy value.

19. A second computing node, comprising a communication processing unit and a trusted execution environment (TEE), wherein: The TEE of the second computing node is used to exchange second data and first data with the TEE of the first computing node through the communication processing unit. The first data is calculated based on the key negotiation algorithm and the first random number, and the second data is calculated based on the key negotiation algorithm and the second random number. The communication processing unit is further configured to receive a first proof from the TEE of the first computing node, wherein the first proof is generated by the TEE of the first computing node based on the first data and the second data. The TEE of the second computing node is also used to verify the first proof, and if the first proof passes verification, to send a second proof and ciphertext data to the first computing node through the communication processing unit, so that the TEE of the first computing node can verify the second proof, and if the second proof passes verification, to decrypt the ciphertext data using a target key calculated based on the second data and the first random number to obtain a privacy value, wherein the second proof is generated based on the first data and the second data, and the ciphertext data is obtained by encrypting the privacy value using a target key calculated based on the first data and the second random number.

Citation Information

Patent Citations

  • Authentication key negotiation method and device, storage medium and equipment

    CN110890962A

  • Secret key cross-device distribution method and electronic device

    CN114245375A