Blockchain transaction method, apparatus, storage medium, and electronic device

By setting up multiple coin mixing nodes and a trusted execution environment in the blockchain network, transaction data is decrypted and stored off-chain. Homomorphic encryption technology is used to solve the security risks and regulatory requirements of coin mixing transactions, and to achieve the privacy and security of transaction data.

CN113902431BActive Publication Date: 2025-11-21NEUSOFT CORP
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111131516.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-26
Publication Date
2025-11-21
Estimated Expiration
2041-09-26

AI Technical Summary

Technical Problem

Existing blockchain transactions using coin mixing methods pose security risks, potentially leading to data leaks, and do not consider the needs of transaction regulation.

Method used

Multiple coin mixing nodes are set up in the blockchain network. After receiving transaction requests, they are decrypted and saved to an off-chain privacy data storage space. Homomorphic encryption and a trusted execution environment are used to encrypt and review the transaction data to ensure the privacy and security of the transaction data.

Benefits of technology

It enhances the transaction system's resistance to attacks, ensures the security of transaction data, provides a foundation for transaction supervision, and improves the efficiency of transaction review.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113902431B_ABST
    Figure CN113902431B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a blockchain transaction method and device, a storage medium and an electronic device. The method is applied to a target coin mixing node in a blockchain network. The target coin mixing node is any node in a plurality of coin mixing nodes in the blockchain network. The method comprises the following steps: after receiving a transaction request of a transaction initiator node, decrypting encrypted transaction data in the transaction request, and saving the decrypted transaction data to an off-chain privacy data storage space. The privacy data storage space is used to store transaction data written by each coin mixing node. Target transaction data is obtained from the privacy data storage space. The target transaction data includes transaction data written by other coin mixing nodes except the target coin mixing node. The identity of a transaction receiver node corresponding to the transaction request is parsed from the target transaction data. The target transaction data is encrypted, and a transaction request including the encrypted target transaction data is sent to the transaction receiver node corresponding to the identity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of blockchain technology, and more specifically, to a blockchain transaction method, apparatus, storage medium, and electronic device. Background Technology

[0002] Blockchain technology is a technology that enables the collective maintenance of a reliable database in a decentralized and trustless manner. In a blockchain network, even mutually untrusted nodes can easily verify data and reach consensus through a certain consensus mechanism. Therefore, blockchain technology can significantly reduce the trust costs between multiple nodes, thus having broad application scenarios and value in cross-border payments, credential services, and the financial sector.

[0003] In some scenarios, participants in a blockchain network may not want their transaction data to be publicly available. In such cases, coin mixing can be used to obfuscate and hide the transaction data, thereby protecting the privacy of the participants. However, coin mixing in related technologies may also pose security risks, such as potential data leakage under attack. Summary of the Invention

[0004] The purpose of this disclosure is to provide a blockchain transaction method, apparatus, storage medium, and electronic device to solve the aforementioned related technical problems.

[0005] To achieve the above objectives, according to a first aspect of the present disclosure, a blockchain transaction method is provided, applied to a target mixing node in a blockchain network, wherein the target mixing node is any one of a plurality of mixing nodes in the blockchain network, the method comprising:

[0006] After receiving a transaction request from the transaction initiator node, the encrypted transaction data in the transaction request is decrypted, and the decrypted transaction data is saved to the off-chain privacy data storage space, wherein the privacy data space is used to store the transaction data written by each of the coin mixing nodes.

[0007] Obtain target transaction data from the privacy data storage space, wherein the target transaction data includes transaction data written by other mixing nodes besides the target mixing node;

[0008] Parse the identifier of the transaction recipient node corresponding to the transaction request from the target transaction data;

[0009] The target transaction data is encrypted, and a transaction request including the encrypted target transaction data is sent to the transaction recipient node corresponding to the identifier.

[0010] Optionally, the transaction nodes in the blockchain network correspond to the mixing nodes, and the mixing node corresponding to any of the transaction nodes has a preset parsing rule for parsing the identifier of the transaction node.

[0011] Optionally, it also includes:

[0012] Obtain the transaction review model;

[0013] The transaction review model is saved to the blockchain of the blockchain network;

[0014] In response to receiving a transaction review request, the trusted execution environment is granted access to the privacy data storage space;

[0015] The trusted execution environment receives the review results, which are generated by the trusted execution environment based on the transaction review model obtained from the blockchain and the transaction data in the privacy data storage space.

[0016] The review result is signed, and the signed review result is saved to the blockchain.

[0017] Optionally, it also includes:

[0018] In response to receiving the transaction review request, the public key of the node to be reviewed is sent to the trusted execution environment;

[0019] The receipt of the review results from the trusted execution environment includes:

[0020] The trusted execution environment receives the encrypted review result, which is obtained by the trusted execution environment encrypting the original review result based on the public key of the reviewed node. The original review result is generated by the trusted execution environment based on the transaction review model obtained from the blockchain and the transaction data of the reviewed node in the privacy data storage space.

[0021] Optionally, each of the coin mixing nodes maintains a homomorphic key pair with each transaction node in the blockchain network. After receiving a transaction request from the transaction initiator node, the encrypted transaction data in the transaction request is decrypted, and the decrypted transaction data is saved to an off-chain privacy data storage space, including:

[0022] The system receives a transaction request sent by the transaction initiator node. The transaction request includes encrypted transaction data. The encrypted transaction data is obtained by the transaction initiator node encrypting the original transaction data based on the encryption key in the first homomorphic key pair. The first homomorphic key pair is the homomorphic key pair between the target mixing node and the transaction initiator node.

[0023] The encrypted transaction data is decrypted using the first homomorphic key to obtain the original transaction data;

[0024] The original transaction data is saved to the privacy data storage space.

[0025] Optionally, encrypting the target transaction data and sending a transaction request including the encrypted target transaction data to the transaction recipient node corresponding to the identifier includes:

[0026] The target transaction data is encrypted using the encryption key in the second homomorphic key pair to obtain the target encrypted transaction data. The second homomorphic key pair is the homomorphic key pair between the target mixing node and the transaction receiving node.

[0027] Send a transaction request, including the target encrypted transaction data, to the transaction recipient node.

[0028] Optionally, a homomorphic key pair between the target mixing node and the transaction node can be generated in the following manner:

[0029] Multiple target prime numbers are determined based on the state parameters of the blockchain network;

[0030] Using the public key of the transaction node as a first starting value, a first target value is determined, wherein the first target value is greater than or equal to the first starting value and cannot be divided by any of the target prime numbers;

