[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN117236959A - Blockchain transaction method and device with privacy protection function and storage medium - Google Patents

Blockchain transaction method and device with privacy protection function and storage medium Download PDF

Info

Publication number
CN117236959A
CN117236959A CN202311490473.XA CN202311490473A CN117236959A CN 117236959 A CN117236959 A CN 117236959A CN 202311490473 A CN202311490473 A CN 202311490473A CN 117236959 A CN117236959 A CN 117236959A
Authority
CN
China
Prior art keywords
signature
transaction
node
data block
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202311490473.XA
Other languages
Chinese (zh)
Other versions
CN117236959B (en
Inventor
杨圣坤
史汉青
晁高锋
石峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Golden Network Beijing E Commerce Co ltd
Original Assignee
Golden Network Beijing E Commerce Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Golden Network Beijing E Commerce Co ltd filed Critical Golden Network Beijing E Commerce Co ltd
Priority to CN202311490473.XA priority Critical patent/CN117236959B/en
Publication of CN117236959A publication Critical patent/CN117236959A/en
Application granted granted Critical
Publication of CN117236959B publication Critical patent/CN117236959B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention discloses a blockchain transaction method, a device and a storage medium with privacy protection, wherein when blockchain transaction is carried out, a third party node is introduced, and in the transaction forwarding process, digital signature and encryption processing are utilized to realize the non-counterfeitability of a transaction participant and the invisibility of transaction information; simultaneously, the invention synchronously transmits a plurality of false transaction information while transmitting the real transaction information, so that each third party node cannot know the authenticity of the corresponding received transaction information, thereby reducing the possibility of data leakage of the third party node; based on the design, the method ensures the privacy of transaction information of the user in the transaction process, solves the problem of transparent transaction data disclosure in the blockchain transaction, ensures the data security of the user, and is suitable for large-scale application and popularization in the blockchain transaction data protection field.

Description

Blockchain transaction method and device with privacy protection function and storage medium
Technical Field
The invention belongs to the technical field of blockchain transaction privacy protection, and particularly relates to a blockchain transaction method and device with privacy protection and a storage medium.
Background
The blockchain is essentially a decentralised and tamper-proof distributed data block, which has the advantages of decentralization, tamper-proof, anonymity, disclosure verifiability and the like; the blockchain can complete point-to-point transaction by using P2P network, data encryption, time stamp, distributed consensus and excitation mechanism, etc., thereby solving the problems of high trust, low efficiency, unsafe data storage, etc. existing in the centralized system; as such, it is also widely used in other fields than various digital cryptocurrencies, such as finance, internet of things, intellectual property, etc., and has gradually become an application hotspot and a research hotspot in various fields.
However, as research goes deep, blockchains, while exhibiting explosive vitality, are increasingly becoming increasingly more secure; in a blockchain system, because a centralized mechanism is not used for processing and maintaining data, in order for each node to quickly reach consensus, all transactions in the system are publicly transparent, so that the problem of data privacy leakage is brought during the transactions; therefore, providing a blockchain transaction method with privacy protection to protect the transaction and private data of users in the blockchain transaction process has become a problem to be solved urgently.
Disclosure of Invention
The invention aims to provide a blockchain transaction method and device with privacy protection and a storage medium, which are used for solving the problem of user data privacy disclosure caused by transparent disclosure of blockchain transaction in the prior art.
In order to achieve the above purpose, the present invention adopts the following technical scheme:
in a first aspect, a blockchain transaction method with privacy protection is provided, comprising:
after transaction information is acquired, a transaction initiating node carries out encryption signature processing on the transaction information to obtain a real signature data block and a plurality of false signature data blocks;
the transaction initiating node sends the real signature data block to a first target node and sends each false signature data block to a second target node, wherein the first target node is any node which is remained after a transaction receiving node and a key generating node are removed in a blockchain, the second target node is all nodes which are remained after the transaction receiving node, the key generating node and the first target node are removed in the blockchain, the key generating node is a providing node of an encryption key used when the transaction information is subjected to encryption signature processing, and any second target node correspondingly receives one false signature data block;
After receiving the corresponding signature data blocks, the first target node and any second target node perform signature authentication processing on the received signature data blocks, and after the signature authentication is passed, obtain encryption public keys of a transaction initiating node and a transaction receiving node so as to respectively perform encryption splicing processing on the received signature data blocks by using the encryption public keys of the transaction initiating node and the transaction receiving node to obtain encryption data blocks, and perform digital signature processing on the respective encryption data blocks to obtain a first signature encryption data block;
the first target node and any second target node send the respective first signature encrypted data blocks to the transaction initiation node;
the transaction initiating node receives first signature encrypted data blocks sent by the first target node and each second target node, so that the first signature encrypted data blocks with real signatures and containing real transaction information are screened out from each first signature encrypted data block to serve as target data blocks, and digital signature processing is carried out on the target data blocks to obtain first signature target data blocks;
the transaction initiating node sends the first signature target data block to the transaction receiving node;
The transaction receiving node performs authenticity verification on the first signature target data block, and performs digital signature processing on the first signature target data block after the authenticity verification is passed to obtain a second signature target data block;
the transaction receiving node sends the second signature target data block to the transaction initiating node;
the transaction initiating node performs authenticity verification on the second signature target data block, and adds account balance into the second signature target data block after the authenticity verification is passed, so as to obtain a transaction data block;
the transaction initiating node carries out digital signature processing on the transaction data block to obtain a signed transaction data block, and sends the signed transaction data block to a billing node in a blockchain;
and the accounting node verifies the authenticity and the legality of the signed transaction data block, writes transaction information into the block after the verification is passed, and updates accounts of the transaction initiating node and the transaction receiving node.
Based on the above disclosure, when the transaction of each node of the blockchain is carried out, the third party node is introduced to forward the transaction data, wherein when the transaction double-sending and the third party node carry out the transmission of the transaction data, the transaction data is subjected to data signature so as to ensure the non-counterfeitability of the identity of the node participating in the transaction, and meanwhile, when the third party node carries out the data forwarding, the encryption is carried out based on the public key of the transaction double-sending, so that the real data of the transaction is invisible in the transaction process, and the security of the transaction data is ensured; in addition, when the transaction data is sent to the third party node, the transaction initiating node also generates a plurality of false transaction information, based on the false transaction information, the third party node cannot verify the authenticity of the received transaction data, and therefore the security of the transaction can be further improved; finally, when the third party node finishes forwarding and both transaction sides pass the authenticity verification, the blockchain transaction can be finished; therefore, the invention ensures the privacy of transaction information of the user in the transaction process, solves the problem of transparent transaction data disclosure in the blockchain transaction, and ensures the data security of the user.
In one possible design, after obtaining the transaction information, the transaction initiating node performs encryption signature processing on the transaction information to obtain a real signature data block and a plurality of false signature data blocks, including:
after the transaction initiating node acquires the transaction information, generating a plurality of false transaction information and a first signature private key, and sending a public key request to any block node in a block chain, so that the block node receives the public key request and then sends the information encryption public key of the block node to the transaction initiating node;
the transaction initiating node receives the information encryption public key and takes the information encryption public key as an encryption key;
the transaction initiating node acquires a first identifier and a second identifier, and encrypts the first identifier and the second identifier by using the encryption key to obtain a first encrypted identifier and a second encrypted identifier respectively;
a transaction initiation node that generates a first data block based on the first encrypted identifier and the transaction information, and generates a plurality of second data blocks based on the second encrypted identifier and each of the dummy transaction information;
and the transaction initiating node respectively carries out digital signature processing on the first data block and each second data block by using the first signature private key so as to obtain the real signature data block and a plurality of false signature data blocks after the digital signature processing.
In one possible design, the transaction initiation node generates a first signature private key after obtaining the transaction information, including:
the transaction initiating node obtains a first random number and a generator of an addition circulation group of an elliptic curve, wherein the value range of the first random number is thatAnd the order of the addition cycle group is R;
the transaction initiating node calculates a first signature key based on the first random number and the generator;
calculating a first encryption intermediate parameter based on the block identifier of the transaction initiating node and the first random number;
the transaction initiating node judges whether the first encryption intermediate parameter is 0;
if not, the transaction initiating node calculates a second encryption intermediate parameter based on the first encryption intermediate parameter and the first random number;
the transaction initiating node calculates a second signature key based on the second encryption intermediate parameter and the generating element;
and utilizing the first signing key, the generating element and the second signing key to form the first signing private key.
In one possible design, the first signature private key includes a first signature key, a second signature key, and a generator of an additive loop group of elliptic curves;
The digital signature processing is carried out on the first data block by utilizing the first signature private key, and the digital signature processing comprises the following steps:
the transaction initiating node generates a first signature intermediate parameter based on the first signature key and the generating element;
the transaction initiating node obtains a second random number, wherein the value range of the second random number is thatAnd the order of the addition cycle group is R;
the transaction initiating node calculates a first signature parameter based on the second random number, the first signature intermediate parameter and the first data block according to the following formula (1);
(1)
in the above-mentioned formula (1),representing the first signature parameter,/->Representing a cryptographic function derived from a cryptographic hash function,/->Representing a first data block->Representing a second signature intermediate parameter, wherein +.>And->Representing said first signature intermediate parameter,/a>Representing the second random number;
the transaction initiating node calculates a third signature intermediate parameter by using the first signature parameter and the second random number according to the following formula (2);
(2)
in the above-mentioned formula (2),representing said third signature intermediate parameter,/v>Representing a remainder operator;
judging whether the third signature intermediate parameter is 0;
If not, generating a second signature parameter by using the second signature key and the third signature intermediate parameter;
and utilizing the first data block, the first signature parameter and the second signature parameter to form the real signature data block.
In one possible design, the authentic signature data block includes a first data block, and the first data block includes transaction information and a first encrypted identifier for use in authenticating the transaction information;
the first target node and any second target node respectively carry out encryption splicing processing on the received signature data blocks by utilizing encryption public keys of the transaction initiating node and the transaction receiving node, and the method comprises the following steps:
for a first target node, the first target node respectively encrypts target information in a received real signature data block by using encryption public keys of a transaction initiating node and a transaction receiving node to respectively obtain first encryption information and second encryption information, wherein the target information is transaction information in a first data block in the real signature data block;
and the first target node performs splicing processing on the first encryption information, the second encryption information and the first encryption identifier in the first data block in the real signature data block so as to obtain the encrypted data block after the splicing processing.
In one possible design, the encrypted public key of the transaction initiating node is generated by:
the transaction initiating node acquires a first prime number and a second prime number, wherein the maximum common factor between a first target parameter and a second target parameter is 1, the first target parameter is the product between the first prime number and the second prime number, the second target parameter is the product between a first difference value and a second difference value, the first difference value is the difference value between the first prime number and a preset value, and the second difference value is the difference value between the second prime number and the preset value;
the transaction initiating node generates a key generation set based on the first target parameter, wherein the number of elements in the key generation set is the first target parameter, and any element in the key generation set is an integer;
the transaction initiating node randomly selects an integer from the key generation set as a public key;
and the transaction initiating node utilizes the public key and the first target parameter to form an encrypted public key of the transaction initiating node.
In one possible design, any first signature encryption data block comprises an encryption data block, wherein the encryption data block comprises a true signature data block or a false signature data block, and the true signature data block and the false signature data block comprise transaction information and an encryption identifier for verifying the authenticity of the transaction information;
The transaction initiating node screens out a first signature encryption data block with a real signature and containing real transaction information from all first signature encryption data blocks as target data blocks, and the method comprises the following steps:
the transaction initiating node acquires encryption parameters, wherein the encryption parameters are parameters used by the transaction initiating node when encrypting the first identifier by utilizing the encryption key, and the first encryption identifier is generated according to the encryption parameters and the first identifier;
the transaction initiating node generates a verification identifier based on the encryption parameter and the encryption key;
the transaction initiating node screens out first signature encrypted data blocks with the same encryption identifier as the verification identifier from all first signature encrypted data blocks to serve as preselected target data blocks;
the transaction initiating node performs signature authentication on the preselected target data block and judges whether the signature authentication is passed or not;
if yes, the transaction initiating node decrypts the preselected target data block to obtain transaction information in the preselected target data block;
the transaction initiating node judges whether transaction information in a preselected target data block is the same as initial transaction information, wherein the initial transaction information is transaction information acquired when transaction begins;
If yes, the pre-selected target data block is taken as a target data block.
In a second aspect, there is provided a blockchain transaction device with privacy protection, comprising:
the transaction initiating node is used for carrying out encryption signature processing on the transaction information after the transaction information is acquired so as to obtain a real signature data block and a plurality of false signature data blocks;
the transaction initiating node is used for sending the real signature data block to a first target node and sending each false signature data block to a second target node, wherein the first target node is any node which is remained after a transaction receiving node and a key generating node are removed in a blockchain, the second target node is all nodes which are remained after the transaction receiving node, the key generating node and the first target node are removed in the blockchain, the key generating node is a providing node of an encryption key used when the transaction information is subjected to encryption signature processing, and any second target node correspondingly receives one false signature data block;
the first target node and any second target node are used for carrying out signature authentication processing on the received signature data blocks after receiving the corresponding signature data blocks, acquiring encryption public keys of the transaction initiating node and the transaction receiving node after the signature authentication is passed, respectively carrying out encryption splicing processing on the received signature data blocks by utilizing the encryption public keys of the transaction initiating node and the transaction receiving node to obtain encryption data blocks, and carrying out digital signature processing on the respective encryption data blocks to obtain a first signature encryption data block;
The first target node and any second target node are also used for sending the respective first signature encrypted data blocks to the transaction initiating node;
the transaction initiating node is used for receiving the first signature encryption data blocks sent by the first target node and each second target node, so that the first signature encryption data blocks with real signatures and containing real transaction information are screened out from each first signature encryption data block to serve as target data blocks, and digital signature processing is carried out on the target data blocks to obtain first signature target data blocks;
the transaction initiating node is used for sending the first signature target data block to the transaction receiving node;
the transaction receiving node is used for verifying the authenticity of the first signature target data block, and after the authenticity is verified, carrying out digital signature processing on the first signature target data block to obtain a second signature target data block;
the transaction receiving node is used for sending the second signature target data block to the transaction initiating node;
the transaction initiating node is used for verifying the authenticity of the second signature target data block, and adding account balance into the second signature target data block after the authenticity is verified, so as to obtain a transaction data block;
The transaction initiating node is used for carrying out digital signature processing on the transaction data block to obtain a signature transaction data block, and sending the signature transaction data block to the accounting node in the blockchain;
and the accounting node is used for verifying the authenticity and the legality of the signed transaction data block, writing transaction information into the block after the verification is passed, and updating the accounts of the transaction initiating node and the transaction receiving node.
In a third aspect, another blockchain transaction device with privacy protection is provided, taking the device as an electronic device for example, and the blockchain transaction device with privacy protection includes a memory, a processor and a transceiver, which are sequentially communicatively connected, where the memory is used to store a computer program, the transceiver is used to send and receive a message, and the processor is used to read the computer program, and execute the blockchain transaction method with privacy protection as in the first aspect or any one of the possible designs of the first aspect.
In a fourth aspect, there is provided a storage medium having instructions stored thereon which, when executed on a computer, perform the blockchain transaction method with privacy protection as in the first aspect or any of the possible designs of the first aspect.
In a fifth aspect, there is provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the blockchain transaction method with privacy protection as in the first aspect or any of the possible designs of the first aspect.
The beneficial effects are that:
(1) The invention carries out the forwarding of the transaction data by introducing the third party node when carrying out the transaction of each node of the blockchain, wherein, when carrying out the transmission of the transaction data by the transaction double-sending and the third party node, the transaction data is subjected to data signature so as to ensure the non-falsification of the identity of the node participating in the transaction, and meanwhile, when carrying out the data forwarding, the third party node also carries out encryption based on the public key of the transaction double-sending, thus, the real data of the transaction is invisible in the transaction process and the security of the transaction data is ensured; in addition, when the transaction data is sent to the third party node, the transaction initiating node also generates a plurality of false transaction information, based on the false transaction information, the third party node cannot verify the authenticity of the received transaction data, and therefore the security of the transaction can be further improved; finally, when the third party node finishes forwarding and both transaction sides pass the authenticity verification, the blockchain transaction can be finished; therefore, the invention ensures the privacy of transaction information of the user in the transaction process, solves the problem of transparent transaction data disclosure in the blockchain transaction, and ensures the data security of the user.
Drawings
FIG. 1 is a flowchart illustrating steps of a blockchain transaction method with privacy protection according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a blockchain transaction device with privacy protection according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the present invention will be briefly described below with reference to the accompanying drawings and the description of the embodiments or the prior art, and it is obvious that the following description of the structure of the drawings is only some embodiments of the present invention, and other drawings can be obtained according to these drawings without inventive effort to a person skilled in the art. It should be noted that the description of these examples is for aiding in understanding the present invention, but is not intended to limit the present invention.
It will be understood that, although the terms first, second, etc. may be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another element. For example, a first element could be termed a second element, and, similarly, a second element could be termed a first element, without departing from the scope of example embodiments of the present invention.
It should be understood that for the term "and/or" that may appear herein, it is merely one association relationship that describes an associated object, meaning that there may be three relationships, e.g., a and/or B, may represent: a alone, B alone, and both a and B; for the term "/and" that may appear herein, which is descriptive of another associative object relationship, it means that there may be two relationships, e.g., a/and B, it may be expressed that: a alone, a alone and B alone; in addition, for the character "/" that may appear herein, it is generally indicated that the context associated object is an "or" relationship.
Examples:
referring to fig. 1, in the blockchain transaction method with privacy protection provided in this embodiment, when performing blockchain transaction, a third party node is introduced to avoid direct information interaction between two parties of the transaction, and meanwhile, when forwarding information, the third party node encrypts information by using public keys of two parties of the transaction, so that data is invisible during transaction, and risk of leakage is reduced; meanwhile, a digital signature is introduced during information forwarding, so that the identity of a transaction participant can be guaranteed to be non-counterfeitable, and the transaction safety can be improved; in addition, when the transaction information is sent to the third party node, the method is doped with a plurality of false transaction information and simultaneously sent to a plurality of third party nodes, and based on the false transaction information, each third party node cannot know the authenticity of the corresponding received transaction information, so that the possibility of data leakage of the third party node can be reduced; based on the design, the method ensures the privacy of transaction information of the user in the transaction process, solves the problem of transparent transaction data disclosure in the blockchain transaction, ensures the data security of the user, and is suitable for large-scale application and popularization in the blockchain transaction field; in this embodiment, the method may be executed at the transaction initiation node, the third party node, the transaction receiving node and the accounting node in the blockchain system, for example, but not limited to, it will be understood that the foregoing execution bodies do not constitute limitations of the embodiments of the present application, and accordingly, the method The operation steps of (a) may be, but are not limited to, the following stepsAs shown.
S1, after transaction information is acquired, a transaction initiating node carries out encryption signature processing on the transaction information to obtain a real signature data block and a plurality of false signature data blocks; in this embodiment, the true signature data block and any false signature data block each include transaction information, a corresponding digital signature, and an encrypted identifier for verifying the authenticity of the transaction information, where, of course, the true signature data block includes true transaction information, and the false signature data block includes false transaction information, and the encrypted identifiers of the true signature data block and the false signature data block are different (a first encrypted identifier included in the true signature data block, and a second encrypted identifier included in the false signature data block); therefore, when the transaction is carried out, a plurality of false signature data blocks are generated, and when the signature data blocks are subsequently sent to the third party node for forwarding transaction information, the third party node cannot know the authenticity of the transaction information in the corresponding received signature data block, so that the possibility that lawbreakers invade from the third party node to leak data is reduced.
Alternatively, the example transaction information may include, but is not limited to, a transaction amount, which may be digital currency; meanwhile, when a transaction initiating node in the blockchain carries out transaction, an information encryption public key of one node is randomly acquired from each node in the blockchain system so as to carry out encryption signature processing of transaction information based on the information encryption public key; specifically, the specific procedure of the cryptographic signature processing may be, but is not limited to, as shown in the following steps a to E.
A. After the transaction initiating node acquires the transaction information, generating a plurality of false transaction information and a first signature private key, and sending a public key request to any block node in a block chain, so that the block node receives the public key request and then sends the information encryption public key of the block node to the transaction initiating node; in this embodiment, the plurality of dummy transaction information generated by the transaction initiation node is randomly generated, and the number may be greater than or equal to 5; meanwhile, the transaction initiating node uses any block node in the block chain system to carry out encryption signature on transaction information, compared with the use of a public key, the random of public key selection is increased, and the possibility that a data block obtained by encryption signature is cracked is further reduced; the process of generating the information encryption public key of any block node is identical to the process of generating the encryption public keys of the transaction initiating node and the transaction receiving node, and the following steps are described in detail.
After the transaction initiating node obtains the information encryption public key sent by any block node in the block chain, the transaction initiating node can utilize the information encryption public key to carry out encryption signature processing on transaction information, as shown in the following steps B-E.
B. The transaction initiating node receives the information encryption public key and takes the information encryption public key as an encryption key.
C. The transaction initiating node acquires a first identifier and a second identifier, and encrypts the first identifier and the second identifier by using the encryption key to obtain a first encrypted identifier and a second encrypted identifier respectively; in this embodiment, the first identifier and the second identifier are used as identifiers of authenticity of the transaction information, that is, one transaction information is associated with the first identifier, and the transaction information is determined to be real information; otherwise, if one transaction information is associated with the second identifier, the transaction information can be identified as false information; thus, based on the two identifiers, real transaction information can be determined in the subsequent transaction; optionally, in order to ensure that the two identifiers are invisible, in this embodiment, encryption processing needs to be performed on the two identifiers to obtain a first encrypted identifier and a second encrypted identifier; further, the encryption process of the two identifiers is the same as the encryption process of each signature data block in the third party node, which is described in detail below.
After the encryption processing of the two identifiers is completed, the transaction information and each false transaction information can be associated with the corresponding identifier, so that a data block containing the transaction information and the encrypted identifier is obtained, wherein the association process is as shown in the following step D.
D. A transaction initiation node that generates a first data block based on the first encrypted identifier and the transaction information, and generates a plurality of second data blocks based on the second encrypted identifier and each of the dummy transaction information; in this embodiment, the first data block may be expressed asWherein->Representing a first encrypted identifier, and Y representing transaction information; of course, the representation of the second data block is identical to the first data block and is not listed here.
After the association of each transaction information and the corresponding encrypted identifier is completed, each data block obtained by association can be subjected to digital signature processing, so that the non-counterfeitability of the identity of the transaction initiating node is ensured by utilizing the data signature, wherein the digital signature process is shown in the following step E.
E. The transaction initiating node respectively carries out digital signature processing on the first data block and each second data block by utilizing the first signature private key so as to obtain the real signature data block and a plurality of false signature data blocks after digital signature processing; in this embodiment, a specific generation process of the first signature private key is disclosed first, and then, based on the first signature private key, a digital signature process of the first data block and the second data block is specifically described, where, for example, the generation process of the first signature private key may be, but is not limited to, as shown in the following steps E01 to E07.
E01. The transaction initiating node obtains a first random number and a generator of an addition circulation group of an elliptic curve, wherein the value range of the first random number is [1, R-1 ]]And the order of the addition cycle group is R; in particular applications, the generator of the addition loop group of the exemplary elliptic curve may include, but is not limited to, a first addition loop groupIs the first generation element of (1)And a second addition cycle group +.>Second generator->And for example, but not limited to, BN curves are used as elliptic curves, so as to generate corresponding two-addition cyclic groups (the order numbers of the two-addition cyclic groups are R); meanwhile, the two generation elements can be preset at the transaction initiating node.
After obtaining the first random number and the generating element of the two-addition cyclic group of the elliptic curve, the first signature private key can be calculated, as followsAs shown.
E02. The transaction initiating node calculates a first signature key based on the first random number and the generator; in the present embodiment, the product between the first random number and the second generator may be used as the first signing key by way of example and not limitation; after the first signing key is obtained, a second signing key is also required to be calculated, and the calculation process comprises the following steps Shown is
E03. Calculating a first encryption intermediate parameter based on the block identifier of the transaction initiating node and the first random number; in a specific application, the following formula (3) may be used, but is not limited to, to calculate the first encryption intermediate parameter.
(3)
In the above-mentioned formula (3),representing said first encrypted intermediate parameter,/v>Representing a cryptographic function derived from a cryptographic hash function,/->Block identification representing the transaction initiating node, < >>A private key generation function identifier, expressed in one byte, representing the choice of the transaction initiating node,/->Representing the first random number.
Thus, after the first encryption intermediate parameter is calculated based on the above formula (3), it is further determined whether it is 0, so that the subsequent calculation step is performed based on the determination result, where the determination process is as shown in the following step E04.
E04. The transaction initiating node determines whether the first encrypted intermediate parameter is 0.
E05. If not, the transaction initiating node calculates a second encryption intermediate parameter based on the first encryption intermediate parameter and the first random number; in the present embodiment, the second encryption intermediate parameter may be calculated by, for example, but not limited to, using the following formula (4).
(4)
In the above-mentioned formula (4), Representing the second encrypted intermediate parameter.
In this embodiment, if the first encryption intermediate parameter is 0, then it is necessary to return to step E01, i.e. to retrieve a first random number and recalculate the first signing key.
After the second intermediate parameter is obtained, the second intermediate parameter may be used to calculate the second signing key, where the calculation process is as shown in step E06 below.
E06. The transaction initiating node calculates a second signature key based on the second encryption intermediate parameter and the generating element; in this embodiment, the second encryption intermediate parameter may be multiplied by the second generator to obtain the second signing key; then, the first signature private key can be generated using the two signature keys and the two generation elements, as shown in step E07.
E07. Forming the first signature private key by using the first signature key, the generator and the second signature key; in this embodiment, the first signing private key may be composed by using the first generator and the two signing keys, for example and without limitation.
Thereby through the stepsThe transaction initiating node can generate a corresponding first signature private key, and then the generated first signature private key can be utilized to carry out digital signature on the first data block and each second data block; wherein, since the digital signature process of the first data block and each second data block are the same, the first data block will be taken as an example to specifically describe the aforementioned digital signature process, and the processing process may be, but is not limited to, the following steps- >As shown.
E1. The transaction initiating node generates a first signature intermediate parameter based on the first signature key and the generating element; in this embodiment, the first signature intermediate parameter may be calculated by using the aforementioned first generator and by adopting the following formula (5).
(5)
In the above-mentioned formula (5),representing a first signature intermediate parameter,/a>Representing a first generator->Represents a first signing key and +.>Representing from->To->Bilinear map of->The multiplicative cycle group of elliptic curves is represented, and the order thereof is also R.
Thus, after the first signature intermediate parameter is calculated based on the above formula (5), the first signature intermediate parameter can be used to calculate the first signature parameter, and the calculation process is as follows in steps E2 and E3.
E2. The transaction initiating node acquires a second random number, wherein the value range of the second random number is [1, R-1].
E3. The transaction initiating node calculates a first signature parameter based on the second random number, the first signature intermediate parameter and the first data block according to the following formula (1).
(1)
In the above-mentioned formula (1),representing the first signature parameter,/->Representing a cryptographic function derived from a cryptographic hash function,/- >Representing a first data block->Representing a second signature intermediate parameter, wherein +.>And->Representing said first signature intermediate parameter,/a>Representing said second random number,/->Can but not be limited to express +.>And->Is a splice of (2).
Calculating a first signature parameter through the formula (1), namely calculating a third signature intermediate parameter by using the first signature parameter so as to generate a second signature parameter by using the third signature intermediate parameter; optionally, the calculation process of the third signature intermediate parameter is as follows in step E4.
E4. The transaction initiating node calculates a third signature intermediate parameter by using the first signature parameter and the second random number according to the following formula (2).
(2)
In the above-mentioned formula (2),representing said third signature intermediate parameter,/v>Representing the remainder operator.
After calculating the third signature intermediate parameter based on the formula (2), judging the result of the third signature intermediate parameter so as to judge whether the third signature intermediate parameter can participate in the subsequent digital signature; the determination process is as follows in step E5.
E5. And judging whether the third signature intermediate parameter is 0.
E6. If not, generating a second signature parameter by using the second signature key and the third signature intermediate parameter; in this embodiment, if the third signature intermediate parameter is not 0, the second random number needs to be selected again, so that the digital signature process is restarted, i.e. the step E2 is returned to restart, and if the third signature intermediate parameter is not 0, the subsequent calculation of the second signature parameter may be involved, where, for example, the second signature key may be but not limited to be multiplied by the third signature intermediate parameter to obtain the second signature parameter; after the two signature parameters are obtained, the digital signature of the second data block can be obtained, and the digital signature and the first data block are utilized to generate a real signature data block; optionally, the generation process is as shown in the following step E7.
E7. Forming the real signature data block by using the first data block, the first signature parameter and the second signature parameter; when the method is applied specifically, the first signature parameter and the second signature parameter form a digital signature of the first data block, and thus, the first signature parameter and the second signature parameter are associated to generate a real signature data block; further, the representation of the exemplary authentic signature data block may be:wherein->Representing a second signature parameter.
Thereby through the stepsAnd sub-steps thereof, the transaction initiating node canCompleting encryption signature processing of transaction information to obtain a real signature data block; of course, the encryption signature processing procedure corresponding to each false transaction information is the same as the encryption signature processing procedure of the real transaction information, and will not be described again.
After the encryption signature processing of the real transaction information and each false transaction information is completed, the transaction initiating node can introduce a third party node (a first target node and a second target node which are described below), and randomly send the real signature data block and each false signature data block to each third party node so as to complete the forwarding of the transaction information by using the third party node, send the forwarding of the transaction information to both parties of the transaction for transaction verification, and finally finish the transaction of the two parties of the transaction by the accounting node in the blockchain after the verification is passed; optionally, the transmission process of the true signature data block and each false signature data block is as follows in step S2.
S2, the transaction initiating node sends the real signature data block to a first target node and sends each false signature data block to a second target node, wherein the first target node is any node which is remained after the transaction receiving node and the key generating node are removed in the blockchain, the second target node is all nodes which are remained after the transaction receiving node, the key generating node and the first target node are removed in the blockchain, the key generating node is a providing node of an encryption key used when the transaction information is subjected to encryption signature processing, and any second target node correspondingly receives one false signature data block; in a specific application, the signature data block corresponds to a third party node, and meanwhile, as the identifier for verifying the authenticity of the transaction information is invisible (i.e. encrypted), each third party node cannot know whether the transaction information in the signature data block received by itself is real transaction information (i.e. whether the transaction information is real transaction amount) when receiving the signature data block; in this way, the risk of the third party node revealing transaction information may be reduced.
After the first target node and each second target node receive the respective signature data blocks, signature authentication is required to be performed first to determine whether the identity of the node where the signature data block occurs is true, and after verification is passed, encryption of the received signature data blocks can be performed by using encryption public keys of both parties of the transaction (i.e. the initiating node and the receiving node), wherein the processing procedure of the received signature data blocks by the first target node and each second target node is as follows in step S3.
S3, after receiving the corresponding signature data blocks, the first target node and any second target node conduct signature authentication processing on the received signature data blocks, and after the signature authentication is passed, the encryption public keys of the transaction initiating node and the transaction receiving node are obtained, so that the received signature data blocks are respectively subjected to encryption splicing processing by utilizing the encryption public keys of the transaction initiating node and the transaction receiving node to obtain encryption data blocks, and the respective encryption data blocks are subjected to digital signature processing to obtain first signature encryption data blocks; in this embodiment, the first target node receives the true signature data block, and the second target node receives the false signature data block, and the processing procedures of the received signature data blocks are the same, so in this embodiment, the processing procedure is specifically described by taking the first target node as an example.
Alternatively, the foregoing describes the representation of a block of authentic signature data as:therefore, it is essential that the first signature parameter and the second signature parameter in the real signature data block are authenticated, and the signature authentication process of the real signature data block received by the first target node may be, but not limited to, as shown in the following steps S31 to S39.
S31, judging whether a first signature parameter in the real signature data block belongs to a target interval, wherein the target interval is a value period of a first random number; in the present embodiment, then, the judgment isWhether or not it is [1, R-1 ]]。
S32, if so, judging whether a second signature parameter in the real signature data block belongs to an addition cycle group of an elliptic curve; in this embodiment, it is determined whether the second signature parameter belongs to the first addition loop group of the elliptic curve, i.e.Whether or not it belongs to->If yes, the following step S33 needs to be executed, otherwise, it is determined that signature authentication fails, that is, the sender of the true signature data block has falsified identity, and the transaction data forwarding process can be ended, that is, the first target node exits the transaction process.
S33, acquiring a target intermediate parameter, wherein the target intermediate parameter is a first signature intermediate parameter in the digital signature processing process of the first data block; in this embodiment, the first signature intermediate parameter is a public parameter, and is sent to the first target node by the transaction initiating node; then, the target intermediate parameter may be used to perform subsequent signature authentication, as shown in step S34 below.
S34, calculating a first verification intermediate parameter based on the target intermediate parameter and a first signature parameter in the real signature data block; in this embodiment, the calculation formula of the first verification intermediate parameter is:wherein c represents a first verification intermediate parameter, v represents a target intermediate parameter (i.e., a first signature intermediate parameter); after the first verification intermediate parameter is calculated, a second verification intermediate parameter is also calculated, as shown in step S35 below.
S35, obtaining a block identifier of the transaction initiating node, and calculating to obtain a second verification intermediate parameter based on the block identifier; in the present embodiment, the second verification intermediate parameter may be calculated by, for example, but not limited to, using the following formula (6).
(6)
In the above-mentioned formula (6),representing said second authentication intermediate parameter,/for>Representing a cryptographic function derived from a cryptographic hash function,/->Block identification representing the transaction initiating node, < >>Representing a private key generation function identifier (disclosed by the transaction initiating node to the first target node).
Based on the above formula (6), a second verification intermediate parameter may be calculated, and then a third verification intermediate parameter may be calculated using the second verification intermediate parameter, as shown in step S36 below.
S36, calculating a third verification intermediate parameter based on the second verification intermediate parameter, and obtaining a fourth verification intermediate parameter by using the third verification intermediate parameter; in the present embodiment, the following formulas (7) and (8) may be used, but are not limited to, to calculate the third and fourth verification intermediate parameters.
(7)
(8)
In the above-mentioned formula (7),representing a third authentication intermediate parameter, ">Second addition representing elliptical intervalA second generator of the method loop group (sent by the transaction initiating node to the first target node); in the above formula (8), +.>Representing a fourth authentication intermediate parameter, ">Representing a second signature parameter in the real signature data block, and +.>Representing from->To the point ofIs explained in the foregoing, i.e +.>Is of->Element of (a)>Is of->Elements of (a) and (b).
After the fourth verification intermediate parameter is calculated according to the foregoing formula (7) and formula (8), the fifth verification intermediate parameter may be calculated based on the fourth verification intermediate parameter and the first verification intermediate parameter, and finally the signature verification parameter may be determined by the fifth verification intermediate parameter, where the calculation process is as shown in step S37 below.
S37, calculating a fifth verification intermediate parameter based on the fourth verification intermediate parameter and the first verification intermediate parameter, and determining a signature verification parameter by using the fifth verification intermediate parameter; in the present embodiment, the signature verification parameter may be calculated using the following formula (9), but is not limited thereto.
(9)
In the above-mentioned formula (9),representing signature verification parameters,/->Representing a fifth authentication intermediate parameter, ">Represents a first data block, and +.>
After the signature verification parameter is calculated according to the formula (9), it can be determined whether the signature verification parameter is the same as the first signature parameter in the real signature data block, if so, it is determined that the signature verification of the real signature data block is passed, otherwise, it is not passed, as shown in step S38 below.
S38, judging whether the signature verification parameter is equal to the first signature parameter in the real signature data block.
S39, if yes, judging that the signature authentication of the real signature data block passes, otherwise, judging that the signature authentication fails.
Thereby through the stepsThe signature authentication of the real signature data block can be completed, and of course, the signature authentication process of each received false signature data block by the second target node is also the same, and is not repeated here, and after the signature authentication of the corresponding signature data block is completed, the first target node and each second target node can perform the subsequent encryption forwarding process; in this embodiment, when any target node determines that the corresponding signature data block fails to pass verification, the subsequent forwarding process is stopped, i.e. the current transaction process is exited.
In this embodiment, the encryption process of the first target node and each second target node on the respective signature data blocks is the same, and the encryption process of the first target node on the actual signature data blocks will be specifically described below by taking the first target node as an example, which may be but not limited to the following steps F and G.
F. For a first target node, the first target node respectively encrypts target information in a received real signature data block by using encryption public keys of a transaction initiating node and a transaction receiving node to respectively obtain first encryption information and second encryption information, wherein the target information is transaction information in a first data block in the real signature data block; in this embodiment, the encryption public key of the example transaction initiation node is the following method.
F01. The transaction initiating node acquires a first prime number and a second prime number, wherein the maximum common factor between a first target parameter and a second target parameter is 1, the first target parameter is the product between the first prime number and the second prime number, the second target parameter is the product between a first difference value and a second difference value, the first difference value is the difference value between the first prime number and a preset value, and the second difference value is the difference value between the second prime number and the preset value; in this embodiment, assuming that the first prime number is m1 and the second prime number is m2, and the preset value is 1, then it is necessary to satisfy And->The maximum common factor of (2) is 1.
F02. And the transaction initiating node generates a key generation set based on the first target parameter, wherein the number of elements in the key generation set is the first target parameter, and any element in the key generation set is an integer.
F03. The transaction initiating node randomly selects an integer from the key generation set as a public key.
F04. The transaction initiating node utilizes theThe public key and the first target parameter form an encrypted public key of the transaction initiating node; in this embodiment, the transaction initiating node generates the encrypted public key and also generates the encrypted private key for use in subsequent decryption; specifically, the encrypted private key includes a first private key and a second private key, where the first private key is the least common multiple between the first difference and the second difference (i.e.Least common multiple between), and the second private key is calculated as:
(10)
in the above-mentioned formula (10),representing a second private key,/->Represents the public key +_>Representing a first private key,/->Represents a first target parameter (i.e. the product between m1 and m 2), and +.>
Thus, through the steps F and G and the formula (10), the encryption public key and the encryption private key of the transaction initiating node can be obtained through calculation; of course, the generation principle of the encryption public key and the encryption private key of the key generation node and the transaction receiving node is also the same, and will not be described herein.
After the first target node obtains the encryption public key of the transaction initiating node, encryption processing can be carried out on the transaction information in the real signature data block, wherein the real signature data block has the following expression form:and->The expression is +.>Then, after the first target node performs signature authentication on the data, the transaction information in the first data block in the true signature data block is encrypted, that is, the encryption processing is performed on the Y (target information), and the encryption process is as follows: randomly selecting an integer from a secret key generation set to be used as an encrypted random number; and then encrypting the target information by adopting an encryption formula based on the encrypted random number to obtain first encrypted information.
(11)
In the above-mentioned formula (11),representing first encryption information->Representing an encrypted random number.
Thus, based on the formula (11), the target information in the real signature data block can be encrypted by using the encryption public key of the transaction initiating node to obtain first encryption information; then, the target information in the real signature data block is encrypted by using the encryption public key of the transaction receiving node according to the same principle, so as to obtain second encrypted information The method comprises the steps of carrying out a first treatment on the surface of the Of course, in the foregoing step C, the encryption process of the first identifier and the second identifier using the encryption key is also the same, and will not be described herein.
After encryption of the transaction information in the real signature data block is completed by using the encryption public keys of both parties of the transaction, the encrypted data block can be spliced with the first encryption identifier in the real signature data block, so that the encrypted data block is obtained, and the splicing process is as shown in the following step G.
G. The first target node performs splicing processing on the first encryption information, the second encryption information and a first encryption identifier in a first data block in the real signature data block so as to obtain the encrypted data block after the splicing processing; in this embodiment, the foregoing splicing process may be, but is not limited to, putting the first encryption information, the second encryption information, and the first encryption identifier in the same set, e.g., the encrypted data block may be represented asThe method comprises the steps of carrying out a first treatment on the surface of the Of course, the three data can be spliced directly, and the indicator is used at the splice to indicate different data, so that different encrypted information can be determined according to the indicator when decryption is performed later, and then the different encrypted information can be decrypted; for example, a- >All represent indicators, and +>Indicating first encryption information->Indicating second encryption information->Indicating third encryption information; of course, the aforementioned indicators may be specifically set according to actual use, and the aforementioned are merely illustrative; after obtaining the encrypted data block, the first target node can use the second signature private key to digitally sign the encrypted data block, so as to obtain a first signed encrypted data block; the generation process of the second signature private key and the digital signature process of the encrypted data block can refer to the generation process of the first signature private key and the digital signature process of the first data block, which are not described herein.
Similarly, the encryption and splicing processing process of the false transaction information in the received false signature data block in the second target node is also similar, and is not repeated herein; after the encryption and splicing processing of the transaction information in the corresponding signature data blocks are completed, the first target node and each second target node can send the corresponding first signature encrypted data block to the transaction initiating node, so that the transaction initiating node performs transaction verification, as shown in the following step S4.
S4, the first target node and any second target node send the respective first signature encrypted data blocks to the transaction initiating node.
S5, the transaction initiating node receives first signature encryption data blocks sent by the first target nodes and the second target nodes so as to screen out the first signature encryption data blocks which are true in signature and contain true transaction information from the first signature encryption data blocks, and the first signature encryption data blocks are used as target data blocks and are subjected to digital signature processing to obtain first signature target data blocks; in the present embodiment, the following steps S51 to S57 can be used, for example, to determine a target data block from among the respective first signature encrypted data blocks.
S51, a transaction initiating node acquires encryption parameters, wherein the encryption parameters are parameters used by the transaction initiating node when encrypting the first identifier by utilizing the encryption key, and the first encryption identifier is generated according to the encryption parameters and the first identifier; in the present embodiment, the example encryption parameter is the encrypted random number selected by the transaction initiating node when encrypting the first identifier, i.e. in equation (11) aboveThe method comprises the steps of carrying out a first treatment on the surface of the The principle is as follows: since the first identifier and the second identifier are both encrypted at the transaction initiating node and the verification of the authenticity of the transaction information is also performed at the transaction initiating node, in order to render the first identifier and the second identifier invisible, the present embodiment does not decrypt the first and second encrypted identifiers, but uses the same method to encrypt Encrypting the secret parameters so as to judge whether the encrypted identifier is the same as the first identifier; thus, the first signature encrypted data block with the real transaction information can be screened from the first signature encrypted data blocks.
After obtaining the encryption parameter, the transaction initiating node may use the encryption key in the foregoing step B to encrypt the encryption parameter, thereby obtaining the verification identifier, where the encryption process is as shown in step S52 below.
S52, the transaction initiating node generates a verification identifier based on the encryption parameter and the encryption key; in this embodiment, the encryption calculation is performed by using the formula (11) to obtain the verification identifier; after the verification identifier is obtained, the verification identifier may be used to screen out the first signature encrypted data blocks containing the real transaction information from the first signature encrypted data blocks, where the screening process is as shown in step S53 below.
And S53, the transaction initiating node screens out the first signature encrypted data blocks with the same encryption identifier as the verification identifier from the first signature encrypted data blocks to serve as a preselected target data block.
After screening the first signature encrypted data block with the same encrypted identifier as the verification identifier, only the screened preselected target data block can be described as a data block containing real transaction information, but whether the identity of the sender is real or not and whether the internal transaction information is modified or not is unclear, so signature authentication and verification of the transaction information are also required; wherein the signature authentication process is as shown in step S54 below.
S54, the transaction initiating node performs signature authentication on the preselected target data block and judges whether the signature authentication is passed or not; in this embodiment, the signature authentication process of the transaction initiating node on the pre-selected target data block is the same as the signature authentication process of the first target node on the real signature data block, which is not described herein, and if the signature authentication is not passed, the transaction initiating node may determine that the sender identity of the pre-selected target data block is forged, and at this time, the transaction may be directly ended.
S55, if yes, the transaction initiating node decrypts the preselected target data block to obtain transaction information in the preselected target data block; in this embodiment, the first encrypted information in the preselected target data block is decrypted by using an encrypted private key kept secret by the transaction initiating node, where a decryption formula is as follows:
(12)
In the above formula, y represents transaction information in the preselected target data block (i.e., decrypted transaction information),representing first encryption information->Representing a second private key,/->Representing a first private key,/->Representing a first target parameter (i.e. the product between two prime numbers m1 and m2 selected in the course of the encryption key generation described above). />
Thus, based on the foregoing formula (12), after decryption of the first encrypted information in the pre-selected target data block is completed, encrypted transaction information can be obtained, and then it is required to determine whether the encrypted transaction information is the same as the transaction information acquired by the transaction initiating node at the beginning of the transaction, where the determination process is as shown in step S56 below.
S56, the transaction initiating node judges whether transaction information in a preselected target data block is the same as initial transaction information, wherein the initial transaction information is transaction information acquired when transaction begins; in this embodiment, the decrypted transaction information is compared with the transaction information obtained in step S1, and the transaction information includes the transaction amount, so that the transaction amount is compared, where if the transaction amount is the same, the preselected target data block may be used as the target data block, that is, the first signature encrypted data block having a true signature and containing the true transaction information; of course, if the two information are different, it indicates that the transaction information is tampered, and the transaction initiating node can directly end the transaction.
S57, if yes, taking the pre-selected target data block as a target data block.
Thus, through the steps S51 to S57, the transaction initiating node may screen out the first signature encrypted data block (i.e., the target data block) which has a true signature and contains the true transaction information from the first signature encrypted data blocks sent by the third party nodes; after the target data block is determined, the transaction initiating node is equivalent to the verification of the transaction, and can perform digital signature at the moment and send the digital signature to the transaction receiving node, and the transaction receiving node performs the verification of the transaction, wherein the digital signature process of the transaction initiating node on the target data block is shown in the following step S6.
S6, the transaction initiating node sends the first signature target data block to the transaction receiving node; in this embodiment, the digital signature is also performed using the first signature private key, and the process is described above, which is not repeated here.
S7, the transaction receiving node performs authenticity verification on the first signature target data block, and performs digital signature processing on the first signature target data block after the authenticity verification is passed to obtain a second signature target data block; in this embodiment, the verification of the authenticity of the transaction receiving node to the first signature target data block is signature authentication and verification of the authenticity of the transaction information, where two signature authentications are required here, which is because: the transaction initiating node directly determines a first signature encryption data block which has a true signature and contains true transaction information from all first signature encryption data blocks, and then the first signature encryption data block is digitally signed and sent to a transaction receiving node, so that the target data block contains a digital signature of the transaction initiating node and a digital signature of a third party node corresponding to the target data block, and thus, signature authentication is needed to be carried out on the digital signature of the transaction initiating node firstly, and then signature authentication is carried out on the digital signature of the third party node corresponding to the target data block; after the verification process, the transaction receiving node uses an encryption private key which is kept secret to decrypt the second encryption information in the first signature target data block, so that the transaction information of which the second encryption information is decrypted is obtained; finally, comparing the information with the initial transaction information, judging whether the information is the same as the initial transaction information, and if so, passing the authenticity verification; otherwise, if any one of the three verification processes fails, the authenticity verification fails, and at this time, the transaction receiving node can end the transaction.
After the authenticity verification of the first signature target data block is completed at the transaction receiving node and the verification is judged to pass, the first signature target data block can be subjected to digital signature processing by using a third signature private key of the first signature target data block, so as to obtain a second signature target data block, and finally, the second signature target data block can be sent to the transaction initiating node, and the transaction initiating node sends the balance of the second signature target data block and the communication transaction information to the accounting node together, so that the transaction amount of both sides of the transaction is updated, wherein the sending process of the second signature target data block is as shown in the following step S8.
S8, the transaction receiving node sends the second signature target data block to the transaction initiating node.
S9, the transaction initiating node performs authenticity verification on the second signature target data block, and adds account balance into the second signature target data block after the authenticity verification is passed, so as to obtain a transaction data block; in this embodiment, the authenticity verification process of the transaction initiating node on the second signature target data block is the same as the authenticity verification process of the first signature target data block, and will not be described again here; after the second signature target data block passes the verification, the transaction initiating node can add the account balance of the second signature target data block into the data block, and then digital signature processing is carried out on the second signature target data block; finally, the transaction can be sent to an accounting node to finish the transaction; wherein the digital signature process of the transaction data block is shown in step S10 below.
S10, the transaction initiating node carries out digital signature processing on the transaction data block to obtain a signed transaction data block, and sends the signed transaction data block to an accounting node in a blockchain; in this embodiment, the digital signature process is the same as the signature process of the first data block, and will not be described herein.
S11, verifying authenticity and legitimacy of the signed transaction data block by the accounting node, writing transaction information into the block after verification is passed, and updating accounts of the transaction initiating node and the transaction receiving node; in this embodiment, the authenticity verification of the signature transaction data block by the accounting node is to authenticate the signature of the signature transaction data block, and the validity verification is to determine whether the account balance of the transaction initiating node is greater than the transaction amount in the transaction information, and verify whether the transaction amount is greater than 0; meanwhile, as the transaction information is ciphertext, a zero knowledge proof algorithm can be adopted to verify the validity of the transaction information and account balance in the signature transaction data block; after the verification is passed, the accounting node can write transaction information into the block and update account balances of both transaction sides so as to complete the transaction; otherwise, if the verification is not passed, the transaction is rejected.
Therefore, through the blockchain transaction method with privacy protection described in detail in the steps S1-S11, the invention realizes the impersonation of a transaction participant and the invisibility of transaction information by introducing a third party node and utilizing digital signature and encryption processing in the transaction forwarding process when carrying out blockchain transaction; simultaneously, the invention synchronously transmits a plurality of false transaction information while transmitting the real transaction information, so that each third party node cannot know the authenticity of the corresponding received transaction information, thereby reducing the possibility of data leakage of the third party node; based on the design, the method ensures the privacy of transaction information of the user in the transaction process, solves the problem of transparent transaction data disclosure in the blockchain transaction, ensures the data security of the user, and is suitable for large-scale application and popularization in the blockchain transaction data protection field.
As shown in fig. 2, a second aspect of the present embodiment provides a hardware device for implementing the blockchain transaction method with privacy protection described in the first aspect of the present embodiment, including:
and the transaction initiating node is used for carrying out encryption signature processing on the transaction information after the transaction information is acquired so as to obtain a real signature data block and a plurality of false signature data blocks.
The transaction initiating node is used for sending the real signature data block to a first target node and sending each false signature data block to a second target node, wherein the first target node is any node which is remained after the transaction receiving node and the key generating node are removed in the blockchain, the second target node is all nodes which are remained after the transaction receiving node, the key generating node and the first target node are removed in the blockchain, the key generating node is a providing node of an encryption key used when the transaction information is subjected to encryption signature processing, and any second target node correspondingly receives one false signature data block.
And the first target node and any second target node are used for carrying out signature authentication processing on the received signature data blocks after receiving the corresponding signature data blocks, acquiring encryption public keys of the transaction initiating node and the transaction receiving node after the signature authentication is passed, respectively carrying out encryption splicing processing on the received signature data blocks by utilizing the encryption public keys of the transaction initiating node and the transaction receiving node to obtain encryption data blocks, and carrying out digital signature processing on the respective encryption data blocks to obtain the first signature encryption data blocks.
The first target node and any second target node are further configured to send respective first signed encrypted data blocks to the transaction initiating node.
The transaction initiating node is used for receiving the first signature encryption data blocks sent by the first target node and each second target node, so that the first signature encryption data blocks with real signatures and containing real transaction information are screened out from each first signature encryption data block to serve as target data blocks, and digital signature processing is carried out on the target data blocks to obtain first signature target data blocks.
And the transaction initiating node is used for sending the first signature target data block to the transaction receiving node.
And the transaction receiving node is used for verifying the authenticity of the first signature target data block, and carrying out digital signature processing on the first signature target data block after the authenticity is verified, so as to obtain a second signature target data block.
And the transaction receiving node is used for sending the second signature target data block to the transaction initiating node.
And the transaction initiating node is used for verifying the authenticity of the second signature target data block, and adding the account balance into the second signature target data block after the authenticity is verified, so as to obtain a transaction data block.
And the transaction initiating node is used for carrying out digital signature processing on the transaction data block to obtain a signed transaction data block, and sending the signed transaction data block to the accounting node in the blockchain.
And the accounting node is used for verifying the authenticity and the legality of the signed transaction data block, writing transaction information into the block after the verification is passed, and updating the accounts of the transaction initiating node and the transaction receiving node.
The working process, working details and technical effects of the device provided in this embodiment may refer to the first aspect of the embodiment, and are not described herein again.
As shown in fig. 3, a third aspect of the present embodiment provides another blockchain transaction device with privacy protection, taking the device as an electronic device as an example, including: the system comprises a memory, a processor and a transceiver which are connected in sequence in communication, wherein the memory is used for storing a computer program, the transceiver is used for receiving and transmitting messages, and the processor is used for reading the computer program and executing the blockchain transaction method with privacy protection according to the first aspect of the embodiment.
By way of specific example, the Memory may include, but is not limited to, random access Memory (random access Memory, RAM), read Only Memory (ROM), flash Memory (Flash Memory), first-in-first-out Memory (First Input First Output, FIFO) and/or first-in-last-out Memory (First In Last Out, FILO), etc.; in particular, the processor may include one or more processing cores, such as a 4-core processor, an 8-core processor, or the like. The processor may be implemented in at least one hardware form of DSP (Digital Signal Processing ), FPGA (Field-Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array ), and may also include a main processor and a coprocessor, where the main processor is a processor for processing data in an awake state, and is also called CPU (Central Processing Unit ); a coprocessor is a low-power processor for processing data in a standby state.
In some embodiments, the processor may be integrated with a GPU (Graphics Processing Unit, image processor) for taking charge of rendering and rendering of content required to be displayed by the display screen, for example, the processor may not be limited to a microprocessor employing a model number of STM32F105 family, a reduced instruction set computer (reduced instruction set computer, RISC) microprocessor, an X86 or other architecture processor, or a processor integrating an embedded neural network processor (neural-network processing units, NPU); the transceiver may be, but is not limited to, a wireless fidelity (WIFI) wireless transceiver, a bluetooth wireless transceiver, a general packet radio service technology (General Packet Radio Service, GPRS) wireless transceiver, a ZigBee protocol (low power local area network protocol based on the ieee802.15.4 standard), a 3G transceiver, a 4G transceiver, and/or a 5G transceiver, etc. In addition, the device may include, but is not limited to, a power module, a display screen, and other necessary components.
The working process, working details and technical effects of the electronic device provided in this embodiment may refer to the first aspect of the embodiment, and are not described herein again.
A fourth aspect of the present embodiment provides a storage medium storing instructions containing the blockchain transaction method with privacy protection of the first aspect of the present embodiment, i.e. the storage medium has instructions stored thereon, which when executed on a computer, perform the blockchain transaction method with privacy protection of the first aspect of the present embodiment.
The storage medium refers to a carrier for storing data, and may include, but is not limited to, a floppy disk, an optical disk, a hard disk, a flash Memory, a flash disk, and/or a Memory Stick (Memory Stick), where the computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable devices.
The working process, working details and technical effects of the storage medium provided in this embodiment may refer to the first aspect of the embodiment, and are not described herein again.
A fifth aspect of the present embodiment provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the blockchain transaction method with privacy protection of the first aspect of the embodiment, wherein the computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
Finally, it should be noted that: the foregoing description is only of the preferred embodiments of the invention and is not intended to limit the scope of the invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A blockchain transaction method with privacy protection, comprising:
after transaction information is acquired, a transaction initiating node carries out encryption signature processing on the transaction information to obtain a real signature data block and a plurality of false signature data blocks;
the transaction initiating node sends the real signature data block to a first target node and sends each false signature data block to a second target node, wherein the first target node is any node which is remained after a transaction receiving node and a key generating node are removed in a blockchain, the second target node is all nodes which are remained after the transaction receiving node, the key generating node and the first target node are removed in the blockchain, the key generating node is a providing node of an encryption key used when the transaction information is subjected to encryption signature processing, and any second target node correspondingly receives one false signature data block;
After receiving the corresponding signature data blocks, the first target node and any second target node perform signature authentication processing on the received signature data blocks, and after the signature authentication is passed, obtain encryption public keys of a transaction initiating node and a transaction receiving node so as to respectively perform encryption splicing processing on the received signature data blocks by using the encryption public keys of the transaction initiating node and the transaction receiving node to obtain encryption data blocks, and perform digital signature processing on the respective encryption data blocks to obtain a first signature encryption data block;
the first target node and any second target node send the respective first signature encrypted data blocks to the transaction initiation node;
the transaction initiating node receives first signature encrypted data blocks sent by the first target node and each second target node, so that the first signature encrypted data blocks with real signatures and containing real transaction information are screened out from each first signature encrypted data block to serve as target data blocks, and digital signature processing is carried out on the target data blocks to obtain first signature target data blocks;
the transaction initiating node sends the first signature target data block to the transaction receiving node;
The transaction receiving node performs authenticity verification on the first signature target data block, and performs digital signature processing on the first signature target data block after the authenticity verification is passed to obtain a second signature target data block;
the transaction receiving node sends the second signature target data block to the transaction initiating node;
the transaction initiating node performs authenticity verification on the second signature target data block, and adds account balance into the second signature target data block after the authenticity verification is passed, so as to obtain a transaction data block;
the transaction initiating node carries out digital signature processing on the transaction data block to obtain a signed transaction data block, and sends the signed transaction data block to a billing node in a blockchain;
and the accounting node verifies the authenticity and the legality of the signed transaction data block, writes transaction information into the block after the verification is passed, and updates accounts of the transaction initiating node and the transaction receiving node.
2. The method of claim 1, wherein the transaction initiation node, after obtaining the transaction information, performs a cryptographic signature process on the transaction information to obtain a true signature data block and a plurality of false signature data blocks, comprising:
After the transaction initiating node acquires the transaction information, generating a plurality of false transaction information and a first signature private key, and sending a public key request to any block node in a block chain, so that the block node receives the public key request and then sends the information encryption public key of the block node to the transaction initiating node;
the transaction initiating node receives the information encryption public key and takes the information encryption public key as an encryption key;
the transaction initiating node acquires a first identifier and a second identifier, and encrypts the first identifier and the second identifier by using the encryption key to obtain a first encrypted identifier and a second encrypted identifier respectively;
a transaction initiation node that generates a first data block based on the first encrypted identifier and the transaction information, and generates a plurality of second data blocks based on the second encrypted identifier and each of the dummy transaction information;
and the transaction initiating node respectively carries out digital signature processing on the first data block and each second data block by using the first signature private key so as to obtain the real signature data block and a plurality of false signature data blocks after the digital signature processing.
3. The method of claim 2, wherein the transaction initiating node, upon obtaining the transaction information, generates a first private signature key comprising:
the method comprises the steps that a transaction initiating node obtains a first random number and a generator of an addition circulation group of an elliptic curve, wherein the value range of the first random number is [1, R-1], and the order of the addition circulation group is R;
the transaction initiating node calculates a first signature key based on the first random number and the generator;
calculating a first encryption intermediate parameter based on the block identifier of the transaction initiating node and the first random number;
the transaction initiating node judges whether the first encryption intermediate parameter is 0;
if not, the transaction initiating node calculates a second encryption intermediate parameter based on the first encryption intermediate parameter and the first random number;
the transaction initiating node calculates a second signature key based on the second encryption intermediate parameter and the generating element;
and utilizing the first signing key, the generating element and the second signing key to form the first signing private key.
4. The method of claim 2, wherein the first signing private key comprises a first signing key, a second signing key, and a generator of an additive loop group of elliptic curves;
The digital signature processing is carried out on the first data block by utilizing the first signature private key, and the digital signature processing comprises the following steps:
the transaction initiating node generates a first signature intermediate parameter based on the first signature key and the generating element;
the transaction initiating node acquires a second random number, wherein the value range of the second random number is [1, R-1], and the order of the addition cycle group is R;
the transaction initiating node calculates a first signature parameter based on the second random number, the first signature intermediate parameter and the first data block according to the following formula (1);
(1)
in the above-mentioned formula (1),representing the first signature parameter,/->Representing a cryptographic function derived from a cryptographic hash function,/->Representing a first data block->Representing a second signature intermediate parameter, wherein +.>And->Representing said first signature intermediate parameter,/a>Representing the second random number;
the transaction initiating node calculates a third signature intermediate parameter by using the first signature parameter and the second random number according to the following formula (2);
(2)
in the above-mentioned formula (2),representing said third signature intermediate parameter,/v>Representing a remainder operator;
judging whether the third signature intermediate parameter is 0;
If not, generating a second signature parameter by using the second signature key and the third signature intermediate parameter;
and utilizing the first data block, the first signature parameter and the second signature parameter to form the real signature data block.
5. The method of claim 1, wherein the authentic signature data block comprises a first data block, and wherein the first data block comprises transaction information and a first encrypted identifier for use in authenticating the transaction information;
the first target node and any second target node respectively carry out encryption splicing processing on the received signature data blocks by utilizing encryption public keys of the transaction initiating node and the transaction receiving node, and the method comprises the following steps:
for a first target node, the first target node respectively encrypts target information in a received real signature data block by using encryption public keys of a transaction initiating node and a transaction receiving node to respectively obtain first encryption information and second encryption information, wherein the target information is transaction information in a first data block in the real signature data block;
and the first target node performs splicing processing on the first encryption information, the second encryption information and the first encryption identifier in the first data block in the real signature data block so as to obtain the encrypted data block after the splicing processing.
6. The method of claim 5, wherein the encrypted public key of the transaction initiating node is generated by:
the transaction initiating node acquires a first prime number and a second prime number, wherein the maximum common factor between a first target parameter and a second target parameter is 1, the first target parameter is the product between the first prime number and the second prime number, the second target parameter is the product between a first difference value and a second difference value, the first difference value is the difference value between the first prime number and a preset value, and the second difference value is the difference value between the second prime number and the preset value;
the transaction initiating node generates a key generation set based on the first target parameter, wherein the number of elements in the key generation set is the first target parameter, and any element in the key generation set is an integer;
the transaction initiating node randomly selects an integer from the key generation set as a public key;
and the transaction initiating node utilizes the public key and the first target parameter to form an encrypted public key of the transaction initiating node.
7. The method according to claim 2, wherein any one of the first signed encrypted data blocks comprises an encrypted data block, wherein the encrypted data block comprises a true signed data block or a false signed data block, and wherein the true signed data block and the false signed data block each comprise transaction information and an encrypted identifier for verifying the authenticity of the transaction information;
The transaction initiating node screens out a first signature encryption data block with a real signature and containing real transaction information from all first signature encryption data blocks as target data blocks, and the method comprises the following steps:
the transaction initiating node acquires encryption parameters, wherein the encryption parameters are parameters used by the transaction initiating node when encrypting the first identifier by utilizing the encryption key, and the first encryption identifier is generated according to the encryption parameters and the first identifier;
the transaction initiating node generates a verification identifier based on the encryption parameter and the encryption key;
the transaction initiating node screens out first signature encrypted data blocks with the same encryption identifier as the verification identifier from all first signature encrypted data blocks to serve as preselected target data blocks;
the transaction initiating node performs signature authentication on the preselected target data block and judges whether the signature authentication is passed or not;
if yes, the transaction initiating node decrypts the preselected target data block to obtain transaction information in the preselected target data block;
the transaction initiating node judges whether transaction information in a preselected target data block is the same as initial transaction information, wherein the initial transaction information is transaction information acquired when transaction begins;
If yes, the pre-selected target data block is taken as a target data block.
8. A blockchain transaction device with privacy protection, comprising:
the transaction initiating node is used for carrying out encryption signature processing on the transaction information after the transaction information is acquired so as to obtain a real signature data block and a plurality of false signature data blocks;
the transaction initiating node is used for sending the real signature data block to a first target node and sending each false signature data block to a second target node, wherein the first target node is any node which is remained after a transaction receiving node and a key generating node are removed in a blockchain, the second target node is all nodes which are remained after the transaction receiving node, the key generating node and the first target node are removed in the blockchain, the key generating node is a providing node of an encryption key used when the transaction information is subjected to encryption signature processing, and any second target node correspondingly receives one false signature data block;
the first target node and any second target node are used for carrying out signature authentication processing on the received signature data blocks after receiving the corresponding signature data blocks, acquiring encryption public keys of the transaction initiating node and the transaction receiving node after the signature authentication is passed, respectively carrying out encryption splicing processing on the received signature data blocks by utilizing the encryption public keys of the transaction initiating node and the transaction receiving node to obtain encryption data blocks, and carrying out digital signature processing on the respective encryption data blocks to obtain a first signature encryption data block;
The first target node and any second target node are also used for sending the respective first signature encrypted data blocks to the transaction initiating node;
the transaction initiating node is used for receiving the first signature encryption data blocks sent by the first target node and each second target node, so that the first signature encryption data blocks with real signatures and containing real transaction information are screened out from each first signature encryption data block to serve as target data blocks, and digital signature processing is carried out on the target data blocks to obtain first signature target data blocks;
the transaction initiating node is used for sending the first signature target data block to the transaction receiving node;
the transaction receiving node is used for verifying the authenticity of the first signature target data block, and after the authenticity is verified, carrying out digital signature processing on the first signature target data block to obtain a second signature target data block;
the transaction receiving node is used for sending the second signature target data block to the transaction initiating node;
the transaction initiating node is used for verifying the authenticity of the second signature target data block, and adding account balance into the second signature target data block after the authenticity is verified, so as to obtain a transaction data block;
The transaction initiating node is used for carrying out digital signature processing on the transaction data block to obtain a signature transaction data block, and sending the signature transaction data block to the accounting node in the blockchain;
and the accounting node is used for verifying the authenticity and the legality of the signed transaction data block, writing transaction information into the block after the verification is passed, and updating the accounts of the transaction initiating node and the transaction receiving node.
9. A blockchain transaction device with privacy protection, comprising: the system comprises a memory, a processor and a transceiver which are connected in sequence in communication, wherein the memory is used for storing a computer program, the transceiver is used for receiving and transmitting messages, and the processor is used for reading the computer program and executing the blockchain transaction method with privacy protection as claimed in any one of claims 1 to 7.
10. A storage medium having instructions stored thereon that, when executed on a computer, perform the blockchain transaction method with privacy protection of any of claims 1-7.
CN202311490473.XA 2023-11-10 2023-11-10 Blockchain transaction method and device with privacy protection function and storage medium Active CN117236959B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311490473.XA CN117236959B (en) 2023-11-10 2023-11-10 Blockchain transaction method and device with privacy protection function and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311490473.XA CN117236959B (en) 2023-11-10 2023-11-10 Blockchain transaction method and device with privacy protection function and storage medium

