Embodiments of the present application relate to the field of computer technologies, and in particular, to a transaction method and apparatus based on blind signature.
A blockchain is a disintermediation database, and in a transaction process based on the blockchain, the blockchain provides a publicly visible, tamper-resistant and decentralized system for both transaction parties.
In the prior art, when a transaction is performed based on the blockchain, both transaction parties upload transaction related information including address information of both transaction parties to the blockchain, and nodes in the blockchain verify the transaction according to the transaction related information, and control a completion of the transaction after a verification is passed.
However, according to the address information, an eavesdropper can acquire private information of both transaction parties, thereby causing a security problem in the transaction process.
Embodiments of the present application provide a transaction method and apparatus based on blind signature, so as to overcome a security problem existing in both transaction parties in a blockchain transaction process.
According to a first aspect, an embodiment of the present application provides a transaction method based on blind signature, including:
receiving, by a currency providing node, a first signature request sent by a payment client, where the first signature request carries a blinding result, and the blinding result is a result obtained by the payment client performing blinding processing according to a transaction service parameter and signature data;
signing, by the currency providing node, the blinding result to obtain a first signature result, and sending the first signature result to the payment client; and
receiving, by the currency providing node, signature data and a second signature result sent by a payee client, and completing a transaction after the signature data and the second signature result are verified successfully, where the signature data and the second signature result are sent by the payment client to the payee client, and the second signature result is a result obtained by de-blinding the first signature result.
In a possible design, before the receiving, by the currency providing node, the first signature request sent by the payment client, further including:
receiving, by the currency providing node, a second signature request sent by the payment client, where the second signature request carries the transaction service parameter;
signing, by the currency providing node, the transaction service parameter to obtain a third signature result; and
sending, by the currency providing node, the third signature result to the payment client;
correspondingly, the blinding result is a result obtained by the payment client performing blinding processing according to the third signature result and the signature data.
In a possible design, before the completing, by the currency providing node, the transaction after the signature data and the second signature result are verified successfully, further including:
determining, by the currency providing node, that the signature data received from the payee client is not in a signature data list; and
verifying, by the currency providing node, the second signature result and the signature data according to a preset model to obtain a successful verification result.
In a possible design, the verifying, by the currency providing node, the second signature result and the signature data according to the preset model to obtain the successful verification result includes:
using, by the currency providing node, the second signature result and the signature data as inputs of the preset model; and
determining, by the currency providing node, whether the preset model satisfies an equation relationship, and if yes, determining that a verification is passed.
In a possible design, before the receiving, by the currency providing node, the first signature request sent by the payment client, further including:
receiving, by the currency providing node, a digital asset sent by the payment client; and
the completing, by the currency providing node, the transaction after the signature data and the second signature result are verified successfully includes:
paying, by the currency providing node, the digital asset to the payee client.
According to a second aspect, an embodiment of the present application provides a transaction method based on blind signature, including:
performing, by a payment client, blinding processing according to a transaction service parameter and signature data to obtain a blinding result;
sending, by the payment client, a first signature request to a currency providing node, where the first signature request carries the blinding result;
receiving, by the payment client, a first signature result sent by the currency providing node, where the first signature result is a result obtained by the currency providing node signing the blinding result; and
de-blinding, by the payment client, the first signature result to obtain a second signature result, and sending the second signature result and the signature data to a payee client.
In a possible design, before the performing, by the payment client, the blinding processing according to the transaction service parameter and the signature data to obtain the blinding result, further including:
sending, by the payment client, a second signature request to the currency providing node, where the second signature request carries the transaction service parameter;
receiving, by the payment client, a third signature result sent by the currency providing node, where the third signature result is a result obtained by the currency providing node signing the transaction service parameter; and
the performing, by the payment client, the blinding processing according to the transaction service parameter and the signature data to obtain the blinding result includes:
performing, by the payment client, blinding processing according to the third signature result and the signature data to obtain the blinding result.
In a possible design, before the performing, by the payment client, the blinding processing according to the transaction service parameter and the signature data to obtain the blinding result, further including:
sending, by the payment client, a digital asset to the currency providing node.
According to a third aspect, an embodiment of the present application provides a transaction apparatus based on blind signature, including:
a receiving module, configured to receive, by a currency providing node, a first signature request sent by a payment client, where the first signature request carries a blinding result, and the blinding result is a result obtained by the payment client performing blinding processing according to a transaction service parameter and signature data;
a signing module, configured to sign, by the currency providing node, the blinding result to obtain a first signature result, and send the first signature result to the payment client; and
a transacting module, configured to receive, by the currency providing node, signature data and a second signature result sent by a payee client, and complete a transaction after the signature data and the second signature result are verified successfully, where the signature data and the second signature result are sent by the payment client to the payee client, and the second signature result is a result obtained by de-blinding the first signature result.
In a possible design, the receiving module is further configured to:
receive, by the currency providing node, a second signature request sent by the payment client, where the second signature request carries the transaction service parameter;
sign, by the currency providing node, the transaction service parameter to obtain a third signature result; and
send, by the currency providing node, the third signature result to the payment client;
correspondingly, the blinding result is a result obtained by the payment client performing blinding processing according to the third signature result and the signature data.
In a possible design, the receiving module is further configured to:
determine, by the currency providing node, that the signature data received from the payee client is not in a signature data list; and
verify, by the currency providing node, the second signature result and the signature data according to a preset model to obtain a successful verification result.
In a possible design, the transacting module is specifically configured to:
use, by the currency providing node, the second signature result and the signature data as inputs of the preset model; and
determine, by the currency providing node, whether the preset model satisfies an equation relationship, and if yes, determine that a verification is passed.
In a possible design, the receiving module is further configured to:
receive, by the currency providing node, a digital asset sent by the payment client; and
the transacting module is further configured to:
pay, by the currency providing node, the digital asset to the payee client.
According to a fourth aspect, an embodiment of the present application provides a transaction apparatus based on blind signature, including:
a blinding module, configured to perform, by a payment client, blinding processing according to a transaction service parameter and signature data to obtain a blinding result;
a sending module, configured to send, by the payment client, a first signature request to a currency providing node, where the first signature request carries the blinding result;
a receiving module, configured to receive, by the payment client, the first signature result sent by the currency providing node, where the first signature result is a result obtained by the currency providing node signing the blinding result; and
a de-blinding module, configured to de-blind, by the payment client, the first signature result to obtain a second signature result, and send the second signature result and the signature data to a payee client.
In a possible design, the sending module is further configured to:
send, by the payment client, a second signature request to the currency providing node, where the second signature request carries the transaction service parameter;
receive, by the payment client, a third signature result sent by the currency providing node, where the third signature result is a result obtained by the currency providing node signing the transaction service parameter; and
the blinding module is specifically configured to:
perform, by the payment client, blinding processing according to the third signature result and the signature data to obtain the blinding result.
In a possible design, the sending module is specifically configured to:
send, by the payment client, a digital asset to the currency providing node.
According to a fifth aspect, an embodiment of the present application provides a transaction device based on blind signature, including:
a memory, configured to store a program; and
a processor, configured to execute the program stored in the memory, and when the program is executed, the processor is configured to execute the method according to the first aspect or various possible designs of the first aspect.
According to a sixth aspect, an embodiment of the present application provides a transaction device based on blind signature, including:
a memory, configured to store a program; and
a processor, configured to execute the program stored in the memory, and when the program is executed, the processor is configured to execute the method according to the second aspect or various possible designs of the second aspect.
According to a seventh aspect, an embodiment of the present application provides a computer readable storage medium, including instructions, which when run on a computer, enable the computer to execute the method according to the first aspect or various possible designs of the first aspect.
According to an eighth aspect, an embodiment of the present application provides a computer readable storage medium, including instructions, which when run on a computer, enable the computer to execute the method according to the second aspect or various possible designs of the second aspect.
Embodiments of the present application provide a transaction method and apparatus based on blind signature, where the method includes: the payment client performs blinding processing according to the transaction service parameter and the signature data to obtain the blinding result. The payment client sends the first signature request to the currency providing node, where the first signature request carries the blinding result. The currency providing node receives the first signature request sent by the payment client, and signs the blinding result to obtain the first signature result. The currency providing node sends the first signature result to the payment client. The payment client receives the first signature result sent by the currency providing node. The payment client de-blinds the first signature result to obtain the second signature result, and sends the second signature result and the signature data to the payee client. The payee client sends the second signature result and the signature data to the currency providing node. The currency providing node receives the signature data and the second signature result sent by the payee client, and completes the transaction after the signature data and the second signature result are verified successfully, where the signature data and the second signature result are sent by the payment client to the payee client, and the second signature result is a result obtained by de-blinding the first signature result. The signature data is performed blinding processing by the payment client, and the currency providing node signs the blinding result, thereby realizing protection of the signature data, and the currency providing node cannot associate a signature with the payment client, thereby realizing protection of the information of the payment client, avoiding a security problem caused by the eavesdropper acquiring private information of both transaction parties, thereby improving security of the transaction.
Firstly, the concept of a blockchain involved in the present application is explained.
Blind signature is a method for signing a message. A message sender is allowed to perform blinding processing on an original message first, then a signer signs a blinded message, at last, the message sender performs de-blinding processing according to a de-blinding factor to obtain a signature of the signer with respect to the original message, where the de-blinding factor is a factor designed for the blinding processing, and can eliminate effects of the blinding processing. The blind signature is a special digital signature technology adopted by the message sender without allowing the signer to obtain specific contents of a signed message. The blind signature will be described in detail below with reference to
Further, the message sender 101 sends the blinded message to the signer 102. The signer 102 signs the received blinded message. Specifically, the signature refers to a segment of numerical strings that can only be generated by the signer and cannot be forged. The segment of numerical strings provides a valid attestation of authenticity of the message signed by the signer. Specific signing manners are not limited particularly in the embodiments of the present application. During a signing process of the signer 102, because a signed content is a blinded message, thus, the signed specific contents cannot be obtained, thereby ensuring confidentiality of the signing process.
Specifically, after the signer 102 obtains the signature of the blinded message after the signing is completed, and further sends the signature to the message sender 101. The message sender 101 is further provided with a de-blinding factor which corresponds to the blinding factor, the de-blinding factor may be, for example, a decryption value of the password specific to the message sender 101, and may also be, for example, a reverse process parameter of the series of computing parameters specific to the message sender. The de-blinding processing is not limited particularly in the embodiments of the present application. Any processing that eliminates effects of the blinding processing all belongs to the protection scope of the embodiments of the present application.
In this embodiment, after de-blinding the signature of the blinded message, the signature of the original message is obtained, where the signed content of the original message is executed by the signer 102. However, during the signing process, the signer 102 cannot obtain the specific contents of the original message, and because the content signed by the signer 102 is the blinded message, thus, the signer 102 cannot associate the signed content with the message sender 101. Therefore, the blind signature guarantees protection of the original message content, meanwhile, realizes protection of identity of the message sender 101.
Regarding the blind signature, an illustrative visual description is given here: the blind signature is a person who needs to sign places a document to be signed and a copy paper into a sealed envelope (blinding processing) first, when the document is in the envelope, no one except the sealed person can open the envelope. The signer signs on the envelope, and the content of the signature is signed on the document through the copy paper. The person who needs to sign opens the envelope (de-blinding processing), and takes out the signed document, i.e. a blind signature process.
The blind signature should have the following properties:
unforgeability, in addition to the signer, any third party cannot generate a valid blind signature in the name of the signer;
non-repudiation, once the signer signs a certain message, the signer cannot deny his own signature of the message;
blindness, although the signer signs the certain message, the signer cannot obtain the specific contents of the message; and
untraceability, after the signature of the original message is published, the signer cannot be sure when he has signed the message.
An embodiment of the present application proposes a transaction method based on blind signature, and the transaction method based on blind signature provided by the embodiment of the present application is described in detail below with reference to specific embodiments. First, the description is made with reference to
Specifically, when a transaction is performed, both transaction parties exist, namely a payer and a payee respectively, where the payment client 201 is a client used by the payer in the transaction, the payee client 202 is a client used by the payee in the transaction. The payment client 201 and the payee client 202 may be, for example, nodes in the blockchain, and specific implementation manners of the payment client 201 and the payee client 202 are not limited in the embodiments of the present application.
The blockchain is a special distributed database, any data can be written into the blockchain, and data can also be read from the blockchain, where any user can join the blockchain by using his own terminal device, and becomes a node therein, and the blockchain has characteristics of decentralization, trustlessness, and in which data cannot be tampered. When a user joins the blockchain through the payment client 201 or the payee client 202, the user becomes a node in the blockchain.
Further, during a transaction process, the payment client 201 may upload, for example, a digital asset to be transacted to the blockchain, and may perform, for example, blinding processing on transaction related data, which are not limited particularly in the embodiments of the present application. The payee client 202 may be configured to, for example, verify the transaction related data, and receive the digital asset to be transacted. Specific functions of the payee client 202 are not limited in the embodiments of the present application.
In this embodiment, the currency providing node 203 is further provided, where the currency providing node 203 is a node in the blockchain. The currency providing node 203 serves as an intermediate node for a transaction between the payment client 201 and the payee client 202, for example, it may be configured to store the digital asset to be transacted from the payment client 201, and it may also be configured to, for example, sign the transaction related data, etc. Specific implementation manners of the currency providing node 203 are not limited particularly in the embodiments of the present application.
Specifically, when a transaction needs to be performed, the payment client 201 sends the digital asset to be transacted to the currency providing node. Further, the payment client 201 sends the transaction related data to the currency providing node 203 for blind signature. The payment client 201 sends a signature result and the transaction related data to the payee client. The payee client and the currency providing node perform the verification according to the signature result and the transaction related data. Thus, it is determined whether the transaction is correct and valid, and when the verification is passed, the currency providing node 203 sends the digital asset to be transacted to the payee client 202 to complete the transaction.
Based on a problem of security risks existing in the prior art caused by exposing private information of the payment client 201 and the payee client 202 during the transaction process, the embodiments of the present application provide a transaction method based on blind signature, which is further described in detail below with reference to
S301: a payment client performs blinding processing according to a transaction service parameter and signature data to obtain a blinding result.
The transaction service parameter is configured to indicate transaction related data in a transaction process between the payment client and the payee client, for example, the transaction service parameter may include a transaction time, and may also include, for example, address information of both transaction parties, and may also be configured to, for example, specify an algorithm in a signature process. The transaction service parameter is not limited particularly in the embodiments of the present application. Any parameter for indicating the transaction process all belongs to the transaction service parameter. A person skilled in the art may understand that, the transaction service parameter may be set as required.
Further, the signature data is original data that needs to be signed, where the signature data may be, for example, a random number generated by the payment client for identifying a transaction, and may also be, for example, data generated by the payment client according to a preset rule, and the signature data is not limited particularly in the embodiments of the present application.
In this embodiment, the payment client performs blinding processing according to the transaction service parameter and the signature data. Specifically, the blinding processing may be, for example, the payment client performs a computation on the transaction service parameter and the signature data according to a blinding factor, and may also be, for example, the payment client performs a computation on the signature data according to processing result of the transaction service parameter by the currency providing node and the blinding factor. The specific implementation manners of the blinding processing are not limited in the embodiments of the present application.
The blinding factor has been introduced in the foregoing embodiment, and will not be repeated herein. During a process of performing the blinding processing, a specific computation, for example, may be performed according to a hash function, and may also be performed, for example, according to a preset formula, where a preset computation may include, for example, a combination of computing methods such as an addition, a subtraction and a multiplication. The specific implementation manners of the computation during the blinding processing are not limited in the embodiments of the present application. A person skilled in the art would understand that, the specific computation manners of the blinding processing can be set as required.
Further, after the blinding processing, a blinding result is obtained, where the blinding result corresponds to the signature data, and in addition to the payment client, any node in the blockchain cannot acquire the signature data corresponding to the blinding result.
S302: the payment client sends a first signature request to a currency providing node, where the first signature request carries the blinding result.
Specifically, the payment client sends the first signature request carrying the blinding result to the currency providing node, where the first signature request is configured to initiate a request for processing the blinding result to the currency providing node, optionally, the first signature request may further carry, for example, a signature algorithm specified by the payment client, and the specific implementation manners of the first signature request are not limited in the embodiments of the present application.
S303: the currency providing node receives the first signature request sent by the payment client, where the first signature request carries the blinding result, and the blinding result is a result obtained by the payment client performing blinding processing according to the transaction service parameter and the signature data.
S304: the currency providing node signs the blinding result to obtain a first signature result.
Further, the currency providing node receives the first signature request sent by the payment client, and signs the blinding result according to the first signature request. A specific implementation manner of the signature may be, for example, a hash signature, and may also be, for example, an asymmetric encryption signature. The specific implementation manner of the signature in the embodiment of the present application is not limited particularly. A person skilled in the art may understand that specific algorithms of the signature may be selected as required.
The blinding result is a result obtained by the payment client performing blinding processing according to the transaction service parameter and the signature data, therefore, the first signature result obtained by signing the blinding result is actually a signature for the transaction service parameter and the signature data. In a signing process, the currency providing node cannot obtain specific signature data, thereby ensuring security of the signature data.
S305: the currency providing node sends the first signature result to the payment client.
S306: the payment client receives the first signature result sent by the currency providing node, where the first signature result is a result obtained by the currency providing node signing the blinding result.
S307: the payment client de-blinds the first signature result to obtain a second signature result.
In this embodiment, the payment client receives the first signature result sent by the currency providing node, and de-blinds the first signature result, where de-blinding is a reverse process for the blinding processing, and can eliminate effects of the blinding processing. Specifically, the payment client processes the first signature result according to a de-blinding factor to obtain the second signature result. The de-blinding factor has been introduced in the foregoing embodiment, and will not be repeated herein. Specific implementation manners of the de-blinding are not limited in the embodiment of the present application.
Specifically, the blinding factor corresponds to the de-blinding factor, and only the payment client can acquire the blinding factor and the de-blinding factor, therefore, it can be ensured that the currency providing node cannot obtain the signature data in the signature process. Further, the first signature result is a result obtained by signing the blinding result by the currency providing node. After the payment client de-blinds the first signature result, the obtained second signature result eliminates a blinding effect. Therefore, the second signature result is a result obtained by the currency providing node performing signing directly according to the transaction service parameter and the signature data.
By performing the blind signature, it is possible to realize effectively that the currency providing node signs the transaction service parameter and the signature data, and the signature data cannot be acquired during the signature process, and the second signature result cannot be associated with the payment client.
S308: the payment client sends the second signature result and the signature data to a payee client.
S309: the payee client sends the second signature result and the signature data to the currency providing node.
Further, the payment client sends the second signature result and the signature data to the payee client, and the payee client further sends the second signature result and the signature data to the currency providing node, so as to verify whether the signature data and the second signature result are correct and valid.
Optionally, the payee client may further perform a verification according to the second signature result and the signature data. Specifically, the payee client may decrypt the second signature data according to, for example, a public key of the payment client, and determine whether a decryption result is consistent with the signature data, so as to determine whether a current transaction is valid, and further determine whether the current transaction is to be performed according to a verification result of the currency providing node.
S310: the currency providing node receives the signature data and the second signature result sent by the payee client, and completes a transaction after the signature data and the second signature result are verified successfully, where the signature data and the second signature result are sent by the payment client to the payee client, and the second signature result is a result obtained by de-blinding the first signature result.
In this embodiment, the currency providing node verifies the transaction according to the signature data and the second signature result sent by the payee client, where a specific manner of the verification may be, for example, performing reverse process computation on the second signature result according to a signature algorithm, and determining whether the obtained computing result is consistent with the signature data; and a verification manner may also be, for example, determining the signature data and the second signature result according to a preset model, and determining whether it complies with the preset model, where the preset model is a model obtained according to a signature. The specific implementation manner of the verification is not limited particularly in the embodiment of the present application.
Specifically, the second signature result is a result obtained by de-blinding the first signature result, and the first signature result is obtained by the currency providing node performing signing. Therefore, the second signature result is actually obtained by the currency providing node signing the signature data. Therefore, the currency providing node can realize the verification according to the signature data and the second signature result. When the verification is passed, the payment client realizes a payment, and the transaction is completed.
The transaction method based on blind signature according to the embodiment of the present application includes: the payment client performs blinding processing according to the transaction service parameter and the signature data to obtain the blinding result. The payment client sends the first signature request to the currency providing node, where the first signature request carries the blinding result. The currency providing node receives the first signature request sent by the payment client, and signs the blinding result to obtain the first signature result. The currency providing node sends the first signature result to the payment client. The payment client receives the first signature result sent by the currency providing node. The payment client de-blinds the first signature result to obtain the second signature result, and sends the second signature result and the signature data to the payee client. The payee client sends the second signature result and the signature data to the currency providing node. The currency providing node receives the signature data and the second signature result sent by the payee client, and completes the transaction after the signature data and the second signature result are verified successfully, where the signature data and the second signature result are sent by the payment client to the payee client, and the second signature result is a result obtained by de-blinding the first signature result. Blinding processing is performed on the signature data by the payment client, and the currency providing node signs the blinding result, thereby realizing protection of the signature data, and the currency providing node cannot associate the signature with the payment client, thereby realizing protection of information of the payment client, avoiding a security problem caused by an eavesdropper acquiring private information of both transaction parties, thereby improving security of the transaction.
On the basis of the foregoing embodiment, the transaction method based on blind signature provided in the embodiments of the present application will be described in further detail below with reference to
S401: the payment client sends a digital asset to the currency providing node.
Specifically, in the transaction process, a payer needs to pay a certain amount of digital assets to a payee to complete the transaction. In this embodiment, the payment client sends the digital assets to the currency providing node, and the currency providing node serves as an intermediate node of the transaction, similar to the existence of a bank. In the embodiment of the present application, the currency providing node is also a node in the blockchain.
S402: the currency providing node receives the digital asset sent by the payment client.
In this embodiment, the currency providing node stores the digital asset of the payment client.
Optionally, the currency providing node further needs to generate a public key and a private key, where the private key is generated randomly, and only the currency providing node knows its own private key, where the public key is generated according to the private key. The remaining nodes in the blockchain can obtain the public key of the currency providing node, and data is encrypted by using the public key of the currency providing node, and then encrypted data is sent to the currency providing node.
Further, the currency providing node can realize decryption of the data by using the private key, data interaction between nodes is realized by using the public key and the private key, and the data is prevented from being acquired by other nodes. In the embodiment of the present application, a public key and a private key are adopted to realize signing of the transaction service parameter and the signature data.
S403: the payment client sends a second signature request to the currency providing node, where the second signature request carries the transaction service parameter.
In this embodiment, the payment client sends the second signature request carrying the transaction service parameter to the currency providing node, where the transaction service parameter has been introduced in the foregoing embodiment, and will not be repeated herein. Further, the second signature request is configured to instruct the currency providing node to perform signature processing on the transaction service parameter, the second signature request may further carry, for example, a specified signature algorithm or an additional condition of the payment client. The specific implementation manner of the second signature request in the embodiment of the present application is not limited particularly.
S404: the currency providing node receives the second signature request sent by the payment client, where the second signature request carries the transaction service parameter.
S405: the currency providing node signs the transaction service parameter to obtain a third signature result.
Further, the currency providing node signs the transaction service parameter according to the second signature request sent by the payment client, where a specific signing manner may be, for example, signing according to an algorithm specified in the transaction service parameter, and may also be, for example, signing according to a preset algorithm, and a specific implementation manner of the signature is not particularly limited in the embodiment of the present application.
Signing processing is performed on the transaction service parameter by the currency providing node, and this transaction can be identified effectively, so as to verify validity of the transaction subsequently.
S406: the currency providing node sends the third signature result to the payment client.
S407: the payment client receives the third signature result sent by the currency providing node, where the third signature result is a result obtained by the currency providing node signing the transaction service parameter.
S408: the payment client performs blinding processing according to the third signature result and the signature data to obtain the blinding result.
In this embodiment, the payment client receives the third signature result sent by the currency providing node. Further, the blinding processing is performed according to the third signature result and the signature data to obtain the blinding result. The blinding processing refers to processing the signature data according to a blinding factor. The blinding factor may be, for example, a random number, and may also be, for example, data generated according to a preset algorithm. The embodiment of the present application is not limited thereto, and the blinding factor is a first random number and a second random number that are generated randomly, which is taken as an example below for introduction.
When the blinding processing is performed, for example, a final commitment value may be generated according to the third signature result, the first random number and the second random number, where the final commitment value is configured to indicate generation of the blinding result. Further, for example, a hash computation may be performed according to the signature data and the final commitment value to obtain a challenge value, and a computation on the signature data is added when the challenge value is computed, where the challenge value is also configured to indicate the generation of the blinding result. In the embodiment of the present application, the signature data is a generated random number to identify a transaction.
Secondly, the blinding result is obtained according to the challenge value and the second random number. A specific implementation manner of obtaining the final commitment value, the challenge value and the blinding result may be, for example, a combination of various basic computations, it may also be, for example, a combination of a plurality of algorithms, and the embodiment of the present application do not limit the computation manner thereof particularly. A person skilled in the art would understand that a specific implementation manner for computing the final commitment value, the challenge value and the blinding result can be set as required, as long as the signature data can be blinded.
Correspondingly, in the embodiment of the present application, the blinding result is a result obtained by the payment client performing blinding processing according to the third signature result and the signature data.
S409: the payment client sends the first signature request to the currency providing node, where the first signature request carries the blinding result.
Specifically, the implementation manner of S409 is similar to that of S302, which is not described herein again.
S410: the currency providing node receives the first signature request sent by the payment client, where the first signature request carries the blinding result, and the blinding result is a result obtained by the payment client performing blinding processing according to the transaction service parameter and the signature data.
S411: the currency providing node signs the blinding result to obtain the first signature result.
Specifically, the implementation manners of S410 and S411 are similar to those of S303 and S304, which are not described herein again.
S412: the currency providing node sends the first signature result to the payment client.
S413: the payment client receives the first signature result sent by the currency providing node, where the first signature result is a result obtained by the currency providing node signing the blinding result.
S414: the payment client de-blinds the first signature result to obtain the second signature result.
Specifically, the implementation manners of S412, S413, and S414 are similar to those of S305, S306, and S307, which are not described herein again.
S415: the payment client sends the second signature result and the signature data to the payee client.
S416: the payee client sends the second signature result and the signature data to the currency providing node.
Specifically, the implementation manners of S415 and S416 are similar to those of S308 and S309, which are not described herein again.
S417: the currency providing node receives the signature data and the second signature result sent by the payee client, and determines that the signature data received from the payee client is not in a signature data list.
In the embodiment of the present application, the currency providing node stores the signature data in a verified transaction to obtain the signature data list. Further, in the embodiment, the signature data is a random number generated by the payment client, and the random number may be, for example, 256 bits, and may identify one transaction uniquely, which is merely illustrative and is not limited particularly herein.
Further, the currency providing node performs a search according to the signature data sent by the payee client and the signature data list, and determines whether the signature data sent by the payee client exits in the signature data list; if yes, it is considered that a transaction corresponding to the signature data sent by the payee client is completed, that is, the payment client has paid the digital asset in the transaction. Thus, a double-spending problem is avoided effectively, that is, a problem that the payment client attempts to complete two transactions with one digital asset is avoided.
Optionally, if it is determined that the signature data received from the payee client is not in the signature data list, it can be determined that a transaction corresponding to current signature data has not occurred, that is, the current transaction is valid, so as to perform subsequent signature verification.
S418: the currency providing node uses the second signature result and the signature data as inputs of a preset model.
S419: the currency providing node determines that the verification is passed when determining that the preset model satisfies an equation relationship.
Further, in the embodiment of the present application, the preset model is provided, where the preset model is a model composed of the public key, the second signature result, the signature data, and preset parameters of the currency providing node, and is configured to verify signature correctness of the second signature result and the signature data, where the specific designs of the preset model correspond to the foregoing processing of the signature algorithm. The specific designs of the preset model are not limited particularly in the embodiment of the present application. A person skilled in the art would understand that the design of the preset model can be selected according to actual needs.
Specifically, the preset model is configured to verify whether a current second signature result is obtained by the currency providing node signing the signature data and the transaction service parameter. The second signature result is a result obtained by de-blinding the first signature result, essentially, is a result obtained by the currency providing node signing the signature data directly. Therefore, the currency providing node uses the second signature result and the signature data as the inputs of the preset model. When the signature data and the second signature result are accurate, the equation relationship of the preset model can be satisfied, and if it is determined that the equation relationship are satisfied, then, it is determined that the verification is passed, that is, the currency providing node verifies that the second signature result is obtained by performing, by itself, signing according to the transaction service parameter and the signature data.
S420: the currency providing node pays the digital asset to the payee client.
Further, after the verification is passed, the currency providing node determines that the transaction is true and valid, and pays the digital asset sent by the payer to the payee, thereby completing the transaction.
The transaction method based on blind signature according to the embodiment of the present application includes: the payment client sends the digital asset to the currency providing node. The currency providing node receives the digital asset sent by the payment client. The payment client sends the second signature request to the currency providing node, where the second signature request carries the transaction service parameter. The currency providing node receives the second signature request sent by the payment client, where the second signature request carries the transaction service parameter. The currency providing node signs the transaction service parameter to obtain the third signature result. The currency providing node sends the third signature result to the payment client. The payment client receives the third signature result sent by the currency providing node. The payment client performs the blinding processing according to the third signature result and the signature data to obtain the blinding result. The payment client sends the first signature request to the currency providing node, where the first signature request carries the blinding result. The currency providing node receives the first signature request sent by the payment client. The currency providing node signs the blinding result to obtain the first signature result. The currency providing node sends the first signature result to the payment client. The payment client receives the first signature result sent by the currency providing node. The payment client de-blinds the first signature result to obtain the second signature result. The payment client sends the second signature result and the signature data to the payee client. The payee client sends the second signature result and the signature data to the currency providing node. The currency providing node receives the signature data and the second signature result sent by the payee client, and determines that the signature data received from the payee client is not in the signature data list. The currency providing node uses the second signature result and the signature data as the inputs of the preset model. The currency providing node determines whether the preset model satisfies the equation relationship, and if yes, determines that the verification is passed. The currency providing node pays the digital asset to the payee client. The signature message and the transaction service parameter are processed by the payment client, which guarantees security of transaction data during the transaction, and implements identity protection of the payment client, and verifies the signature data by setting the signature data list by the currency providing node, thereby guaranteeing authenticity and validity of the transaction effectively.
The receiving module 501 is configured to receive, by a currency providing node, a first signature request sent by a payment client, where the first signature request carries a blinding result, and the blinding result is a result obtained by the payment client performing blinding processing according to a transaction service parameter and signature data;
the signing module 502 is configured to sign, by the currency providing node, the blinding result to obtain a first signature result, and send the first signature result to the payment client; and
the transacting module 503 is configured to receive, by the currency providing node, signature data and a second signature result sent by a payee client, and complete a transaction after the signature data and the second signature result are verified successfully, where the signature data and the second signature result are sent by the payment client to the payee client, and the second signature result is a result obtained by de-blinding the first signature result.
Optionally, the receiving module 501 is further configured to:
receive, by the currency providing node, a second signature request sent by the payment client, where the second signature request carries the transaction service parameter;
sign, by the currency providing node, the transaction service parameter to obtain a third signature result; and
send, by the currency providing node, the third signature result to the payment client;
correspondingly, the blinding result is a result obtained by the payment client performing blinding processing according to the third signature result and the signature data.
Optionally, the receiving module 501 is further configured to:
determine, by the currency providing node, that the signature data received from the payee client is not in a signature data list; and
verify, by the currency providing node, the second signature result and the signature data according to a preset model to obtain a successful verification result.
Optionally, the transacting module 503 is specifically configured to:
use, by the currency providing node, the second signature result and the signature data as inputs of the preset model; and
determine, by the currency providing node, whether the preset model satisfies an equation relationship, and if yes, determine that a verification is passed.
Optionally, the receiving module 501 is further configured to:
receive, by the currency providing node, a digital asset sent by the payment client; and
the transacting module 503 is further configured to:
pay, by the currency providing node, the digital asset to the payee client.
The apparatus provided in the embodiments may be configured to execute technical solutions of the foregoing method embodiments, and implementation principles and technical effects thereof are similar, which are not described herein again in this embodiment.
The blinding module 601 is configured to perform, by a payment client, blinding processing according to a transaction service parameter and signature data to obtain a blinding result;
the sending module 602 is configured to send, by the payment client, a first signature request to a currency providing node, where the first signature request carries the blinding result;
the receiving module 603 is configured to receive, by the payment client, the first signature result sent by the currency providing node, where the first signature result is a result obtained by the currency providing node signing the blinding result; and
the de-blinding module 604 is configured to de-blind, by the payment client, the first signature result to obtain a second signature result, and send the second signature result and the signature data to a payee client.
The sending module 602 is further configured to:
send, by the payment client, a second signature request to the currency providing node, where the second signature request carries the transaction service parameter;
receive, by the payment client, a third signature result sent by the currency providing node, where the third signature result is a result obtained by the currency providing node signing the transaction service parameter; and
the blinding module 601 is specifically configured to:
perform, by the payment client, blinding processing according to the third signature result and the signature data to obtain the blinding result.
The sending module 602 is specifically configured to:
send, by the payment client, a digital asset to the currency providing node.
The apparatus provided in the embodiments may be configured to execute technical solutions of the foregoing method embodiments, and implementation principles and technical effects thereof are similar, which are not described herein again in the embodiments.
the memory 702 is configured to store computer execution instructions; and
the processor 701 is configured to execute the computer execution instructions stored in the memory to implement each step executed by the transaction method based on blind signature in the foregoing embodiments. For details, reference may be made to the related description in the foregoing method embodiments.
Optionally, the memory 702 may be independent or integrated with the processor 701.
When the memory 702 is set independently, the transaction device based on blind signature further includes a bus 703 for connecting the memory 702 and the processor 701.
the memory 802 is configured to store computer execution instructions; and
the processor 801 is configured to execute the computer execution instructions stored in the memory to implement each step executed by the transaction method based on blind signature in the foregoing embodiments. For details, reference may be made to the related description in the foregoing method embodiments.
Optionally, the memory 802 may be independent or integrated with the processor 801.
When the memory 802 is set independently, the transaction device based on blind signature further includes a bus 803 for connecting the memory 802 and the processor 801.
An embodiment of the present application further provides a computer readable storage medium, in which computer execution instructions is stored in the computer readable storage medium, and when a processor executes the computer execution instructions, the above transaction method based on blind signature executed by the transaction device based on blind signature is implemented.
In several embodiments provided in the present application, it should be understood that, the disclosed device and method may be implemented in other manners. For example, the device embodiments described above are merely schematic, for example, a division of the modules is merely a logical function division, and there may be another division manner in actual implementation, for example, a plurality of modules may be combined or integrated into another system, or some features may be ignored or not performed. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, apparatuses or modules, and may be electrical, mechanical or in other forms.
The integrated modules implemented in a form of a software function module may be stored in a computer readable storage medium. The software function module is stored in a storage medium, and includes a plurality of instructions for enabling a computer device (which may be a personal computer, a server, or a network device) or a processor to execute partial steps of the method described in each embodiment of the present application.
It should be understood that, the above processor may be a central processing unit (CPU for short), and may also be other general processors, digital signal processors (DSP for short), application specific integrated circuits (ASIC for short), etc. The general processor may be a microprocessor or the processor may also be any conventional processor or the like. The steps of the method disclosed in connection with the present application may be directly embodied as executed by a hardware processor, or executed by a combination of hardware and software modules in the processor.
The memory may include a high-speed random access memory (RAM), and may also include a non-volatile memory (NVM), for example, at least one disk memory, and may also be a U-disk, a mobile hard disk, a read-only memory, a magnetic disk, or an optical disk.
The bus may be an industry standard architecture (ISA) bus, a peripheral component interconnect (PCI) bus, an extended industry standard architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, the bus in the drawings of the present application is not limited to only one bus or one type of bus.
The storage medium may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as a static random access memory (SRAM), an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic memory, a flash memory, a magnetic disk or an optical disk. The storage medium may be any available medium that is accessible to a general or specific computer.
A person of ordinary skill in the art may understand that, all or part of the steps of the foregoing method embodiments may be implemented by a program instruction related hardware. The foregoing program may be stored in a computer readable storage medium. When the program is executed, the steps including the foregoing method embodiments are executed. The storage medium includes any medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.
Finally, it should be noted that, the above embodiments are merely used for describing the technical solutions of the present application, and are not limited thereto. Although the present application is described in detail with reference to the foregoing embodiments, it should be understood by those skilled in the art that, the technical solutions described in the foregoing embodiments can still be modified, or equivalent replacements can be made to some or all of the technical features. These amendments or replacements do not depart from the scope of the technical solutions of the embodiments of the present application.
Number | Date | Country | Kind |
---|---|---|---|
201910223566.3 | Mar 2019 | CN | national |
The present application is a continuation of International Application No. PCT/CN2020/070109, filed on Jan. 2, 2020, which claims priority to Chinese Patent Application No. 201910223566.3, filed with the China National Intellectual Property Administration on Mar. 22, 2019 and titled “TRANSACTION METHOD AND APPARATUS BASED ON BLIND SIGNATURE”. The disclosures of the aforementioned applications are incorporated herein by reference in their entireties.
Number | Date | Country | |
---|---|---|---|
Parent | PCT/CN2020/070109 | Jan 2020 | US |
Child | 17370742 | US |