[0031] Using the public key of the target mixing node as the second starting value, a second target value is determined. The second target value is greater than or equal to the second starting value and cannot be divided by any of the target prime numbers.

[0032] Generate a homomorphic key pair between the target mixing node and the transaction node based on the first target value and the second target value.

[0033] Optionally, the state parameters of the blockchain network include the number of nodes in the blockchain network and the length of the hash value obtained by the blockchain network during cryptographic calculation. The step of determining multiple target prime numbers based on the state parameters of the blockchain network includes:

[0034] Calculate the product of the quantity value and the length value to obtain the first product;

[0035] Starting from a preset target value, the first product of prime numbers greater than the target value is determined as the target prime number.

[0036] Optionally, generating a homomorphic key pair between the target mixing node and the transaction node based on the first target value and the second target value includes:

[0037] Calculate the product of the first target value and the second target value to obtain the first key parameter n;

[0038] The target random integer is determined as the second key parameter g, where, Furthermore, the first key parameter n is divisible by the order of the second key parameter g. Given that there exists a multiplicative inverse in the remainder system, the homomorphic key of the transaction node is (n, g);

[0039] The homomorphic key λ of the target mixing node is calculated using the following formula:

[0040] λ = lcm(p-1, q-1)

[0041] Where p is the first target value, q is the second target value, and lcm() is the least common multiple function.

[0042] According to a second aspect of the present disclosure, a blockchain transaction apparatus is provided, applied to a target mixing node in a blockchain network, wherein the target mixing node is any one of a plurality of mixing nodes in the blockchain network, and the apparatus includes:

[0043] The transaction data storage module is used to decrypt the encrypted transaction data in the transaction request after the target mixing node receives the transaction request from the transaction initiator node, and save the decrypted transaction data to the off-chain privacy data storage space. The privacy data space is used to store the transaction data written by each of the mixing nodes.

[0044] The transaction data acquisition module is used to acquire target transaction data from the privacy data storage space, wherein the target transaction data includes transaction data written by other mixing nodes besides the target mixing node;

[0045] The transaction data parsing module is used to parse the identifier of the transaction receiver node corresponding to the transaction request from the target transaction data;

[0046] The first sending module is used to encrypt the target transaction data and send a transaction request including the encrypted target transaction data to the transaction receiving node corresponding to the identifier.

[0047] Optionally, the transaction nodes in the blockchain network correspond to the mixing nodes, and the mixing node corresponding to any of the transaction nodes has a preset parsing rule for parsing the identifier of the transaction node.

[0048] Optionally, the device further includes:

[0049] The model acquisition module is used to acquire transaction review models.

[0050] The model storage module is used to store the transaction review model in the blockchain of the blockchain network;

[0051] The authorization module is used to grant the trusted execution environment access to the privacy data storage space in response to receiving a transaction review request;

[0052] The review result receiving module is used to receive the review result of the trusted execution environment, which is generated by the trusted execution environment based on the transaction review model obtained from the blockchain and the transaction data in the privacy data storage space;

[0053] The signature module is used to sign the review results and save the signed review results to the blockchain.

[0054] Optionally, the device further includes:

[0055] The second sending module is used to send the public key of the node to be reviewed to the trusted execution environment in response to receiving the transaction review request;

[0056] The review result receiving module includes:

[0057] The first receiving submodule is used to receive the encrypted review result of the trusted execution environment. The encrypted review result is obtained by the trusted execution environment encrypting the original review result based on the public key of the reviewed node. The original review result is generated by the trusted execution environment based on the transaction review model obtained from the blockchain and the transaction data of the reviewed node in the privacy data storage space.

[0058] Optionally, each of the coin mixing nodes maintains a homomorphic key pair with each transaction node in the blockchain network, and the transaction data storage module includes:

[0059] The second receiving submodule is used to receive a transaction request sent by the transaction initiator node. The transaction request includes encrypted transaction data. The encrypted transaction data is obtained by the transaction initiator node encrypting the original transaction data based on the encryption key in the first homomorphic key pair. The first homomorphic key pair is a homomorphic key pair between the target mixing node and the transaction initiator node.

[0060] The decryption submodule is used to decrypt the encrypted transaction data using the first homomorphic key to obtain the original transaction data;

[0061] The storage submodule is used to save the original transaction data to the privacy data storage space.

[0062] Optionally, the first transmitting module includes:

[0063] The encryption submodule is used to encrypt the target transaction data based on the encryption key in the second homomorphic key pair to obtain the target encrypted transaction data. The second homomorphic key pair is the homomorphic key pair between the target mixing node and the transaction receiving node.

[0064] The sending submodule is used to send a transaction request, including the target encrypted transaction data, to the transaction receiving node.

[0065] Optionally, the apparatus further includes a key generation module for generating homomorphic key pairs between the target mixing node and the transaction node, the key generation module comprising:

[0066] The first determining submodule is used to determine multiple target prime numbers based on the state parameters of the blockchain network;

[0067] The second determining submodule is used to determine a first target value based on the public key of the transaction node as a first starting value, wherein the first target value is greater than or equal to the first starting value and cannot be divided by any target prime number;

[0068] The third determining submodule is used to determine a second target value based on the public key of the target mixing node as the second starting value. The second target value is greater than or equal to the second starting value and cannot be divided by any of the target prime numbers.

[0069] The key generation submodule is used to generate a homomorphic key pair between the target mixing node and the transaction node based on the first target value and the second target value.

[0070] Optionally, the state parameters of the blockchain network include the number of nodes in the blockchain network and the length of the hash value obtained by the blockchain network during cryptographic calculation. The first determining submodule includes:

[0071] The first calculation subunit is used to calculate the product of the quantity value and the length value to obtain a first product;

[0072] The first determining subunit is used to determine the first product of prime numbers greater than the target value as the target prime number, starting from a preset target value.

[0073] Optionally, the key generation submodule includes:

[0074] The second calculation subunit is used to calculate the product of the first target value and the second target value to obtain the first key parameter n;

[0075] The second determining subunit is used to determine the target random integer as the second key parameter g, where... Furthermore, the first key parameter n is divisible by the order of the second key parameter g. Given that there exists a multiplicative inverse in the remainder system, the homomorphic key of the transaction node is (n, g);

[0076] The third computational subunit is used to calculate the homomorphic key λ of the target mixing node using the following formula:

[0077] λ = lcm(p-1, q-1)

[0078] Where p is the first target value, q is the second target value, and lcm() is the least common multiple function.

[0079] According to a third aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the steps of the method described in any of the first aspects above.