Publications (2)

Publication Number Publication Date
CN117236959A true CN117236959A (en) 2023-12-15
CN117236959B CN117236959B (en) 2024-02-09

Family

ID=89095175

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311490473.XA Active CN117236959B (en) 2023-11-10 2023-11-10 Blockchain transaction method and device with privacy protection function and storage medium

Country Status (1)

Country Link
CN (1) CN117236959B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106549749A (en) * 2016-12-06 2017-03-29 杭州趣链科技有限公司 A kind of block chain method for secret protection encrypted based on additive homomorphism
CN109840771A (en) * 2019-04-01 2019-06-04 西安电子科技大学 A kind of block chain intimacy protection system and its method based on homomorphic cryptography
CN110059494A (en) * 2019-04-17 2019-07-26 深圳市路云区链网络科技有限公司 A kind of method for secret protection and block catenary system of block chain transaction data
CN111815322A (en) * 2020-06-08 2020-10-23 北京邮电大学 Distributed payment method with selectable privacy service based on Ether house
CN112131601A (en) * 2020-09-22 2020-12-25 圆通速递有限公司 Block chain privacy protection method and system based on ring signature and proxy re-encryption
US20210160082A1 (en) * 2018-10-26 2021-05-27 Advanced New Technologies Co., Ltd. Blockchain transaction method and apparatus
CN114666032A (en) * 2022-03-04 2022-06-24 三峡大学 Block chain transaction data privacy protection method based on homomorphic encryption

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106549749A (en) * 2016-12-06 2017-03-29 杭州趣链科技有限公司 A kind of block chain method for secret protection encrypted based on additive homomorphism
US20210160082A1 (en) * 2018-10-26 2021-05-27 Advanced New Technologies Co., Ltd. Blockchain transaction method and apparatus
CN109840771A (en) * 2019-04-01 2019-06-04 西安电子科技大学 A kind of block chain intimacy protection system and its method based on homomorphic cryptography
CN110059494A (en) * 2019-04-17 2019-07-26 深圳市路云区链网络科技有限公司 A kind of method for secret protection and block catenary system of block chain transaction data
CN111815322A (en) * 2020-06-08 2020-10-23 北京邮电大学 Distributed payment method with selectable privacy service based on Ether house
CN112131601A (en) * 2020-09-22 2020-12-25 圆通速递有限公司 Block chain privacy protection method and system based on ring signature and proxy re-encryption
CN114666032A (en) * 2022-03-04 2022-06-24 三峡大学 Block chain transaction data privacy protection method based on homomorphic encryption

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
冯浩铭;陈杭;刘彦平;: "一种金融级安全的区块链资产交易系统", 信息通信技术与政策, no. 01 *