[0080] According to a fourth aspect of the present disclosure, an electronic device is provided, comprising:

[0081] A memory on which computer programs are stored;

[0082] A processor for executing the computer program in the memory to implement the steps of the method described in any of the first aspects above.

[0083] The above technical solution involves setting up multiple mixing nodes in the blockchain network. Upon receiving a transaction request from the transaction initiator node, any mixing node can decrypt the encrypted transaction data in the request and save the decrypted data to an off-chain privacy data storage space. Thus, the transaction data is stored in the privacy data storage space, while the encrypted version is stored on the blockchain. Furthermore, any mixing node can retrieve transaction data written by other mixing nodes from the privacy data storage space and parse it. Once a mixing node successfully parses the identifier of the transaction recipient node from the transaction data, it can encrypt the transaction data and send a transaction request containing the encrypted target transaction data to the corresponding transaction recipient node, thereby completing the transaction between the transaction initiator node and the transaction recipient node.

[0084] Using the above technical solution, the transaction process between the transaction initiator node and the transaction recipient node includes: on-chain interaction between the transaction initiator node and the mixing node, off-chain interaction between the mixing nodes based on a privacy data storage space, and on-chain interaction between the mixing node and the transaction recipient node. In other words, the transaction is divided into multiple on-chain and off-chain stages, and monitoring or obtaining data from only one stage cannot yield the complete transaction data. Therefore, the above transaction method can improve the anti-attack capability of the transaction system while ensuring the privacy of transaction data, thereby guaranteeing the security of transaction data. Furthermore, storing transaction data in an off-chain privacy data storage space also provides a basis for relevant transaction supervision.

[0085] Other features and advantages of this disclosure will be described in detail in the following detailed description section. Attached Figure Description

[0086] The accompanying drawings are provided to further illustrate the present disclosure and form part of the specification. They are used together with the following detailed description to explain the present disclosure, but do not constitute a limitation thereof. In the drawings:

[0087] Figure 1 This is a flowchart illustrating an exemplary embodiment of a blockchain transaction method disclosed herein.

[0088] Figure 2 This is a block diagram of a blockchain transaction system shown in an exemplary embodiment of this disclosure.

[0089] Figure 3 This is a flowchart illustrating an exemplary embodiment of a blockchain transaction method disclosed herein.

[0090] Figure 4 This is a flowchart illustrating a transaction review process as shown in an exemplary embodiment of this disclosure.

[0091] Figure 5 This is a flowchart illustrating an exemplary embodiment of a blockchain transaction method disclosed herein.

[0092] Figure 6 This is a flowchart illustrating the generation of a homomorphic key pair according to an exemplary embodiment of this disclosure.

[0093] Figure 7 This is a block diagram of a blockchain transaction device shown in an exemplary embodiment of this disclosure.

[0094] Figure 8 This is a block diagram of an electronic device shown in an exemplary embodiment of the present disclosure. Detailed Implementation

[0095] The specific embodiments of this disclosure will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit this disclosure.

[0096] Before introducing the blockchain transaction methods, apparatus, storage media, and electronic devices disclosed herein, the application scenarios of the various embodiments provided in this disclosure are first described. This disclosure can be used in transaction scenarios within a blockchain network, thereby enabling anonymous transactions within the blockchain network. Here, the type of blockchain network can be, for example, a public chain, a consortium chain, etc., and this disclosure does not limit this.

[0097] To achieve anonymous transactions, coin mixing technology is used in relevant scenarios to blend transactions. For example, a master node can be set up to blend multiple transactions from multiple users into a single transaction. Through transaction mixing, a certain number of users receive the merged transfers, making it difficult for outsiders to determine the details of a particular transaction from the obfuscated transactions.

[0098] However, in this transaction method, the master node becomes a new privacy and security bottleneck; when the master node is attacked, transaction data may be leaked. Furthermore, this transaction method does not consider the needs of regulatory auditing, facilitating illegal transactions.

[0099] Therefore, this disclosure provides a blockchain transaction method applied to a target mixing node in a blockchain network, wherein the target mixing node is any one of multiple mixing nodes in the blockchain network. The mixing node can be set up by a regulatory body, for example. For instance, in the presence of multiple transaction regulators, each regulator can set up a corresponding mixing node.

[0100] Reference Figure 1 The flowchart shown is a blockchain transaction method, the method including:

[0101] In step 11, after receiving the transaction request from the transaction initiator node, the encrypted transaction data in the transaction request is decrypted, and the decrypted transaction data is saved to the off-chain privacy data storage space.

[0102] The privacy data storage space can be maintained jointly by multiple mixing nodes to store transaction data written by each mixing node. In some implementation scenarios, to enhance the security of the privacy data storage space, it can also be placed in a trusted environment.

[0103] For example, Figure 2This is a block diagram of a blockchain transaction system disclosed herein. When mixing node 1 is the target mixing node and transaction node 1 needs to initiate a transaction to transaction node 6, transaction node 1 can encrypt the transaction data (such as the transaction content, the identifier of transaction node 6, etc.) using key 1 and send a transaction request including the encrypted transaction data to mixing node 1. Here, key 1 can be, for example, the private key in a key pair applied for by transaction node 1, and transaction node 1 can also synchronize the public key in the key pair to the mixing node 1. It should be noted that, in order to improve transaction security, this key pair can be configured to be used only in anonymous transaction processes.

[0104] After receiving the transaction request, the target mixing node can decrypt the encrypted transaction data using the public key sent by transaction node 1, thereby obtaining the plaintext of the transaction data. Then, the target mixing node can save the decrypted plaintext transaction data to a private data storage space.

[0105] It is worth noting that the transaction between transaction node 1 and the target mixing node still takes place within the blockchain network. Therefore, the encrypted transaction data in the transaction request can also be saved to the blockchain ledger of the blockchain network as proof of the transaction, thereby ensuring the authenticity of the transaction result.

[0106] In addition, in some implementation scenarios, transaction data can be encrypted using homomorphic encryption to facilitate verification and auditing of transaction data. This disclosure will illustrate this in subsequent examples.

[0107] In step 12, the target transaction data is retrieved from the privacy data storage space.

[0108] The target transaction data includes transaction data written by other mixing nodes besides the target mixing node. For example, in Figure 2 In the example, mixing node 2 can obtain the transaction data written by mixing node 1. Of course, in some scenarios, mixing node 2 can obtain the transaction data written by mixing node 2, and this disclosure does not impose any restrictions on this.

[0109] In step 13, the identifier of the transaction recipient node corresponding to the transaction request is parsed from the target transaction data. For example, if the target transaction data indicates that transaction node 1 initiated a transaction to transaction node 6, the target mixing node can determine that the transaction recipient node is transaction node 6 from the target transaction data.

[0110] Furthermore, in one possible implementation, transaction nodes in the blockchain network correspond to mixing nodes, and the mixing node corresponding to any of the transaction nodes has a pre-defined parsing rule for resolving the identifier of the transaction node.

[0111] by Figure 2 Taking an example, transaction nodes 1 to 3 can correspond to mixing node 1, and transaction nodes 4 to 6 can correspond to mixing node 2. Mixing node 1 can maintain resolution rules for parsing the identifiers of transaction nodes 1 to 3, and mixing node 2 can maintain resolution rules for parsing the identifiers of transaction nodes 4 to 6. Here, the resolution rules can be presented in the form of a key, for example, or they can be a mapping relationship between identifier fields and node identities; this disclosure does not impose any limitations on this.

[0112] Using this method, mixing node 1 cannot identify the identifiers of transaction nodes 4 to 6, and mixing node 2 cannot identify the identifiers of transaction nodes 1 to 3. Therefore, even if mixing node 1 is compromised, the attacker cannot obtain information about the recipient of the transaction; even if mixing node 2 is compromised, the attacker cannot obtain information about the initiator of the transaction. In other words, the transaction data obtained from a single mixing node is stateless intermediate data, and complete transaction data cannot be obtained from it. Therefore, the above technical solution can improve the anti-attack performance of the transaction system and enhance transaction security.

[0113] In step 14, the target transaction data is encrypted, and a transaction request including the encrypted target transaction data is sent to the transaction recipient node corresponding to the identifier.

[0114] The target transaction data can be encrypted using a public-private key system, or it can be encrypted using homomorphic encryption. This disclosure does not impose any restrictions on this method.

[0115] The above technical solution involves setting up multiple mixing nodes in the blockchain network. Upon receiving a transaction request from the transaction initiator node, any mixing node can decrypt the encrypted transaction data in the request and save the decrypted data to an off-chain privacy data storage space. Thus, the transaction data is stored in the privacy data storage space, while the encrypted version is stored on the blockchain. Furthermore, any mixing node can retrieve transaction data written by other mixing nodes from the privacy data storage space and parse it. Once a mixing node successfully parses the identifier of the transaction recipient node from the transaction data, it can encrypt the transaction data and send a transaction request containing the encrypted target transaction data to the corresponding transaction recipient node, thereby completing the transaction between the transaction initiator node and the transaction recipient node.

[0116] Using the above technical solution, the transaction process between the transaction initiator node and the transaction recipient node includes: on-chain interaction between the transaction initiator node and the mixing node, off-chain interaction between the mixing nodes based on a privacy data storage space, and on-chain interaction between the mixing node and the transaction recipient node. In other words, the transaction is divided into multiple on-chain and off-chain stages, and monitoring or obtaining data from only one stage cannot yield the complete transaction data. Therefore, the above transaction method can improve the anti-attack capability of the transaction system while ensuring the privacy of transaction data, thereby guaranteeing the security of transaction data. Furthermore, storing transaction data in an off-chain privacy data storage space also provides a basis for relevant transaction supervision.

[0117] It's worth noting that in some scenarios, the rules for resolving transaction node identifiers may also be publicly available within the mixing nodes. Therefore, each mixing node may be able to parse the identifier of the transaction recipient node corresponding to the transaction request from the target transaction data. In this case, steps 13 and 14 above may be repeatedly executed across multiple mixing nodes, resulting in the transaction recipient node corresponding to the identifier receiving transaction requests from multiple mixing nodes. These transaction requests may be triggered by the same transaction data in the privacy data storage space.

[0118] Therefore, in some implementations, transaction nodes in the blockchain network can also correspond to mixing nodes (for example, mixing nodes set up by a bank can correspond to various organizational nodes under the bank). The mixing node corresponding to any of the transaction nodes is used to relay transactions initiated by that transaction node. After parsing the identifier of the transaction recipient node from the target transaction data, the target mixing node can also determine whether the transaction recipient node corresponding to the identifier is the transaction node corresponding to the target mixing node.

[0119] by Figure 2 Taking an example, transaction nodes 1 to 3 can correspond to mixing node 1, and transaction nodes 4 to 6 can correspond to mixing node 2. Thus, when the identifier parsed by mixing node 2 is different from the identifiers of transaction nodes 4 to 6, mixing node 2 can determine that this transaction data does not need to be forwarded. When the identifier parsed by mixing node 2 is the same as the identifier of transaction node 6, this transaction data can be forwarded to transaction node 6, that is, a transaction request including the encrypted transaction data is sent to transaction node 6. In this way, the mixing node corresponding to any transaction node can forward transactions initiated by that transaction node, thereby reducing the phenomenon of duplicate transaction forwarding.

[0120] Figure 3 This is a flowchart of a blockchain transaction method shown in this disclosure, such as... Figure 3 As shown, the method is in Figure 1 In addition to this, it also includes:

[0121] S15, Obtain the transaction review model. The transaction review model may include, for example, relevant transaction review strategies and rules.

[0122] S16, the transaction review model is saved to the blockchain of the blockchain network. In this way, the transaction review model can be jointly maintained and supervised by the participants of the blockchain network.

[0123] S17, in response to receiving a transaction review request, grant the trusted execution environment access to the privacy data storage space.

[0124] A Trusted Execution Environment (TEE) is a secure zone that runs in a separate environment and in parallel with the operating system. A TEE ensures the confidentiality and integrity of code and data loaded within it. By using both hardware and software to protect data and code, a TEE offers a high level of security.

[0125] Here, after receiving a transaction review request, the target mixing node can grant the trusted execution environment access to the privacy data storage space so that the transaction can be reviewed through the trusted execution environment.

[0126] For example, the trusted execution environment can obtain the transaction review model in the blockchain and the transaction data in the privacy data storage space. Then, the transaction data in the privacy data storage space can be input into the transaction review model to obtain the review result, and the review result can be returned to the target mixing node. It should be noted that, in order to read the transaction data, the trusted execution environment can also request the relevant key from the mixing node to obtain the plaintext of the transaction data.

[0127] S18, Receive the review results of the trusted execution environment.

[0128] S19, the review result is signed, and the signed review result is saved to the blockchain. For example, the target mixing node can sign the review result using its own private key. In this way, other nodes in the blockchain network can verify the signature using the target mixing node's public key, thereby ensuring the credibility of the review result.

[0129] The above technical solution enables coin mixing transactions based on off-chain privacy data storage space, thereby protecting the privacy of transaction participants. Furthermore, the method of setting up privacy data storage space allows for review of transaction data within this space through a trusted execution environment during subsequent transaction review, thus satisfying both transaction privacy requirements and review needs. In addition, since transaction review is conducted within a trusted execution environment, privacy leaks during the review process are also avoided.

[0130] To further protect privacy, in one possible implementation, the method in Figure 3 In addition to this, it also includes:

[0131] In response to receiving the transaction review request, the public key of the node to be reviewed is sent to the trusted execution environment;

[0132] The receipt of the review results from the trusted execution environment includes:

[0133] The trusted execution environment receives the encrypted review result, which is obtained by the trusted execution environment encrypting the original review result based on the public key of the reviewed node. The original review result is generated by the trusted execution environment based on the transaction review model obtained from the blockchain and the transaction data of the reviewed node in the privacy data storage space.

[0134] Figure 4 This is a flowchart of a transaction review process shown in this disclosure, combined with... Figure 4 The transaction review process described above will be explained. To conduct transaction reviews, mixing nodes can develop a transaction review model and upload it to the blockchain. In this way, the transaction review model is publicly available on the chain and jointly maintained by all participants, thereby reducing doubts among participants regarding regulatory strategies.

[0135] After the transaction review model is uploaded to the blockchain, the trusted execution environment (TEO) can synchronize the model from the blockchain. In some scenarios, the TEO can also obtain the transaction review model from the blockchain by interacting with mixing nodes. Obtaining the transaction review model on-chain also ensures its trustworthiness.

[0136] Upon receiving a transaction review request, the mixing node can grant the trusted execution environment access to its privacy data storage space. It then writes the key for reading transaction data from the privacy data storage space, along with the public key of the node being reviewed, into the trusted execution environment.

[0137] In this way, the trusted execution environment can read the transaction data of the audited node in the privacy data storage space, and track abnormal transactions of the audited node through the transaction audit model to obtain the audit results. It is worth noting that, in order to protect the privacy of the audited node, the audit results can also be encrypted using the public key of the audited node during transaction auditing, and the encrypted audit results can be returned to the mixing node.

[0138] In this way, the review results received by the mixing node are encrypted, meaning the mixing node cannot know the content of the review results, thus protecting the privacy of the reviewed node. Furthermore, the mixing node can sign the encrypted review results and upload the signed encrypted review results to the blockchain. This ensures the credibility of the review results.

[0139] In some implementations, corresponding review smart contracts can also be deployed in the blockchain network. In this way, after the review results of the reviewed node are uploaded to the chain, the review smart contract can send a review result notification to the reviewed node.

[0140] In the above technical solution, transaction data in the privacy data storage space can be reviewed through a trusted execution environment, thus satisfying both the privacy requirements of transactions and the review requirements. Furthermore, since the transaction review is conducted in a trusted execution environment and the review result is encrypted using the public key of the reviewed node, the mixing node cannot know the content of the review result. This further prevents privacy leaks during the review process.

[0141] It should be noted that during the transaction review process, the plaintext transaction data in the privacy data storage space and the encrypted transaction data on the blockchain may also be compared and verified. However, the relevant encryption methods may make the verification process cumbersome, thereby reducing review efficiency. For example, for transaction data encrypted using a public-private key system, the corresponding encrypted transaction data needs to be downloaded from the blockchain for verification. When the transaction data volume is large, the download process will take a long time.

[0142] Therefore, in one possible implementation of this disclosure, each of the coin mixing nodes maintains a homomorphic key pair with each transaction node in the blockchain network, thereby encrypting transaction data through homomorphic encryption.

[0143] Figure 5 This is a flowchart of a blockchain transaction method shown in this disclosure, such as... Figure 5 As shown, the method is in Figure 1Based on this, after receiving the transaction request from the transaction initiator node, the encrypted transaction data in the transaction request is decrypted, and the decrypted transaction data is saved to the off-chain privacy data storage space (step S11), including:

[0144] S111, Receive a transaction request sent by the transaction initiator node, the transaction request including encrypted transaction data.

[0145] The encrypted transaction data is obtained by the transaction initiating node encrypting the original transaction data based on the encryption key in the first homomorphic key pair, where the first homomorphic key pair is the homomorphic key pair between the target mixing node and the transaction initiating node.

[0146] For example, the first homomorphic key pair includes the key (n, g) of the transaction initiating node and the key λ of the target mixing node. Thus, when encrypting the original transaction data, the transaction initiating node can determine a random number r, r ∈ Z. n Z n This is an integer field. Next, the transaction initiating node can calculate the encrypted transaction data c using the following formula:

[0147] c = E(m, r) = g m r n modn 2 ,r∈Z n

[0148] Where m represents the original transaction data.

[0149] S112, the encrypted transaction data is decrypted using the first homomorphic key to obtain the original transaction data. Continuing with the above example, the target mixing node can decrypt the encrypted transaction data using the following formula:

[0150] m=D(c,λ=(L(c λ modn 2 ) / L(g λ modn 2 ))mod n

[0151] Where L(u) = u-1 / n, and mod is the modulo function.

[0152] S113, save the original transaction data to the privacy data storage space.

[0153] S12, retrieve target transaction data from the privacy data storage space.

[0154] S13, parse the identifier of the transaction receiver node corresponding to the transaction request from the target transaction data.

[0155] S14, encrypt the target transaction data, and send a transaction request including the encrypted target transaction data to the transaction recipient node corresponding to the identifier.

[0156] The above technical solution encrypts transaction data using homomorphic encryption. The ciphertext of the original transaction data obtained through homomorphic encryption can be stored on the blockchain, while the original transaction data can be stored in a private data storage space. Because the encryption method has the following property: the sum of encrypted data A (obtained from original data a) and B (obtained from original data b), A+B, is equal to the result obtained by encrypting the original data (a+b). Therefore, using this technical solution, during transaction verification, the ciphertext of on-chain transaction data and the plaintext of off-chain transaction data can be verified by calculating the homomorphic encrypted sum, without needing to download the ciphertext of the transaction data from the blockchain. Therefore, this technical solution can improve the efficiency of transaction verification.

[0157] Based on this concept, the target mixing node can also perform homomorphic encryption when sending a transaction to the transaction recipient node. In this case, the step of encrypting the target transaction data and sending a transaction request (S14) including the encrypted target transaction data to the transaction recipient node corresponding to the identifier includes:

[0158] The target transaction data is encrypted using the encryption key in the second homomorphic key pair to obtain the target encrypted transaction data. The second homomorphic key pair is the homomorphic key pair between the target mixing node and the transaction receiving node.

[0159] Send a transaction request, including the target encrypted transaction data, to the transaction recipient node.

[0160] This approach can improve the efficiency of transaction review.

[0161] The following section explains the method for generating homomorphic key pairs disclosed herein. Figure 6 This is a flowchart illustrating the generation of a homomorphic key pair as shown in this disclosure, see reference. Figure 6 Homomorphic key pairs between the target mixing node and the transaction node can be generated in the following way:

[0162] S61 determines multiple target prime numbers based on the state parameters of the blockchain network.

[0163] For example, in some implementation scenarios, the state parameters of the blockchain network include the number of nodes in the blockchain network. In this case, multiple target prime numbers can be determined based on the number of nodes in the blockchain network.

[0164] In other implementation scenarios, the state parameters of the blockchain network include the length of the hash value obtained by the blockchain network during cryptographic calculation, such as 32, 128, etc. In this case, multiple target prime numbers can be determined based on the length of the hash value obtained by the blockchain network during cryptographic calculation.

[0165] In some implementation scenarios, multiple target prime numbers can be determined by combining the number of nodes in the blockchain network with the length of the hash value obtained by the blockchain network during cryptographic calculation. For example, the product of the number of nodes and the length value can be calculated to obtain the first product.

[0166] In this way, a preset target value (e.g., 2) can be used as the starting value, and the first product of prime numbers greater than the target value can be determined as the target prime number.

[0167] S62, using the public key of the transaction node as the first starting value, determine the first target value, wherein the first target value is greater than or equal to the first starting value and cannot be divided by any target prime number.

[0168] For example, the public key of the transaction node can be obtained as the first starting value P. When the public key is even, the first starting value P = P + 1 is taken. In this way, the first starting value P can be successively divided by each target prime number, and if the remainder is 0, the value of P is incremented by one, until a first target value p that cannot be divided evenly by any of the target prime numbers is determined.

[0169] S63, using the public key of the target mixing node as the second starting value, determine the second target value, wherein the second target value is greater than or equal to the second starting value and cannot be divided by any of the target prime numbers.

[0170] For example, the public key of the target mixing node can be obtained as the first starting value Q. When the public key is even, the first starting value Q = Q + 1 is taken. In this way, the first starting value Q can be successively divided by each target prime number, and if the remainder is 0, the value of Q is incremented by one, until a first target value q that cannot divide any of the target prime numbers is determined.

[0171] S64, Generate a homomorphic key pair between the target mixing node and the transaction node based on the first target value and the second target value.

[0172] For example, the product of the first target value and the second target value can be calculated to obtain the first key parameter n. Continuing with the above example, n = p * q.

[0173] In this way, the target random integer can be determined as the second key parameter g, where, Furthermore, the first key parameter n is divisible by the order of the second key parameter g. If a multiplicative inverse exists in the remainder system, then the homomorphic key of the transaction node is (n, g).

[0174] Furthermore, the homomorphic key λ of the target mixing node can be calculated using the following formula:

[0175] λ = lcm(p-1, q-1)

[0176] Where p is the first target value, q is the second target value, and lcm() is the least common multiple function. It should be understood that gcd(L(g λ modn 2 ),n)=1,gcd() is the greatest common divisor function.

[0177] The aforementioned technical solution can generate homomorphic key pairs based on the state parameters of the blockchain network. For example, for blockchain networks with low encryption strength and few participating nodes, it can generate homomorphic key pairs with low complexity. In this way, the computational load of the transaction process can be reduced, thereby minimizing the impact on the performance of the blockchain network and improving transaction processing efficiency.

[0178] It should be noted that in some possible implementations, homomorphic key pairs can also be generated by the transaction node and synchronized to the mixing node, and this disclosure does not impose any restrictions on this.

[0179] Based on the same inventive concept, this disclosure also provides a blockchain transaction device applied to a target coin mixing node in a blockchain network, wherein the target coin mixing node is any one of multiple coin mixing nodes in the blockchain network. Figure 7 This is a block diagram of a blockchain transaction device 700 shown in this disclosure, the device 700 comprising:

[0180] The transaction data storage module 701 is used to decrypt the encrypted transaction data in the transaction request after the target mixing node receives the transaction request from the transaction initiator node, and save the decrypted transaction data to the off-chain privacy data storage space, wherein the privacy data space is used to store the transaction data written by each of the mixing nodes.

[0181] The transaction data acquisition module 702 is used to acquire target transaction data from the privacy data storage space, wherein the target transaction data includes transaction data written by other mixing nodes besides the target mixing node;

[0182] The transaction data parsing module 703 is used to parse the identifier of the transaction receiver node corresponding to the transaction request from the target transaction data;

[0183] The first sending module 704 is used to encrypt the target transaction data and send a transaction request including the encrypted target transaction data to the transaction receiving node corresponding to the identifier.

[0184] The above technical solution involves setting up multiple mixing nodes in the blockchain network. Upon receiving a transaction request from the transaction initiator node, any mixing node can decrypt the encrypted transaction data in the request and save the decrypted data to an off-chain privacy data storage space. Thus, the transaction data is stored in the privacy data storage space, while the encrypted version of the transaction data is stored on the blockchain. Furthermore, any mixing node can retrieve transaction data written by other mixing nodes from the privacy data storage space and parse it. Once a mixing node successfully parses the identifier of the transaction recipient node from the transaction data, it can send a transaction request containing the transaction data to the corresponding recipient node, thereby completing the transaction between the transaction initiator node and the transaction recipient node.

[0185] Using the above technical solution, the transaction process between the transaction initiator node and the transaction recipient node includes: on-chain interaction between the transaction initiator node and the mixing node, off-chain interaction between the mixing nodes based on a privacy data storage space, and on-chain interaction between the mixing node and the transaction recipient node. In other words, the transaction is divided into multiple on-chain and off-chain stages. Monitoring or obtaining data from only one stage cannot yield the complete transaction data. Therefore, the above transaction method can improve the transaction system's resistance to attacks while ensuring the privacy of transaction data, thereby guaranteeing the security of transaction data. Furthermore, storing transaction data in an off-chain privacy data storage space also provides a basis for relevant transaction supervision.

[0186] Optionally, the transaction nodes in the blockchain network correspond to the mixing nodes, and the mixing node corresponding to any of the transaction nodes has a preset parsing rule for parsing the identifier of the transaction node.

[0187] Optionally, the device 700 further includes:

[0188] The model acquisition module is used to acquire transaction review models.

[0189] The model storage module is used to store the transaction review model in the blockchain of the blockchain network;

[0190] The authorization module is used to grant the trusted execution environment access to the privacy data storage space in response to receiving a transaction review request;

[0191] The review result receiving module is used to receive the review result of the trusted execution environment, which is generated by the trusted execution environment based on the transaction review model obtained from the blockchain and the transaction data in the privacy data storage space;

[0192] The signature module is used to sign the review results and save the signed review results to the blockchain.

[0193] Optionally, the device 700 further includes:

[0194] The second sending module is used to send the public key of the node to be reviewed to the trusted execution environment in response to receiving the transaction review request;

[0195] The review result receiving module includes:

[0196] The first receiving submodule is used to receive the encrypted review result of the trusted execution environment. The encrypted review result is obtained by the trusted execution environment encrypting the original review result based on the public key of the reviewed node. The original review result is generated by the trusted execution environment based on the transaction review model obtained from the blockchain and the transaction data of the reviewed node in the privacy data storage space.

[0197] Optionally, each of the coin mixing nodes maintains a homomorphic key pair with each transaction node in the blockchain network, and the transaction data storage module 701 includes:

[0198] The second receiving submodule is used to receive a transaction request sent by the transaction initiator node. The transaction request includes encrypted transaction data. The encrypted transaction data is obtained by the transaction initiator node encrypting the original transaction data based on the encryption key in the first homomorphic key pair. The first homomorphic key pair is a homomorphic key pair between the target mixing node and the transaction initiator node.

[0199] The decryption submodule is used to decrypt the encrypted transaction data using the first homomorphic key to obtain the original transaction data;

[0200] The storage submodule is used to save the original transaction data to the privacy data storage space.

[0201] Optionally, the first transmitting module 704 includes:

[0202] The encryption submodule is used to encrypt the target transaction data based on the encryption key in the second homomorphic key pair to obtain the target encrypted transaction data. The second homomorphic key pair is the homomorphic key pair between the target mixing node and the transaction receiving node.

[0203] The sending submodule is used to send a transaction request, including the target encrypted transaction data, to the transaction receiving node.

[0204] Optionally, the device 700 further includes a key generation module for generating a homomorphic key pair between the target mixing node and the transaction node, the key generation module comprising:

[0205] The first determining submodule is used to determine multiple target prime numbers based on the state parameters of the blockchain network;

[0206] The second determining submodule is used to determine a first target value based on the public key of the transaction node as a first starting value, wherein the first target value is greater than or equal to the first starting value and cannot be divided by any target prime number;

[0207] The third determining submodule is used to determine a second target value based on the public key of the target mixing node as the second starting value. The second target value is greater than or equal to the second starting value and cannot be divided by any of the target prime numbers.

[0208] The key generation submodule is used to generate a homomorphic key pair between the target mixing node and the transaction node based on the first target value and the second target value.

[0209] Optionally, the state parameters of the blockchain network include the number of nodes in the blockchain network and the length of the hash value obtained by the blockchain network during cryptographic calculation. The first determining submodule includes:

[0210] The first calculation subunit is used to calculate the product of the quantity value and the length value to obtain a first product;

[0211] The first determining subunit is used to determine the first product of prime numbers greater than the target value as the target prime number, starting from a preset target value.

[0212] Optionally, the key generation submodule includes:

[0213] The second calculation subunit is used to calculate the product of the first target value and the second target value to obtain the first key parameter n;

[0214] The second determining subunit is used to determine the target random integer as the second key parameter g, where... Furthermore, the first key parameter n is divisible by the order of the second key parameter g. Given that there exists a multiplicative inverse in the remainder system, the homomorphic key of the transaction node is (n, g);

[0215] The third computational subunit is used to calculate the homomorphic key λ of the target mixing node using the following formula:

[0216] λ = lcm(p-1, q-1)

[0217] Where p is the first target value, q is the second target value, and lcm() is the least common multiple function.

[0218] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0219] This disclosure also provides a non-transitory computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the steps of the blockchain transaction method provided in this disclosure.

[0220] This disclosure also provides an electronic device, including:

[0221] A memory on which computer programs are stored;

[0222] A processor is configured to execute the computer program in the memory to implement the steps of the blockchain transaction method provided in this disclosure.

[0223] Figure 8 This is a block diagram illustrating an electronic device 800 according to an exemplary embodiment. For example... Figure 8 As shown, the electronic device 800 may include a processor 801 and a memory 802. The electronic device 800 may also include one or more of a multimedia component 803, an input / output (I / O) interface 804, and a communication component 805.

[0224] The processor 801 controls the overall operation of the electronic device 800 to complete all or part of the steps in the aforementioned blockchain transaction method. The memory 802 stores various types of data to support the operation of the electronic device 800. This data may include, for example, instructions for any application or method operating on the electronic device 800, and application-related data such as sent and received messages, images, blockchain ledger data, videos, etc. The memory 802 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, disk, or optical disk. Multimedia component 803 may include a screen and an audio component. The screen may be, for example, a touchscreen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signals may be further stored in memory 802 or transmitted via communication component 805. The audio component also includes at least one speaker for outputting audio signals. I / O interface 804 provides an interface between processor 801 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual or physical buttons. Communication component 805 is used for wired or wireless communication between the electronic device 800 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IoT, eMTC, or other 5G technologies, or combinations thereof, is not limited here. Therefore, the corresponding communication component 805 may include: a Wi-Fi module, a Bluetooth module, an NFC module, etc.

[0225] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to execute the blockchain transaction method described above.

[0226] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, which, when executed by a processor, implement the steps of the blockchain transaction method described above. For example, the computer-readable storage medium may be the memory 802 including the program instructions, which may be executed by the processor 801 of the electronic device 800 to complete the blockchain transaction method described above.

[0227] In another exemplary embodiment, a computer program product is also provided, which includes a computer program executable by a programmable device, the computer program having a code portion for performing the blockchain transaction method described above when executed by the programmable device.

[0228] The preferred embodiments of this disclosure have been described in detail above with reference to the accompanying drawings. However, this disclosure is not limited to the specific details of the above embodiments. Within the scope of the technical concept of this disclosure, various simple modifications can be made to the technical solutions of this disclosure, and these simple modifications all fall within the protection scope of this disclosure.

[0229] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, this disclosure will not describe the various possible combinations separately.

[0230] Furthermore, various different embodiments of this disclosure can be combined in any way, as long as they do not violate the spirit of this disclosure, they should also be regarded as the content disclosed in this disclosure.

Claims

1. A blockchain transaction method, characterized in that, The method, applied to a target mixing node in a blockchain network, wherein the target mixing node is any one of multiple mixing nodes set up by the transaction regulator in the blockchain network, includes: After receiving a transaction request from the transaction initiator node, the encrypted transaction data in the transaction request is decrypted, and the decrypted transaction data is saved to an off-chain privacy data storage space, wherein the privacy data storage space is used to store the transaction data written by each of the coin mixing nodes. Obtain target transaction data from the privacy data storage space, wherein the target transaction data includes transaction data written by other mixing nodes besides the target mixing node; The target mixing node is configured to be unable to parse the identifier of the transaction receiver node corresponding to the transaction request of the transaction initiator node from the decrypted transaction data, and unable to parse the identifier of the transaction initiator node corresponding to the transaction request from the target transaction data. The target transaction data is encrypted, and a transaction request including the encrypted target transaction data is sent to the transaction recipient node corresponding to the identifier.

2. The method according to claim 1, characterized in that, The transaction nodes in the blockchain network correspond to the mixing nodes, and the mixing node corresponding to any of the transaction nodes has a pre-set parsing rule for parsing the identifier of the transaction node.

3. The method according to claim 1, characterized in that, Also includes: Obtain the transaction review model; The transaction review model is saved to the blockchain of the blockchain network; In response to receiving a transaction review request, the trusted execution environment is granted access to the privacy data storage space; The trusted execution environment receives the review results, which are generated by the trusted execution environment based on the transaction review model obtained from the blockchain and the transaction data in the privacy data storage space. The review result is signed, and the signed review result is saved to the blockchain.

4. The method according to claim 3, characterized in that, Also includes: In response to receiving the transaction review request, the public key of the node to be reviewed is sent to the trusted execution environment; The receipt of the review results from the trusted execution environment includes: The trusted execution environment receives the encrypted review result, which is obtained by the trusted execution environment encrypting the original review result based on the public key of the reviewed node. The original review result is generated by the trusted execution environment based on the transaction review model obtained from the blockchain and the transaction data of the reviewed node in the privacy data storage space.

5. The method according to any one of claims 1 to 4, characterized in that, Each of the aforementioned mixing nodes maintains a homomorphic key pair with each transaction node in the blockchain network. Upon receiving a transaction request from the transaction initiator node, the encrypted transaction data in the transaction request is decrypted, and the decrypted transaction data is saved to an off-chain privacy data storage space, including: The system receives a transaction request sent by the transaction initiator node. The transaction request includes encrypted transaction data. The encrypted transaction data is obtained by the transaction initiator node encrypting the original transaction data based on the encryption key in the first homomorphic key pair. The first homomorphic key pair is the homomorphic key pair between the target mixing node and the transaction initiator node. The encrypted transaction data is decrypted using the first homomorphic key to obtain the original transaction data; The original transaction data is saved to the privacy data storage space.

6. The method according to claim 5, characterized in that, The step of encrypting the target transaction data and sending a transaction request including the encrypted target transaction data to the transaction recipient node corresponding to the identifier includes: The target transaction data is encrypted using the encryption key in the second homomorphic key pair to obtain the target encrypted transaction data. The second homomorphic key pair is the homomorphic key pair between the target mixing node and the transaction receiving node. Send a transaction request, including the target encrypted transaction data, to the transaction recipient node.

7. The method according to claim 5, characterized in that, Generate homomorphic key pairs between the target mixing node and the transaction node using the following method: Multiple target prime numbers are determined based on the state parameters of the blockchain network; Using the public key of the transaction node as a first starting value, a first target value is determined, wherein the first target value is greater than or equal to the first starting value and cannot be divided by any of the target prime numbers; Using the public key of the target mixing node as the second starting value, a second target value is determined. The second target value is greater than or equal to the second starting value and cannot be divided by any of the target prime numbers. Generate a homomorphic key pair between the target mixing node and the transaction node based on the first target value and the second target value.

8. The method according to claim 7, characterized in that, The state parameters of the blockchain network include the number of nodes in the blockchain network and the length of the hash value obtained by the blockchain network during cryptographic calculation. Determining multiple target prime numbers based on the state parameters of the blockchain network includes: Calculate the product of the quantity value and the length value to obtain the first product; Starting from a preset target value, the first product of prime numbers greater than the target value is determined as the target prime number.

9. The method according to claim 7, characterized in that, The step of generating a homomorphic key pair between the target mixing node and the transaction node based on the first target value and the second target value includes: Calculate the product of the first target value and the second target value to obtain the first key parameter n; Determine the target random integer as the second key parameter g, where g Furthermore, the first key parameter n is divisible by the order of the second key parameter g. Given that there exists a multiplicative inverse in the remainder system, the homomorphic key of the transaction node is (n, g). The homomorphic key λ of the target mixing node is calculated using the following formula: Where p is the first target value, q is the second target value, and lcm() is the least common multiple function.

10. A blockchain transaction device, characterized in that, An apparatus for use as a target mixing node in a blockchain network, wherein the target mixing node is any one of multiple mixing nodes set up by the transaction regulator in the blockchain network, the apparatus comprising: The transaction data storage module is used to decrypt the encrypted transaction data in the transaction request after the target mixing node receives the transaction request from the transaction initiator node, and save the decrypted transaction data to the off-chain privacy data storage space. The privacy data storage space is used to store the transaction data written by each of the mixing nodes. The transaction data acquisition module is used to acquire target transaction data from the privacy data storage space, wherein the target transaction data includes transaction data written by other mixing nodes besides the target mixing node; The transaction data parsing module is used to parse the identifier of the transaction receiver node corresponding to the transaction request from the target transaction data. The target mixing node is configured to be unable to parse the identifier of the transaction receiver node corresponding to the transaction request of the transaction initiator node from the decrypted transaction data, and unable to parse the identifier of the transaction initiator node corresponding to the transaction request from the target transaction data. The first sending module is used to encrypt the target transaction data and send a transaction request including the encrypted target transaction data to the transaction receiving node corresponding to the identifier.

11. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the steps of the method described in any one of claims 1-9.

12. An electronic device, characterized in that, include: A memory on which computer programs are stored; A processor for executing the computer program in the memory to implement the steps of the method according to any one of claims 1-9.

Citation Information

Patent Citations

  • Trusted data grid system based on block chain

    CN109451071A

  • Contract auditing method, device and equipment and storage medium

    CN112434677A

  • Transaction method, device and system based on account model and storage medium

    CN112771562A