Also Published As

Publication number Publication date
CN117236959B (en) 2024-02-09

Similar Documents

Publication Publication Date Title
CN106416124A (en) Semi-deterministic digital signature generation
CN101873307A (en) Digital signature method, device and system based on identity forward secrecy
JP2013539248A (en) Secure node authorization in communication networks
CN101300808A (en) Method and arrangement for secure autentication
CN113573304B (en) Signature realization, signature verification method, signature terminal, signature verification terminal and storage medium
CN113360943B (en) Block chain privacy data protection method and device
CN110932865B (en) Linkable ring signature generation method based on SM2 digital signature algorithm
KR101348249B1 (en) OTP authentification method and system using of QR-code
CN112019326A (en) Vehicle charging safety management method and system
CN112380584A (en) Block chain data updating method and device, electronic equipment and storage medium
US11943210B2 (en) System and method for distributed, keyless electronic transactions with authentication
CN108494561B (en) Aggregation electronic signature method with fixed signature length
CN112272088A (en) Auditable signature method based on multiple secure parties and related components
CN110602190A (en) Block chain consensus method, block chain node and storage device
CN117236959B (en) Blockchain transaction method and device with privacy protection function and storage medium
CN109660344A (en) Anti- quantum calculation block chain method of commerce and system based on unsymmetrical key pond route device
CN117978408B (en) Collaborative signature algorithm detection method, collaborative signature device and readable storage medium
CN109245882A (en) A kind of SM2 endorsement method suitable for electric power wireless sensor network
CN112541759A (en) Hidden transaction method and device based on UTXO model in block chain system and related products
CN112364335A (en) Identification identity authentication method and device, electronic equipment and storage medium
CN117614707A (en) Block chain transaction method, system, electronic equipment and medium based on intelligent contract
CN117318935A (en) Key generation method and system for vehicle team, and vehicle team formation method and system
CN111340488A (en) Method and device for generating monitorable secret transaction amount
WO2019174404A1 (en) Digital group signature method, device and apparatus, and verification method, device and apparatus
CN110493178A (en) A kind of big data encryption sharing method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant