WO2019132767A1 - Transaction processing method and related equipment - Google Patents

Transaction processing method and related equipment Download PDF

Info

Publication number
WO2019132767A1
WO2019132767A1 PCT/SG2017/050654 SG2017050654W WO2019132767A1 WO 2019132767 A1 WO2019132767 A1 WO 2019132767A1 SG 2017050654 W SG2017050654 W SG 2017050654W WO 2019132767 A1 WO2019132767 A1 WO 2019132767A1
Authority
WO
WIPO (PCT)
Prior art keywords
transaction
account
signature information
verification result
public key
Prior art date
Application number
PCT/SG2017/050654
Other languages
French (fr)
Chinese (zh)
Inventor
阮子瀚
吴双
贺伟
Original Assignee
华为国际有限公司
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 华为国际有限公司 filed Critical 华为国际有限公司
Priority to PCT/SG2017/050654 priority Critical patent/WO2019132767A1/en
Priority to CN201780097441.XA priority patent/CN111433800B/en
Publication of WO2019132767A1 publication Critical patent/WO2019132767A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials

Definitions

  • the present application relates to the field of computer technologies, and in particular, to a transaction processing method and related devices.
  • a blockchain is a distributed database that stores a list of ordered records that include growing blocks, each block including a timestamp and a link to the previous block.
  • the blockchain system including the blockchain consists of several consensus nodes, each of which maintains a complete blockchain data and code. Consensus algorithms can be used to achieve consistency of blockchain data.
  • transaction records are recorded in the blockchain in the form of blocks, and the transaction records cannot be unilaterally modified, thereby ensuring that the data cannot be tampered and unforgeable.
  • all consensus nodes maintain transaction records, and each transaction record includes the signature of the transaction content, the address of the recipient, and/or the transaction amount in the transaction content.
  • the signature of the transaction content is generated by using the sender's private key, so the third party that can obtain the transaction record needs to use the public key to verify, and correspondingly, the sender of the transaction record is identified.
  • the present application provides a transaction processing method and related apparatus capable of protecting the privacy of a sender that initiates a transaction in a blockchain transaction.
  • the present application provides a transaction processing method, in which a terminal may generate first signature information of a transaction content according to a credential of a first account, where the transaction content is that the terminal is based on the first account Initiating, the credential is generated by the transaction processing device that processes the transaction content for the first account; the terminal sends a transaction request message to the transaction processing device, where the transaction request message includes the transaction content And the first signature information; the terminal receives the transaction response message returned by the transaction processing device, where the transaction response message includes transaction result information generated by the transaction processing device according to the transaction content; the terminal according to the transaction response message Transmitting, to the transaction processing device, a transaction record message, the transaction record message is used to instruct the transaction processing device to store the transaction record carried by the transaction record message on a blockchain, wherein the blockchain is the transaction processing device Saving a distributed database of the transaction records, the transaction records including The content of said transaction, the first signature information and the transaction result information.
  • the terminal is a device that is logged in by the first account; the first account is a party that initiates the transaction content, and may be referred to as a payer or a sender.
  • the signature of the transaction content is generated by using the credentials of the first account, to avoid using the long-term private key of the first account to generate the signature in the prior art, and the verification device is also required, for example, the transaction processing device uses the long-term public key to verify the signature.
  • Signature resulting in the disclosure of the identity information of the first account, that is, the application can protect the first account ⁇ 0 2019/132767 ⁇ (: Anonymity of 17802017/050654.
  • the credential of the first account since the credential of the first account is generated by the transaction processing device, the first account cannot issue a repudiation to the transaction record once the terminal posts the transaction record to the blockchain based on the first account, therefore, the application Not only can the privacy of the first account be protected, but also the characteristics of the transaction record on the blockchain can be retained.
  • the generating, by the terminal, the first signature information of the transaction content according to the credential of the first account, the method includes: the terminal inputting the private key of the first account, the credential of the first account, and the transaction content as an input of a zero-knowledge proof algorithm, and calculating the The first signature information of the transaction content, the private key includes a long-term private key or a one-time private key.
  • the transaction response message is returned when the transaction processing device verifies that the first verification result obtained by the transaction request message is a pass; the transaction record is a second verification obtained by the transaction processing device verifying the transaction record message.
  • the result is stored as it passes;
  • the first verification result and the second verification result respectively include a verification result of the first signature information; the verification result of the first signature information is determined by the transaction processing device according to its own public key and The verification parameter in the first signature information is obtained by performing verification calculation.
  • the transaction processing device uses the public key of the transaction and the verification parameter in the first signature information to perform the verification calculation to obtain the verification result of the first signature information.
  • the management device generates the credentials of the first account
  • the transaction processing device uses the public key of the management device and the verification parameter in the first signature information to perform verification verification to obtain the verification result of the first signature information. It can be seen that the implementation can avoid the disclosure of the identity information of the first account caused by the long-term public key corresponding to the long-term private key in the prior art.
  • the verification result of the first signature information is used to indicate whether the first account is an account that can access the transaction processing device, or whether the account is issued by the transaction processing device, or is the first Whether an account has the right to access the transaction processing device; in the second verification result, the verification result of the first signature information is used to indicate whether the first account has the right to use the blockchain, that is, whether The transaction record related to the first account is stored in the blockchain.
  • the function of the verification result of the first signature information may be associated with the operation related to whether the verification is performed, and the application is not limited.
  • the transaction content is initiated by the terminal for the second account based on the first account, that is, the second account may be referred to as a recipient or a payee of the transaction content, or the terminal logging in to the second account is The recipient of the transaction, or the recipient of the transaction amount in the transaction.
  • the terminal may generate a one-time public key of the second account according to the long-term public key of the second account; the terminal generates second signature information of the transaction content according to the one-time public key of the second account and the certificate of the second account;
  • the one-time public key of the second account is the address of the second account; the certificate is generated by using the private key of the certificate issuing device; the transaction request message and the transaction record include the one-time public key and the second signature information of the second account.
  • the first verification result and the second verification result further include a verification result of the second signature information
  • the verification result of the second signature information is issued according to the one-time public key of the second account, the certificate is issued
  • the public key of the device and the verification parameter in the second signature information are obtained by verifying the calculation.
  • the verification result of the second signature information is used to indicate whether the second account is an account that can access the transaction processing device, or whether the account is issued by the transaction processing device, or Whether the second account has the right to access the transaction processing device; in the second verification result, the verification result of the second signature information is used to indicate whether the second account has the permission to use the blockchain, that is, whether can ⁇ 0 2019/132767 ⁇ (:17802017/050654 is enough to store the transaction record related to the second account on the blockchain.
  • the effect of the verification result of the second signature information may be related to whether the verification is passed or not. The operation is associated with, and the application is not limited.
  • the receiving address of the transaction content is a one-time public key
  • the third party cannot identify the public key corresponding to the second account (ie, the receiving party) of the transaction content according to the receiving address
  • the third party such as the transaction processing device, may perform verification calculation using the one-time public key, the public key of the certificate issuing device, and the verification parameter in the second signature information, and obtain the verification result of the second signature information, and further, according to the verification result
  • the verification result of the second signature information is related to the related rights of the second account, and the hash value of the long-term public key of the second account in the prior art can be avoided as the privacy leakage caused by the address.
  • the terminal may obtain the ciphertext of each input amount and the ciphertext of each output amount; the terminal calculates the total according to the ciphertext of each input amount and the ciphertext of each output amount. Entering a ciphertext of a difference between the amount of money and the total output amount; the terminal generating third signature information of the transaction content according to the ciphertext of the difference; wherein, the transaction request message and the transaction record further Include the third signature information; the first verification result and the second verification result further include a verification result of the third signature information, where the verification result of the third signature information is determined by the transaction processing device
  • the verification result in the third signature information, the ciphertext of each input amount, and the ciphertext of each output amount are obtained through verification calculation, and the verification result of the third signature information is used to indicate the total input. Whether the amount is equal to the total output amount.
  • the transaction content of the present application does not need to carry the plaintext of each input amount and each output amount, and the verifier, such as the verification parameter in the third signature information by the transaction processing device, the ciphertext of each input amount, and the output.
  • the ciphertext of the amount can verify whether the total input amount is equal to the total output amount, that is, the correctness of the transaction is known. This helps protect the privacy of the transaction amount.
  • the ciphertext of each input amount and the ciphertext of each output amount are obtained by using an additive homomorphic encryption algorithm.
  • the addition homomorphic encryption algorithm refers to adding the encrypted data to obtain an output, and decrypting the output, and the result is the same as the output obtained by processing the unencrypted original data. Therefore, the terminal does not need plaintext, but uses the ciphertext of each input amount and the ciphertext of each output amount to obtain the ciphertext of the total input amount and the ciphertext of the total output amount, and also obtain the total input amount and total output.
  • the ciphertext of the difference between the amounts are not need plaintext, but uses the ciphertext of each input amount and the ciphertext of each output amount to obtain the ciphertext of the total input amount and the ciphertext of the total output amount, and also obtain the total input amount and total output.
  • each of the above possible implementations can protect the privacy of the first account (ie, the payer or sender), the second account (the payee or the recipient), or the transaction amount. Therefore, in some other implementation manners, the terminal may set the privacy of any one or more of the payer, the payee, and the transaction amount according to the user's business requirement, and correspondingly, may adopt the above three possible implementation manners. Any one or more of them to achieve privacy protection.
  • the transaction content may include a ciphertext of each input amount and a ciphertext of each output amount; and, in addition, the ciphertext of each input amount and the encryption of the ciphertext of each output amount
  • the key is the public key of the third-party audit account.
  • the third-party audit account can use its own private key to decrypt the ciphertext of each input amount and the ciphertext of each output amount, thereby facilitating the auditor who has the third-party audit account to review the transaction amount in the transaction content.
  • the transaction content has the ciphertext of the transaction amount, not the plaintext, and the ciphertext of the transaction amount is obtained by using the public key encryption of the third-party audit account, therefore, only the third party audit account except the two parties to the transaction The auditor can see the transaction amount, which helps to protect the privacy of the transaction amount and facilitate the audit work of the auditor.
  • the terminal may generate an identifier of each input amount according to the one-time private key of the first account; the transaction request message And the transaction record further includes an identifier of each input amount, and the identifier of each input amount is used to prevent the input amount from being consumed twice. For example, if an identifier with an input amount already exists in the blockchain If the transaction processing device verifies the transaction content and then finds the identifier I with the input amount, it can be determined as secondary consumption, and the verification fails. It can be seen that the implementation can use the identification of each input amount to prevent Enter the secondary consumption of the amount.
  • the terminal may further generate fourth signature information of the transaction content according to the identifier of each input amount, where the transaction request message and the transaction record further include the fourth signature information.
  • the first verification result and the second verification result further include a verification result of the fourth signature information, and the verification result of the fourth signature information is an identifier and a location of the input amount by the transaction processing device.
  • the verification result in the fourth signature information is obtained by the verification calculation, and the verification result of the fourth signature information is used to indicate whether the identifier of each input amount is correct. It can be seen that if the identifier of the input amount is incorrect, the verification result of the fourth signature information is also not passed, and the secondary consumption of the input amount is further avoided.
  • the terminal may encrypt the one-time public key of the first account according to the public key of the third-party audit account, and obtain the ciphertext of the one-time public key; correspondingly, the transaction request message and the transaction record It may also include the ciphertext of the one-time public key.
  • the auditor with the third-party audit account can use the private key to decrypt the ciphertext of the one-time public key, obtain the one-time public key, and obtain the identity information of the first account, which is convenient for the auditor to audit.
  • the first transaction is initiated by the account, the payee is the account I); the second transaction is initiated by the account, and the payee is the account ⁇
  • the auditor obtains the one-time public key of the account according to the implementation
  • the audit The member can also know the first transaction involved in the account 1 according to the one-time public key of the account 1), and the process of generating the one-time public key of the account by decrypting the terminal that logs in the account in the first transaction, and the account can be obtained.
  • the long-term public key also knows the identity information of the account, so that the account can be audited.
  • the terminal of the account can use the public key of the third-party audit account to generate the ciphertext of the long-term public key of the account, and the auditor can obtain the ciphertext of the long-term public key of the account I? The long-term public key of the account, in order to audit the account.
  • the terminal may further generate fifth signature information of the transaction content according to the ciphertext of the one-time public key obtained in the foregoing implementation manner, and correspondingly, the transaction request message and the transaction record further include The fifth signature information, the first verification result and the second verification result further include a verification result of the fifth signature information, and the verification result of the fifth signature information is determined by the transaction processing device according to the The verification result of the fifth signature information is obtained by the verification calculation, and the verification result of the fifth signature information is used to indicate whether the ciphertext of the one-time public key of the first account is correct.
  • the terminal may further encrypt the long-term public key of the second account according to the public key of the third-party audit account, and obtain the ciphertext of the long-term public key of the second account;
  • the ciphertext of the long-term public key is also included in the transaction request message and the transaction record.
  • the auditor with the third-party audit account can use his private key to decrypt the ciphertext of the long-term public key, obtain the long-term public key of the second account, and thereby obtain the identity information of the second account, which is convenient for the auditor. audit.
  • the terminal may further generate sixth signature information of the transaction content according to the ciphertext of the long-term public key of the second account; correspondingly, the transaction request message and the Also in the transaction record ⁇ 0 2019/132767 ⁇ (:17802017/050654 includes the sixth signature information; the first verification result and the second verification result further include a verification result of the sixth signature information, the sixth signature
  • the verification result of the information is obtained by the transaction processing device according to the verification parameter in the sixth signature information, and the verification result of the sixth signature information is used to indicate the long-term public of the second account. Whether the ciphertext of the key is correct.
  • the obtaining, by the terminal, the credential of the first account may include: sending, by the terminal, a credential request message to the transaction processing device, where the credential request message includes the one-time public key of the first account and/or Or the ciphertext of the transaction amount of the first account; the terminal receives the credential response message returned by the transaction processing device, where the credential response message includes the credential of the first account, the first account
  • the credential is generated by the transaction processing device according to the one-time public key of the first account and/or the ciphertext of the transaction amount of the first account.
  • the terminal may apply for the credentials of the second account when applying for the credentials of the first account to the transaction processing device, so that the second account can directly use the transaction amount when using the transaction amount.
  • Credentials to protect their anonymity for example, using the implementation of the first aspect to protect the anonymity of the second account as a payment account.
  • the credential request message may further include a one-time public key of the second account and/or a ciphertext of the transaction amount of the second account; correspondingly, the credential response message may further include the second account.
  • the credential of the second account is generated by the management device according to the one-time public key of the first account and/or the ciphertext of the transaction amount of the first account, the transaction request.
  • the message and the transaction record also include credentials of the second account. Therefore, it is convenient for the second account to protect the anonymity of the transaction amount when using the transaction amount as a payment account.
  • the credentials of the second account may also be applied by the second account itself.
  • the method may include: The terminal that has logged in to the second account may send a credential request message to the management device, where the credential request message includes a one-time public key of the second account and/or a ciphertext of the transaction amount of the second account; and receives the return from the management device.
  • the credential response message includes the credential of the first account, and the credential of the first account is generated by the management device according to the one-time public key of the first account and/or the ciphertext of the transaction amount of the first account.
  • the first signature information, the second signature information, the third signature information, the fourth signature information, the fifth signature information, or the sixth signature information may all be zero signatures of the knowledge certification, that is, It can be said that the above method for generating signature information can adopt a zero-knowledge proof algorithm.
  • the zero-knowledge proof algorithm is that the prover performs a series of mathematical calculations on the useful information to be confidential to obtain a signature, which is a series of verification parameters, and the series of verification parameters does not include useful information to be kept secret; the verifier can Using the series of verification parameters to perform a series of verification calculations, according to the results of the verification calculation can verify the prover's assertion on the useful information, that is, verify that the prover's argument is correct, usually the argument is that the prover can know that it is confidential. An argument for useful information.
  • the first signature information, the second signature information, the third signature information, the fourth signature information, the fifth signature information, or the sixth signature information may use a zero-knowledge proof algorithm to generate a sound field, and correspondingly, a zero-knowledge proof may also be used.
  • the algorithm is used for verification, and the verification result is obtained. Since the verification calculation process only needs to use the signature information and the verification parameter, the leakage of the useful information is avoided, thereby protecting the first account, the second account, the transaction amount, and the like in the foregoing implementation manners. Privacy.
  • the present application further provides a transaction processing method, in which the transaction processing device receives a transaction request message sent by the terminal, in the transaction request message The transaction content and the first signature information, where the transaction content is initiated by the terminal based on the first account, the first signature information is generated by the terminal according to the credentials of the first account; Returning, by the device, a transaction response message to the terminal according to the transaction request message, where the transaction response message includes transaction result information generated by the transaction processing device according to the transaction content; and the transaction processing device receives the terminal according to the Transaction report message sent by the transaction response message; the transaction processing device stores the transaction record carried in the transaction record message on a blockchain, where the blockchain stores the transaction record in the transaction processor a distributed database, the transaction record including the transaction content, the first signature information, and a The transaction result information.
  • the first signature information in the application is generated according to the credentials of the first account.
  • the long-term private key of the first account is used to generate the signature
  • the verification device such as the transaction processing device, is used to verify the long-term public key.
  • the signature causes the identity information of the first account to be leaked, that is, the application can protect the anonymity of the first account.
  • the method further includes: the transaction processing device verifying the transaction request message to obtain a first verification result; When the first verification result is a pass, the transaction processing device runs the transaction content to obtain transaction result information; the method further includes: the transaction processing device verifying the transaction record message to obtain a second verification result; When the second verification result is a pass, the transaction processing device performs the step of storing the transaction record carried by the transaction record message on the blockchain.
  • the verification result of the first signature information is included in the first verification result and the second verification result; the verification result of the first signature information is used by the transaction processing device to use the public key of the transaction
  • the verification parameters in the first signature information are obtained by verification calculation. It can be seen that the transaction processing device can verify the first signature information of the transaction content according to the public key of the transaction, instead of using the public key of the first account to verify the public key, so that the third party cannot know the public key of the first account. It also protects the privacy of the first account.
  • the transaction processing device verifies the first signature information of the transaction content, and the method includes: the transaction processing device performs the verification calculation by using the zero-knowledge proof algorithm according to the verification parameter in the first signature information and the public key of the first signature information, and obtains the verification of the first signature information. result.
  • the transaction content is initiated by the terminal for the second account based on the first account, that is, the first account may be the sender of the transaction content or the account of the payment party, and the second account may be the transaction content.
  • the transaction request message and the transaction record may further include a second signature information and a one-time public key of the second account, where the one-time public key of the second account is a receiving address of the transaction content, or may also be referred to as a transaction content.
  • the first verification result and the second verification result may further include a verification result of the second signature information, where the verification result of the second signature information is a one-time public key of the transaction processing device according to the second account, and the certificate issuing device
  • the public key and the verification parameter in the second signature information are obtained by verifying the calculation.
  • the receiving address of the transaction content is a one-time public key
  • the third party cannot identify the public key corresponding to the second account of the transaction content according to the receiving address.
  • the transaction processing device uses the receiving address to verify the second signature information, and knows whether the second account has the transaction record stored in the blockchain. ⁇ 0 2019/132767 ⁇ (: 17802017/050654 conditions, that is, verify the access qualification of the second account. Compared with the hash value of the long-term public key using the second account in the prior art as the receiving address, This implementation can protect the privacy of the second account.
  • the transaction request message and the transaction record may further include third signature information, a ciphertext of each input amount, and a ciphertext of each output amount, and correspondingly, a first verification result and a second
  • the verification result further includes a verification result of the third signature information, where the verification result of the third signature information is determined by the transaction processing device according to the verification parameter in the third signature information, the ciphertext of each input amount, and The ciphertext of each output amount is obtained through verification calculation, and the verification result of the third signature information is used to indicate whether the total input amount in the transaction record is equal to the total output amount.
  • the transaction content does not need to carry the plain text of each input amount and each output amount, and even the ciphertext of each input amount and the ciphertext of each output amount are not required in the transaction content, and the certifier such as the transaction processing device according to the third signature information It is possible to verify whether the total input amount is equal to the total output amount, that is, to know the correctness of the transaction. This helps protect the privacy of the transaction amount.
  • the transaction content further includes a ciphertext of each input amount and a ciphertext of each output amount, and the ciphertext of each input amount and the ciphertext encryption key of each output amount are third parties.
  • the auditor who has the third-party audit account can use his private key to decrypt the ciphertext of each input amount and the ciphertext of each output amount, and obtain the plaintext of each input amount and the plaintext of each output amount. Since the ciphertext is encrypted by the public key of the third-party audit account, only the private key of the third-party audit account can be decrypted, thereby helping to protect the privacy of the transaction amount and facilitating the audit of the auditor.
  • the transaction request message and the transaction record may further include an identifier of each input amount, the identifier of each input amount, and the identifier of each input amount is used to prevent the input amount from being twice consumption. For example, if the transaction record with the identifier 1" of the input amount already exists in the blockchain, if the transaction processing device verifies the transaction content and then finds the identifier with the input amount, it can be determined that the input amount is secondary consumption. The verification fails. It can be seen that the implementation can use the identification of each input amount to prevent secondary consumption of the input amount.
  • the transaction request message and the transaction record further include fourth signature information
  • the first verification result and the second verification result further include a verification result of the fourth signature information
  • the fourth signature The verification result of the information is obtained by the transaction processing device according to the verification of the identifier of each input amount and the verification parameter in the fourth signature information, and the verification result of the fourth signature information is used to indicate the input amount. Whether the identification is correct; it can be seen that if the identifier of the input amount is incorrect, the verification result of the fourth signature information is also not passed, and the secondary consumption of the input amount is further avoided.
  • the transaction request message and the transaction record may further include a ciphertext of the one-time public key of the first account, where the ciphertext encryption key of the one-time public key of the first account is The public key of the third-party audit account.
  • the auditor with the third-party audit account can use its own private key to decrypt the ciphertext of the one-time public key, obtain the one-time public key, and obtain the identity information of the first account, which is convenient for the auditor to audit.
  • the transaction request message and the transaction record may further include fifth signature information.
  • the first verification result and the second verification result further include a verification result of the fifth signature information, where the fifth The verification result of the signature information is performed by the transaction processing device according to the verification parameter in the fifth signature information. ⁇ 0 2019/132767 ⁇ (:17802017/050654 The verification result obtained by the verification calculation, the verification result of the fifth signature information is used to indicate whether the ciphertext of the one-time public key of the first account is correct.
  • the transaction request message and the transaction record further include a ciphertext of the long-term public key of the second account, where the encryption key of the ciphertext of the long-term public key of the second account
  • the public key for the third party audit account is used.
  • the auditor with the third-party audit account can use his private key to decrypt the ciphertext of the long-term public key, obtain the long-term public key of the second account, and thereby obtain the identity information of the second account, which is convenient for the auditor. audit.
  • the transaction request message and the transaction record further include the sixth signature information; the first verification result and the second verification result further include a verification result of the sixth signature information, the sixth
  • the verification result of the signature information is obtained by the transaction processing device according to the verification parameter in the sixth signature information, and the verification result of the sixth signature information is used to indicate whether the ciphertext of the long-term public key of the second account is correct.
  • the credential of the first account may be generated by the following steps: the transaction processing device receives a credential request message sent by the terminal, where the credential request message includes the one-time public key of the first account and/or Or the ciphertext of the transaction amount of the first account; the transaction processing device generates the credential of the first account according to the credential request message; the transaction processing device sends a credential response message to the terminal, The credential response message carries the credentials of the first account.
  • the terminal may apply for the credentials of the second account at the same time as applying the credentials of the first account, so that the second account can directly use the credentials to protect itself when using the transaction amount.
  • Anonymity That is, the credential request message further includes the one-time public key of the second account and/or the ciphertext of the transaction amount of the second account; the transaction processing device may further request a message according to the credential Generating a credential of the second account, the credential response message further includes the credential of the second account; the transaction request message and the transaction record may further include the credential of the second account.
  • the credentials of the second account may also be applied by the second account itself, for example, to apply for credentials to the management device before the second account wants to use the transaction amount.
  • the first signature information, the second signature information, the third signature information, the fourth signature information, the fifth signature information, or the sixth signature information may all be zero signatures of the knowledge certification, that is,
  • the above signature information can be verified by using a zero-knowledge proof algorithm, and the verification process can be verified only by using the above-mentioned signature information and system parameters, thereby avoiding leakage of key information in the transaction, thereby protecting the first account in each of the above implementation manners, The privacy of the second account number, transaction amount, etc.
  • the application further provides a terminal, where the terminal has the function of implementing the terminal in the foregoing implementation method.
  • This function can be implemented in hardware, for example, including a processor and a transceiver, or it can be implemented by hardware.
  • the hardware or software includes one or more modules corresponding to the functions described above, which may be software and/or hardware.
  • the present application further provides a transaction processing device having a function of implementing the transaction processing device in the above implementation method.
  • This function can be implemented in hardware, for example, including a processor and a transceiver, or can be implemented by hardware in a corresponding software.
  • the hardware or software includes one or more modules corresponding to the functions described above, which may be software and/or hardware.
  • the processor and transceiver can handle multiple of the above ⁇ 0 2019/132767 ⁇ (: 17802017/050654 The message sent by the terminal in the current method, the transaction processing method described in the above implementation method is executed.
  • the application further provides a transaction processing device, where the transaction processing device includes at least one endorsement module, a consensus module, a submission module, and a management module;
  • the at least one endorsement module is configured to receive a transaction request message sent by the terminal, where the transaction request message includes a transaction content and first signature information, where the transaction content is initiated by the terminal based on the first account, a signature information is generated by the terminal according to the credentials of the first account;
  • the at least one endorsement module is further configured to: return, according to the transaction request message, a transaction response message to the terminal, where the transaction response message includes transaction result information generated by the transaction processing device according to the transaction content; a consensus module, configured to receive a transaction record message sent by the terminal according to the at least one transaction response message, and sort the transaction record carried by the transaction record message with the transaction record received from other terminals according to the receiving time, Generating a block including the transaction record, and submitting the block to the submitting module; the submitting module, configured to receive the block, and store the transaction record in the form of the block
  • the management module of the transaction processing device configured to generate the credential of the first account according to the private key of the first account and the one-time public key of the first account and/or the ciphertext of the transaction amount .
  • the present application further provides a transaction processing system, which may include a terminal and a transaction processing device, and the terminal may perform the transaction processing method provided by the above first aspect, or in a possible implementation manner of the first aspect Any one or more of the following: the transaction processing device may perform the transaction processing method provided by the second aspect, or the second aspect may be any one or more of the implementation manners.
  • the present application further provides a computer readable storage medium, where the readable storage medium stores any one of the possible implementation methods of the first aspect, or a possible implementation of the first aspect.
  • program code of a plurality of provided transaction processing methods the program code comprising a transaction processing method provided by the first aspect, or an execution instruction of the transaction processing method provided by any one of the possible implementations of the first aspect .
  • the present application further provides a computer readable storage medium, where the readable storage medium stores any one of the transaction processing methods provided by the second aspect, or a possible implementation of the second aspect.
  • program code of a plurality of provided transaction processing methods the program code comprising a transaction processing method provided by the second aspect, or an execution instruction of the transaction processing method provided by any one of the possible implementations of the second aspect .
  • FIG. 1 is a schematic structural diagram of a transaction processing system
  • FIG. 2 is a schematic flow chart of a transaction processing method based on the blockchain system shown in FIG. 1.
  • FIG. 3 is a schematic structural diagram of a transaction processing system according to an embodiment of the present invention.
  • FIG. 30 is a schematic structural diagram of still another transaction processing system according to an embodiment of the present invention.
  • FIG. 30 is a schematic structural diagram of still another transaction processing system according to an embodiment of the present invention.
  • FIG. 4 is a schematic flowchart of a transaction processing method according to an embodiment of the present invention.
  • FIG. 5 is a schematic flowchart diagram of another transaction processing method according to an embodiment of the present invention.
  • FIG. ⁇ 0 2019/132767 ⁇ (: 17802017/050654
  • FIG. 6 is a schematic flow chart of still another transaction processing method according to an embodiment of the present invention.
  • FIG. 7 is a schematic flowchart diagram of still another transaction processing method according to an embodiment of the present invention.
  • FIG. 8 is a schematic diagram of a user interface according to an embodiment of the present invention.
  • FIG. 9 is a schematic structural diagram of a terminal according to an embodiment of the present disclosure.
  • FIG. 10 is a schematic structural diagram of a transaction processing device according to an embodiment of the present invention.
  • FIG. 11 is a schematic structural diagram of another transaction processing device according to an embodiment of the present invention.
  • FIG. 12 is a schematic structural diagram of a terminal according to an embodiment of the present disclosure.
  • FIG. 13 is a schematic structural diagram of a transaction processing device according to an embodiment of the present invention.
  • the blockchain is a distributed database, which includes a growing number of ordered records lists, which are called blocks, that is, each block includes time according to a preset time period. Sorted transaction records. Each block contains a timestamp that generated the block and a link to the previous block.
  • FIG. 1 is a schematic structural diagram of a transaction processing system.
  • the transaction processing system shown in FIG. 1 includes a terminal, an endorsing peer, and an endorsing peer.
  • the consensus node is the Ordering peer and the submitting node is the Committing peer.
  • the terminal is a terminal that logs in to the payment account, and the terminal may also be called a payer or a sender, and can initiate a transaction;
  • the endorsement node, the consensus node, and the submit node may be located in different servers, or may be located in the same server. It can also be deployed to the cloud platform to perform related functions, so the endorsement node, the consensus node, and the submitting node are collectively referred to as a transaction processing system.
  • the terminal is used to initiate a transaction, and the transaction content, the signature of the transaction content, the address of the payee, and the certificate of the payer and the certificate of the payee are also available.
  • An endorsement node used to verify the transaction request message initiated by the payer, and can simulate running the transaction content, obtain the transaction result, and generate a signature for the transaction result when the verification is passed.
  • the endorsement node can verify the signature of the transaction by the payer, the certificate of the payer and the payee, the address of the payee, and the like.
  • the consensus node may obtain multiple transaction records submitted by multiple terminals, and sort multiple transaction records according to the submitted time to obtain an ordered transaction record list, and the ordered The list of transaction records is called a block.
  • the submitting node is used to verify the signature of the payer and the signature of the endorsement node in each transaction record in the block, and when the verification is passed, each transaction record in the block can be stored in the blockchain. For example, the submitting node verifies whether the transaction record satisfies a preset condition for each transaction record in the block. If the preset condition is met, the verification transaction is passed, and the corresponding transaction record can be stored in the blockchain.
  • the preset condition may be: at least ten signatures of the endorsement nodes and corresponding transaction results in each transaction record, and the transaction results corresponding to the signatures are consistent.
  • the payee can determine whether the payee in the transaction record is himself or not based on its own private key and the address of the payee in the transaction record.
  • FIG. 2 is a schematic flowchart of a transaction processing method provided by the blockchain system shown in FIG. 1.
  • the transaction processing method may include the following steps: ⁇ 0 2019/132767 ?01/802017/050654
  • the terminal generates a signature of the transaction content by using a private key of the payment account, obtains a certificate of the payment account and the payment account, and generates a receiving address of the payment account according to the public key of the payment account;
  • the certificate of the withdrawal account and the payment account is generated by the certificate authority according to the public key of the payment account and the payment account, and is used to verify whether the payment account and the payment account have the qualification to use the blockchain system, that is, whether Access qualification.
  • the receiving account can verify whether the receiving address is itself based on how the public key generates a hash value.
  • the terminal sends a transaction request message to the at least one endorsement node.
  • Each endorsement node in the at least one endorsement node can verify the transaction request message, and when the verification passes, simulate running the transaction content to obtain the transaction result information;
  • Each endorsement node in the at least one endorsement node respectively returns a transaction response message to the terminal.
  • the transaction response message carries corresponding transaction result information.
  • each endorsement node verification transaction request message may include the following steps:
  • the endorsement node verifies the signature of the transaction content, that is, the endorsement node verifies the signature of the transaction content by using the public key of the payment account, and if the verification passes, it indicates that the transaction is initiated by the payment account, thereby ensuring non-repudiation of the payment account.
  • the endorsement node verifies the certificate of the payment account and the payment account, that is, the endorsement node checks whether the certificate of the payment account and the payment account is a certificate authority.
  • the issued certificate if yes, indicates that the payment account and the payment account have the qualification to execute the transaction, that is, the payment account and the payment account have the qualification to enter;
  • the endorsement node verifies the address of the payee, wherein the payee's certificate is the payee's public key, so the hash value of the public key can be obtained to verify whether it is consistent with the payee's address, if they are consistent, Verification passed, otherwise, verification failed.
  • the endorsement node can simulate the running of the transaction and obtain the transaction result information.
  • the transaction result information includes a transaction result and a signature of the transaction result generated by the endorsement node using its own private key.
  • the endorsement node simulates running the transaction content, and the obtained transaction result is that the amount owned by the payer is less than the amount of the transaction, and the amount owned by the payee The amount of this amount is increased.
  • the terminal may send the transaction request message to multiple endorsement nodes simultaneously, and correspondingly, the transaction response message returned by the multiple endorsement nodes may be obtained, and the terminal may obtain multiple signatures and corresponding multiple transactions according to the multiple transaction response messages. result.
  • the terminal receives a transaction response message returned by the at least one endorsement node, and sends a transaction record message to the consensus node.
  • the transaction record message carries a transaction record
  • the transaction record includes a transaction content, a signature of the transaction content, a payment account and a certificate of the payment account, and at least one transaction result information.
  • the consensus node receives the transaction record message, and sorts the transaction record carried by the transaction record message sent by the terminal with the transaction record sent by other terminals according to time, generates a block including the ordered transaction record list, and creates the area. The block is sent to the submitting node;
  • the submitting node receives the block, and verifies each transaction record in the block. When the verification is passed, ⁇ 0 2019/132767 ?01/802017/050654 Store this block on the blockchain.
  • the method for the submitting node to verify each transaction record in the block is the same. Therefore, the transaction record in the transaction record message sent by the terminal is verified by the submitting node as an example.
  • the submitting node verification transaction record mainly includes: the submitting node verifies the signature of the transaction content according to the public key of the payment account; the submitting node verifies the signature of the corresponding transaction result according to the public key of the endorsement node; and submits the node to verify whether the transaction result information in the transaction record is
  • the preset condition is met.
  • the preset condition is that the transaction record requires at least ten signatures of the endorsement node and the corresponding transaction result, and the transaction result corresponding to each signature is consistent.
  • the submitting node can store the transaction record on the blockchain.
  • the transaction record is stored in the blockchain in the form of a block generated by the consensus node, and the timestamp of the block is the time at which the consensus node generates the block, and the link in the block points to the previous block. Is the number determined according to the previous block.
  • the signature of the transaction content is obtained according to the private key of the payment account, and the verification party can verify the signature by using the public key of the payment account, and confirm the transaction when the verification is passed.
  • the content is initiated by the payment account, thereby avoiding the repudiation of the payment account.
  • the authenticator needs to know the public key of the payment account to verify the signature, so as to avoid the payment account from repudiating the transaction content. This also results in any party other than the transaction, any third party that has the public key of the payment account can identify all transactions initiated by the payment account, and thus cannot protect the identity anonymity of the payment account.
  • the receiving address of the transaction content is the hash value of the public key of the receiving account
  • the certifier verifies that the eligibility of the receiving account to access the blockchain system is also determined according to the certificate of the receiving account, resulting in a third party.
  • the transaction content also needs to carry the transaction amount, so that the third party can know the transaction amount between the payment account and the payment account. For example, if the transaction input amount is equal to the transaction output amount, it is avoided that the transaction account has a transaction input amount smaller than the transaction output amount.
  • the third party such as the endorsement node, the consensus node, and the submitting node, need to know the public key of the payment account, the public key of the payment account, and the transaction content, and learn the payment account and the payment account.
  • the public key is equivalent to knowing the identity information of the payer and the payee, which results in the privacy of the payer, the payee and the transaction amount in the transaction.
  • an embodiment of the present invention provides a transaction processing method capable of selecting privacy of a payment party, a payee, and/or a transaction amount according to a service setting.
  • the signature refers to a digital signature, or signature information of digital information, such as signature information or signature of a transaction content; a digital signature is a common physical signature written on paper, using a public key cryptography field.
  • Digital signatures apply the principle of one-way functions used in the field of public key cryptography to generate long-term public keys and long-term private keys.
  • the one-way function refers to a function in which the forward operation is very simple and the reverse operation is very difficult.
  • a set of digital signatures usually defines two complementary operations, one for signature, the other.
  • ⁇ 0 2019/132767 ⁇ (:17802017/050654 is used for verification; for example, the signer can use a private key and digital information to calculate a function to generate a signature of the digital information; in the verification operation, the verifier can use the corresponding public key, The digital information and the signature are calculated to determine if the signature is correct.
  • the first account is an account that initiates transaction content, and may be referred to as a payment account or a payment account;
  • the second account is an account for which the transaction content initiated by the first account is directed, that is, the second account may be
  • the recipient of the transaction content may be referred to as a payment account; correspondingly, the first account may also be referred to as a payment account in other transactions, and the second account may also be referred to as a payment account.
  • the first account is a payment account
  • the second account is a payment account.
  • the terminal that logs in to the first account is the terminal in FIG. 3A to FIG. 3D, and the terminal may be referred to as a payment terminal; the terminal that logs in to the second account may be referred to as a payment terminal, which is not embodied in FIG. 3A to FIG. 3D.
  • the terminal Before executing the transaction processing method, the terminal may select, according to the privacy protection method selected by the user of the first account on the terminal that logs in to the first account, such as selecting to protect the first account, the second account, and the transaction amount in the transaction content.
  • the privacy protection method selected by the user of the first account on the terminal that logs in to the first account, such as selecting to protect the first account, the second account, and the transaction amount in the transaction content.
  • One or more of the privacy, the embodiments described herein are selected to perform the corresponding transaction processing method.
  • FIG. 8 is a schematic diagram of a user interface according to an embodiment of the present invention.
  • the mobile phone is used as an example.
  • the payment account may include multiple users, and the user selects the input mode through the terminal.
  • the payment account to be used in this transaction; the user can also input the payment account of the payee and the amount paid in the user interface through the input mode of the terminal, and select the option that needs privacy protection in the user interface, as shown in the figure. As shown in 8, select the privacy protection of the payment account.
  • the terminal receives the payment account entered for the user interface or the selected payment account, the payment account, the amount, and the selected privacy protection option; the terminal executes the following embodiments according to the selected privacy protection option.
  • the payment process is completed, that is, the transaction process is completed.
  • Embodiment 1 is described in detail below.
  • the embodiment of the present invention proposes a transaction processing method based on the transaction processing system shown in FIG. 3A or FIG. 3B, which can protect the privacy of the payment account.
  • the transaction processing system includes at least one terminal and at least one transaction processing system, and the at least one terminal can separately log in at least one payment account.
  • the payment account is It may also be referred to as a first account, wherein, in the transaction processing method, each terminal processes the transaction initiated by the registered payment account.
  • Each transaction processing system in at least one transaction processing system processes the transactions submitted by the terminal, and each transaction processing system can be maintained by a corresponding organization, for example, in the financial industry's alliance chain scenario, each bank A transaction processing system can be maintained to process transactions submitted by terminals registered by the bank's user account; wherein each transaction processing system includes at least one endorsement node, consensus node, and submission node, at least one endorsement node, consensus node And the submitting node has the same function as the endorsement node, the consensus node, and the commit node in the blockchain system shown in FIG. 1 described above.
  • each transaction processing system may further include a management node Group Manager; in the transaction processing system shown in FIG. 3B, the endorsement node may also perform the function of the management node.
  • the management node can be a node independent of the transaction processing system, or it can be a certificate machine.
  • the certificate issuing nodes are merged into one node, and can also be merged with the endorsement node in the transaction processing system into one node, and the management node is used to generate credentials for the payment account to protect the identity privacy of the payment account.
  • each transaction processing system may be a server that performs functions of each node in the transaction processing system; each transaction processing system may also be multiple servers, for example, each node corresponds to one server.
  • the transaction processing system is collectively referred to as a transaction processing device, and the interaction between the endorsement node, the consensus node, and the submit node in the transaction processing system is similar to that in the prior art.
  • the functions of the nodes are executed by the transaction processing device; correspondingly, since the interaction process of each terminal with the transaction processing device is also the same, as shown in FIG. 3C, the transaction processing system shown in FIG. 3A is abstracted to include one terminal. a transaction processing device and a system for managing the device; correspondingly, as shown in FIG.
  • the transaction processing system shown in FIG. 3B is abstracted into a system including a terminal and a transaction processing device, wherein, in FIG. 3D, the transaction
  • the processing device can also perform the function of managing the device, Account credentials generated to protect the identity of privacy payment account.
  • the collection account is collectively referred to as the second account, and the terminal that logs in to the payment account may also be referred to as a payee or a recipient.
  • the terminal when the terminal generates the signature information of the transaction content, the terminal does not use the private key of the payment account to generate, but uses the credentials of the payment account to generate the signature information of the transaction content.
  • the verifier such as the endorsement node and the submitting node, verify the signature information of the transaction content.
  • the public key of the payment account is no longer used for verification, the public key of the management device that generated the certificate is used for verification, so that the public key of the payment account is known by the verifier or any third party during the entire transaction process. , effectively protect the privacy of the payment account.
  • the embodiment of the present invention refers to the signature information of the transaction content generated by the credentials of the payment account as the first signature information.
  • the terminal may send the content of the payment account that needs privacy protection to the management device, and the management device generates the credentials for the payment account according to the content that needs privacy protection.
  • the management device generates credentials for the payment account based on the one-time public key of the payment account and/or the transaction amount owned.
  • the credential is issued by the management device for the payment account, once the payment account uses the credential to generate the signature of the transaction content, the transaction content cannot be denied. Thus, the non-repudiation of the transaction content can be maintained while protecting the privacy of the payment account.
  • the obtaining the credentials of the payment account by the terminal may include the following steps:
  • the terminal sends a credential request message to the management device, where the credential request message includes the one-time public key of the first account and/or the ciphertext of the transaction amount of the first account;
  • the terminal receives the credential response message returned by the management device, where the credential response message includes the credential of the first account, and the credential of the first account is the management device according to the first account.
  • the one-time public key and/or the ciphertext of the transaction amount of the first account is generated.
  • the terminal only sends the amount C owned by the payment account to the management device, and the otpk Mice is equal to 1 in the credentials generated by the management device for the payment account Alice.
  • the transaction processing method in the embodiment of the present invention is different from the transaction processing method shown in FIG. 2 in that, in the embodiment of the present invention, the terminal generates the first signature information of the transaction content according to the credentials of the payment account.
  • the transaction processing device verifies the transaction request message, the obtained first verification result; and the transaction processing device verifies the transaction record message, and the obtained second verification result, the first verification result and the second verification result both include the first signature information
  • the verification result of the first signature information is obtained by the transaction processing device performing verification calculation according to the public key of the management device and the verification parameter in the first signature information.
  • the verification result of the first signature information is used to indicate whether the first account is an account that can access the transaction processing device, or whether the account is issued by the transaction processing device, or is the first Whether an account has the right to access the transaction processing device; in the second verification result, the verification result of the first signature information is used to indicate whether the first account has the right to use the blockchain, that is, whether The transaction record related to the first account is stored in the blockchain.
  • the function of the verification result of the first signature information may be associated with the operation related to whether the verification is performed, and the application is not limited.
  • the transaction processing method in the embodiment of the present invention may include the following steps:
  • the terminal generates first signature information of the transaction content according to the credential of the first account, where the transaction content is initiated by the terminal based on the first account, and the credential is generated by using the private key of the management device as the first account. of;
  • step S301 is the one-time private key of the terminal according to the first account.
  • the credential generates the first signature information of the transaction content; when the first account is used as the payee to receive the amount to be consumed this time, the address of the hash value of the long-term public key is used, and the first account is used as the payer to consume the amount
  • the terminal generates first signature information of the transaction content according to the long-term private key and the credential of the first account.
  • the terminal sends a transaction request message to the transaction processing device, where the transaction request message includes the first signature information and the transaction content.
  • the transaction processing device returns a transaction response message to the terminal according to the transaction request message, where the transaction response ⁇ 0 2019/132767 ⁇ (:17802017/050654 message includes the transaction result information;
  • the transaction result information may be multiple, and the plurality of transaction result information may be respectively obtained by simulating running transaction content of multiple endorsement nodes in the transaction processing device.
  • the method further includes: the transaction processing device verifying the transaction request message to obtain a first verification result; and when the first verification result is a pass, before the transaction processing device returns a transaction response message to the terminal according to the transaction request message
  • the transaction processing device runs the transaction content to obtain transaction result information.
  • the terminal sends a transaction record message to the transaction processing device according to the transaction response message.
  • the transaction processing device stores the transaction record carried in the transaction record message on the blockchain.
  • the transaction processing device verifies the transaction record message to obtain a second verification result; when the second verification result is passed, the transaction processing device executes 305 to store the transaction record carried by the transaction record message to Steps on the blockchain.
  • the transaction record includes the transaction content, the first signature information, and the transaction result information
  • the first verification result and the second verification result both include a verification result of the first signature information, and the verification result of the first signature information is that the transaction processing device is based on a public key of the management device And obtained by performing verification calculation with the verification parameter in the first signature information.
  • the steps 8301 to 8305 do not mention the second account and the processing steps of the transaction amount, in order to implement the transaction processing method, the person skilled in the art may and the second account and the transaction amount described in the embodiment of the present invention.
  • the related processing steps are combined with the related processing steps of the second account and the transaction amount in FIG. 2 in the prior art, and the qualification of the second account, the correctness of the transaction amount, and the qualification of the first account are verified. For example, if only the anonymity of the first account is protected, and the second account and the transaction amount are processed in the prior art, in addition to the first signature information generated by the terminal, the transaction content also needs to carry the plaintext and output of the input amount.
  • the plain text of the amount is used to enable the transaction processing device to verify the accuracy of the transaction; at the same time, the transaction content also needs to carry the certificate of the usual meaning of the second account (ie, the long-term public key of the second account, which is different from the second account in the second embodiment)
  • a long-term public key generated certificate capable of zero-knowledge proof to enable the transaction processing device to verify the access qualification of the second account, and at the same time, the receiving address of the transaction content, that is, the address of the second account is the long-term public key of the second account.
  • the value of the first verification includes the verification result of the transaction processing device and the verification result of the certificate of the second account.
  • the access qualification of the first account or the access qualification of the second account is obtained according to the verification result of the first signature information or the second signature information, where the admission qualification refers to whether the first account and the second account have Whether to use the permission of the blockchain, whether to access the transaction processing device, or whether to issue an account for the transaction processing device, etc., may be limited according to whether the verification result is passed after the relevant operation. For example, when the verification result of the first signature information is in the first verification result, the verification result of the first signature information is used to indicate whether the first account is able to access the transaction processing device; the verification result of the first signature information is in the second verification result. The verification result of the first signature information is used to indicate whether the first account has the right to use the blockchain.
  • the first signature information is a signature of the knowledge certificate
  • the terminal may generate the first signature information of the transaction content by using a zero-knowledge proof algorithm according to the credentials of the payment account.
  • the verifier is a transaction
  • the processing device may verify the first signature information of the zero knowledge certificate by using the public key p/ C of the management device.
  • the zero-knowledge proof means that the prover performs a series of mathematical calculations on the useful information to be confidential to obtain a signature, which is a series of parameters, and the series of parameters does not include useful information to be kept secret; the verifier can utilize the series The parameters are used to perform a series of mathematical calculations.
  • the prover's assertion on the useful information can be verified, that is, the verifier's argument is correct.
  • the argument is that the prover can know the useful information to be kept secret. thesis.
  • the terminal can be trusted to judge the first signature information: the payment account has the credential issued by the management device and the one-time private key, that is, the payment account has the admission certificate.
  • SoK ⁇ secret value: "relations to proof” ⁇ (Message to sign) ;
  • the secret value is the secret of the prover.
  • the payment account has a one-time private key and the credentials issued by the management device for the payment account; "relations to proof” is the relationship to be proved, for example, to prove
  • the relationship or assertion is: the terminal can know the one-time private key of the payment account and the certificate issued by the management device for the payment account; the part of (Message to sign) is the file to be signed, for example, the transaction content that the file can initiate for the payment account All symbols in the expression that are not part of the prover's secret are public values.
  • the terminal that logs in to the payment account sets the anonymity of the payment account, and does not set the protection of the payment account and the privacy of the transaction amount, then
  • the relevant parameters of the account number and the transaction amount are all public; in addition, other parameters except the prover secret used in the zero-knowledge proof may be public and may be included in the signature, such as the system parameter may be included in the first signature In the information, they are collectively referred to as verification parameters.
  • the payment account is Alice
  • the amount that Alice wants to consume this time is obtained from the address of its one-time public key when Alice is the payee
  • the first signature information of this transaction needs to use Alice's
  • the one-time private key ots/3 ⁇ 4 iic;e the credentials issued by the management device for Alice are (A Ali . e , XAii . e ), where the credential is the one-time public key and the first account of the management device according to the first account
  • the expression of the signature generated by the terminal using the zero-knowledge proof for the transaction content is:
  • the transaction request message and the transaction record message sent by the terminal to the transaction processing device only need to carry the first signature information generated by using the zero-knowledge proof, and the verifier can learn from the first signature information that: the terminal can obtain the payment account.
  • the one-time private key and the credentials issued by the group administrator can verify that the payment account is eligible for admission, and since the credentials are generated by the trusted management device, the payment account can be prevented from refusing the transaction content.
  • the verification is passed, indicating that the first account has the condition to store the transaction record on the blockchain.
  • the function or map 6 is a bilinear pairing map
  • the map X ® ⁇ 7 ⁇ is called a bilinear pairing map if the following conditions are met:
  • the embodiment of the present invention can prevent the certifier or other third party capable of obtaining the signature from using the public key disclosed by the payment account to identify the identity information of the payment account, and can use the zero-knowledge proof to enable the certifier and the third party to know the payment account has access. Eligibility, and knowing that the payment account has the credentials issued by the management device, makes the payment account non-compliance with the corresponding transaction content.
  • Embodiment 2
  • each transaction processing system may further include a certificate issuing node of a certificate authority, and the certificate issuing node is configured to issue a second signature for generating the transaction content for each payment account.
  • the certificate of the information that is, the certificate is different from the ordinary certificate, and the certificate does not need to be verified by using the long-term public key.
  • the one-time public key, the public key of the certificate issuing device, and the signature information are used.
  • the certificate can be verified. Or based on graph In the transaction processing system shown in 3B, the endorsement node can also perform the function of the certificate issuing node, and is also used to issue the above certificate to the user.
  • the transaction processing system shown in FIG. 3C further includes a certificate issuing device; or in the transaction processing system shown in FIG. 3D, the transaction processing device further performs a function of a certificate issuing device capable of issuing a certificate for the receiving account.
  • the certificate is different from the ordinary certificate.
  • the terminal can generate the second signature information of the transaction content, and the second signature information can protect the privacy of the payment account, and at the same time enable the transaction processing device to verify whether the payment account has a location. The conditions under which the transaction record is stored on the blockchain.
  • applying for a certificate to a certificate authority (C A) device (or a transaction processing device, or a certificate issuing node) by the receiving terminal of the login account may include the following steps:
  • the payment terminal sends a certificate application message to the C A device, where the certificate application message carries the long-term public key of the payment account and the certification information with the long-term private key;
  • the CA device verifies that the certificate application message is passed, the certificate of the payment account is generated according to the long-term public key of the payment account, and a certificate response message is returned to the payment terminal, where the certificate response message carries the The certificate of the payment account.
  • the certificate of the payment account can be obtained from the payment terminal, thereby using the certificate to generate the second signature information of the transaction content.
  • the long-term public key Y Bob of the payment account Bob is c
  • the private key of the CA device is c
  • the public key capk is g ⁇
  • the CA device verifies the certificate application message, it can generate a zero-knowledge proof for the Bob.
  • the certificate is (F B . b , w B . b ), where:
  • the one-time public key of the payment account may also be used as the transaction.
  • the public key verifies the address of the payee, and the identity of the payment account is leaked.
  • the one-time public key of the payment account may be generated according to the long-term public key of the payment account, for example, generating a PKeyGen 0 function by using the one-time public key to generate a one-time public key of the payment account.
  • the terminal generates the one-time public key of the payment account, which may include: the terminal generates a PKeyGen 0 function according to the long-term public key of the payment account and the one-time public key, and calculates a one-time public key of the payment account.
  • the terminal can also be based on system parameters
  • the transaction content initiated by the payment account carries the R tx , R te , and is used to calculate the one-time private key of the payment account.
  • the one-time private key may be utilized to protect the anonymity of the payment account.
  • the parameter R tx , R x can be obtained when calculating the one-time public key of the user account, so that when the user account needs to consume the transaction amount of the income, the user account can be utilized.
  • the parameter R tx generates a one-time private key
  • the first signature information as described in the first embodiment is generated by using the one-time private key and the credential generated by the management device to ensure the user account as the transaction content including the transaction amount. ⁇ 0 2019/132767 ?01/802017/050654 Anonymity when paying for an account.
  • the one-time private key of the payment account is generated by the terminal that logs in to the payment account according to the long-term private key of the payment account and the above parameter 1 ⁇ 3 ⁇ 4 .
  • the input of the one-time private key generation 0 function is the long-term private key of the payment account 8 ⁇ 1) and the parameter 1 ⁇ ,
  • the calculated one-time private key .
  • the payment terminal when the payment terminal uses the one-time public key of the payment account as the address of the payee, the payee, that is, the collection terminal that logs in to the payment account, can check the address, that is, check the time.
  • the payment terminal can check the address of the payee in the transaction record by using the one-time public key check 0 function.
  • the receiving terminal that logs in to the payment account will have 1 ⁇ , one-time public key in the transaction content.
  • a one-time public key check As a one-time public key check
  • the payment terminal uses the one-time public key of the payment account as the address of the transaction content, and needs to generate the second signature of the transaction content according to the one-time public key of the payment account and the certificate of the payment account.
  • the information, the verification result of the second signature information is used to indicate whether the payment account has a condition for storing the transaction content on the blockchain, and the condition may be whether the long-term private key of the payment account has a corresponding certificate.
  • the second signature information cannot include the certificate of the payment account, so the embodiment of the invention not only verifies the qualification of the second account, but also protects the anonymity of the account.
  • the transaction processing method is different from the transaction processing method shown in FIG. 4 in that step 301 in FIG. 4 is replaced with step 401. -402, where:
  • the terminal generates a one-time public key of the second account according to the long-term public key of the second account.
  • the terminal generates second signature information of the transaction content according to the one-time public key of the second account and the certificate of the second account.
  • the certificate is generated according to the private key of the certificate issuing device; for example, according to the above steps 21) to 22); correspondingly, the transaction request message and the transaction record further include a one-time public key of the second account and the first The second signature information, the one-time public key of the second account is the address of the second account.
  • first verification result and the second verification result further include a verification result of the second signature information
  • the verification result of the second signature information is based on the one-time public key of the second account And obtaining, by the verification, the public key of the certificate issuing device and the verification parameter in the second signature information.
  • the verification result of the second signature information when the verification result of the second signature information is in the first verification result, it is used to indicate that the second account has the right to access the transaction processing device, that is, the transaction processing device can simulate running the transaction content; the second signature information When the verification result is in the second verification result, it is used to indicate that the second account has the right to use the blockchain.
  • the steps 8401 to 8402 do not mention the first account and the transaction processing steps, in order to implement the transaction processing method, the first account and the transaction amount described by the embodiment of the present invention may be used by those skilled in the art.
  • the related processing steps are combined with the related processing steps of the first account and the transaction amount in FIG. 2 in the prior art, verifying the qualification of the second account, the correctness of the transaction amount, and the qualification of the first account. To complete the transaction process.
  • the transaction content in addition to the second signature information generated by the terminal, the transaction content also needs to carry the plain text of the input amount and the plain text of the output amount. Having the transaction processing device verify the accuracy of the transaction; at the same time, the transaction content also needs to carry the certificate of the usual meaning of the first account (ie, the long-term public key of the first account, which is different from the certificate for zero-knowledge proof in the second embodiment).
  • the first verification result further includes a verification result of the transaction processing device on the transaction amount and a verification result of the certificate of the first account, and the first verification result and the second verification result also include verification of the first signature information result.
  • the second signature information is a signature of the knowledge proof, for example, assuming that the second account is
  • the terminal is based on the one-time public key of the second account. 1 ), certificate
  • the calculation process for generating the second signature information for ⁇ includes:
  • transaction processing equipment can be utilized Device public key
  • the address of the second account that is, the one-time public key of the second account ( ⁇ and the second signature information are verified as follows:
  • the transaction content has the second signature information
  • the first signature of the transaction content is generated by using the long-term private key or the one-time private key of the first account.
  • Information to verify the eligibility of the first account is generated by using the long-term private key of the first account or the one-time private key is used when the first account is used as the payee to receive the amount of the transaction. ⁇ 0 2019/132767 ?01/802017/050654 The address of the secondary public key, or the address of the hash of the long-term public key.
  • the transaction content needs to carry the plaintext of the transaction amount, so that the transaction processing device can use the transaction amount to verify the correctness of the transaction.
  • the terminal that logs in to the first account needs to generate a one-time public key of the second account according to the long-term public key of the second account, and use the one-time public key as a transaction.
  • the parameters of the one-time private key generation function of the second account and the parameters of the one-time public key checking function may also be obtained, and the two parameters are stored in the transaction content, so that the second account is
  • the parameter of the one-time public key check function is used to check whether the address of the transaction content is itself, and if it is itself, when the transaction amount in the transaction content is consumed, the one-time private key may be generated.
  • the parameter of the function and the credential of the second account generate signature information of the transaction content, that is, when the second account is the payment account and consumes the transaction amount, the parameter of the one-time private key generation function may be used to generate the second account.
  • the one-time private key is used to generate the signature information of the transaction content by using the one-time private key and the credential, thereby protecting the anonymity of the second account as the payment account as described in the first embodiment.
  • the embodiment of the present invention provides a transaction processing method, in which the third signature information of the transaction content can be generated, and the verifier, such as the transaction processing device, can The verification result of the third signature information is used to know whether the total transaction input amount is equal to the total transaction output amount, so that the transaction content does not carry the transaction amount, and the transaction amount is correct.
  • the transaction processing method is different from the transaction processing method shown in FIG. 4 in that step 301 in FIG. 4 is replaced with steps 501-403, where:
  • the terminal determines a ciphertext of each input amount and a ciphertext of each output amount;
  • the terminal calculates a ciphertext of a difference between the total input amount and the total output amount according to the ciphertext of each input amount and the ciphertext of each output amount.
  • the terminal generates third signature information of the transaction content according to the ciphertext of the difference.
  • the transaction request message and the transaction record further include the third signature information; the first verification result and the second verification result further include a verification result of the third signature information, where The verification result of the three signature information is used to indicate whether the total input amount is equal to the total output amount.
  • steps 8501 to 8503 do not mention the related processing steps of the first account and the second account, in order to implement the transaction processing method, a person skilled in the art may perform the first account and the transaction according to the embodiment of the present invention.
  • the relevant processing steps of the amount or the prior art in combination with the processing steps of the first account number and the transaction amount in FIG. 2, verify the qualification of the second account, the correctness of the transaction amount, and the qualification of the first account. , to complete the transaction process.
  • the transaction content also needs to carry the certificate of the usual meaning of the first account and the second account to enable the transaction processing device to verify the first account.
  • the second account is eligible for admission, and the terminal further needs to generate the first signature information of the transaction content according to the one-time private key or the long-term private key of the first account, so that the first account does not deny the transaction;
  • the hash value of the long-term public key of the second account is required to be the receiving address. Therefore, the first verification result further includes the verification result of the certificate of the second account of the first account by the transaction processing device, and the first verification result and the second verification result are further Also included is the verification result of the first signature information.
  • the terminal determines the ciphertext of each input amount and the ciphertext of each output amount, and specifically adopts an addition homomorphic encryption algorithm.
  • the addition homomorphic encryption algorithm refers to performing arithmetic processing on the encrypted data to obtain an output, and decrypting the output, and the result is the same as the output obtained by adding the unencrypted original data by addition. Therefore, the terminal directly uses the ciphertext of each input amount and the ciphertext of each output amount to obtain the ciphertext of the total input amount and the ciphertext of the total output amount.
  • the third signature information may also be a zero-knowledge signature, that is, the verifier, such as the transaction processing device, may be based on the verification parameters in the third signature information, the ciphertext of each input amount, and the density of each output amount.
  • the verification calculation of the zero-knowledge proof is carried out, and the correctness of the transaction can be known based on the calculated result. For example, suppose the transaction input amount is input l, input2; the transaction output amount is output 1 and output2 respectively, and the ciphertext of the transaction input amount obtained by the addition homomorphic encryption algorithm HEnc pk 0 is (] ⁇ and ( ⁇ 2 , respectively). The ciphertext of the obtained transaction output amount is C. ⁇ PC. 2 , then
  • the terminal can generate a signature of the zero-knowledge proof that "the C ' is a ciphertext in which the plaintext is 0", and the third signature information can be used.
  • the transaction initiated by the payer has an input amount and an output amount, that is, the payer and the payee are in a one-to-one relationship.
  • the plain text of the transaction input is m in
  • the expression when signing is:
  • Txl is the transaction content to be signed
  • r ' r in - r out
  • g 4 is the system parameter
  • the terminal calculating the signature of the zero knowledge certificate may include the following calculation process:
  • the transaction processing device utilizes the ciphertext of the amount of the ciphertext outputted in the transaction content and the above ⁇ 0 2019/132767 ?01/802017/050654
  • the third signature information is verified as follows:
  • the transaction processing device can know that the transaction amount is correct, thereby ensuring the correctness of the transaction.
  • the third signature information is used to ensure the correctness of the transaction, thereby avoiding the transaction request message and the transaction record carrying the transaction amount, and protecting the privacy of the transaction amount.
  • the transaction processing method described in the present application is described in terms of protecting the payer, that is, the first account, the payee, the second account, or the privacy of the transaction amount.
  • the privacy of the first party account, the second party account, and the transaction amount may be selected, and the specific transaction processing method may be corresponding.
  • the steps and implementations related to the above embodiments 1 to 3 are included.
  • the embodiments of the present invention are not limited.
  • the terminal may be executed in the manner of the first embodiment and/or the second embodiment.
  • Related operations to achieve the transaction amount and the privacy protection of the first account, or to realize the transaction amount and the privacy protection of the second account, or to realize the privacy protection of the transaction amount, the first account and the second account.
  • the terminal only needs to protect the privacy of the transaction amount according to the input of the user interface shown in FIG. 8, the first method of generating the transaction content by using the long-term private key or the one-time private key of the first account in the prior art may be used.
  • the signature information, the hash value of the long-term public key of the second account is used as the address of the second account. That is to say, the privacy protection operation in the transaction processing method according to the embodiment of the present invention can be combined with the transaction processing method in the prior art to realize the privacy protection of the transaction amount, the transaction amount, and the privacy of the first account. Protection, transaction amount and privacy protection of the second account, privacy protection of the first account and the second account, and privacy protection of the first account, the second account, and the transaction amount, all of the above combinations belong to the present application. The scope of protection. Embodiment 4
  • the present application uses the fourth embodiment as an example to explain in detail how to protect the privacy of the first account, the second account, and the transaction amount at the same time.
  • FIG. 7 is a schematic flowchart diagram of still another transaction processing method according to an embodiment of the present invention.
  • a terminal that logs in to the first account is referred to as a payment terminal
  • a terminal that logs in to the second account is called
  • the first account is called a payment account
  • the second account is called a payment account.
  • the transaction processing method shown in FIG. 7 may include the following steps:
  • the terminal sends a credential request message to the management device.
  • the terminal is a terminal that logs in to the first account.
  • the credential request message includes a one-time public key of the first account and/or a ciphertext of the transaction amount of the first account.
  • the one-time public key of the first account is the first account as the payment account, the corresponding payment account is generated according to the long-term public key of the first account.
  • the management device is configured according to the one-time public key of the first account and/or the transaction amount of the first account. ⁇ 0 2019/132767 ?01/802017/050654 text, generate the credentials of the first account;
  • the management device returns a credential response message to the terminal.
  • the credential response message carries the credential of the first account.
  • the terminal generates a one-time public key of the second account according to the long-term public key of the second account, and uses the one-time public key as the receiving address of the transaction content.
  • the terminal may generate a one-time public key of the second account according to the one-time public key generation function in the second embodiment, which is not described in detail herein.
  • the terminal determines a ciphertext of each input amount and a ciphertext of each output amount, and calculates a difference between the total input amount and the total output amount according to the ciphertext of each input amount and the ciphertext of each output amount.
  • the terminal generates signature information of the transaction content according to the one-time private key of the first account, the credential, the certificate of the second account, and the ciphertext of the difference between the total input amount and the total output amount.
  • the signature information of the transaction content includes the first signature information, the second signature information, and the third signature information in Embodiments 1 to 3.
  • the terminal sends a transaction request message to the transaction processing device, where the transaction request message carries signature information of the transaction content, a one-time public key of the second account that is the receiving address, and transaction content.
  • the transaction content may include a parameter of the one-time private key generation function and a parameter of the one-time public key check function obtained when the terminal generates the one-time public key of the second account.
  • the terminal logging in to the second account may check whether the receiving address of the transaction content is itself according to the parameter of the first-time public key checking function and its long-term private key; and when the transaction amount of the transaction is consumed, it may be based on one time
  • the parameter of the private key generation function and the long-term private key are used to generate a one-time private key of the second account, and then the one-time private key is used to generate a signature of the transaction content, thereby protecting the anonymity of the second account as a payment account.
  • the credential of the second account may be, when the terminal that logs in the first account applies for the credential of the first account, and simultaneously requests the credential for the second account; or the transaction that the terminal that logs in the second account consumes the transaction.
  • the amount of the credentials of the second account is not limited in the embodiment of the present invention.
  • FIG. 3 (compared with FIG. 30, based on the transaction processing system shown in FIG. 3, the transaction processing method may have more steps of interacting with the management device to generate credentials of the first account and/or the second account. .
  • the transaction processing device verifies the transaction request message, and obtains a first verification result.
  • the transaction content is simulated and the transaction result information is obtained.
  • the transaction processing device may include at least one endorsement node.
  • each endorsement node verifies that the transaction request message passes, it may simulate running the transaction content, obtain the transaction result, and use the private key of the transaction to sign the transaction result. Therefore, the The transaction result information includes the transaction result of at least one endorsement node and the corresponding signature.
  • the transaction processing device returns a transaction response message to the terminal, where the transaction response message carries the transaction result information.
  • the terminal sends a transaction record message to the transaction processing device.
  • the transaction record carried by the transaction record message includes the transaction content, the signature information of the transaction content, the transaction result of the at least one endorsement node, and the corresponding signature.
  • the transaction processing device receives the transaction record message, and verifies the transaction record, and obtains a second verification result. And when the second verification result is passed, the transaction record is stored on the blockchain.
  • the consensus node in the transaction processing device needs to sort the transaction records received by other consensus nodes according to the receiving time to generate a transaction including the first account.
  • the recorded block submits the transaction record to the submitting node in the form of a block, and the submitting node verifies the transaction record in the block, wherein the operation of submitting the node to verify each transaction record is similar, so the transaction is initiated by the first account.
  • the transaction record is taken as an example.
  • the second verification result includes a verification result of the signature information of the transaction content and a verification result of the signature information of the transaction result, wherein the verification result of the signature information of the transaction content is a public key of the submitting node according to the management device, The one-time public key of the second account, the public key of the CA device, and the verification parameters in the signature information are verified.
  • the second verification result further includes a verification result that the transaction result information meets the preset condition, that is, the submitting node further needs to verify whether the transaction result of the at least one endorsement node and the corresponding signature meet the preset condition, for example, the preset condition is
  • the preset condition is
  • Each transaction record requires at least ten signatures of the endorsement nodes and corresponding transaction results, and the transaction results corresponding to each signature are consistent.
  • the reason why the endorsement node runs the transaction content becomes the simulation, because the transaction results of the multiple endorsement nodes are consistent in the submitting node, and the transaction result is accepted, which can be called the actual transaction result. Therefore, before submitting the node It can be called the transaction result obtained by simulating the running transaction content, and also ensures the accuracy of the transaction content running.
  • the amount of input plaintext m in, ciphertext C in g ⁇ in gl in , wherein, r in the encryption of the random payer Number;
  • the plain text of the output amount is 771.
  • the second account Bob's certificate is The one-time private key of the first account Alice is ots1 ⁇ 2 ice , and the credentials issued by the management device for Alice are
  • the signature information of the transaction content is a signature of the knowledge certificate
  • the zero knowledge certificate proves that "the first account has a one-time private key and the certificate issued by the management device, and the second account has a certificate corresponding to the long-term public key
  • the ciphertext of the difference between the input amount and the output amount is the ciphertext encrypted with plaintext 0.
  • the expression of the signature is:
  • Txl is the transaction content to be signed
  • r r in - r out
  • gi > g 2
  • h system parameters.
  • the terminal calculating the signature of the zero knowledge certificate may include the following calculation process: ⁇ 0 2019/132767 ?01/802017/050654
  • the transaction processing device uses the public key of the management device Device public key
  • the one-time public key of the second account ⁇ 10 ⁇ and the system parameter verification that the signature of the zero-knowledge proof can include the following calculation process:
  • the verification proves that the content proved by the signature of the zero-knowledge proof is correct, that is, the first account has a one-time private key and the certificate issued by the management device, the second account has a certificate corresponding to the long-term public key, and the input amount
  • the ciphertext of the difference between the output amount and the output amount is a ciphertext encrypted with a plaintext of 0; that is, the verification result of the signature indicates that the first account and the second account have the condition for using the blockchain, and the transaction is correct.
  • the signature information of the transaction content is generated according to the one-time private key of the first account, the credential, the certificate of the second account, and the ciphertext of the difference between the input amount and the output amount, so that the verification party is a transaction processing device.
  • the signature information is used to verify the access qualification of the first account and the second account, and the one-time public key of the second account is used as the receiving address of the transaction content, and the transaction processing device in the prior art needs to utilize the first account.
  • the key verification uses the private key of the first account to generate the signature of the transaction content, the public key of the second account to verify the hash value of the long-term public key of the second account, and the specific transaction amount is required to verify the transaction accuracy, and the embodiment of the present invention Protects the privacy of the first account, the second account, and the transaction amount.
  • the transaction content may also have each input amount. ⁇ 0 2019/132767 ?01/802017/050654
  • the ciphertext and the ciphertext of each output amount, the ciphertext of each input amount and the encryption key of the ciphertext of each output amount are the public key of the third-party audit account.
  • the terminal obtains the ciphertext of each input amount and the ciphertext of each output amount, and obtains the ciphertext and each of the input amounts for the public key using the addition homomorphic encryption algorithm and the third-party audit account.
  • the ciphertext of the output amount so that while protecting the privacy of the transaction amount, the auditor can also use the private key of the third-party audit account to decrypt the ciphertext of each input amount and the ciphertext of each output amount, thereby obtaining each Enter the plain text of the amount and the clear text of each output amount to facilitate the auditor's audit.
  • the encryption key of the addition homomorphic encryption algorithm may be a random number, and the ciphertext and the output amount of each input amount are dense. The text will not be decrypted, so as to ensure the correctness of the transaction, the privacy protection of the transaction amount can be realized.
  • the transaction processing method of the foregoing embodiment may further include: the terminal generating, according to the one-time private key of the first account, an identifier of each input amount; The identifier is used to prevent the respective input amounts from being consumed twice. For example, if there is already an identified transaction record with the input amount in the blockchain, if the transaction processing device verifies the transaction content and then finds the identifier I with the input amount, it can be determined as secondary consumption, and the verification fails. It can be seen that this implementation can use the identification of each input amount to prevent secondary consumption of the input amount.
  • the transaction processing method of the implementation manner may further include: the terminal generating fourth signature information of the transaction content according to the identifier of each input amount; wherein, the transaction request message and the transaction record further And including the fourth signature information and the identifier of each input amount; the identifier of each input amount is used to prevent the input amount from being consumed twice; the first verification result and the second verification result are further And a verification result of the fourth signature information, where the verification result of the fourth signature information is obtained by the transaction processing device according to the identifier of each input amount and the verification parameter in the fourth signature information.
  • the verification result of the fourth signature information is used to indicate whether the identifier of each input amount is correct. It can be seen that if the identifier of the input amount is incorrect, the verification result of the fourth signature information is also not passed, and the secondary consumption of the input amount is further avoided.
  • the fourth signature information may be a signature of the zero-knowledge proof, and the terminal may calculate the fourth signature information of the transaction content according to the identifier of each input amount and the zero-knowledge proof algorithm, and correspondingly, the transaction processing device verifies the transaction request message and the transaction.
  • the fourth signature information in the record can also be verified using a zero-knowledge proof algorithm.
  • the transaction processing method of the foregoing embodiment may further include: the terminal encrypting the one-time public key of the first account according to a public key of the third-party auditing account, and obtaining the first
  • the ciphertext of the one-time public key of the account, the transaction request message and the transaction record further include the ciphertext of the one-time public key of the first account, so that the auditor can use the third-party audit account when auditing the account of the initiated transaction.
  • the private key is used to decrypt the one-time public key of the first account.
  • the long-term public key of the first account can be obtained according to the one-time public key, so that the auditor can audit the first account.
  • the transaction processing method in the implementation manner may further include: the terminal generating, according to the ciphertext of the one-time public key of the first account, the fifth signature information of the transaction content; correspondingly, the transaction request message and the The fifth signature information is further included in the transaction record, the first verification result and the second verification result further include a verification result of the fifth signature information, and the verification result of the fifth signature information is The verification of the fifth signature information obtained by the transaction processing device according to the verification parameter in the fifth signature information ⁇ 0 2019/132767 ?01/802017/050654 The result of the certificate is used to indicate whether the ciphertext of the one-time public key of the first account is correct.
  • the fifth signature information may be a signature of the zero-knowledge proof, and the terminal may calculate the fifth signature information of the transaction content according to the identifier of each input amount and the zero-knowledge proof algorithm, and correspondingly, the transaction processing device verifies the transaction request message and the transaction.
  • the fifth signature information in the record can also be verified using a zero-knowledge proof algorithm.
  • the transaction processing method of the foregoing embodiment may further include: the terminal encrypting the long-term public key of the second account according to the public key of the third-party audit account, and obtaining the second a ciphertext of the long-term public key of the account; correspondingly, the transaction request message and the transaction record further include a ciphertext of the long-term public key.
  • the auditor with the third-party audit account can use his private key to decrypt the ciphertext of the long-term public key, obtain the long-term public key of the second account, and thereby obtain the identity information of the second account, which is convenient for the auditor. audit.
  • the transaction processing method in the implementation manner may further include: the terminal generating, according to the ciphertext of the long-term public key of the second account, sixth signature information of the transaction content; correspondingly, the transaction request
  • the sixth signature information is further included in the message and the transaction record;
  • the first verification result and the second verification result further include a verification result of the sixth signature information, and a verification result of the sixth signature information
  • the verification processing is performed by the transaction processing device according to the verification parameter in the sixth signature information, and the verification result of the sixth signature information is used to indicate the ciphertext of the long-term public key of the second account. is it right or not.
  • the sixth signature information may be a signature of the zero-knowledge proof, and the terminal may calculate the sixth signature information of the transaction content according to the identifier of each input amount and the zero-knowledge proof algorithm, and correspondingly, the transaction processing device verifies the transaction request message and the transaction.
  • the sixth signature information in the record can also be verified using a zero-knowledge proof algorithm.
  • the transaction processing device, the management device, and the certificate issuing device respectively protect the transaction processing method provided by the embodiment of the present invention from the perspective of the interaction of the terminal, the transaction processing device, the management device, and the certificate issuing device that are logged in to the first account.
  • the privacy of an account, how to protect the privacy of the second account, how to protect the privacy of the transaction amount in the transaction content, and how to cooperate with the auditor's audit are elaborated.
  • the transaction processing device, the management device, and the certificate issuing device may include corresponding hardware results and/or software modules.
  • the transaction processing device may include at least one endorsement node, a consensus node, a submit node, and the like.
  • FIG. 9 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
  • the terminal includes a processor 901, a memory 902, and a communication interface 903.
  • the memory 902 is configured to store program instructions, and the processor 901 is used by the processor 901.
  • the program instruction is called to perform the following operations.
  • the processor 901 is configured to generate first signature information of the transaction content according to the credential of the first account, where the transaction content is initiated by the terminal based on the first account, and the credential is processed by the transaction contents ⁇ 0 2019/132767 ⁇ (:17802017/050654
  • the transaction processing device is generated for the first account;
  • the communication interface 903 is configured to send a transaction request message to the transaction processing device, where the transaction request message includes the first signature information and the transaction content;
  • the communication interface 903 is further configured to receive a transaction response message returned by the transaction processing device, where the transaction response message includes transaction result information generated by the transaction processing device according to the transaction content;
  • the communicator 903 is further configured to send, according to the transaction response message, a transaction record message to the transaction processing device, where the transaction record message is used to instruct the transaction processing device to store the transaction record on a blockchain
  • the transaction record includes the transaction content, the first signature information, and the transaction result information.
  • the processor generates the first signature information of the transaction content according to the credential of the first account, specifically: the long-term private key/one-time private key of the first account, the credential of the first account, and the transaction content as zero-knowledge proof
  • the input of the algorithm calculates the first signature information of the transaction content.
  • the transaction response message is returned when the transaction processing device verifies that the first verification result obtained by the transaction request message is a pass; the transaction record is obtained by the transaction processing device verifying the transaction record message The second verification result is stored when passed;
  • the first verification result and the second verification result both include a verification result of the first signature information
  • the verification result of the first signature information is obtained by the transaction processing device performing verification calculation according to the public key of the transaction and the verification parameter in the first signature information.
  • the transaction content is that the terminal is initiated according to the first account for the second account, and the processor 901 is further configured to generate the second account once according to the long-term public key of the second account.
  • the processor 901 is further configured to generate second signature information of the transaction content according to the one-time public key of the second account and the certificate of the second account;
  • the certificate is generated according to a private key of the certificate issuing device;
  • the transaction request message and the transaction record include a one-time public key and the second signature information of the second account, the second
  • the one-time public key of the account is an address of the second account;
  • the first verification result and the second verification result further include a verification result of the second signature information, and the verification result of the second signature information is determined by the transaction processing device according to the second account
  • the one-time public key, the public key of the certificate issuing device, and the verification parameter in the second signature information are obtained by verifying.
  • the processor 901 is further configured to calculate a ciphertext of a difference between the total input amount and the total output amount according to the ciphertext of each input amount in the transaction content and the ciphertext of each output amount;
  • the processor 901 is further configured to generate third signature information of the transaction content according to the ciphertext of the difference value, where the transaction request message and the transaction record further include the third signature information;
  • the first verification result and the second verification result further include a verification result of the third signature information, and the verification result of the third signature information is determined by the transaction processing device according to the third signature information.
  • the verification parameter, the ciphertext of each input amount, and the ciphertext of each output amount are obtained by verification calculation, and the verification result of the third signature information is used to indicate whether the total input amount is equal to the total output amount. . ⁇ 0 2019/132767 ⁇ (:17802017/050654
  • the ciphertext of each input amount and the ciphertext encryption key of each output amount are the public key of the third party audit account .
  • the processor is further configured to generate, according to the one-time private key of the first account, an identifier of each input amount;
  • the processor is further configured to generate fourth signature information of the transaction content according to the identifier of each input amount;
  • the transaction request message and the transaction record further include the fourth signature information and an identifier of each input amount;
  • the identifiers of the input amounts are used to prevent the respective input amounts from being consumed twice;
  • the first verification result and the second verification result further include a verification result of the fourth signature information, and the verification result of the fourth signature information is determined by the transaction processing device according to the identifiers of the input amounts
  • the verification result in the fourth signature information is obtained by the verification calculation, and the verification result of the fourth signature information is used to indicate whether the identifier of each input amount is correct.
  • the processor 901 is further configured to encrypt, according to the public key of the third-party auditing account, the one-time public key of the first account, to obtain the first account. a ciphertext describing a one-time public key;
  • the processor 901 is further configured to generate fifth signature information of the transaction content according to the ciphertext of the one-time public key of the first account.
  • the transaction request message and the transaction record further include the fifth signature information and the ciphertext of the one-time public key of the first account;
  • the first verification result and the second verification result further include a verification result of the fifth signature information, and the verification result of the fifth signature information is determined by the transaction processing device according to the fifth signature information.
  • the verification result is obtained by the verification calculation, and the verification result of the fifth signature information is used to indicate whether the ciphertext of the one-time public key of the first account is correct.
  • the processor 901 is further configured to encrypt, according to the public key of the third-party auditing account, the long-term public key of the second account, to obtain the a cipher text of the long-term public key; the processor 901, configured to generate sixth signature information of the transaction content according to the ciphertext of the long-term public key of the second account;
  • the transaction request message and the transaction record further include the sixth signature information and the ciphertext of the long-term public key of the second account;
  • the first verification result and the second verification result further include a verification result of the sixth signature information, and the verification result of the sixth signature information is determined by the transaction processing device according to the sixth signature information.
  • the verification result is obtained by the verification calculation, and the verification result of the sixth signature information is used to indicate whether the ciphertext of the long-term public key of the second account is correct.
  • the communication interface 903 is further configured to send a credential request message to the transaction processing device, where the credential request message includes the one-time public key of the first account and/or Or the ciphertext of the transaction amount of the first account;
  • the communication interface 903 is further configured to receive a credential response message returned by the transaction processing device, where ⁇ 0 2019/132767 ⁇ (:17802017/050654) According to the response message, the credentials of the first account are included, and the credentials of the first account are the one-time public of the transaction processing device according to the first account. The key and/or the ciphertext of the transaction amount of the first account is generated.
  • the credential request message further includes the one-time public key of the second account and/or the ciphertext of the transaction amount of the second account; the credential response message The credential of the second account is further included; the credential of the second account is the one-time public key of the transaction processing device according to the first account and/or the transaction amount of the first account The ciphertext is generated; the transaction request message and the transaction record further include a credential of the second account.
  • FIG. 10 is a schematic structural diagram of a transaction processing device according to an embodiment of the present invention. As shown in FIG. 10, the transaction processing device may include at least one endorsement module 1001, a consensus module 1002, and a delivery module 1003.
  • the at least one endorsement module 1001 is configured to receive a transaction request message sent by the terminal, where the transaction request message includes first signature information of the transaction content, where the transaction content is initiated by the first account;
  • the at least one endorsement module 1001 is further configured to verify the transaction request message, obtain a first verification result, and when the first verification result is a pass, simulate running the transaction content to obtain transaction result information, to the terminal Returning a transaction response message carrying the transaction result information;
  • the consensus module 1002 is configured to receive a transaction record message sent by the terminal according to the at least one transaction response message, and compare the transaction record carried by the transaction record message with the transaction record received from other terminals according to the receiving time. Sorting, generating a block including the transaction record, and submitting the block to the submitting module;
  • the submitting module 1003 is configured to receive the block, and verify the transaction record in the block to obtain a second verification result.
  • the transaction record is The form of the block is stored on the blockchain;
  • the first verification result and the second verification result both include a verification result of the first signature information, and the verification result of the first signature information is that the transaction processing device is authorized according to the endorsement module 10011 in the endorsement module Obtained by the public key verification, used to indicate whether the first account has a condition for storing the transaction record on a blockchain;
  • the authorization endorsement module is configured to generate the credential of the first account according to the private key of the first account, and the credential of the first account is used to generate the first signature information.
  • FIG. 11 is a schematic structural diagram of another transaction processing device according to an embodiment of the present invention.
  • the transaction processing device includes at least one endorsement module 1101, a consensus module 1102, a submission module 1103, and management. Module 1104;
  • the at least one endorsement module 1101 is configured to receive a transaction request message sent by the terminal, where the transaction request message includes first signature information of the transaction content, where the transaction content is initiated by the first account;
  • the at least one endorsement module 1101 is further configured to verify the transaction request message, obtain a first verification result, and when the first verification result is a pass, simulate running the transaction content to obtain transaction result information, to the terminal Returning a transaction response message carrying the transaction result information;
  • the consensus module 1102 is configured to receive, by the terminal, the delivery according to the at least one transaction response message. ⁇ 0 2019/132767 ⁇ (: 17802017/050654 easy to record messages, and the transaction records carried by the transaction record message together with the transaction records received from other terminals are sorted according to the receiving time, generating the transaction record including a block, and submitting the block to the submitting module;
  • the submitting module 1103 is configured to receive the block, and verify the transaction record in the block to obtain a second verification result.
  • the transaction record is The form of the block is stored on the blockchain;
  • the first verification result and the second verification result both include a verification result of the first signature information, and the verification result of the first signature information is obtained by the transaction processing device according to the public key verification of the management module. And indicating whether the first account has a condition for storing the transaction record on a blockchain;
  • the management module 1104 is configured to generate a credential of the first account according to a private key of the first account, where the credential of the first account is used to generate the first signature information.
  • the transaction processing device described in FIG. 10 and FIG. 11 may also invoke a related module to perform the processing of the transaction processing device involved in FIG. 4 to FIG. 7 and/or for the description of the present application.
  • a related module to perform the processing of the transaction processing device involved in FIG. 4 to FIG. 7 and/or for the description of the present application.
  • the management module or the authorization endorsement module in the transaction processing device performs the relevant steps to generate credentials for the first account, etc.; at least one endorsement module and the submission module verify the transaction request message and related content in the transaction record, and the like.
  • FIG. 12 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
  • the terminal shown in FIG. 12 may be the terminal in FIG. 3-8, FIG. 4 to FIG. 8, and the terminal may include processing.
  • the processor is mainly used for processing the communication protocol and the communication data, and controlling the entire terminal device, executing the software program, and processing the data of the software program, for example, in the embodiment of the indication method for supporting the terminal device to perform the foregoing transmission precoding matrix.
  • the memory is mainly used for storing software programs and data, such as storing the credentials of the first account described in the above embodiment, the long-term private key or the one-time private key of the first account.
  • the control circuit is mainly used for the conversion of the baseband signal and the radio frequency signal and the processing of the radio frequency signal.
  • the control circuit together with the antenna can also be called a transceiver, and is mainly used to transmit and receive RF signals in the form of electromagnetic waves.
  • Input and output devices such as touch screens, display screens, keyboards, etc., are mainly used to receive data input by a user and output data to a user.
  • the processor can read the software program in the storage unit, interpret and execute the instructions of the software program, and process the data of the software program.
  • the processor performs baseband processing on the data to be transmitted, and then outputs the baseband signal to the radio frequency circuit.
  • the radio frequency circuit performs radio frequency processing on the baseband signal, and then transmits the radio frequency signal to the outside through the antenna in the form of electromagnetic waves.
  • the RF circuit receives the RF signal through the antenna, converts the RF signal into a baseband signal, and outputs the baseband signal to the processor, which converts the baseband signal into data and processes the data.
  • FIG. 12 shows only one memory and processor for ease of illustration. In an actual terminal device, there may be multiple processors and memories.
  • the memory may also be referred to as a storage medium or a storage device, and the like.
  • the processor may include a baseband processor and a central processing unit, and the baseband processor is mainly used to process communication protocols and communication data, and the central processing unit is mainly used for the entire terminal device. ⁇ 0 2019/132767 ⁇ (:17802017/050654 Control, execute software program, process software program data.
  • the processor in Figure 12 integrates the functions of the baseband processor and the central processor, as will be understood by those skilled in the art,
  • the baseband processor and the central processing unit may also be independent processors, and are interconnected by technologies such as a bus.
  • the terminal device may include multiple baseband processors to adapt to different network standards, and the terminal device may include multiple Central processing units to enhance their processing capabilities, the various components of the terminal device can be connected through various buses.
  • the baseband processor can also be expressed as a baseband processing circuit or a baseband processing chip.
  • the central processing unit can also be expressed as a central processing.
  • the functions of processing the communication protocol and the communication data may be built in the processor, or may be stored in the storage unit in the form of a software program, and the processor executes the software program to implement the baseband processing function.
  • the antenna and control circuit having the transceiving function can be regarded as the transceiving unit 1201 of the terminal, and the processor having the processing function can be regarded as the processing unit 1202 of the terminal.
  • the terminal includes a transceiver unit 1201 and a processing unit 1202.
  • the transceiver unit can also be referred to as a transceiver, transceiver, transceiver, and the like.
  • the device for implementing the receiving function in the transceiver unit 1201 can be regarded as a receiving unit, and the device for implementing the sending function in the transceiver unit 1201 is regarded as a sending unit, that is, the transceiver unit 1201 includes a receiving unit and a sending unit.
  • the receiving unit may also be referred to as a receiver, a receiver, a receiving circuit, etc.
  • the transmitting unit may be referred to as a transmitter, a transmitter, or a transmitting circuit.
  • the transaction processing device may include a communication unit and a processing unit, where the processing unit and the communication unit perform the related operations performed by the transaction processing device in the foregoing embodiment, or execute at least one endorsement node, The consensus node, the related function of the submitting node, or the related functions of the management device, the certificate issuing device, and the like can also be performed.
  • FIG. 13 is a schematic diagram of a structure of a transaction processing device according to an embodiment of the present invention.
  • the transaction processing device may include a processor 1301 and a memory 1302.
  • the memory 1302 is for storing instructions for executing the instructions stored by the memory 1302 to implement the steps and embodiments of the method corresponding to Figures 4 through 8 above.
  • the transaction processing device may further include an input port 1304 and an output port 1305. Further, the device may further include a bus system 1303, wherein the processor 1301, the memory 1302, and the communication interface 1304 may be connected by the bus system 1303.
  • the processor 1301 is configured to execute the instructions stored by the memory 1302 to control the communication interface 1304 to receive the signal, and control the communication interface 1304 to send a signal to complete the steps of the terminal in the above method.
  • the communication interface 1304 can be the same or different physical entity. When they are the same physical entity, they can be collectively referred to as transceivers.
  • the memory 1302 may be integrated in the processor 1301 or may be provided separately from the processor 1301.
  • the function of the communication interface 1304 can be implemented by a dedicated chip through a transceiver circuit or a transceiver.
  • the processor 1301 can be implemented by a dedicated processing chip, a processing circuit, a processor, or a general purpose chip.
  • a terminal provided by the embodiment of the present application may be implemented by using a general-purpose computer.
  • the program code for the function of the processor 1301, the communication interface 1304 is stored in a memory, and the general purpose processor implements the functions of the processor 1301, the communication interface 1304 by executing the code in the memory.
  • ⁇ 0 2019/132767 ⁇ (: 17802017/050654)
  • the concepts, explanations, detailed descriptions and other steps related to the technical solutions provided by the embodiments of the present application are referred to the foregoing methods or other embodiments. The descriptions are not described herein. It will be apparent to those skilled in the art that, for the convenience and simplicity of the description, the specific processes of the systems, devices, and units described above may be referred to the corresponding processes in the foregoing method embodiments. I will not repeat them here.
  • the disclosed systems, devices, and methods may be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be electrical, mechanical or otherwise.
  • the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, i.e., may be located in one place, or may be distributed over multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above embodiments it may be implemented in whole or in part by software, hardware, firmware or any combination thereof.
  • software it may be implemented in whole or in part in the form of a computer program product.
  • the computer program product includes one or more computer instructions.
  • the computer program instructions When the computer program instructions are loaded and executed on a computer, the processes or functions described in accordance with embodiments of the present invention are generated in whole or in part.
  • the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • the computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be from a website site, computer, server or data center Transfer to another website site, computer, server, or data center by wire (such as coaxial cable, fiber, digital subscriber line (DSL), or wireless (eg, infrared, wireless, microwave, etc.).
  • the computer readable storage medium can be any available media that can be accessed by a computer or a data storage device such as a server, data center, or the like that includes one or more of the available media.
  • the usable medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a Solid State Disk (SSD)).
  • a magnetic medium e.g., a floppy disk, a hard disk, a magnetic tape
  • an optical medium e.g., a DVD
  • a semiconductor medium e.g., a Solid State Disk (SSD)

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Computer Security & Cryptography (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

Disclosed in the present application are a transaction processing method and related equipment. The method comprises: a terminal generates first signature information of a transaction content according to credentials of a first account, wherein the transaction content is initiated by the first account; The terminal sends a transaction request message to a transaction processing device, and the transaction processing device returns a transaction response message to the terminal according to the transaction request message, wherein the transaction response message carries transaction result information; and the terminal sends a transaction record message to the transaction processing device on the basis of the transaction response message, wherein the transaction record message can instruct the transaction processing device to store the transaction record carried by the transaction record message on a blockchain, the blockchain being a distributed database of the transaction records stored by the transaction processing equipment. It can be seen that according to the embodiment of the present invention, the credentials of the first account are used to generate a front face, which avoids leakage of identity information caused by using a long-term private key of the first account to generate the signature in the prior art, thereby protecting the anonymity of the first account.

Description

\¥0 2019/132767 ?01/802017/050654 叉易处理方法及相关设备 技术领域  \¥0 2019/132767 ?01/802017/050654 Fork easy handling method and related equipment
本申请涉及计算机技术领域, 尤其涉及一种交易处理方法及相关设备。  The present application relates to the field of computer technologies, and in particular, to a transaction processing method and related devices.
背景技术  Background technique
区块链是一个分布式数据库, 存储的是有序记录列表, 该有序记录列表包括不断 增长的区块, 每个区块包括一个时间戳和指向前一个区块的链接。 包括该区块链的区 块链系统由若干个共识节点组成, 每个共识节点都会保存一份完整的区块链数据和代 码。 共识节点之间可以通过共识算法实现区块链数据的一致性。  A blockchain is a distributed database that stores a list of ordered records that include growing blocks, each block including a timestamp and a link to the previous block. The blockchain system including the blockchain consists of several consensus nodes, each of which maintains a complete blockchain data and code. Consensus algorithms can be used to achieve consistency of blockchain data.
在区块链系统中, 交易记录以区块的形式被记录到区块链中, 该交易记录就不能 被单方面修改,从而保证数据的不可篡改、不可伪造等特点。然而,在区块链系统中, 所有的共识节点都保存有交易记录, 每个交易记录均包括交易内容的签名、 接收方的 地址和 /或交易内容中的交易金额。其中,交易内容的签名是利用发送方的私钥生成的, 故能够获得该交易记录的第三方需要利用公钥来验证, 相应的, 也就识别出了该交易 记录的发送方。  In the blockchain system, transaction records are recorded in the blockchain in the form of blocks, and the transaction records cannot be unilaterally modified, thereby ensuring that the data cannot be tampered and unforgeable. However, in the blockchain system, all consensus nodes maintain transaction records, and each transaction record includes the signature of the transaction content, the address of the recipient, and/or the transaction amount in the transaction content. Wherein, the signature of the transaction content is generated by using the sender's private key, so the third party that can obtain the transaction record needs to use the public key to verify, and correspondingly, the sender of the transaction record is identified.
然而, 在某些业务场景中, 例如, 在金融业中, 很多用户并不希望除了交易双方 的第三方获知自己发起的交易信息。 因此, 区块链系统中发送方的隐私性保护是一个 亟待解决的问题。 发明内容  However, in some business scenarios, for example, in the financial industry, many users do not want third parties to the transaction to know the transaction information they initiated. Therefore, the privacy protection of the sender in the blockchain system is an urgent problem to be solved. Summary of the invention
本申请提供一种交易处理方法及相关设备, 能够保护区块链交易中发起交易的发 送方的隐私性。  The present application provides a transaction processing method and related apparatus capable of protecting the privacy of a sender that initiates a transaction in a blockchain transaction.
第一方面, 本申请提供一种交易处理方法, 该交易处理方法中, 终端可以根据第 一账号的凭据生成交易内容的第一签名信息, 所述交易内容是所述终端基于所述第一 账号发起的, 所述凭据是由处理所述交易内容的交易处理设备为所述第一账号生成的; 所述终端向所述交易处理设备发送交易请求消息, 所述交易请求消息包括所述交易内 容和第一签名信息; 所述终端接收所述交易处理设备返回的交易响应消息, 所述交易 响应消息中包括交易处理设备根据所述交易内容生成的交易结果信息; 所述终端根据 该交易响应消息向所述交易处理设备发送交易记录消息, 所述交易记录消息用于指示 交易处理设备将所述交易记录消息携带的交易记录存储到区块链上, 所述区块链为所 述交易处理设备中保存所述交易记录的分布式数据库, 所述交易记录包括所述交易内 容、 所述第一签名信息以及所述交易结果信息。  In a first aspect, the present application provides a transaction processing method, in which a terminal may generate first signature information of a transaction content according to a credential of a first account, where the transaction content is that the terminal is based on the first account Initiating, the credential is generated by the transaction processing device that processes the transaction content for the first account; the terminal sends a transaction request message to the transaction processing device, where the transaction request message includes the transaction content And the first signature information; the terminal receives the transaction response message returned by the transaction processing device, where the transaction response message includes transaction result information generated by the transaction processing device according to the transaction content; the terminal according to the transaction response message Transmitting, to the transaction processing device, a transaction record message, the transaction record message is used to instruct the transaction processing device to store the transaction record carried by the transaction record message on a blockchain, wherein the blockchain is the transaction processing device Saving a distributed database of the transaction records, the transaction records including The content of said transaction, the first signature information and the transaction result information.
其中, 终端为第一账号登录的设备; 第一账号为发起交易内容的一方, 可称为付 款方或者发送方等。  The terminal is a device that is logged in by the first account; the first account is a party that initiates the transaction content, and may be referred to as a payer or a sender.
可见, 本申请中采用第一账号的凭据生成交易内容的签名信息, 避免现有技术中 使用第一账号的长期私钥生成签名, 还需要验证设备, 如交易处理设备利用长期公钥 来验证该签名, 导致第一账号的身份信息被泄露, 也就是说, 本申请可以保护第一账 \¥0 2019/132767 卩(:17802017/050654 号的匿名性。 It can be seen that, in the application, the signature of the transaction content is generated by using the credentials of the first account, to avoid using the long-term private key of the first account to generate the signature in the prior art, and the verification device is also required, for example, the transaction processing device uses the long-term public key to verify the signature. Signature, resulting in the disclosure of the identity information of the first account, that is, the application can protect the first account \¥0 2019/132767 卩 (: Anonymity of 17802017/050654.
其中, 由于第一账号的凭据是由交易处理设备生成的, 因此, 终端一旦基于第一 账号将交易记录发布到区块链上, 第一账号就无法对该交易记录产生抵赖, 因此, 本 申请不仅可以保护第一账号的隐私性, 还能够保留区块链上交易记录不可抵赖的特征。  Wherein, since the credential of the first account is generated by the transaction processing device, the first account cannot issue a repudiation to the transaction record once the terminal posts the transaction record to the blockchain based on the first account, therefore, the application Not only can the privacy of the first account be protected, but also the characteristics of the transaction record on the blockchain can be retained.
其中, 终端根据第一账号的凭据生成交易内容的第一签名信息, 包括: 终端将第 一账号的私钥、 所述第一账号的凭据以及交易内容作为零知识证明算法的输入, 计算 所述交易内容的第一签名信息, 所述私钥包括长期私钥或一次性私钥。  The generating, by the terminal, the first signature information of the transaction content according to the credential of the first account, the method includes: the terminal inputting the private key of the first account, the credential of the first account, and the transaction content as an input of a zero-knowledge proof algorithm, and calculating the The first signature information of the transaction content, the private key includes a long-term private key or a one-time private key.
其中, 交易响应消息是所述交易处理设备验证所述交易请求消息获得的第一验证 结果为通过时返回的; 所述交易记录是所述交易处理设备验证所述交易记录消息获得 的第二验证结果为通过时存储的;  The transaction response message is returned when the transaction processing device verifies that the first verification result obtained by the transaction request message is a pass; the transaction record is a second verification obtained by the transaction processing device verifying the transaction record message. The result is stored as it passes;
其中, 所述第一验证结果和所述第二验证结果中均包括所述第一签名信息的验证 结果; 所述第一签名信息的验证结果是由所述交易处理设备根据自身的公钥以及所述 第一签名信息中的验证参数进行验证计算获得的。 其中, 若交易处理设备生成第一账 号的凭据, 则交易处理设备利用自身的公钥以及第一签名信息中的验证参数进行验证 计算获得第一签名信息的验证结果。 若由管理设备生成第一账号的凭据, 则交易处理 设备利用管理设备的公钥以及第一签名信息中的验证参数进行验证计算获得第一签 名信息的验证结果。 可见, 该实现方式可避免现有技术中采用长期私钥对应的长期公 钥进行验证计算时所导致的第一账号的身份信息泄露。  The first verification result and the second verification result respectively include a verification result of the first signature information; the verification result of the first signature information is determined by the transaction processing device according to its own public key and The verification parameter in the first signature information is obtained by performing verification calculation. Wherein, if the transaction processing device generates the credentials of the first account, the transaction processing device uses the public key of the transaction and the verification parameter in the first signature information to perform the verification calculation to obtain the verification result of the first signature information. If the management device generates the credentials of the first account, the transaction processing device uses the public key of the management device and the verification parameter in the first signature information to perform verification verification to obtain the verification result of the first signature information. It can be seen that the implementation can avoid the disclosure of the identity information of the first account caused by the long-term public key corresponding to the long-term private key in the prior art.
另外, 在第一验证结果中时, 该第一签名信息的验证结果用于指示该第一账号是 否为能够访问交易处理设备的账号, 或者是否为该交易处理设备颁发的账号, 或者为 该第一账号是否具有访问该交易处理设备的权限; 在第二验证结果中时, 该第一签名 信息的验证结果用于指示该第一账号是否具有使用该区块链的权限, 也就是说是否能 够将该第一账号相关的交易记录存储到区块链上, 可选的, 该第一签名信息的验证结 果的作用可与验证是否通过后相关的操作所关联, 本申请不做限定。  In addition, in the first verification result, the verification result of the first signature information is used to indicate whether the first account is an account that can access the transaction processing device, or whether the account is issued by the transaction processing device, or is the first Whether an account has the right to access the transaction processing device; in the second verification result, the verification result of the first signature information is used to indicate whether the first account has the right to use the blockchain, that is, whether The transaction record related to the first account is stored in the blockchain. Optionally, the function of the verification result of the first signature information may be associated with the operation related to whether the verification is performed, and the application is not limited.
在一种可能的实现方式中, 该交易内容是终端基于第一账号针对第二账号发起的, 即第二账号可以称为交易内容的接收方或者收款方, 或者登录第二账号的终端为该交 易内容的接收方, 或者交易内容中交易金额的收款方。 这样, 终端可以根据第二账号 的长期公钥生成第二账号的一次性公钥; 终端根据第二账号的一次性公钥和第二账号 的证书生成交易内容的第二签名信息; 其中, 第二账号的一次性公钥为第二账号的地 址; 证书是利用证书颁发设备的私钥生成的; 交易请求消息和交易记录中包括第二账 号的一次性公钥和第二签名信息。  In a possible implementation manner, the transaction content is initiated by the terminal for the second account based on the first account, that is, the second account may be referred to as a recipient or a payee of the transaction content, or the terminal logging in to the second account is The recipient of the transaction, or the recipient of the transaction amount in the transaction. In this way, the terminal may generate a one-time public key of the second account according to the long-term public key of the second account; the terminal generates second signature information of the transaction content according to the one-time public key of the second account and the certificate of the second account; The one-time public key of the second account is the address of the second account; the certificate is generated by using the private key of the certificate issuing device; the transaction request message and the transaction record include the one-time public key and the second signature information of the second account.
相应的, 所述第一验证结果和所述第二验证结果还包括所述第二签名信息的验证 结果, 第二签名信息的验证结果是根据第二账号的一次性公钥、 所述证书颁发设备的 公钥以及所述第二签名信息中的验证参数进行验证计算获得的。  Correspondingly, the first verification result and the second verification result further include a verification result of the second signature information, and the verification result of the second signature information is issued according to the one-time public key of the second account, the certificate is issued The public key of the device and the verification parameter in the second signature information are obtained by verifying the calculation.
同理, 在第一验证结果中时, 该第二签名信息的验证结果用于指示该第二账号是 否为能够访问交易处理设备的账号, 或者是否为该交易处理设备颁发的账号, 或者为 该第二账号是否具有访问该交易处理设备的权限; 在第二验证结果中时, 该第二签名 信息的验证结果用于指示该第二账号是否具有使用该区块链的权限, 也就是说是否能 \¥0 2019/132767 卩(:17802017/050654 够将该第二账号相关的交易记录存储到区块链上, 可选的, 该第二签名信息的验证结 果的作用可与验证是否通过后相关的操作所关联, 本申请不做限定。 Similarly, in the first verification result, the verification result of the second signature information is used to indicate whether the second account is an account that can access the transaction processing device, or whether the account is issued by the transaction processing device, or Whether the second account has the right to access the transaction processing device; in the second verification result, the verification result of the second signature information is used to indicate whether the second account has the permission to use the blockchain, that is, whether can \¥0 2019/132767 卩(:17802017/050654 is enough to store the transaction record related to the second account on the blockchain. Optionally, the effect of the verification result of the second signature information may be related to whether the verification is passed or not. The operation is associated with, and the application is not limited.
可见, 该实现方式中, 交易内容的接收地址是一个一次性公钥, 第三方无法根据 该接收地址来识别出该交易内容的第二账号 (即接收方) 所对应的公钥; 另外, 第三 方如交易处理设备还可以利用该一次性公钥、 所述证书颁发设备的公钥以及所述第二 签名信息中的验证参数进行验证计算, 获得第二签名信息的验证结果, 进而, 根据该 第二签名信息的验证结果获知第二账号的相关权限, 还可以避免现有技术中采用第二 账号的长期公钥的哈希值作为地址带来的隐私泄露。  It can be seen that, in the implementation manner, the receiving address of the transaction content is a one-time public key, and the third party cannot identify the public key corresponding to the second account (ie, the receiving party) of the transaction content according to the receiving address; The third party, such as the transaction processing device, may perform verification calculation using the one-time public key, the public key of the certificate issuing device, and the verification parameter in the second signature information, and obtain the verification result of the second signature information, and further, according to the verification result The verification result of the second signature information is related to the related rights of the second account, and the hash value of the long-term public key of the second account in the prior art can be avoided as the privacy leakage caused by the address.
在一种可能的实现方式中, 终端可以获取各输入金额的密文以及各输出金额的密 文; 所述终端根据所述各输入金额的密文和所述各输出金额的密文, 计算总输入金额 与总输出金额之间差值的密文; 所述终端根据所述差值的密文生成所述交易内容的第 三签名信息; 其中, 所述交易请求消息和所述交易记录中还包括所述第三签名信息; 所述第一验证结果和所述第二验证结果还包括所述第三签名信息的验证结果, 所述第 三签名信息的验证结果是由所述交易处理设备根据所述第三签名信息中的验证参数、 所述各输入金额的密文以及所述各输出金额的密文进行验证计算获得的, 所述第三签 名信息的验证结果用于指示所述总输入金额是否等于所述总输出金额。  In a possible implementation, the terminal may obtain the ciphertext of each input amount and the ciphertext of each output amount; the terminal calculates the total according to the ciphertext of each input amount and the ciphertext of each output amount. Entering a ciphertext of a difference between the amount of money and the total output amount; the terminal generating third signature information of the transaction content according to the ciphertext of the difference; wherein, the transaction request message and the transaction record further Include the third signature information; the first verification result and the second verification result further include a verification result of the third signature information, where the verification result of the third signature information is determined by the transaction processing device The verification result in the third signature information, the ciphertext of each input amount, and the ciphertext of each output amount are obtained through verification calculation, and the verification result of the third signature information is used to indicate the total input. Whether the amount is equal to the total output amount.
可见, 本申请的交易内容中不需要携带各输入金额以及各输出金额的明文, 验证 者如交易处理设备根据第三签名信息中的验证参数、 所述各输入金额的密文以及所述 各输出金额的密文就可以验证总输入金额是否等于总输出金额, 即获知交易的正确性。 从而有助于保护交易金额的隐私性。  It can be seen that the transaction content of the present application does not need to carry the plaintext of each input amount and each output amount, and the verifier, such as the verification parameter in the third signature information by the transaction processing device, the ciphertext of each input amount, and the output. The ciphertext of the amount can verify whether the total input amount is equal to the total output amount, that is, the correctness of the transaction is known. This helps protect the privacy of the transaction amount.
其中, 各输入金额的密文和各输出金额的密文为采用加法同态加密算法获得的。 其中, 加法同态加密算法是指对加密的数据进行加法处理得到一个输出, 将这一输出 进行解密, 其结果与处理未加密的原始数据得到的输出结果是一样。 因此, 终端不需 要明文, 而是利用各输入金额的密文和各输出金额的密文, 就可以获得总输入金额的 密文以及总输出金额的密文, 还可以获得总输入金额与总输出金额之间差值的密文。  The ciphertext of each input amount and the ciphertext of each output amount are obtained by using an additive homomorphic encryption algorithm. The addition homomorphic encryption algorithm refers to adding the encrypted data to obtain an output, and decrypting the output, and the result is the same as the output obtained by processing the unencrypted original data. Therefore, the terminal does not need plaintext, but uses the ciphertext of each input amount and the ciphertext of each output amount to obtain the ciphertext of the total input amount and the ciphertext of the total output amount, and also obtain the total input amount and total output. The ciphertext of the difference between the amounts.
可见, 上述各可能的实现方式可以保护第一账号 (即付款方或发送方)、 第二账 号 (收款方或接收方) 或交易金额的隐私性。 故在其他一些实现方式中, 终端可以根 据用户的业务需求来设置付款方、 收款方以及交易金额中任一项或多项的隐私性, 相 应的, 可以采用上述三种可能的实现方式中的任一种或多种来实现隐私性的保护。  It can be seen that each of the above possible implementations can protect the privacy of the first account (ie, the payer or sender), the second account (the payee or the recipient), or the transaction amount. Therefore, in some other implementation manners, the terminal may set the privacy of any one or more of the payer, the payee, and the transaction amount according to the user's business requirement, and correspondingly, may adopt the above three possible implementation manners. Any one or more of them to achieve privacy protection.
在一种可能的实现方式中, 交易内容中可以包括各输入金额的密文以及各输出金 额的密文; 另外, 所述各输入金额的密文以及所述各输出金额的密文的加密密钥为第 三方审核账号的公钥。  In a possible implementation, the transaction content may include a ciphertext of each input amount and a ciphertext of each output amount; and, in addition, the ciphertext of each input amount and the encryption of the ciphertext of each output amount The key is the public key of the third-party audit account.
这样, 第三方审核账号可以利用自身的私钥来解密各输入金额的密文和各输出金 额的密文, 从而有利于拥有第三方审核账号的审核员来审核交易内容中的交易金额。 又因为交易内容中具有的是交易金额的密文, 而不是明文, 并且该交易金额的密文是 利用第三方审核账号的公钥加密获得的, 因此, 除了交易双方外, 只有第三方审核账 号的审核员能够看到交易金额, 从而有助于保护交易金额的隐私性同时, 便于审核员 的审计工作。 \¥0 2019/132767 卩(:17802017/050654 在一种可能的实现方式中, 终端可以根据所述第一账号的所述一次性私钥生成所 述各输入金额的标识; 所述交易请求消息和所述交易记录中还包括所述各输入金额的 标识, 所述各输入金额的标识用于防止所述各输入金额被二次消费。 例如, 若区块链 中已存在具有输入金额的标识了的交易记录, 则交易处理设备验证该交易内容时再发 现具有该输入金额的标识 I, 则可以确定为二次消费, 验证不通过。 可见, 该实现方 式可以利用各输入金额的标识来防止输入金额的二次消费。 In this way, the third-party audit account can use its own private key to decrypt the ciphertext of each input amount and the ciphertext of each output amount, thereby facilitating the auditor who has the third-party audit account to review the transaction amount in the transaction content. And because the transaction content has the ciphertext of the transaction amount, not the plaintext, and the ciphertext of the transaction amount is obtained by using the public key encryption of the third-party audit account, therefore, only the third party audit account except the two parties to the transaction The auditor can see the transaction amount, which helps to protect the privacy of the transaction amount and facilitate the audit work of the auditor. \¥0 2019/132767 卩 (:17802017/050654 In a possible implementation manner, the terminal may generate an identifier of each input amount according to the one-time private key of the first account; the transaction request message And the transaction record further includes an identifier of each input amount, and the identifier of each input amount is used to prevent the input amount from being consumed twice. For example, if an identifier with an input amount already exists in the blockchain If the transaction processing device verifies the transaction content and then finds the identifier I with the input amount, it can be determined as secondary consumption, and the verification fails. It can be seen that the implementation can use the identification of each input amount to prevent Enter the secondary consumption of the amount.
在一种可能的实现方式中, 终端还可以根据各输入金额的标识生成所述交易内容 的第四签名信息, 所述交易请求消息和所述交易记录中还包括所述第四签名信息, 所 述第一验证结果和所述第二验证结果还包括所述第四签名信息的验证结果, 所述第四 签名信息的验证结果是由所述交易处理设备根据所述各输入金额的标识和所述第四 签名信息中的验证参数进行验证计算获得的, 所述第四签名信息的验证结果用于指示 所述各输入金额的标识是否正确。 可见, 若输入金额的标识不正确, 则该第四签名信 息的验证结果也是不通过的, 进一步的避免输入金额的二次消费。  In a possible implementation, the terminal may further generate fourth signature information of the transaction content according to the identifier of each input amount, where the transaction request message and the transaction record further include the fourth signature information. The first verification result and the second verification result further include a verification result of the fourth signature information, and the verification result of the fourth signature information is an identifier and a location of the input amount by the transaction processing device. The verification result in the fourth signature information is obtained by the verification calculation, and the verification result of the fourth signature information is used to indicate whether the identifier of each input amount is correct. It can be seen that if the identifier of the input amount is incorrect, the verification result of the fourth signature information is also not passed, and the secondary consumption of the input amount is further avoided.
在一种可能的实现方式中, 终端可以根据第三方审核账号的公钥来加密第一账号 的一次性公钥, 获得该一次性公钥的密文; 相应的, 交易请求消息和交易记录中还可 以包括该一次性公钥的密文。 这样, 具有第三方审核账号的审计员就可以利用自身的 私钥来解密该一次性公钥的密文,获得该一次性公钥,从而获知第一账号的身份信息, 便于审计员的审计。 例如, 第一次交易是账号 发起的, 收款方为账号 I) ; 第二次交 易是账号 发起的, 收款方为账号 ^ 审计员根据该实现方式获得账号 的一次性公 钥之后, 审计员还可以根据账号1)的一次性公钥获知账号1?所参与的第一次交易, 通 过解密第一次交易中登录账号 的终端生成账号 的一次性公钥的过程, 即可获知账 号 的长期公钥, 也就获知了账号 的身份信息, 从而可以对账号 进行审计。 再例 如, 结合下方实现方式中, 账号 的终端可以利用第三方审核账号的公钥生成账号 的长期公钥的密文, 审计员可以获得账号 I?的长期公钥的密文, 从而可以解密出账号 的长期公钥, 以便于对账号 进行审计。  In a possible implementation manner, the terminal may encrypt the one-time public key of the first account according to the public key of the third-party audit account, and obtain the ciphertext of the one-time public key; correspondingly, the transaction request message and the transaction record It may also include the ciphertext of the one-time public key. In this way, the auditor with the third-party audit account can use the private key to decrypt the ciphertext of the one-time public key, obtain the one-time public key, and obtain the identity information of the first account, which is convenient for the auditor to audit. For example, the first transaction is initiated by the account, the payee is the account I); the second transaction is initiated by the account, and the payee is the account ^ After the auditor obtains the one-time public key of the account according to the implementation, the audit The member can also know the first transaction involved in the account 1 according to the one-time public key of the account 1), and the process of generating the one-time public key of the account by decrypting the terminal that logs in the account in the first transaction, and the account can be obtained. The long-term public key also knows the identity information of the account, so that the account can be audited. For example, in combination with the following implementation manner, the terminal of the account can use the public key of the third-party audit account to generate the ciphertext of the long-term public key of the account, and the auditor can obtain the ciphertext of the long-term public key of the account I? The long-term public key of the account, in order to audit the account.
在一种可能的实现方式中, 终端还可以根据上述实现方式中获得的一次性公钥的 密文来生成交易内容的第五签名信息, 相应的, 交易请求消息和所述交易记录中还包 括所述第五签名信息, 所述第一验证结果和所述第二验证结果还包括所述第五签名信 息的验证结果, 所述第五签名信息的验证结果是由所述交易处理设备根据所述第五签 名信息中的验证参数进行验证计算获得的, 所述第五签名信息的验证结果用于指示所 述第一账号的所述一次性公钥的密文是否正确。  In a possible implementation manner, the terminal may further generate fifth signature information of the transaction content according to the ciphertext of the one-time public key obtained in the foregoing implementation manner, and correspondingly, the transaction request message and the transaction record further include The fifth signature information, the first verification result and the second verification result further include a verification result of the fifth signature information, and the verification result of the fifth signature information is determined by the transaction processing device according to the The verification result of the fifth signature information is obtained by the verification calculation, and the verification result of the fifth signature information is used to indicate whether the ciphertext of the one-time public key of the first account is correct.
在一种可能的实现方式中, 终端还可以根据第三方审核账号的公钥加密所述第二 账号的所述长期公钥, 获得所述第二账号的所述长期公钥的密文; 相应的, 交易请求 消息和所述交易记录中还包括该长期公钥的密文。 这样, 具有第三方审核账号的审计 员就可以利用自身的私钥来解密该长期公钥的密文, 获得第二账号的长期公钥, 从而 获知该第二账号的身份信息, 便于审计员的审计。  In a possible implementation, the terminal may further encrypt the long-term public key of the second account according to the public key of the third-party audit account, and obtain the ciphertext of the long-term public key of the second account; The ciphertext of the long-term public key is also included in the transaction request message and the transaction record. In this way, the auditor with the third-party audit account can use his private key to decrypt the ciphertext of the long-term public key, obtain the long-term public key of the second account, and thereby obtain the identity information of the second account, which is convenient for the auditor. audit.
在一种可能的实现方式中, 终端还可以根据所述第二账号的所述长期公钥的密文, 生成所述交易内容的第六签名信息; 相应的, 所述交易请求消息和所述交易记录中还 \¥0 2019/132767 卩(:17802017/050654 包括所述第六签名信息; 所述第一验证结果和所述第二验证结果还包括所述第六签名 信息的验证结果, 所述第六签名信息的验证结果是由所述交易处理设备根据所述第六 签名信息中的验证参数进行验证计算获得的, 所述第六签名信息的验证结果用于指示 所述第二账号的所述长期公钥的密文是否正确。 In a possible implementation, the terminal may further generate sixth signature information of the transaction content according to the ciphertext of the long-term public key of the second account; correspondingly, the transaction request message and the Also in the transaction record \¥0 2019/132767 卩 (:17802017/050654 includes the sixth signature information; the first verification result and the second verification result further include a verification result of the sixth signature information, the sixth signature The verification result of the information is obtained by the transaction processing device according to the verification parameter in the sixth signature information, and the verification result of the sixth signature information is used to indicate the long-term public of the second account. Whether the ciphertext of the key is correct.
在一种可能的实现方式中, 终端获得第一账号的凭据可以包括: 终端向交易处理 设备发送凭据请求消息, 所述凭据请求消息中包括所述第一账号的所述一次性公钥和 /或所述第一账号具有的交易金额的密文;所述终端接收所述交易处理设备返回的凭据 响应消息, 所述凭据响应消息中包括所述第一账号的凭据, 所述第一账号的凭据是所 述交易处理设备根据所述第一账号的所述一次性公钥和 /或所述第一账号具有的交易 金额的密文生成的。  In a possible implementation manner, the obtaining, by the terminal, the credential of the first account may include: sending, by the terminal, a credential request message to the transaction processing device, where the credential request message includes the one-time public key of the first account and/or Or the ciphertext of the transaction amount of the first account; the terminal receives the credential response message returned by the transaction processing device, where the credential response message includes the credential of the first account, the first account The credential is generated by the transaction processing device according to the one-time public key of the first account and/or the ciphertext of the transaction amount of the first account.
在一种可能的实现方式中, 终端在向交易处理设备申请第一账号的凭据的同时, 也可以申请第二账号的凭据, 以便于第二账号在使用该笔交易金额时, 可以直接使用 该凭据来保护自身的匿名性, 例如, 采用第一方面的实现方式来保护第二账号作为付 款账号时的匿名性。  In a possible implementation manner, the terminal may apply for the credentials of the second account when applying for the credentials of the first account to the transaction processing device, so that the second account can directly use the transaction amount when using the transaction amount. Credentials to protect their anonymity, for example, using the implementation of the first aspect to protect the anonymity of the second account as a payment account.
也就是说, 上述实现方式中, 凭据请求消息还可以包括第二账号的一次性公钥和 /或第二账号具有的交易金额的密文; 相应的, 凭据响应消息中还可以包括第二账号的 凭据; 所述第二账号的凭据是所述管理设备根据所述第一账号的所述一次性公钥和 / 或所述第一账号具有的交易金额的密文生成的, 所述交易请求消息以及所述交易记录 中还包括所述第二账号的凭据。 从而, 便于第二账号作为付款账号使用该笔交易金额 时保护自身的匿名性。  That is, in the above implementation manner, the credential request message may further include a one-time public key of the second account and/or a ciphertext of the transaction amount of the second account; correspondingly, the credential response message may further include the second account. The credential of the second account is generated by the management device according to the one-time public key of the first account and/or the ciphertext of the transaction amount of the first account, the transaction request The message and the transaction record also include credentials of the second account. Therefore, it is convenient for the second account to protect the anonymity of the transaction amount when using the transaction amount as a payment account.
在一种可能的实现方式中, 第二账号的凭据也可以由第二账号自身来申请,例如, 在第二账号要使用该笔交易金额之前, 向管理设备申请凭据, 具体的, 可以包括: 登 录了第二账号的终端可以向管理设备发送凭据请求消息, 该凭据请求消息中包括第二 账号的一次性公钥和 /或第二账号具有的交易金额的密文;并接收管理设备返回的凭据 响应消息, 该凭据响应消息中包括第一账号的凭据, 第一账号的凭据是管理设备根据 第一账号的一次性公钥和/或第一账号具有的交易金额的密文生成的。  In a possible implementation, the credentials of the second account may also be applied by the second account itself. For example, before the second account needs to use the transaction amount, the credentials are applied to the management device. Specifically, the method may include: The terminal that has logged in to the second account may send a credential request message to the management device, where the credential request message includes a one-time public key of the second account and/or a ciphertext of the transaction amount of the second account; and receives the return from the management device. The credential response message includes the credential of the first account, and the credential of the first account is generated by the management device according to the one-time public key of the first account and/or the ciphertext of the transaction amount of the first account.
在一种可能的实现方式中, 上述第一签名信息、 第二签名信息、 第三签名信息、 第四签名信息、第五签名信息或第六签名信息可以均为零知识证明的签名,也就是说, 上述签名信息的生成方法可以采用零知识证明算法。 其中, 零知识证明算法是指证明 者针对要保密的有用信息进行一系列的数学计算获得一个签名, 该签名就是一系列验 证参数, 该系列验证参数中不包括要保密的有用信息; 验证者可以利用该系列验证参 数来执行一系列的验证计算, 根据验证计算的结果可以验证证明者针对该有用信息的 论断, 即验证证明者的论断是否正确, 通常该论断即为证明者能够获知要保密的有用 信息的论断。 因此, 上述第一签名信息、 第二签名信息、 第三签名信息、 第四签名信 息、 第五签名信息或第六签名信息可以利用零知识证明算法来声场, 相应地, 也可以 采用零知识证明算法来进行验证, 获得验证结果, 由于验证计算过程只需使用上述签 名信息以及验证参数, 因此避免了有用信息的泄露, 从而保护了上述各实现方式中第 一账号、 第二账号、 交易金额等的隐私性。 \¥0 2019/132767 卩(:17802017/050654 第二方面, 本申请还提供了一种交易处理方法, 该交易处理方法中, 交易处理设 备接收终端发送的交易请求消息, 所述交易请求消息中包括交易内容和第一签名信息, 所述交易内容是所述终端基于第一账号发起的, 所述第一签名信息是由所述终端根据 所述第一账号的凭据生成的; 所述交易处理设备根据所述交易请求消息向所述终端返 回交易响应消息, 所述交易响应消息中包括所述交易处理设备根据所述交易内容生成 的交易结果信息; 所述交易处理设备接收所述终端根据所述交易响应消息发送的交易 记录消息; 所述交易处理设备将所述交易记录消息中携带的交易记录存储到区块链上, 所述区块链为所述交易处理方中保存所述交易记录的分布式数据库, 所述交易记录包 括所述交易内容、 所述第一签名信息以及所述交易结果信息。 In a possible implementation, the first signature information, the second signature information, the third signature information, the fourth signature information, the fifth signature information, or the sixth signature information may all be zero signatures of the knowledge certification, that is, It can be said that the above method for generating signature information can adopt a zero-knowledge proof algorithm. The zero-knowledge proof algorithm is that the prover performs a series of mathematical calculations on the useful information to be confidential to obtain a signature, which is a series of verification parameters, and the series of verification parameters does not include useful information to be kept secret; the verifier can Using the series of verification parameters to perform a series of verification calculations, according to the results of the verification calculation can verify the prover's assertion on the useful information, that is, verify that the prover's argument is correct, usually the argument is that the prover can know that it is confidential. An argument for useful information. Therefore, the first signature information, the second signature information, the third signature information, the fourth signature information, the fifth signature information, or the sixth signature information may use a zero-knowledge proof algorithm to generate a sound field, and correspondingly, a zero-knowledge proof may also be used. The algorithm is used for verification, and the verification result is obtained. Since the verification calculation process only needs to use the signature information and the verification parameter, the leakage of the useful information is avoided, thereby protecting the first account, the second account, the transaction amount, and the like in the foregoing implementation manners. Privacy. \¥0 2019/132767 卩 (: 17802017/050654 In the second aspect, the present application further provides a transaction processing method, in which the transaction processing device receives a transaction request message sent by the terminal, in the transaction request message The transaction content and the first signature information, where the transaction content is initiated by the terminal based on the first account, the first signature information is generated by the terminal according to the credentials of the first account; Returning, by the device, a transaction response message to the terminal according to the transaction request message, where the transaction response message includes transaction result information generated by the transaction processing device according to the transaction content; and the transaction processing device receives the terminal according to the Transaction report message sent by the transaction response message; the transaction processing device stores the transaction record carried in the transaction record message on a blockchain, where the blockchain stores the transaction record in the transaction processor a distributed database, the transaction record including the transaction content, the first signature information, and a The transaction result information.
本申请中第一签名信息是根据第一账号的凭据生成的, 避免现有技术中使用第一 账号的长期私钥生成签名, 还需要验证设备, 如交易处理设备, 利用长期公钥来验证 该签名, 导致第一账号的身份信息被泄露, 也就是说, 本申请可以保护第一账号的匿 名性。  The first signature information in the application is generated according to the credentials of the first account. In the prior art, the long-term private key of the first account is used to generate the signature, and the verification device, such as the transaction processing device, is used to verify the long-term public key. The signature causes the identity information of the first account to be leaked, that is, the application can protect the anonymity of the first account.
其中, 所述交易处理设备根据所述交易请求消息向所述终端返回交易响应消息之 前,所述方法还包括:所述交易处理设备验证所述交易请求消息,获得第一验证结果; 当所述第一验证结果为通过时, 所述交易处理设备运行所述交易内容, 获得交易结果 信息; 所述方法还包括: 所述交易处理设备验证所述交易记录消息, 获得第二验证结 果; 当所述第二验证结果为通过时, 所述交易处理设备执行将所述交易记录消息携带 的交易记录存储到区块链上的步骤。  Before the transaction processing device returns a transaction response message to the terminal according to the transaction request message, the method further includes: the transaction processing device verifying the transaction request message to obtain a first verification result; When the first verification result is a pass, the transaction processing device runs the transaction content to obtain transaction result information; the method further includes: the transaction processing device verifying the transaction record message to obtain a second verification result; When the second verification result is a pass, the transaction processing device performs the step of storing the transaction record carried by the transaction record message on the blockchain.
所述第一验证结果和所述第二验证结果中均包括所述第一签名信息的验证结果; 所述第一签名信息的验证结果是由所述交易处理设备利用自身的公钥与所述第一签 名信息中的验证参数进行验证计算获得的。 可见, 交易处理设备可以根据自身的公钥 来验证交易内容的第一签名信息, 而不必如现有技术采用第一账号的公钥来验证, 从 而, 使得第三方无法获知第一账号的公钥, 也就保护了第一账号的隐私性。  And the verification result of the first signature information is included in the first verification result and the second verification result; the verification result of the first signature information is used by the transaction processing device to use the public key of the transaction The verification parameters in the first signature information are obtained by verification calculation. It can be seen that the transaction processing device can verify the first signature information of the transaction content according to the public key of the transaction, instead of using the public key of the first account to verify the public key, so that the third party cannot know the public key of the first account. It also protects the privacy of the first account.
其中, 交易处理设备验证交易内容的第一签名信息, 可以包括: 交易处理设备根 据第一签名信息中的验证参数以及自身的公钥利用零知识证明算法进行验证计算, 获 得第一签名信息的验证结果。  The transaction processing device verifies the first signature information of the transaction content, and the method includes: the transaction processing device performs the verification calculation by using the zero-knowledge proof algorithm according to the verification parameter in the first signature information and the public key of the first signature information, and obtains the verification of the first signature information. result.
在一种可能的实现方式中, 交易内容是终端基于第一账号针对第二账号发起的, 即第一账号可以为交易内容的发送方或者付款方具有的账号, 第二账号可以为交易内 容的接收方或者收款方具有的账号。 交易请求消息和交易记录中还可以包括第二签名 信息以及第二账号的一次性公钥, 其中, 该第二账号的一次性公钥为交易内容的接收 地址, 或者也可以称为交易内容的接收方或者收款方的地址。 相应的, 第一验证结果 和第二验证结果中还可以包括第二签名信息的验证结果, 该第二签名信息的验证结果 是交易处理设备根据第二账号的一次性公钥、 证书颁发设备的公钥以及所述第二签名 信息中的验证参数进行验证计算获得的。  In a possible implementation manner, the transaction content is initiated by the terminal for the second account based on the first account, that is, the first account may be the sender of the transaction content or the account of the payment party, and the second account may be the transaction content. The account that the recipient or payee has. The transaction request message and the transaction record may further include a second signature information and a one-time public key of the second account, where the one-time public key of the second account is a receiving address of the transaction content, or may also be referred to as a transaction content. The address of the recipient or payee. Correspondingly, the first verification result and the second verification result may further include a verification result of the second signature information, where the verification result of the second signature information is a one-time public key of the transaction processing device according to the second account, and the certificate issuing device The public key and the verification parameter in the second signature information are obtained by verifying the calculation.
可见, 该实现方式中, 交易内容的接收地址是一个一次性公钥, 第三方无法根据 该接收地址来识别出该交易内容的第二账号所对应的公钥。 另外, 交易处理设备使用 的是接收地址来验证第二签名信息, 获知第二账号是否具有将交易记录存储到区块链 \¥0 2019/132767 卩(:17802017/050654 上的条件, 也就是验证第二账号的准入资格。 与现有技术中采用第二账号的长期公钥 的哈希值作为接收地址相比, 该实现方式可以保护第二账号的隐私性。 It can be seen that, in the implementation manner, the receiving address of the transaction content is a one-time public key, and the third party cannot identify the public key corresponding to the second account of the transaction content according to the receiving address. In addition, the transaction processing device uses the receiving address to verify the second signature information, and knows whether the second account has the transaction record stored in the blockchain. \¥0 2019/132767 卩 (: 17802017/050654 conditions, that is, verify the access qualification of the second account. Compared with the hash value of the long-term public key using the second account in the prior art as the receiving address, This implementation can protect the privacy of the second account.
在一种可能的实现方式中, 交易请求消息以及交易记录中还可以包括第三签名信 息、 各输入金额的密文以及所述各输出金额的密文, 相应的, 第一验证结果和第二验 证结果中还包括第三签名信息的验证结果, 所述第三签名信息的验证结果是由所述交 易处理设备根据所述第三签名信息中的验证参数、 所述各输入金额的密文以及所述各 输出金额的密文进行验证计算获得的, 该第三签名信息的验证结果用于指示交易记录 中总输入金额是否等于总输出金额。  In a possible implementation manner, the transaction request message and the transaction record may further include third signature information, a ciphertext of each input amount, and a ciphertext of each output amount, and correspondingly, a first verification result and a second The verification result further includes a verification result of the third signature information, where the verification result of the third signature information is determined by the transaction processing device according to the verification parameter in the third signature information, the ciphertext of each input amount, and The ciphertext of each output amount is obtained through verification calculation, and the verification result of the third signature information is used to indicate whether the total input amount in the transaction record is equal to the total output amount.
可见, 交易内容中不需要携带各输入金额以及各输出金额的明文, 甚至交易内容 中也不需要各输入金额的密文以及各输出金额的密文, 验证者如交易处理设备根据第 三签名信息就可以验证总输入金额是否等于总输出金额, 即获知交易的正确性。 从而 有助于保护交易金额的隐私性。  It can be seen that the transaction content does not need to carry the plain text of each input amount and each output amount, and even the ciphertext of each input amount and the ciphertext of each output amount are not required in the transaction content, and the certifier such as the transaction processing device according to the third signature information It is possible to verify whether the total input amount is equal to the total output amount, that is, to know the correctness of the transaction. This helps protect the privacy of the transaction amount.
在一种可能的实现方式中, 交易内容中还包括各输入金额的密文和各输出金额的 密文, 另外, 各输入金额的密文和各输出金额的密文的加密密钥为第三方审核账号的 公钥。 这样, 拥有第三方审核账号的审计员可以利用自身的私钥来解密各输入金额的 密文和各输出金额的密文, 获得各输入金额的明文和各输出金额的明文。 由于该密文 是第三方审核账号的公钥加密的, 因此,只有第三方审核账号的私钥可以解密,从而, 有助于保护交易金额隐私性的同时, 方便审计员的审计。  In a possible implementation manner, the transaction content further includes a ciphertext of each input amount and a ciphertext of each output amount, and the ciphertext of each input amount and the ciphertext encryption key of each output amount are third parties. Review the public key of the account. In this way, the auditor who has the third-party audit account can use his private key to decrypt the ciphertext of each input amount and the ciphertext of each output amount, and obtain the plaintext of each input amount and the plaintext of each output amount. Since the ciphertext is encrypted by the public key of the third-party audit account, only the private key of the third-party audit account can be decrypted, thereby helping to protect the privacy of the transaction amount and facilitating the audit of the auditor.
在一种可能的实现方式中, 交易请求消息和交易记录中还可以包括各输入金额的 标识, 该各输入金额的标识, 所述各输入金额的标识用于防止所述各输入金额被二次 消费。 例如, 若区块链中已存在具有输入金额的标识 1"的交易记录, 则交易处理设备 验证该交易内容时再发现具有该输入金额的标识丁, 则可以确定该输入金额为二次消 费, 验证不通过。 可见, 该实现方式可以利用各输入金额的标识来防止输入金额的二 次消费。  In a possible implementation manner, the transaction request message and the transaction record may further include an identifier of each input amount, the identifier of each input amount, and the identifier of each input amount is used to prevent the input amount from being twice consumption. For example, if the transaction record with the identifier 1" of the input amount already exists in the blockchain, if the transaction processing device verifies the transaction content and then finds the identifier with the input amount, it can be determined that the input amount is secondary consumption. The verification fails. It can be seen that the implementation can use the identification of each input amount to prevent secondary consumption of the input amount.
在一种可能的实现方式中, 交易请求消息和交易记录中还包括第四签名信息, 相 应的, 第一验证结果和第二验证结果还包括第四签名信息的验证结果, 所述第四签名 信息的验证结果是由所述交易处理设备根据所述各输入金额的标识和所述第四签名 信息中的验证参数进行验证计算获得的, 第四签名信息的验证结果用于指示各输入金 额的标识是否正确; 可见, 若输入金额的标识不正确, 则该第四签名信息的验证结果 也是不通过的, 进一步的避免输入金额的二次消费。  In a possible implementation manner, the transaction request message and the transaction record further include fourth signature information, and correspondingly, the first verification result and the second verification result further include a verification result of the fourth signature information, the fourth signature The verification result of the information is obtained by the transaction processing device according to the verification of the identifier of each input amount and the verification parameter in the fourth signature information, and the verification result of the fourth signature information is used to indicate the input amount. Whether the identification is correct; it can be seen that if the identifier of the input amount is incorrect, the verification result of the fourth signature information is also not passed, and the secondary consumption of the input amount is further avoided.
在一种可能的实现方式中, 交易请求消息和交易记录中还可以包括第一账号的一 次性公钥的密文, 其中, 该第一账号的一次性公钥的密文的加密密钥为第三方审核账 号的公钥。 这样, 具有第三方审核账号的审计员就可以利用自身的私钥来解密该一次 性公钥的密文, 获得该一次性公钥, 从而获知第一账号的身份信息, 便于审计员的审 计。  In a possible implementation, the transaction request message and the transaction record may further include a ciphertext of the one-time public key of the first account, where the ciphertext encryption key of the one-time public key of the first account is The public key of the third-party audit account. In this way, the auditor with the third-party audit account can use its own private key to decrypt the ciphertext of the one-time public key, obtain the one-time public key, and obtain the identity information of the first account, which is convenient for the auditor to audit.
在一种可能的实现方式中, 交易请求消息和交易记录中还可以包括第五签名信息; 相应的, 第一验证结果和第二验证结果还包括第五签名信息的验证结果, 所述第五签 名信息的验证结果是由所述交易处理设备根据所述第五签名信息中的验证参数进行 \¥0 2019/132767 卩(:17802017/050654 验证计算获得的, 第五签名信息的验证结果用于指示第一账号的所述一次性公钥的密 文是否正确。 In a possible implementation manner, the transaction request message and the transaction record may further include fifth signature information. Correspondingly, the first verification result and the second verification result further include a verification result of the fifth signature information, where the fifth The verification result of the signature information is performed by the transaction processing device according to the verification parameter in the fifth signature information. \¥0 2019/132767 卩 (:17802017/050654 The verification result obtained by the verification calculation, the verification result of the fifth signature information is used to indicate whether the ciphertext of the one-time public key of the first account is correct.
在一种可能的实现方式中, 交易请求消息和所述交易记录中还包括第二账号的长 期公钥的密文, 其中, 该第二账号的所述长期公钥的密文的加密密钥为所述第三方审 核账号的公钥。 这样, 具有第三方审核账号的审计员就可以利用自身的私钥来解密该 长期公钥的密文, 获得第二账号的长期公钥, 从而获知该第二账号的身份信息, 便于 审计员的审计。  In a possible implementation, the transaction request message and the transaction record further include a ciphertext of the long-term public key of the second account, where the encryption key of the ciphertext of the long-term public key of the second account The public key for the third party audit account. In this way, the auditor with the third-party audit account can use his private key to decrypt the ciphertext of the long-term public key, obtain the long-term public key of the second account, and thereby obtain the identity information of the second account, which is convenient for the auditor. audit.
在一种可能的实现方式中, 交易请求消息和所述交易记录中还包括所述第六签名 信息; 第一验证结果和第二验证结果还包括第六签名信息的验证结果, 所述第六签名 信息的验证结果是由所述交易处理设备根据所述第六签名信息中的验证参数进行验 证计算获得的, 第六签名信息的验证结果用于指示第二账号的长期公钥的密文是否正 确。  In a possible implementation manner, the transaction request message and the transaction record further include the sixth signature information; the first verification result and the second verification result further include a verification result of the sixth signature information, the sixth The verification result of the signature information is obtained by the transaction processing device according to the verification parameter in the sixth signature information, and the verification result of the sixth signature information is used to indicate whether the ciphertext of the long-term public key of the second account is correct.
另外, 第一账号的凭据可以通过以下步骤来生成: 所述交易处理设备接收所述终 端发送的凭据请求消息, 所述凭据请求消息中包括所述第一账号的所述一次性公钥和 /或所述第一账号具有的交易金额的密文;所述交易处理设备根据所述凭据请求消息生 成所述第一账号的凭据; 所述交易处理设备向所述终端发送凭据响应消息, 所述凭据 响应消息中携带所述第一账号的凭据。  In addition, the credential of the first account may be generated by the following steps: the transaction processing device receives a credential request message sent by the terminal, where the credential request message includes the one-time public key of the first account and/or Or the ciphertext of the transaction amount of the first account; the transaction processing device generates the credential of the first account according to the credential request message; the transaction processing device sends a credential response message to the terminal, The credential response message carries the credentials of the first account.
在一种可能的实现方式中, 终端在申请第一账号的凭据的同时, 也可以申请第二 账号的凭据, 以便于第二账号在使用该笔交易金额时, 可以直接使用该凭据来保护自 身的匿名性。 也就是说, 凭据请求消息中还包括所述第二账号的所述一次性公钥和/ 或所述第二账号具有的交易金额的密文; 所述交易处理设备还可以根据该凭据请求消 息生成第二账号的凭据, 所述凭据响应消息中还包括所述第二账号的凭据; 交易请求 消息以及交易记录中还可以包括第二账号的凭据。  In a possible implementation manner, the terminal may apply for the credentials of the second account at the same time as applying the credentials of the first account, so that the second account can directly use the credentials to protect itself when using the transaction amount. Anonymity. That is, the credential request message further includes the one-time public key of the second account and/or the ciphertext of the transaction amount of the second account; the transaction processing device may further request a message according to the credential Generating a credential of the second account, the credential response message further includes the credential of the second account; the transaction request message and the transaction record may further include the credential of the second account.
在一种可能的实现方式中, 第二账号的凭据也可以由第二账号自身来申请,例如, 在第二账号要使用该笔交易金额之前, 向管理设备申请凭据。  In a possible implementation manner, the credentials of the second account may also be applied by the second account itself, for example, to apply for credentials to the management device before the second account wants to use the transaction amount.
在一种可能的实现方式中, 上述第一签名信息、 第二签名信息、 第三签名信息、 第四签名信息、第五签名信息或第六签名信息可以均为零知识证明的签名,也就是说, 上述签名信息可以利用零知识证明算法来验证, 并且验证过程只需使用上述签名信息 以及系统参数就可以验证, 避免交易中的关键信息泄露, 从而保护了上述各实现方式 中第一账号、 第二账号、 交易金额等的隐私性。  In a possible implementation, the first signature information, the second signature information, the third signature information, the fourth signature information, the fifth signature information, or the sixth signature information may all be zero signatures of the knowledge certification, that is, The above signature information can be verified by using a zero-knowledge proof algorithm, and the verification process can be verified only by using the above-mentioned signature information and system parameters, thereby avoiding leakage of key information in the transaction, thereby protecting the first account in each of the above implementation manners, The privacy of the second account number, transaction amount, etc.
第三方面,本申请还提供一种终端,该终端具有实现上述实现方法中终端的功能。 该功能可以通过硬件实现, 例如, 包括处理器和收发器, 也可以通过硬件执行相应的 软件实现。 所述硬件或软件包括一个或多个与上述功能相对应的模块, 所述模块可以 是软件和/或硬件。  In a third aspect, the application further provides a terminal, where the terminal has the function of implementing the terminal in the foregoing implementation method. This function can be implemented in hardware, for example, including a processor and a transceiver, or it can be implemented by hardware. The hardware or software includes one or more modules corresponding to the functions described above, which may be software and/or hardware.
第四方面, 本申请还提供一种交易处理设备, 该交易处理设备具有实现上述实现 方法中交易处理设备的功能。该功能可以通过硬件实现,例如,包括处理器和收发器, 也可以通过硬件执行相应的软件实现。 所述硬件或软件包括一个或多个与上述功能相 对应的模块, 所述模块可以是软件和/或硬件。该处理器和收发器可以处理多个上述实 \¥0 2019/132767 卩(:17802017/050654 现方法中的终端所发送的消息, 执行上述实现方法中所描述的交易处理方法。 In a fourth aspect, the present application further provides a transaction processing device having a function of implementing the transaction processing device in the above implementation method. This function can be implemented in hardware, for example, including a processor and a transceiver, or can be implemented by hardware in a corresponding software. The hardware or software includes one or more modules corresponding to the functions described above, which may be software and/or hardware. The processor and transceiver can handle multiple of the above \¥0 2019/132767 卩 (: 17802017/050654 The message sent by the terminal in the current method, the transaction processing method described in the above implementation method is executed.
第五方面, 本申请还提供一种交易处理设备, 交易处理设备包括至少一个背书模 块、 共识模块、 提交模块以及管理模块;  In a fifth aspect, the application further provides a transaction processing device, where the transaction processing device includes at least one endorsement module, a consensus module, a submission module, and a management module;
所述至少一个背书模块, 用于接收终端发送的交易请求消息, 所述交易请求消息 中包括交易内容和第一签名信息, 所述交易内容是所述终端基于第一账号发起的, 所 述第一签名信息是由所述终端根据所述第一账号的凭据生成的;  The at least one endorsement module is configured to receive a transaction request message sent by the terminal, where the transaction request message includes a transaction content and first signature information, where the transaction content is initiated by the terminal based on the first account, a signature information is generated by the terminal according to the credentials of the first account;
所述至少一个背书模块, 还用于根据所述交易请求消息向所述终端返回交易响应 消息, 所述交易响应消息中包括所述交易处理设备根据所述交易内容生成的交易结果 信息; 所述共识模块, 用于接收所述终端根据所述至少一个交易响应消息发送的交易 记录消息, 并将所述交易记录消息携带的交易记录与从其他终端接收的交易记录一并 根据接收时间进行排序, 生成包括所述交易记录的区块, 并将所述区块提交给所述提 交模块; 所述提交模块, 用于接收所述区块, 并将所述交易记录以所述区块的形式存 储到区块链上; 交易处理设备所述管理模块, 用于根据自身的私钥以及所述第一账号 的一次性公钥和/或具有的交易金额的密文生成所述第一账号的凭据。  The at least one endorsement module is further configured to: return, according to the transaction request message, a transaction response message to the terminal, where the transaction response message includes transaction result information generated by the transaction processing device according to the transaction content; a consensus module, configured to receive a transaction record message sent by the terminal according to the at least one transaction response message, and sort the transaction record carried by the transaction record message with the transaction record received from other terminals according to the receiving time, Generating a block including the transaction record, and submitting the block to the submitting module; the submitting module, configured to receive the block, and store the transaction record in the form of the block The management module of the transaction processing device, configured to generate the credential of the first account according to the private key of the first account and the one-time public key of the first account and/or the ciphertext of the transaction amount .
第六方面, 本申请还提供一种交易处理系统, 该交易处理系统可以包括终端和交 易处理设备, 终端可以执行上述第一方面所提供的交易处理方法, 或者第一方面可能 的实现方式中的任一种或多种; 所述交易处理设备可以执行上述第二方面所提供的交 易处理方法, 或者第二方面可能的是实现方式中的任一种或多种。  In a sixth aspect, the present application further provides a transaction processing system, which may include a terminal and a transaction processing device, and the terminal may perform the transaction processing method provided by the above first aspect, or in a possible implementation manner of the first aspect Any one or more of the following: the transaction processing device may perform the transaction processing method provided by the second aspect, or the second aspect may be any one or more of the implementation manners.
第七方面, 本申请还提供了一种计算机可读存储介质, 所述可读存储介质上存储 有实现第一方面所提供的交易处理方法, 或者第一方面可能的实现方式中的任意一种 或多种所提供的交易处理方法的程序代码, 该程序代码包含运行第一方面所提供的交 易处理方法, 或者第一方面可能的实施方式中的任意一种所提供的交易处理方法的执 行指令。  In a seventh aspect, the present application further provides a computer readable storage medium, where the readable storage medium stores any one of the possible implementation methods of the first aspect, or a possible implementation of the first aspect. Or program code of a plurality of provided transaction processing methods, the program code comprising a transaction processing method provided by the first aspect, or an execution instruction of the transaction processing method provided by any one of the possible implementations of the first aspect .
第八方面, 本申请还提供了一种计算机可读存储介质, 所述可读存储介质上存储 有实现第二方面所提供的交易处理方法, 或者第二方面可能的实现方式中的任意一种 或多种所提供的交易处理方法的程序代码, 该程序代码包含运行第二方面所提供的交 易处理方法, 或者第二方面可能的实施方式中的任意一种所提供的交易处理方法的执 行指令。 附图说明  In an eighth aspect, the present application further provides a computer readable storage medium, where the readable storage medium stores any one of the transaction processing methods provided by the second aspect, or a possible implementation of the second aspect. Or program code of a plurality of provided transaction processing methods, the program code comprising a transaction processing method provided by the second aspect, or an execution instruction of the transaction processing method provided by any one of the possible implementations of the second aspect . DRAWINGS
图 1是一种交易处理系统的结构示意图;  1 is a schematic structural diagram of a transaction processing system;
图 2是基于图 1所示的区块链系统提供的一种交易处理方法的流程示意图; 图 3八是本发明实施例提供的一种交易处理系统的结构示意图;  2 is a schematic flow chart of a transaction processing method based on the blockchain system shown in FIG. 1. FIG. 3 is a schematic structural diagram of a transaction processing system according to an embodiment of the present invention;
图 38是本发明实施例提供的另一种交易处理系统的结构示意图;  38 is a schematic structural diagram of another transaction processing system according to an embodiment of the present invention;
图 30是本发明实施例提供的又一种交易处理系统的结构示意图;  30 is a schematic structural diagram of still another transaction processing system according to an embodiment of the present invention;
图 30是本发明实施例提供的又一种交易处理系统的结构示意图;  30 is a schematic structural diagram of still another transaction processing system according to an embodiment of the present invention;
图 4是本发明实施例提供的一种交易处理方法的流程示意图;  4 is a schematic flowchart of a transaction processing method according to an embodiment of the present invention;
图 5是本发明实施例提供的另一种交易处理方法的流程示意图; \¥0 2019/132767 卩(:17802017/050654 图 6是本发明实施例提供的又一种交易处理方法的流程示意图; FIG. 5 is a schematic flowchart diagram of another transaction processing method according to an embodiment of the present invention; FIG. \¥0 2019/132767 卩 (: 17802017/050654 FIG. 6 is a schematic flow chart of still another transaction processing method according to an embodiment of the present invention;
图 7是本发明实施例提供的又一种交易处理方法的流程示意图;  FIG. 7 is a schematic flowchart diagram of still another transaction processing method according to an embodiment of the present invention; FIG.
图 8是本发明实施例提供的一种用户界面示意图;  FIG. 8 is a schematic diagram of a user interface according to an embodiment of the present invention;
图 9是本发明实施例提供的一种终端的结构示意图;  FIG. 9 is a schematic structural diagram of a terminal according to an embodiment of the present disclosure;
图 10是本发明实施例提供的一种交易处理设备的结构示意图;  FIG. 10 is a schematic structural diagram of a transaction processing device according to an embodiment of the present invention;
图 11是本发明实施例提供的另一种交易处理设备的结构示意图;  11 is a schematic structural diagram of another transaction processing device according to an embodiment of the present invention;
图 12是本发明实施例提供的一种终端的结构示意图;  FIG. 12 is a schematic structural diagram of a terminal according to an embodiment of the present disclosure;
图 13是本发明实施例提供的一种交易处理设备的结构示意图。  FIG. 13 is a schematic structural diagram of a transaction processing device according to an embodiment of the present invention.
具体实施方式  Detailed ways
下面将结合本发明实施例中的附图, 对本发明实施例中的技术方案进行详细的描 述。  The technical solutions in the embodiments of the present invention will be described in detail below with reference to the accompanying drawings in the embodiments of the present invention.
目前, 区块链是一个分布式数据库, 该分布式数据库中包括数量不断增长的有序 记录列表, 该有序记录列表被称为区块, 即每个区块包括预设时间段内按照时间排序 的交易记录。其中,每个区块都包含生成该区块的时间戳以及指向前一个区块的链接。  At present, the blockchain is a distributed database, which includes a growing number of ordered records lists, which are called blocks, that is, each block includes time according to a preset time period. Sorted transaction records. Each block contains a timestamp that generated the block and a link to the previous block.
其中, 区块链的构建是基于交易处理系统完成的, 例如, 请参阅图 1, 图 1是一 种交易处理系统的结构示意图, 图 1 所示的交易处理系统包括终端、 背书节点 Endorsing peer、 共识节点 Ordering peer以及提交节点 Committing peer。 其中, 该终端 为登录付款账号的终端, 该终端也可以称为付款方或发送方, 能够发起交易; 背书节 点、 共识节点以及提交节点可以分别位于不同的服务器中, 也可以位于同一个服务器 中, 还可以部署到云平台上来执行相关的功能, 故背书节点、 共识节点以及提交节点 统称为交易处理系统。  The construction of the blockchain is completed based on the transaction processing system. For example, please refer to FIG. 1. FIG. 1 is a schematic structural diagram of a transaction processing system. The transaction processing system shown in FIG. 1 includes a terminal, an endorsing peer, and an endorsing peer. The consensus node is the Ordering peer and the submitting node is the Committing peer. The terminal is a terminal that logs in to the payment account, and the terminal may also be called a payer or a sender, and can initiate a transaction; the endorsement node, the consensus node, and the submit node may be located in different servers, or may be located in the same server. It can also be deployed to the cloud platform to perform related functions, so the endorsement node, the consensus node, and the submitting node are collectively referred to as a transaction processing system.
其中, 终端, 用于发起交易, 可以获得交易内容、 针对该交易内容的签名、 收款 方的地址以及还拥有付款方的证书和收款方的证书。  The terminal is used to initiate a transaction, and the transaction content, the signature of the transaction content, the address of the payee, and the certificate of the payer and the certificate of the payee are also available.
背书节点, 用于验证付款方发起的交易请求消息, 而且可以在验证通过时, 模拟 运行交易内容, 获得交易结果, 并生成针对交易结果的签名。 例如, 背书节点可以验 证付款方对交易内容的签名、 付款方和收款方的证书、 收款方的地址等。  An endorsement node, used to verify the transaction request message initiated by the payer, and can simulate running the transaction content, obtain the transaction result, and generate a signature for the transaction result when the verification is passed. For example, the endorsement node can verify the signature of the transaction by the payer, the certificate of the payer and the payee, the address of the payee, and the like.
共识节点, 用于执行共识算法, 另外, 共识节点可以获得多个终端提交的多个交 易记录, 并根据提交的时间对多个交易记录进行排序, 获得有序的交易记录列表, 该 有序的交易记录列表称为块。  a consensus node, configured to execute a consensus algorithm. In addition, the consensus node may obtain multiple transaction records submitted by multiple terminals, and sort multiple transaction records according to the submitted time to obtain an ordered transaction record list, and the ordered The list of transaction records is called a block.
提交节点, 用于验证区块中各交易记录中付款方的签名和背书节点的签名, 并在 验证通过时, 可以将区块中的各交易记录存储在区块链上。 例如, 提交节点针对区块 中的每个交易记录验证该交易记录是否满足预设条件,若满足预设条件,则验证通过, 可以将相应的交易记录存储在区块链上。 其中, 该预设条件可以为: 每条交易记录中 需至少有十个背书节点的签名及相应的交易结果且各签名对应的交易结果是一致的。  The submitting node is used to verify the signature of the payer and the signature of the endorsement node in each transaction record in the block, and when the verification is passed, each transaction record in the block can be stored in the blockchain. For example, the submitting node verifies whether the transaction record satisfies a preset condition for each transaction record in the block. If the preset condition is met, the verification transaction is passed, and the corresponding transaction record can be stored in the blockchain. The preset condition may be: at least ten signatures of the endorsement nodes and corresponding transaction results in each transaction record, and the transaction results corresponding to the signatures are consistent.
另外, 交易记录存储到区块链上后, 收款方收款时可以根据自身的私钥和交易记 录中收款方的地址来确定该交易记录中收款人是否为自己。  In addition, after the transaction record is stored in the blockchain, the payee can determine whether the payee in the transaction record is himself or not based on its own private key and the address of the payee in the transaction record.
例如, 请参阅图 2, 图 2是基于图 1所示的区块链系统提供的一种交易处理方法 的流程示意图, 该交易处理方法可以包括以下步骤: \¥0 2019/132767 ?01/802017/050654 For example, please refer to FIG. 2. FIG. 2 is a schematic flowchart of a transaction processing method provided by the blockchain system shown in FIG. 1. The transaction processing method may include the following steps: \¥0 2019/132767 ?01/802017/050654
201、 终端利用付款账号的私钥生成交易内容的签名, 并获取付款账号和收款账 号的证书, 并根据收款账号的公钥来生成收款账号的接收地址; 201. The terminal generates a signature of the transaction content by using a private key of the payment account, obtains a certificate of the payment account and the payment account, and generates a receiving address of the payment account according to the public key of the payment account;
其中, 取款账号和收款账号的证书, 是证书机构根据付款账号和收款账号的公钥 生成的, 用于验证付款账号和收款账号是否具有使用该区块链系统的资格, 即是否具 有准入资格。 收款账号可以基于自身的公钥生成哈希值的方式来验证该接收地址是否 为自身。  The certificate of the withdrawal account and the payment account is generated by the certificate authority according to the public key of the payment account and the payment account, and is used to verify whether the payment account and the payment account have the qualification to use the blockchain system, that is, whether Access qualification. The receiving account can verify whether the receiving address is itself based on how the public key generates a hash value.
202、 终端向至少一个背书节点发送交易请求消息;  202. The terminal sends a transaction request message to the at least one endorsement node.
203、 至少一个背书节点中的每个背书节点可以验证该交易请求消息, 并在验证 通过时, 模拟运行交易内容, 获得交易结果信息;  203. Each endorsement node in the at least one endorsement node can verify the transaction request message, and when the verification passes, simulate running the transaction content to obtain the transaction result information;
204、 至少一个背书节点中每个背书节点分别向终端返回交易响应消息。  204. Each endorsement node in the at least one endorsement node respectively returns a transaction response message to the terminal.
该交易响应消息中携带相应的交易结果信息。  The transaction response message carries corresponding transaction result information.
其中, 每个背书节点验证交易请求消息可以包括以下步骤:  Wherein, each endorsement node verification transaction request message may include the following steps:
.背书节点验证该交易内容的签名, 即背书节点利用付款账号的公钥对该交易内 容的签名进行验证, 若验证通过, 则表明该交易是由付款账号发起的, 从而保证付款 账号的不可抵赖性;  The endorsement node verifies the signature of the transaction content, that is, the endorsement node verifies the signature of the transaction content by using the public key of the payment account, and if the verification passes, it indicates that the transaction is initiated by the payment account, thereby ensuring non-repudiation of the payment account. Sex
I) .背书节点验证付款账号和收款账号的证书, 即背书节点检查付款账号和收款账 号的证书是否为证书机构
Figure imgf000013_0001
颁发的证书, 若是, 则表示付款账号和收款账号具有执 行交易的资格, 即表示付款账号和收款账号具有准入资格;
I). The endorsement node verifies the certificate of the payment account and the payment account, that is, the endorsement node checks whether the certificate of the payment account and the payment account is a certificate authority.
Figure imgf000013_0001
The issued certificate, if yes, indicates that the payment account and the payment account have the qualification to execute the transaction, that is, the payment account and the payment account have the qualification to enter;
.背书节点验证收款方的地址, 其中, 收款方的证书是收款方的公钥, 故可以获 取还公钥的哈希值来验证是否与收款方的地址一致, 若一致, 则验证通过, 否则, 验 证不通过。  The endorsement node verifies the address of the payee, wherein the payee's certificate is the payee's public key, so the hash value of the public key can be obtained to verify whether it is consistent with the payee's address, if they are consistent, Verification passed, otherwise, verification failed.
若 3、 I) 以及 均验证通过, 则背书节点可以模拟运行该交易内容, 获得交易结 果信息。 其中, 交易结果信息包括交易结果和该背书节点利用自身的私钥生成的该交 易结果的签名。  If 3, I) and both are verified, the endorsement node can simulate the running of the transaction and obtain the transaction result information. The transaction result information includes a transaction result and a signature of the transaction result generated by the endorsement node using its own private key.
例如, 交易内容为付款方支付给收款方一定数量的交易金额, 则背书节点模拟运 行该交易内容, 获得的交易结果为付款方拥有的金额少了该数量的金额, 收款方拥有 的金额多了该数量的金额。  For example, if the transaction content is a certain amount of transaction amount paid by the payer to the payee, the endorsement node simulates running the transaction content, and the obtained transaction result is that the amount owned by the payer is less than the amount of the transaction, and the amount owned by the payee The amount of this amount is increased.
其中, 终端可以将交易请求消息同时发送给多个背书节点, 相应的, 可以获得多 个背书节点返回的交易响应消息, 终端可以根据该多个交易响应消息获得多个签名以 及相应的多个交易结果。  The terminal may send the transaction request message to multiple endorsement nodes simultaneously, and correspondingly, the transaction response message returned by the multiple endorsement nodes may be obtained, and the terminal may obtain multiple signatures and corresponding multiple transactions according to the multiple transaction response messages. result.
205、 终端接收至少一个背书节点返回的交易响应消息, 并向共识节点发送交易 记录消息。  205. The terminal receives a transaction response message returned by the at least one endorsement node, and sends a transaction record message to the consensus node.
其中, 该交易记录消息携带交易记录, 该交易记录包括交易内容、 交易内容的签 名、 付款账号和收款账号的证书以及至少一个交易结果信息。  Wherein, the transaction record message carries a transaction record, and the transaction record includes a transaction content, a signature of the transaction content, a payment account and a certificate of the payment account, and at least one transaction result information.
206、 共识节点接收该交易记录消息, 并将该终端发送的交易记录消息携带的交 易记录与其他终端发送的交易记录按照时间进行排序, 生成包括有序交易记录列表的 区块, 并将该区块发送给提交节点;  206. The consensus node receives the transaction record message, and sorts the transaction record carried by the transaction record message sent by the terminal with the transaction record sent by other terminals according to time, generates a block including the ordered transaction record list, and creates the area. The block is sent to the submitting node;
207、 提交节点接收该区块, 并验证该区块中的每个交易记录, 在验证通过时, \¥0 2019/132767 ?01/802017/050654 将该区块存储到区块链上。 207. The submitting node receives the block, and verifies each transaction record in the block. When the verification is passed, \¥0 2019/132767 ?01/802017/050654 Store this block on the blockchain.
其中, 提交节点验证该区块中的每个交易记录的方法相同, 因此, 此处以提交节 点验证该终端发送的交易记录消息中的交易记录为例进行阐述。 提交节点验证交易记 录主要包括: 提交节点根据付款账号的公钥来验证交易内容的签名; 提交节点根据背 书节点的公钥来验证相应的交易结果的签名; 提交节点验证交易记录中交易结果信息 是否满足预设条件, 例如, 该预设条件为交易记录中需至少有十个背书节点的签名及 相应的交易结果且各签名对应的交易结果是一致的。 这样, 所有的验证均通过时, 提 交节点可以将该交易记录存储到区块链上。 具体的, 该交易记录是以共识节点生成的 区块的形式存储到区块链上的, 该区块的时间戳为共识节点生成该区块的时间, 该区 块中指向上一个区块的链接为根据上一个区块确定的编号。  The method for the submitting node to verify each transaction record in the block is the same. Therefore, the transaction record in the transaction record message sent by the terminal is verified by the submitting node as an example. The submitting node verification transaction record mainly includes: the submitting node verifies the signature of the transaction content according to the public key of the payment account; the submitting node verifies the signature of the corresponding transaction result according to the public key of the endorsement node; and submits the node to verify whether the transaction result information in the transaction record is The preset condition is met. For example, the preset condition is that the transaction record requires at least ten signatures of the endorsement node and the corresponding transaction result, and the transaction result corresponding to each signature is consistent. Thus, when all verifications pass, the submitting node can store the transaction record on the blockchain. Specifically, the transaction record is stored in the blockchain in the form of a block generated by the consensus node, and the timestamp of the block is the time at which the consensus node generates the block, and the link in the block points to the previous block. Is the number determined according to the previous block.
可见, 图 2所示的交易处理方法中, 交易内容的签名是根据付款账号的私钥来获 得的, 验证方可以利用付款账号的公钥来验证该签名, 并在验证通过时, 确认该交易 内容是该付款账号发起的, 从而避免付款账号的抵赖。 由于图 2所示的交易处理方法中,交易内容的签名是利用付款账号的私钥生成的, 因此, 验证方需要获知该付款账号的公钥验证该签名, 以避免付款账号抵赖该交易内 容。 这也就导致除了交易双方外, 任何拥有该付款账号的公钥的第三方都可以识别出 付款账号所发起的所有交易, 也就无法保护付款账号的身份匿名性。  It can be seen that in the transaction processing method shown in FIG. 2, the signature of the transaction content is obtained according to the private key of the payment account, and the verification party can verify the signature by using the public key of the payment account, and confirm the transaction when the verification is passed. The content is initiated by the payment account, thereby avoiding the repudiation of the payment account. Since the transaction processing method is generated by using the private key of the payment account in the transaction processing method shown in Fig. 2, the authenticator needs to know the public key of the payment account to verify the signature, so as to avoid the payment account from repudiating the transaction content. This also results in any party other than the transaction, any third party that has the public key of the payment account can identify all transactions initiated by the payment account, and thus cannot protect the identity anonymity of the payment account.
另外, 图 2中, 交易内容的接收地址为收款账号的公钥的哈希值, 验证者验证收 款账号访问区块链系统的资格也是根据收款账号的证书来判断的, 导致第三方一旦知 道收款账号的公钥, 就可以识别该收款账号所对应的交易, 也就无法保护收款账号的 身份匿名性。  In addition, in FIG. 2, the receiving address of the transaction content is the hash value of the public key of the receiving account, and the certifier verifies that the eligibility of the receiving account to access the blockchain system is also determined according to the certificate of the receiving account, resulting in a third party. Once the public key of the payment account is known, the transaction corresponding to the payment account can be identified, and the identity anonymity of the payment account cannot be protected.
另外, 为了使验证方验证交易金额是否正确, 交易内容还需要携带交易金额, 从 而使得第三方能够获知付款账号与收款账号之间的交易金额。 例如, 交易输入金额是 否等于交易输出金额, 避免付款账号拥有的交易输入金额小于交易输出金额所产生的 非法交易。  In addition, in order for the verifier to verify that the transaction amount is correct, the transaction content also needs to carry the transaction amount, so that the third party can know the transaction amount between the payment account and the payment account. For example, if the transaction input amount is equal to the transaction output amount, it is avoided that the transaction account has a transaction input amount smaller than the transaction output amount.
可见, 图 2中, 除了交易双方外, 第三方如背书节点、 共识节点以及提交节点都 需要获知付款账号的公钥、 收款账号的公钥以及交易内容, 而获知付款账号和收款账 号的公钥就相当于获知了付款方和收款方的身份信息, 也就导致交易中付款方、 收款 方以及交易金额的隐私性得不到保护。  It can be seen that in Figure 2, in addition to the two parties, the third party, such as the endorsement node, the consensus node, and the submitting node, need to know the public key of the payment account, the public key of the payment account, and the transaction content, and learn the payment account and the payment account. The public key is equivalent to knowing the identity information of the payer and the payee, which results in the privacy of the payer, the payee and the transaction amount in the transaction.
为了解决该问题, 本发明实施例提供一种交易处理方法, 能够根据业务设置, 来 选择保护付款方、 收款方和/或交易金额的隐私性。  In order to solve the problem, an embodiment of the present invention provides a transaction processing method capable of selecting privacy of a payment party, a payee, and/or a transaction amount according to a service setting.
为了便于理解本发明实施例, 首先对相关概念或术语进行阐述。  In order to facilitate an understanding of the embodiments of the present invention, the related concepts or terms are first described.
本发明实施例中, 签名是指数字签名, 或数字信息的签名信息, 如交易内容的签 名信息或签名; 数字签名是一种类似写在纸上的普通的物理签名, 使用了公钥密码领 域的技术实现, 用于鉴别数字信息的方法。 数字签名应用了公钥密码领域使用的单向 函数原理生了长期公钥和长期私钥。 其中, 单向函数是指正向操作非常简单, 逆向操 作非常困难的函数。 一套数字签名通常定义两种互补的运算, 一个用于签名, 另一个 \¥0 2019/132767 卩(:17802017/050654 用于验证; 例如, 签名者可以利用私钥与数字信息计算一个函数生成该数字信息的签 名; 在验证运算中, 验证者可用相应的公钥、 该数字信息以及该签名进行计算, 来确 定该签名是否正确。 In the embodiment of the present invention, the signature refers to a digital signature, or signature information of digital information, such as signature information or signature of a transaction content; a digital signature is a common physical signature written on paper, using a public key cryptography field. Technical implementation, a method for identifying digital information. Digital signatures apply the principle of one-way functions used in the field of public key cryptography to generate long-term public keys and long-term private keys. Among them, the one-way function refers to a function in which the forward operation is very simple and the reverse operation is very difficult. A set of digital signatures usually defines two complementary operations, one for signature, the other. \¥0 2019/132767 卩(:17802017/050654 is used for verification; for example, the signer can use a private key and digital information to calculate a function to generate a signature of the digital information; in the verification operation, the verifier can use the corresponding public key, The digital information and the signature are calculated to determine if the signature is correct.
本发明实施例中, 第一账号为发起交易内容的账号, 可以称为付款账号或支付账 号; 第二账号为第一账号发起的交易内容所针对的账号, 也就是说, 第二账号可以为 交易内容的接收方, 可以称为收款账号; 相应的, 第一账号在其他交易中也可以称为 收款账号, 第二账号也可以称为付款账号, 为了便于理解, 本发明实施例中, 第一账 号为付款账号, 第二账号为收款账号。  In the embodiment of the present invention, the first account is an account that initiates transaction content, and may be referred to as a payment account or a payment account; the second account is an account for which the transaction content initiated by the first account is directed, that is, the second account may be The recipient of the transaction content may be referred to as a payment account; correspondingly, the first account may also be referred to as a payment account in other transactions, and the second account may also be referred to as a payment account. For ease of understanding, in the embodiment of the present invention, The first account is a payment account, and the second account is a payment account.
相应的, 登录第一账号的终端为图 3A至图 3D 中的终端, 该终端可以称为付款 终端; 登录第二账号的终端可以称为收款终端, 在图 3A至图 3D中未体现。  Correspondingly, the terminal that logs in to the first account is the terminal in FIG. 3A to FIG. 3D, and the terminal may be referred to as a payment terminal; the terminal that logs in to the second account may be referred to as a payment terminal, which is not embodied in FIG. 3A to FIG. 3D.
终端在执行交易处理方法之前, 可以根据第一账号的用户在登录第一账号的终端 上所选择的隐私保护方式, 如选择保护第一账号、 第二账号以及交易内容中的交易金 额中的任一项或多项的隐私性, 来选择本申请所述的实施例执行相应的交易处理方法。  Before executing the transaction processing method, the terminal may select, according to the privacy protection method selected by the user of the first account on the terminal that logs in to the first account, such as selecting to protect the first account, the second account, and the transaction amount in the transaction content. One or more of the privacy, the embodiments described herein are selected to perform the corresponding transaction processing method.
例如, 请参阅图 8, 图 8是本发明实施例提供的一种用户界面示意图, 如图 8所 示, 该示意图以手机为例, 付款账号可以包括多个, 用户通过终端的输入方式从中选 择本次交易要使用的付款账号; 用户还可以通过终端的输入方式在该用户界面中输入 收款方的收款账号以及支付的金额, 并在该用户界面中选择需要隐私保护的选项, 如 图 8所示, 选择付款账号的隐私性保护。 可选的, 本发明实施例中, 终端接收针对用 户界面输入的付款账号或者选择的付款账号、 收款账号、 金额以及选择的隐私保护选 项;终端根据所选的隐私保护选项,执行以下实施例中相关的操作,完成该支付过程, 即完成该交易过程。  For example, please refer to FIG. 8. FIG. 8 is a schematic diagram of a user interface according to an embodiment of the present invention. As shown in FIG. 8 , the mobile phone is used as an example. The payment account may include multiple users, and the user selects the input mode through the terminal. The payment account to be used in this transaction; the user can also input the payment account of the payee and the amount paid in the user interface through the input mode of the terminal, and select the option that needs privacy protection in the user interface, as shown in the figure. As shown in 8, select the privacy protection of the payment account. Optionally, in the embodiment of the present invention, the terminal receives the payment account entered for the user interface or the selected payment account, the payment account, the amount, and the selected privacy protection option; the terminal executes the following embodiments according to the selected privacy protection option. In the related operation, the payment process is completed, that is, the transaction process is completed.
以下对可选的实施例进行详述。 实施例一  The optional embodiments are described in detail below. Embodiment 1
为了保护付款账号的隐私性, 本发明实施例基于图 3A或图 3B所示的交易处理 系统提出了一种交易处理方法, 可以保护付款账号的隐私性。 如图 3A或图 3B所示 的交易处理系统, 该交易处理系统至少包括至少一个终端和至少一个交易处理系统, 该至少一个终端可以分别登录至少一个付款账号, 本发明实施例中, 该付款账号也可 以称为第一账号, 其中, 该交易处理方法中, 每个终端对所登录的付款账号发起的交 易的处理过程相同。 至少一个交易处理系统中每个交易处理系统对终端提交的交易的 处理过程也相同, 每个交易处理系统可以由一个相应的机构来維护, 例如, 金融业的 联盟链场景中, 每家银行可以維护一个交易处理系统, 来处理该银行的用户账号所登 录的终端提交的交易; 其中, 每个交易处理系统至少包括至少一个背书节点、 共识节 点以及提交节点, 至少一个背书节点、 共识节点以及提交节点与上述图 1所示的区块 链系统中的背书节点、 共识节点以及提交节点的功能相同。  In order to protect the privacy of the payment account, the embodiment of the present invention proposes a transaction processing method based on the transaction processing system shown in FIG. 3A or FIG. 3B, which can protect the privacy of the payment account. As shown in FIG. 3A or FIG. 3B, the transaction processing system includes at least one terminal and at least one transaction processing system, and the at least one terminal can separately log in at least one payment account. In the embodiment of the present invention, the payment account is It may also be referred to as a first account, wherein, in the transaction processing method, each terminal processes the transaction initiated by the registered payment account. Each transaction processing system in at least one transaction processing system processes the transactions submitted by the terminal, and each transaction processing system can be maintained by a corresponding organization, for example, in the financial industry's alliance chain scenario, each bank A transaction processing system can be maintained to process transactions submitted by terminals registered by the bank's user account; wherein each transaction processing system includes at least one endorsement node, consensus node, and submission node, at least one endorsement node, consensus node And the submitting node has the same function as the endorsement node, the consensus node, and the commit node in the blockchain system shown in FIG. 1 described above.
其中, 图 3A所示的交易处理系统中, 每个交易处理系统还可以包括一个管理节 点 Group Manager; 图 3B所示的交易处理系统中, 背书节点还可以执行管理节点的功 能。 也就是说, 管理节点可以为独立于交易处理系统的一个节点, 也可以为与证书机 构的证书颁发节点合并为一个节点, 还可以与交易处理系统中的背书节点合并为一个 节点, 管理节点用于为付款账号生成凭据, 来保护付款账号的身份隐私性。 In the transaction processing system shown in FIG. 3A, each transaction processing system may further include a management node Group Manager; in the transaction processing system shown in FIG. 3B, the endorsement node may also perform the function of the management node. In other words, the management node can be a node independent of the transaction processing system, or it can be a certificate machine. The certificate issuing nodes are merged into one node, and can also be merged with the endorsement node in the transaction processing system into one node, and the management node is used to generate credentials for the payment account to protect the identity privacy of the payment account.
本发明实施例中, 每个交易处理系统可以为一个服务器, 该服务器来执行交易处 理系统中各节点的功能; 每个交易处理系统也可以为多个服务器, 例如, 每个节点对 应一个服务器来执行相应的功能, 由于本发明实施例中, 交易处理系统中背书节点、 共识节点以及提交节点之间的交互与现有技术中类似, 故本发明实施例将交易处理系 统统称为交易处理设备, 由交易处理设备来执行各节点的功能; 相应的, 由于每个终 端与交易处理设备的交互过程也相同, 因此, 如图 3C所示, 将图 3A所示的交易处 理系统抽象为包括一个终端、 一个交易处理设备以及一个管理设备的系统; 相应的, 如图 3D所示, 将图 3B所示的交易处理系统抽象为包括一个终端和一个交易处理设 备的系统, 其中, 图 3D 中, 交易处理设备还可以执行管理设备的功能, 为付款账号 生成凭据, 来保护付款账号的身份隐私性。  In the embodiment of the present invention, each transaction processing system may be a server that performs functions of each node in the transaction processing system; each transaction processing system may also be multiple servers, for example, each node corresponds to one server. The transaction processing system is collectively referred to as a transaction processing device, and the interaction between the endorsement node, the consensus node, and the submit node in the transaction processing system is similar to that in the prior art. The functions of the nodes are executed by the transaction processing device; correspondingly, since the interaction process of each terminal with the transaction processing device is also the same, as shown in FIG. 3C, the transaction processing system shown in FIG. 3A is abstracted to include one terminal. a transaction processing device and a system for managing the device; correspondingly, as shown in FIG. 3D, the transaction processing system shown in FIG. 3B is abstracted into a system including a terminal and a transaction processing device, wherein, in FIG. 3D, the transaction The processing device can also perform the function of managing the device, Account credentials generated to protect the identity of privacy payment account.
另外, 本发明实施例中, 将收款账号统称为第二账号, 登陆收款账号的终端也可 以称为收款方或者接收方。  In addition, in the embodiment of the present invention, the collection account is collectively referred to as the second account, and the terminal that logs in to the payment account may also be referred to as a payee or a recipient.
本发明实施例中, 终端生成交易内容的签名信息时, 不再利用付款账号的私钥来 生成, 而是利用付款账号的凭据来生成交易内容的签名信息。 这样, 即使拥有付款账 号的公钥的第三方, 也无法识别出该签名信息就是该付款账号所登录的终端生成的; 相应的, 验证者如背书节点和提交节点在验证该交易内容的签名信息时, 也不再使用 付款账号的公钥来验证, 而是利用生成该凭据的管理设备的公钥来验证, 从而避免整 个交易处理过程中, 付款账号的公钥被验证者或者任何第三方获知, 有效的保护了付 款账号的隐私性。  In the embodiment of the present invention, when the terminal generates the signature information of the transaction content, the terminal does not use the private key of the payment account to generate, but uses the credentials of the payment account to generate the signature information of the transaction content. Thus, even a third party having a public key of the payment account cannot recognize that the signature information is generated by the terminal to which the payment account is logged in; correspondingly, the verifier, such as the endorsement node and the submitting node, verify the signature information of the transaction content. When the public key of the payment account is no longer used for verification, the public key of the management device that generated the certificate is used for verification, so that the public key of the payment account is known by the verifier or any third party during the entire transaction process. , effectively protect the privacy of the payment account.
为了便于后续描述, 本发明实施例将付款账号的凭据所生成的交易内容的签名信 息称为第一签名信息。  In order to facilitate the subsequent description, the embodiment of the present invention refers to the signature information of the transaction content generated by the credentials of the payment account as the first signature information.
本发明实施例中, 终端可以将付款账号需要隐私保护的内容发送给管理设备, 管 理设备根据该需要隐私保护的内容为付款账号生成凭据。 例如, 管理设备根据付款账 号的一次性公钥和 /或拥有的交易金额生成付款账号的凭据。  In the embodiment of the present invention, the terminal may send the content of the payment account that needs privacy protection to the management device, and the management device generates the credentials for the payment account according to the content that needs privacy protection. For example, the management device generates credentials for the payment account based on the one-time public key of the payment account and/or the transaction amount owned.
由于该凭据是管理设备为付款账号签发的, 因此, 付款账号一旦采用该凭据生成 交易内容的签名时, 就对该交易内容不能抵赖。 从而, 可以在保护付款账号的隐私性 的同时, 保持交易内容的不可抵赖性。  Since the credential is issued by the management device for the payment account, once the payment account uses the credential to generate the signature of the transaction content, the transaction content cannot be denied. Thus, the non-repudiation of the transaction content can be maintained while protecting the privacy of the payment account.
在一些实施例中, 终端获取付款账号的凭据可以包括以下步骤:  In some embodiments, the obtaining the credentials of the payment account by the terminal may include the following steps:
11 ) 终端向管理设备发送凭据请求消息, 所述凭据请求消息中包括所述第一账号 的所述一次性公钥和 /或所述第一账号具有的交易金额的密文;  The terminal sends a credential request message to the management device, where the credential request message includes the one-time public key of the first account and/or the ciphertext of the transaction amount of the first account;
12) 终端接收所述管理设备返回的凭据响应消息, 所述凭据响应消息中包括所述 第一账号的凭据, 所述第一账号的凭据是所述管理设备根据所述第一账号的所述一次 性公钥和 /或所述第一账号具有的交易金额的密文生成的。  The terminal receives the credential response message returned by the management device, where the credential response message includes the credential of the first account, and the credential of the first account is the management device according to the first account. The one-time public key and/or the ciphertext of the transaction amount of the first account is generated.
例如, 终端将付款账号 Alice的一次性公钥 0tpkAiiee提交给管理设备, 管理设备根 据自身的私钥 ^ = a以及随机数 X ice, 为 Alice生成的凭据 credential为 (A Alice, XAlice), 其中: \¥0 2019/132767 卩(:17802017/050654
Figure imgf000017_0001
For example, the terminal submits the one-time public key 0tpk Aiiee of the payment account Alice to the management device, and the management device generates the credentials credential for Alice according to its private key ^=a and the random number X ice (A Alice, XAlice), where : \¥0 2019/132767 卩(:17802017/050654
Figure imgf000017_0001
其中, gl、 g2以及 h为系统参数。 Where gl , g 2, and h are system parameters.
再例如, 终端将付款账号 Alice所拥有的金额 C 以及一次性公钥 0tpkAiice提交给 管理设备,管理设备根据自身的私钥 gs/c = ir以及随机数 XAiice,为 Alice生成的 credential 为 (AAlice, ^Alice), 其中.
Figure imgf000017_0002
For another example, the terminal submits the amount C owned by the payment account Alice and the one-time public key 0tpk Aiice to the management device, and the management device generates the credit for Alice according to its private key gs/c = ir and the random number X Aiice ( AA lice , ^A lice ), where.
Figure imgf000017_0002
其中, gl、 g2以及 h为系统参数。 Where gl , g 2, and h are system parameters.
又例如, 终端仅将付款账号所拥有的金额 C发送给管理设备, 那么管理设备为付 款账号 Alice所生成的凭据中, otpkMice等于 1。 For another example, the terminal only sends the amount C owned by the payment account to the management device, and the otpk Mice is equal to 1 in the credentials generated by the management device for the payment account Alice.
本发明实施例中的交易处理方法与图 2所示的交易处理方法相比,不同之处在于, 本发明实施例中, 终端是根据付款账号的凭据来生成交易内容的第一签名信息的, 相 应的, 交易处理设备验证交易请求消息, 获得的第一验证结果; 以及交易处理设备验 证交易记录消息, 获得的第二验证结果, 该第一验证结果和第二验证结果均包括第一 签名信息的验证结果, 该第一签名信息的验证结果是交易处理设备根据管理设备的公 钥以及第一签名信息中的验证参数进行验证计算获得的。  The transaction processing method in the embodiment of the present invention is different from the transaction processing method shown in FIG. 2 in that, in the embodiment of the present invention, the terminal generates the first signature information of the transaction content according to the credentials of the payment account. Correspondingly, the transaction processing device verifies the transaction request message, the obtained first verification result; and the transaction processing device verifies the transaction record message, and the obtained second verification result, the first verification result and the second verification result both include the first signature information The verification result of the first signature information is obtained by the transaction processing device performing verification calculation according to the public key of the management device and the verification parameter in the first signature information.
另外, 在第一验证结果中时, 该第一签名信息的验证结果用于指示该第一账号是 否为能够访问交易处理设备的账号, 或者是否为该交易处理设备颁发的账号, 或者为 该第一账号是否具有访问该交易处理设备的权限; 在第二验证结果中时, 该第一签名 信息的验证结果用于指示该第一账号是否具有使用该区块链的权限, 也就是说是否能 够将该第一账号相关的交易记录存储到区块链上, 可选的, 该第一签名信息的验证结 果的作用可与验证是否通过后相关的操作所关联, 本申请不做限定。  In addition, in the first verification result, the verification result of the first signature information is used to indicate whether the first account is an account that can access the transaction processing device, or whether the account is issued by the transaction processing device, or is the first Whether an account has the right to access the transaction processing device; in the second verification result, the verification result of the first signature information is used to indicate whether the first account has the right to use the blockchain, that is, whether The transaction record related to the first account is stored in the blockchain. Optionally, the function of the verification result of the first signature information may be associated with the operation related to whether the verification is performed, and the application is not limited.
具体的, 如图 4所示, 本发明实施例所述的交易处理方法可以包括以下步骤: Specifically, as shown in FIG. 4, the transaction processing method in the embodiment of the present invention may include the following steps:
5301、 终端根据第一账号的凭据生成交易内容的第一签名信息, 所述交易内容是 终端基于所述第一账号发起的, 所述凭据是根据管理设备利用自身的私钥为第一账号 生成的; 5301. The terminal generates first signature information of the transaction content according to the credential of the first account, where the transaction content is initiated by the terminal based on the first account, and the credential is generated by using the private key of the management device as the first account. of;
其中, 终端根据第一账号的凭据生成交易内容的第一签名信息时, 还需要根据第 一账号作为收款方时接收该笔交易金额时使用的是一次性公钥的地址还是长期公钥 的哈希值的地址, 来确定是根据第一账号的一次性私钥和凭据来生成第一签名信息, 还是根据第二账号的长期私钥和凭据来生成第一签名信息; 也就是说, 当第一账号作 为收款方接收本次待消费的金额时使用的是一次性公钥的地址, 则第一账号作为付款 方消费该金额时, 步骤 S301 为终端根据第一账号的一次性私钥和凭据生成交易内容 的第一签名信息; 当第一账号作为收款方接收本次待消费的金额时使用的是长期公钥 的哈希值的地址, 则第一账号作为付款方消费该金额时, 步骤 S301 为终端根据第一 账号的长期私钥和凭据生成交易内容的第一签名信息。  When the terminal generates the first signature information of the transaction content according to the credentials of the first account, the terminal also needs to use the address of the one-time public key or the long-term public key when receiving the transaction amount according to the first account as the payee. The address of the hash value, to determine whether the first signature information is generated according to the one-time private key and the credential of the first account, or the first signature information is generated according to the long-term private key and the credential of the second account; that is, when When the first account is used as the payee to receive the amount to be consumed, the address of the one-time public key is used, and when the first account is used as the payer to consume the amount, step S301 is the one-time private key of the terminal according to the first account. And the credential generates the first signature information of the transaction content; when the first account is used as the payee to receive the amount to be consumed this time, the address of the hash value of the long-term public key is used, and the first account is used as the payer to consume the amount At step S301, the terminal generates first signature information of the transaction content according to the long-term private key and the credential of the first account.
5302、 所述终端向所述交易处理设备发送交易请求消息, 所述交易请求消息包括 所述第一签名信息和所述交易内容;  5302. The terminal sends a transaction request message to the transaction processing device, where the transaction request message includes the first signature information and the transaction content.
5303、 交易处理设备根据交易请求消息向终端返回交易响应消息, 所述交易响应 \¥0 2019/132767 卩(:17802017/050654 消息包括所述交易结果信息; 5303. The transaction processing device returns a transaction response message to the terminal according to the transaction request message, where the transaction response \¥0 2019/132767 卩 (:17802017/050654 message includes the transaction result information;
其中, 所述交易结果信息可以为多个, 该多个交易结果信息可以分别为交易处理 设备中多个背书节点模拟运行交易内容获得的。  The transaction result information may be multiple, and the plurality of transaction result information may be respectively obtained by simulating running transaction content of multiple endorsement nodes in the transaction processing device.
其中, 交易处理设备根据交易请求消息向终端返回交易响应消息之前, 所述方法 还包括: 所述交易处理设备验证所述交易请求消息, 获得第一验证结果; 当所述第一 验证结果为通过时, 所述交易处理设备运行所述交易内容, 获得交易结果信息。  The method further includes: the transaction processing device verifying the transaction request message to obtain a first verification result; and when the first verification result is a pass, before the transaction processing device returns a transaction response message to the terminal according to the transaction request message The transaction processing device runs the transaction content to obtain transaction result information.
8304、 所述终端根据交易响应消息向所述交易处理设备发送交易记录消息;8304. The terminal sends a transaction record message to the transaction processing device according to the transaction response message.
8305、 交易处理设备将交易记录消息携带的交易记录存储到区块链上。 8305. The transaction processing device stores the transaction record carried in the transaction record message on the blockchain.
其中, 所述交易处理设备验证所述交易记录消息, 获得第二验证结果; 当所述第 二验证结果为通过时, 所述交易处理设备执行 305将所述交易记录消息携带的交易记 录存储到区块链上的步骤。  The transaction processing device verifies the transaction record message to obtain a second verification result; when the second verification result is passed, the transaction processing device executes 305 to store the transaction record carried by the transaction record message to Steps on the blockchain.
其中, 所述交易记录包括所述交易内容、 所述第一签名信息以及所述交易结果信 息;  The transaction record includes the transaction content, the first signature information, and the transaction result information;
其中, 所述第一验证结果和所述第二验证结果均包括所述第一签名信息的验证结 果, 所述第一签名信息的验证结果是所述交易处理设备根据所述管理设备的公钥与所 述第一签名信息中的验证参数进行验证计算获得的。  The first verification result and the second verification result both include a verification result of the first signature information, and the verification result of the first signature information is that the transaction processing device is based on a public key of the management device And obtained by performing verification calculation with the verification parameter in the first signature information.
需要注意的是, 虽然步骤 8301至 8305未提到第二账号以及交易金额的相关处理 步骤, 但为了实现交易处理方法, 本领域技术人员可以与本发明实施例所述的第二账 号以及交易金额的相关处理步骤或现有技术中如图 2中对第二账号以及交易金额的相 关处理步骤相结合, 验证第二账号的准入资格、 交易金额的正确性以及第一账号的准 入资格。 例如, 假设只保护第一账号的匿名性, 第二账号和交易金额均采用现有技术 中的处理方法, 则除了终端生成第一签名信息外, 交易内容中还需要携带输入金额的 明文和输出金额的明文以使交易处理设备验证交易的准确性; 同时交易内容中还需要 携带第二账号的通常意义的证书 (即第二账号的长期公钥, 不同于实施例二中利用第 二账号的长期公钥生成的能够进行零知识证明的证书) 以使交易处理设备验证第二账 号的准入资格, 同时, 交易内容的接收地址即第二账号的地址为第二账号的长期公钥 的哈希值, 故第一验证结果还包括交易处理设备对交易金额的验证结果和对第二账号 的证书的验证结果。  It should be noted that, although the steps 8301 to 8305 do not mention the second account and the processing steps of the transaction amount, in order to implement the transaction processing method, the person skilled in the art may and the second account and the transaction amount described in the embodiment of the present invention. The related processing steps are combined with the related processing steps of the second account and the transaction amount in FIG. 2 in the prior art, and the qualification of the second account, the correctness of the transaction amount, and the qualification of the first account are verified. For example, if only the anonymity of the first account is protected, and the second account and the transaction amount are processed in the prior art, in addition to the first signature information generated by the terminal, the transaction content also needs to carry the plaintext and output of the input amount. The plain text of the amount is used to enable the transaction processing device to verify the accuracy of the transaction; at the same time, the transaction content also needs to carry the certificate of the usual meaning of the second account (ie, the long-term public key of the second account, which is different from the second account in the second embodiment) A long-term public key generated certificate capable of zero-knowledge proof) to enable the transaction processing device to verify the access qualification of the second account, and at the same time, the receiving address of the transaction content, that is, the address of the second account is the long-term public key of the second account. The value of the first verification includes the verification result of the transaction processing device and the verification result of the certificate of the second account.
其中, 第一账号的准入资格或第二账号的准入资格是根据第一签名信息或第二签 名信息的验证结果获得的, 具体该准入资格是指第一账号和第二账号是否具有使用区 块链的权限, 还是是否能够访问交易处理设备, 还是是否为交易处理设备颁发的账号 等, 可以根据验证结果是否通过后的相关操作来限定。 例如, 第一签名信息的验证结 果在第一验证结果中时, 该第一签名信息的验证结果用于指示第一账号是否能够访问 交易处理设备; 第一签名信息的验证结果在第二验证结果中时, 该第一签名信息的验 证结果用于指示第一账号是否具有使用区块链的权限。  The access qualification of the first account or the access qualification of the second account is obtained according to the verification result of the first signature information or the second signature information, where the admission qualification refers to whether the first account and the second account have Whether to use the permission of the blockchain, whether to access the transaction processing device, or whether to issue an account for the transaction processing device, etc., may be limited according to whether the verification result is passed after the relevant operation. For example, when the verification result of the first signature information is in the first verification result, the verification result of the first signature information is used to indicate whether the first account is able to access the transaction processing device; the verification result of the first signature information is in the second verification result. The verification result of the first signature information is used to indicate whether the first account has the right to use the blockchain.
本发明实施例中, 该第一签名信息为零知识证明的签名, 即终端可以根据付款账 号的凭据利用零知识证明算法生成交易内容的第一签名信息。 相应的, 验证者如交易 处理设备可以利用管理设备的公钥 p/C来验证该零知识证明的第一签名信息。 其中, 零知 识证明是指证明者针对要保密的有用信息进行一系列的数学计算获得一个签名, 该签 名就是一系列参数, 该系列参数中不包括要保密的有用信息; 验证者可以利用该系列 参数来执行一系列的数学计算, 根据数学计算的结果可以验证证明者针对该有用信息 的论断, 即验证证明者的论断是正确的, 通常该论断即为证明者能够获知要保密的有 用信息的论断。 In the embodiment of the present invention, the first signature information is a signature of the knowledge certificate, that is, the terminal may generate the first signature information of the transaction content by using a zero-knowledge proof algorithm according to the credentials of the payment account. Correspondingly, the verifier is a transaction The processing device may verify the first signature information of the zero knowledge certificate by using the public key p/ C of the management device. Among them, the zero-knowledge proof means that the prover performs a series of mathematical calculations on the useful information to be confidential to obtain a signature, which is a series of parameters, and the series of parameters does not include useful information to be kept secret; the verifier can utilize the series The parameters are used to perform a series of mathematical calculations. According to the results of the mathematical calculation, the prover's assertion on the useful information can be verified, that is, the verifier's argument is correct. Usually, the argument is that the prover can know the useful information to be kept secret. thesis.
例如, 交易处理设备验证通过时, 可以相信终端针对第一签名信息的论断: 付款账号具 有管理设备签发的凭据 credential以及一次性私钥, 即付款账号具有准入证明。  For example, when the transaction processing device passes the verification, the terminal can be trusted to judge the first signature information: the payment account has the credential issued by the management device and the one-time private key, that is, the payment account has the admission certificate.
其中, 该零知识证明 ( Signature of knowledge, SoK) 的表达式为:  The expression of the Signature of knowledge (SoK) is:
SoK{ (secret value):“relations to proof’} (Message to sign) ;  SoK{ (secret value): "relations to proof"} (Message to sign) ;
该表达式中 (secret value)是证明者的秘密, 例如, 付款账号具有一次性私钥和管 理设备为付款账号签发的凭据等; “relations to proof’是想证明的关系, 例如, 想证明 的关系或论断为: 终端能够获知付款账号的一次性私钥和管理设备为付款账号签发的 凭据; (Message to sign) 的部分是要签名的文件, 例如, 该文件可以为付款账号发起 的交易内容; 在表达式中所有不属于证明者秘密的符号都是公开的数值, 例如, 登录 付款账号的终端设置付款账号的匿名性, 而没有设置保护收款账号以及交易金额的隐 私性, 则关于收款账号和交易金额的相关参数都是公开的; 另外, 该零知识证明中所 用的除了证明者秘密的其他参数都可以是公开的, 可以包含在签名中, 如系统参数可 以包括在第一签名信息中, 统称为验证参数。  The secret value is the secret of the prover. For example, the payment account has a one-time private key and the credentials issued by the management device for the payment account; "relations to proof" is the relationship to be proved, for example, to prove The relationship or assertion is: the terminal can know the one-time private key of the payment account and the certificate issued by the management device for the payment account; the part of (Message to sign) is the file to be signed, for example, the transaction content that the file can initiate for the payment account All symbols in the expression that are not part of the prover's secret are public values. For example, if the terminal that logs in to the payment account sets the anonymity of the payment account, and does not set the protection of the payment account and the privacy of the transaction amount, then The relevant parameters of the account number and the transaction amount are all public; in addition, other parameters except the prover secret used in the zero-knowledge proof may be public and may be included in the signature, such as the system parameter may be included in the first signature In the information, they are collectively referred to as verification parameters.
举例来说, 假设付款账号为 Alice, 并且 Alice本次要消费的金额是 Alice作为收 款方时从自身的一次性公钥的地址获得的, 故本次交易的第一签名信息需使用 Alice 的一次性私钥 ots/¾iic;e, 管理设备为 Alice签发的凭据为 (AAlie, XAiie), 其中, 该凭据是 管理设备根据第一账号的一次性公钥和第一账号具有的交易金额的密文生成的, 管理 设备的公钥 gpk= g^ , 则终端利用零知识证明为交易内容生成的签名的表达式为: For example, suppose the payment account is Alice, and the amount that Alice wants to consume this time is obtained from the address of its one-time public key when Alice is the payee, so the first signature information of this transaction needs to use Alice's The one-time private key ots/3⁄4 iic;e , the credentials issued by the management device for Alice are (A Ali . e , XAii . e ), where the credential is the one-time public key and the first account of the management device according to the first account If the ciphertext of the transaction amount is generated, and the public key of the management device is gpk=g^, the expression of the signature generated by the terminal using the zero-knowledge proof for the transaction content is:
S〇K{(〇tsk^|jce, A^|jce, XAlice) : S〇K{(〇tsk^|j ce , A^|j ce , XAlice) :
e(AAlice, g2 - g2 Alice) = e( tskAlice) }(Txl) 其中, Txl为要签名的交易内容; 统参数; e(A Alice , g 2 - g 2 Alice ) = e( tsk Alice ) }(Txl) where Txl is the transaction content to be signed;
〇 随机生成
Figure imgf000019_0001
〇 Random generation
Figure imgf000019_0001
o 计算: o Calculation:
\¥0 2019/132767 卩(:17802017/050654 \¥0 2019/132767 卩(:17802017/050654
〇 第一签名信
Figure imgf000020_0001
〇First signature letter
Figure imgf000020_0001
因此, 终端向交易处理设备发送的交易请求消息和交易记录消息中只需要携带上 述利用零知识证明生成的第一签名信息, 验证者可以通过该第一签名信息来获知: 终 端能够获得付款账号的一次性私钥和群管理员为其签发的凭据, 从而可以验证付款账 号具有准入资格, 并且由于该凭据是可信的管理设备生成的, 因此, 可以避免付款账 号对该交易内容进行抵赖。  Therefore, the transaction request message and the transaction record message sent by the terminal to the transaction processing device only need to carry the first signature information generated by using the zero-knowledge proof, and the verifier can learn from the first signature information that: the terminal can obtain the payment account. The one-time private key and the credentials issued by the group administrator can verify that the payment account is eligible for admission, and since the credentials are generated by the trusted management device, the payment account can be prevented from refusing the transaction content.
相应的, 交易处理设备利用管理设备的公钥 § 1^= 和上述零知识证明生成的第 一签名信息进行如下验证计算:  Correspondingly, the transaction processing device performs the following verification calculation by using the public key of the management device § 1^= and the first signature information generated by the above zero knowledge proof:
0收到第一签名信息 =(¾·, ·^, 7, £:, 2;^ 2 , 2^;, 2^后, 计算:  0 receives the first signature information = (3⁄4·, ·^, 7, £:, 2;^ 2 , 2^;, 2^, after calculation:
Figure imgf000020_0002
息验 证通过, 即指示第一账号具有将所述交易记录存储到区块链上的条件。
Figure imgf000020_0002
The verification is passed, indicating that the first account has the condition to store the transaction record on the blockchain.
其中, 函数或映射 6为一个双线性配对映射, 该映射 X ® ^7 ^如果满足以 下条件, 就称其为一个双线性配对映射: Wherein, the function or map 6 is a bilinear pairing map, and the map X ® ^ 7 ^ is called a bilinear pairing map if the following conditions are met:
Figure imgf000020_0003
Figure imgf000020_0003
可见, 本发明实施例可以避免验证者或其他能够获知签名的第三方利用付款账号 公开的公钥识别付款账号的身份信息, 同时可以采用零知识证明使得验证者和第三方 获知付款账号具有准入资格, 以及获知付款账号具有管理设备签发的凭据使得付款账 号不得抵赖相应的交易内容。 实施例二  It can be seen that the embodiment of the present invention can prevent the certifier or other third party capable of obtaining the signature from using the public key disclosed by the payment account to identify the identity information of the payment account, and can use the zero-knowledge proof to enable the certifier and the third party to know the payment account has access. Eligibility, and knowing that the payment account has the credentials issued by the management device, makes the payment account non-compliance with the corresponding transaction content. Embodiment 2
若交易内容是第一账号针对第二账号发起的, 也就是说, 该交易内容涉及交易双 方时, 为了保护第二账号的隐私性, 本发明实施例基于图 3人至 30所示的交易处理 系统还提出了一种交易处理方法, 可以保护第二账号的隐私性。 其中, 图 3人所示的 交易处理系统中, 每个交易处理系统还可以包括一个证书机构的证书颁发节点, 该证 书颁发节点用于为各收款账号颁发用于生成交易内容的第二签名信息的证书, 即该证 书与普通的证书是不同的,该证书不需要使用长期公钥来验证,如本发明实施例所述, 使用一次性公钥、 证书颁发设备的公钥以及签名信息即可验证该证书。 或者, 基于图 3B 所示的交易处理系统中, 背书节点还可以执行证书颁发节点的功能, 还用于为用 户颁发上述证书。 或者, 图 3C所示的交易处理系统中还包括证书颁发设备; 或者图 3D 所示的交易处理系统中, 交易处理设备还执行证书颁发设备的功能, 该证书颁发 设备能够为收款账号颁发证书, 该证书与普通的证书不同, 利用该证书, 终端可以生 成交易内容的第二签名信息, 第二签名信息可以保护收款账号的隐私性, 同时使得交 易处理设备验证收款账号是否具有将所述交易记录存储到区块链上的条件。 If the transaction content is initiated by the first account for the second account, that is, when the transaction content involves both parties, in order to protect the privacy of the second account, the embodiment of the present invention is based on the transaction processing shown in FIG. 3 to 30. The system also proposes a transaction processing method that can protect the privacy of the second account. In the transaction processing system shown in FIG. 3, each transaction processing system may further include a certificate issuing node of a certificate authority, and the certificate issuing node is configured to issue a second signature for generating the transaction content for each payment account. The certificate of the information, that is, the certificate is different from the ordinary certificate, and the certificate does not need to be verified by using the long-term public key. As described in the embodiment of the present invention, the one-time public key, the public key of the certificate issuing device, and the signature information are used. The certificate can be verified. Or based on graph In the transaction processing system shown in 3B, the endorsement node can also perform the function of the certificate issuing node, and is also used to issue the above certificate to the user. Alternatively, the transaction processing system shown in FIG. 3C further includes a certificate issuing device; or in the transaction processing system shown in FIG. 3D, the transaction processing device further performs a function of a certificate issuing device capable of issuing a certificate for the receiving account. The certificate is different from the ordinary certificate. The terminal can generate the second signature information of the transaction content, and the second signature information can protect the privacy of the payment account, and at the same time enable the transaction processing device to verify whether the payment account has a location. The conditions under which the transaction record is stored on the blockchain.
本发明实施例以登录收款账号的收款终端向证书颁发 ( Certificate Authority, C A) 设备 (或交易处理设备, 或证书颁发节点) 申请证书, 可以包括以下步骤:  In the embodiment of the present invention, applying for a certificate to a certificate authority (C A) device (or a transaction processing device, or a certificate issuing node) by the receiving terminal of the login account may include the following steps:
21) 收款终端向 C A设备发送证书申请消息, 所述证书申请消息中携带收款账号 的长期公钥以及拥有长期私钥的证明信息;  21) The payment terminal sends a certificate application message to the C A device, where the certificate application message carries the long-term public key of the payment account and the certification information with the long-term private key;
22) CA设备验证所述证书申请消息通过时, 根据所述收款账号的长期公钥生成 所述收款账号的证书, 并向收款终端返回证书响应消息, 该证书响应消息中携带所述 收款账号的证书。  When the CA device verifies that the certificate application message is passed, the certificate of the payment account is generated according to the long-term public key of the payment account, and a certificate response message is returned to the payment terminal, where the certificate response message carries the The certificate of the payment account.
这样, 付款账号要向收款账号发起交易内容时, 可以从收款终端获取收款账号的 该证书, 从而利用该证书生成交易内容的第二签名信息。  In this way, when the payment account initiates the transaction content to the payment account, the certificate of the payment account can be obtained from the payment terminal, thereby using the certificate to generate the second signature information of the transaction content.
举例来说, 收款账号 Bob的长期公钥 YBob, CA设备的私钥 cask为 p, 公钥 capk 为 g^, 则 CA设备验证证书申请消息通过后, 可以为 Bob生成用于零知识证明的证书 为 (FBb, wBb), 其中: For example, the long-term public key Y Bob of the payment account Bob, the private key of the CA device is c, and the public key capk is g^, after the CA device verifies the certificate application message, it can generate a zero-knowledge proof for the Bob. The certificate is (F B . b , w B . b ), where:
FBb = (h〇
Figure imgf000021_0001
F Bb = (h〇
Figure imgf000021_0001
其中, h〇为系统参数, WB。b为随机生成的。  Where h〇 is the system parameter, WB. b is randomly generated.
另外, 本发明实施例中, 为了保护收款账号的隐私性, 除了生成交易内容的第二 签名信息来验证收款账号的准入资格外, 还可以利用收款账号的一次性公钥作为交易 内容或者收款方的地址, 而不再利用现有技术中收款账号的长期公钥的哈希值作为交 易内容的地址, 从而可以避免现有技术中交易处理设备需要利用收款账号的长期公钥 来验证该收款方的地址, 所造成的收款账号的身份泄露。  In addition, in the embodiment of the present invention, in order to protect the privacy of the payment account, in addition to generating the second signature information of the transaction content to verify the access qualification of the payment account, the one-time public key of the payment account may also be used as the transaction. The content or the address of the payee, and no longer use the hash value of the long-term public key of the payment account in the prior art as the address of the transaction content, thereby avoiding the long-term need for the transaction processing device in the prior art to utilize the payment account. The public key verifies the address of the payee, and the identity of the payment account is leaked.
本发明实施例中, 收款账号的一次性公钥可以根据收款账号的长期公钥来生成, 例如, 利用一次性公钥生成 PKeyGen 0 函数来生成收款账号的一次性公钥。  In the embodiment of the present invention, the one-time public key of the payment account may be generated according to the long-term public key of the payment account, for example, generating a PKeyGen 0 function by using the one-time public key to generate a one-time public key of the payment account.
也就是说, 终端生成收款账号的一次性公钥, 可以包括: 终端根据收款账号的长 期公钥和一次性公钥生成 PKeyGen 0 函数, 计算所述收款账号的一次性公钥。  That is, the terminal generates the one-time public key of the payment account, which may include: the terminal generates a PKeyGen 0 function according to the long-term public key of the payment account and the one-time public key, and calculates a one-time public key of the payment account.
例如, 收款账号 Bob的长期公钥 YBb作为 PKeyGen 0 函数的输入, 输出 Bob 的一次性公钥 OtpkBb=Y^x b ; 其中, rtx为随机数。 另外, 终端还可以根据系统参数
Figure imgf000021_0002
付 款账号发起的交易内容中携带该 Rtx, Rte, 用于计算收款账号的一次性私钥。 其中, 在该收款账号发起交易, 例如, 消费该笔从付款账号输入的交易金额时, 可以利用该 一次性私钥来保护该收款账号的匿名性。
For example, the long-term public key Y B of the payment account Bob. b As the input to the PKeyGen 0 function, output Bob's one-time public key Otpk B . b = Y^ x b ; where r tx is a random number. In addition, the terminal can also be based on system parameters
Figure imgf000021_0002
The transaction content initiated by the payment account carries the R tx , R te , and is used to calculate the one-time private key of the payment account. Wherein, when the transaction account initiates a transaction, for example, when the transaction amount input from the payment account is consumed, the one-time private key may be utilized to protect the anonymity of the payment account.
也就是说, 用户账号作为收款账号时, 在计算该用户账号的一次性公钥时可以获 得该参数 Rtx, R x, 这样, 用户账号需要消费该次收入的交易金额时, 可以利用该参 数 Rtx, 生成一次性私钥, 利用该一次性私钥和管理设备生成的凭据可以对包括该 交易金额的交易内容生成如实施例一所述的第一签名信息, 从而保证该用户账号作为 \¥0 2019/132767 ?01/802017/050654 付款账号时的匿名性。 That is to say, when the user account is used as the payment account, the parameter R tx , R x can be obtained when calculating the one-time public key of the user account, so that when the user account needs to consume the transaction amount of the income, the user account can be utilized. The parameter R tx generates a one-time private key, and the first signature information as described in the first embodiment is generated by using the one-time private key and the credential generated by the management device to ensure the user account as the transaction content including the transaction amount. \¥0 2019/132767 ?01/802017/050654 Anonymity when paying for an account.
其中, 收款账号的一次性私钥是由登录收款账号的终端根据收款账号的长期私钥 和上述参数1^¾生成的。 例如, 一次性私钥生成 0 函数的输入为收款账号 的长期私钥 8〇1)以及参数 1^,
Figure imgf000022_0001
计算得到的一次性私 钥 = 。
The one-time private key of the payment account is generated by the terminal that logs in to the payment account according to the long-term private key of the payment account and the above parameter 1^ 3⁄4 . For example, the input of the one-time private key generation 0 function is the long-term private key of the payment account 8〇1) and the parameter 1^,
Figure imgf000022_0001
The calculated one-time private key = .
另外,本发明实施例中,付款终端将收款账号的一次性公钥作为收款方的地址时, 收款方, 即登录收款账号的收款终端可以通过检查该地址, 即检查该一次性公钥来确 认收款方是否为自身。 具体的, 收款终端可以通过一次性公钥检查 0 函 数来检查交易记录中收款方的地址。 例如, 登录收款账号 的收款终端将交易内容 中1^、 一次性公钥
Figure imgf000022_0003
作为一次性公钥检查
Figure imgf000022_0002
In addition, in the embodiment of the present invention, when the payment terminal uses the one-time public key of the payment account as the address of the payee, the payee, that is, the collection terminal that logs in to the payment account, can check the address, that is, check the time. The public key to confirm whether the payee is itself. Specifically, the payment terminal can check the address of the payee in the transaction record by using the one-time public key check 0 function. For example, the receiving terminal that logs in to the payment account will have 1^, one-time public key in the transaction content.
Figure imgf000022_0003
As a one-time public key check
Figure imgf000022_0002
函数的输入, 若 91¾。13 =只^。15, 即该函数输出为 1, 则表明该收款方的地址为
Figure imgf000022_0004
的地址, 也就是说该交易内容的收款方是 8〇1); 若该函数输出为 0, 则表明该交易内 容的收款方不是8〇1)。
The input to the function, if 918⁄4. 13 = only ^. 15 , that is, the output of the function is 1, indicating that the address of the payee is
Figure imgf000022_0004
The address of the transaction, that is, the payee of the transaction content is 8〇1); If the output of the function is 0, it means that the recipient of the transaction is not 8〇1).
本发明实施例中, 付款终端将收款账号的该一次性公钥作为交易内容的地址之外, 还需要根据收款账号的一次性公钥和收款账号的证书生成交易内容的第二签名信息, 该第二签名信息的验证结果用于指示收款账号是否具有将该交易内容存储到区块链 上的条件, 该条件可以为收款账号的长期私钥是否有对应的证书。 相应的, 该第二签 名信息还不能包括收款账号的证书, 故本发明实施例既验证了第二账号的准入资格, 又保护了收款账号的匿名性。  In the embodiment of the present invention, the payment terminal uses the one-time public key of the payment account as the address of the transaction content, and needs to generate the second signature of the transaction content according to the one-time public key of the payment account and the certificate of the payment account. The information, the verification result of the second signature information is used to indicate whether the payment account has a condition for storing the transaction content on the blockchain, and the condition may be whether the long-term private key of the payment account has a corresponding certificate. Correspondingly, the second signature information cannot include the certificate of the payment account, so the embodiment of the invention not only verifies the qualification of the second account, but also protects the anonymity of the account.
也就是说, 为了保护第二账号的匿名性, 如图 5所示, 该交易处理方法与图 4所 示的交易处理方法相比, 不同之处在于, 图 4中的步骤 301替换为步骤 401-402, 其 中:  That is, in order to protect the anonymity of the second account, as shown in FIG. 5, the transaction processing method is different from the transaction processing method shown in FIG. 4 in that step 301 in FIG. 4 is replaced with step 401. -402, where:
401、 终端根据第二账号的长期公钥生成第二账号的一次性公钥;  401. The terminal generates a one-time public key of the second account according to the long-term public key of the second account.
402、 终端根据所述第二账号的一次性公钥和第二账号的证书生成交易内容的第 二签名信息。  402. The terminal generates second signature information of the transaction content according to the one-time public key of the second account and the certificate of the second account.
其中, 该证书是根据证书颁发设备的私钥生成的; 例如, 根据上述步骤 21) 至 22) 生成的; 相应的, 交易请求消息和交易记录中还包括第二账号的一次性公钥和第 二签名信息, 该第二账号的该一次性公钥为第二账号的地址。  The certificate is generated according to the private key of the certificate issuing device; for example, according to the above steps 21) to 22); correspondingly, the transaction request message and the transaction record further include a one-time public key of the second account and the first The second signature information, the one-time public key of the second account is the address of the second account.
另外, 所述第一验证结果和所述第二验证结果还包括所述第二签名信息的验证结 果, 所述第二签名信息的验证结果是根据所述第二账号的所述一次性公钥、 所述证书 颁发设备的公钥以及所述第二签名信息中的验证参数进行验证计算获得的。  In addition, the first verification result and the second verification result further include a verification result of the second signature information, and the verification result of the second signature information is based on the one-time public key of the second account And obtaining, by the verification, the public key of the certificate issuing device and the verification parameter in the second signature information.
可选地, 第二签名信息的验证结果在第一验证结果中时, 用于指示第二账号具有 访问该交易处理设备的权限, 即交易处理设备能够模拟运行该交易内容; 该第二签名 信息的验证结果在第二验证结果中时, 用于指示第二账号具有使用区块链的权限。  Optionally, when the verification result of the second signature information is in the first verification result, it is used to indicate that the second account has the right to access the transaction processing device, that is, the transaction processing device can simulate running the transaction content; the second signature information When the verification result is in the second verification result, it is used to indicate that the second account has the right to use the blockchain.
需要注意的是, 虽然步骤 8401至 8402未提到第一账号以及交易金额的相关处理 步骤, 但为了实现交易处理方法, 本领域技术人员可以与本发明实施例所述的第一账 号以及交易金额的相关处理步骤或现有技术中如图 2中对第一账号以及交易金额的相 关处理步骤相结合, 验证第二账号的准入资格、 交易金额的正确性以及第一账号的准 入资格, 来完成交易处理过程。 例如, 假设仅保护第二账号的匿名性, 第一账号和交 \¥0 2019/132767 卩(:17802017/050654 易金额均采用现有技术中的处理方法, 则除了终端生成第二签名信息外, 交易内容中 还需要携带输入金额的明文和输出金额的明文以使交易处理设备验证交易的准确性; 同时交易内容中还需要携带第一账号的通常意义的证书 (即第一账号的长期公钥, 不 同于实施例二中用于零知识证明的证书) 以使交易处理设备验证第一账号的准入资格, 同时, 终端还需要根据第一账号的一次性私钥或长期私钥生成交易内容的第一签名信 息, 以使的第一账号对该交易不得抵赖, 故第一验证结果还包括交易处理设备对交易 金额的验证结果和对第一账号的证书的验证结果, 第一验证结果和第二验证结果还同 时包括的有对第一签名信息的验证结果。 It should be noted that, although the steps 8401 to 8402 do not mention the first account and the transaction processing steps, in order to implement the transaction processing method, the first account and the transaction amount described by the embodiment of the present invention may be used by those skilled in the art. The related processing steps are combined with the related processing steps of the first account and the transaction amount in FIG. 2 in the prior art, verifying the qualification of the second account, the correctness of the transaction amount, and the qualification of the first account. To complete the transaction process. For example, suppose only the anonymity of the second account is protected, the first account and the account \¥0 2019/132767 卩 (:17802017/050654 Easy money is processed in the prior art, in addition to the second signature information generated by the terminal, the transaction content also needs to carry the plain text of the input amount and the plain text of the output amount. Having the transaction processing device verify the accuracy of the transaction; at the same time, the transaction content also needs to carry the certificate of the usual meaning of the first account (ie, the long-term public key of the first account, which is different from the certificate for zero-knowledge proof in the second embodiment). Having the transaction processing device verify the qualification of the first account, and the terminal further needs to generate the first signature information of the transaction content according to the one-time private key or the long-term private key of the first account, so that the first account cannot The first verification result further includes a verification result of the transaction processing device on the transaction amount and a verification result of the certificate of the first account, and the first verification result and the second verification result also include verification of the first signature information result.
在一些实施例中, 该第二签名信息为零知识证明的签名, 例如, 假设第二账号为
Figure imgf000023_0001
In some embodiments, the second signature information is a signature of the knowledge proof, for example, assuming that the second account is
Figure imgf000023_0001
具体的, 终端根据第二账号的一次性公钥 〇 1¾。1)、 证书
Figure imgf000023_0002
Specifically, the terminal is based on the one-time public key of the second account. 1 ), certificate
Figure imgf000023_0002
设备的公钥
Figure imgf000023_0003
为^生成第二签名信息的计算过程包括:
Device public key
Figure imgf000023_0003
The calculation process for generating the second signature information for ^ includes:
Figure imgf000023_0007
Figure imgf000023_0007
相应的, 交易处理设备可以利用
Figure imgf000023_0005
设备的公钥
Figure imgf000023_0004
第二账号的地址即第 二账号的一次性公钥(^ 以及第二签名信息进行如下验证计算:
Correspondingly, transaction processing equipment can be utilized
Figure imgf000023_0005
Device public key
Figure imgf000023_0004
The address of the second account, that is, the one-time public key of the second account (^ and the second signature information are verified as follows:
〇收到签名 =(¾,(:, 后, 计算:  〇 Receive signature = (3⁄4, (:, after, calculate:
0
Figure imgf000023_0006
0
Figure imgf000023_0006
另外,若本发明实施例中只保护第二账号的匿名性,则交易内容具有上述第二签名 信息外,还需要使用第一账号的长期私钥或者一次性私钥生成交易内容的第一签名信 息,从而验证第一账号的准入资格。此时第一签名信息的生成是利用第一账号的长期私 钥还是一次性私钥是根据第一账号作为收款方接收此次交易的金额时所使用的是一 \¥0 2019/132767 ?01/802017/050654 次性公钥的地址, 还是长期公钥的哈希值的地址。 相应的, 若只保护第二账号的匿名 性, 则为了验证交易的正确性, 交易内容中需要携带交易金额的明文, 这样, 交易处 理设备可以采用该交易金额来验证交易的正确性。 In addition, if only the anonymity of the second account is protected in the embodiment of the present invention, the transaction content has the second signature information, and the first signature of the transaction content is generated by using the long-term private key or the one-time private key of the first account. Information to verify the eligibility of the first account. At this time, the first signature information is generated by using the long-term private key of the first account or the one-time private key is used when the first account is used as the payee to receive the amount of the transaction. \¥0 2019/132767 ?01/802017/050654 The address of the secondary public key, or the address of the hash of the long-term public key. Correspondingly, if only the anonymity of the second account is protected, in order to verify the correctness of the transaction, the transaction content needs to carry the plaintext of the transaction amount, so that the transaction processing device can use the transaction amount to verify the correctness of the transaction.
可见, 本发明实施例中, 为保护第二账号的匿名性, 登录第一账号的终端需要根 据第二账号的长期公钥生成第二账号的一次性公钥, 将该一次性公钥作为交易内容的 地址; 并根据该一次性公钥和第二账号的证书生成交易内容的第二签名信息, 该第二 签名信息使得验证者如交易处理设备可以验证第二账号的准入资格, 从而, 使得验证 者如交易处理设备无需获知第二账号的长期公钥即可验证第二账号的准入资格以及 使得该交易内容的收款方根据该一次性公钥即可获知收款方是否为自身, 避免了现有 技术中第二账号的公钥被交易双方之外的第三方获知, 保护了第二账号的匿名性。  It can be seen that, in the embodiment of the present invention, in order to protect the anonymity of the second account, the terminal that logs in to the first account needs to generate a one-time public key of the second account according to the long-term public key of the second account, and use the one-time public key as a transaction. And generating, according to the one-time public key and the certificate of the second account, second signature information of the transaction content, the second signature information enabling the verifier, such as the transaction processing device, to verify the qualification of the second account, thereby Enabling the verifier, such as the transaction processing device, to verify the eligibility of the second account without knowing the long-term public key of the second account, and enabling the payee of the transaction content to know whether the payee is itself according to the one-time public key The public key of the second account in the prior art is avoided from being known by a third party other than the two parties, and the anonymity of the second account is protected.
另外, 生成一次性公钥的同时, 还可以获得第二账号的一次性私钥生成函数的参 数以及一次性公钥检查函数的参数, 将这两个参数存储到交易内容中, 使得第二账号 收到该交易内容时, 利用一次性公钥检查函数的参数来检查该交易内容的地址是否为 自身, 若为自身, 则在消费该交易内容中的交易金额时, 可以利用一次性私钥生成函 数的参数以及第二账号的凭据生成交易内容的签名信息, 也就是说, 第二账号为付款 账号且消费该笔交易金额时, 可以利用该一次性私钥生成函数的参数生成第二账号的 一次性私钥, 并利用该一次性私钥和凭据生成交易内容的签名信息, 从而, 如实施例 一所述, 保护了第二账号作为付款账号时的匿名性。 实施例三  In addition, while generating the one-time public key, the parameters of the one-time private key generation function of the second account and the parameters of the one-time public key checking function may also be obtained, and the two parameters are stored in the transaction content, so that the second account is When receiving the transaction content, the parameter of the one-time public key check function is used to check whether the address of the transaction content is itself, and if it is itself, when the transaction amount in the transaction content is consumed, the one-time private key may be generated. The parameter of the function and the credential of the second account generate signature information of the transaction content, that is, when the second account is the payment account and consumes the transaction amount, the parameter of the one-time private key generation function may be used to generate the second account. The one-time private key is used to generate the signature information of the transaction content by using the one-time private key and the credential, thereby protecting the anonymity of the second account as the payment account as described in the first embodiment. Embodiment 3
根据业务设置, 为了保护交易内容中交易金额的隐私性, 本发明实施例提出一种 交易处理方法, 该交易处理方法中, 可以生成交易内容的第三签名信息, 验证者如交 易处理设备可以根据第三签名信息的验证结果来获知交易总输入金额是否等于交易 总输出金额, 从而使得交易内容中不携带交易金额的同时, 保证交易金额的正确性。  According to the service setting, in order to protect the privacy of the transaction amount in the transaction content, the embodiment of the present invention provides a transaction processing method, in which the third signature information of the transaction content can be generated, and the verifier, such as the transaction processing device, can The verification result of the third signature information is used to know whether the total transaction input amount is equal to the total transaction output amount, so that the transaction content does not carry the transaction amount, and the transaction amount is correct.
本发明实施例中,如图 6所示,该交易处理方法与图 4所示的交易处理方法相比, 不同之处在于, 图 4中的步骤 301替换为步骤 501-403, 其中:  In the embodiment of the present invention, as shown in FIG. 6, the transaction processing method is different from the transaction processing method shown in FIG. 4 in that step 301 in FIG. 4 is replaced with steps 501-403, where:
501、 终端确定各输入金额的密文以及各输出金额的密文;  501. The terminal determines a ciphertext of each input amount and a ciphertext of each output amount;
502、 终端根据各输入金额的密文和所述各输出金额的密文, 计算总输入金额与 总输出金额之间差值的密文;  502. The terminal calculates a ciphertext of a difference between the total input amount and the total output amount according to the ciphertext of each input amount and the ciphertext of each output amount.
503、 终端根据该差值的密文生成所述交易内容的第三签名信息;  503. The terminal generates third signature information of the transaction content according to the ciphertext of the difference.
其中, 所述交易请求消息和所述交易记录中还包括所述第三签名信息; 所述第一 验证结果和所述第二验证结果还包括所述第三签名信息的验证结果, 所述第三签名信 息的验证结果用于指示所述总输入金额是否等于所述总输出金额。  The transaction request message and the transaction record further include the third signature information; the first verification result and the second verification result further include a verification result of the third signature information, where The verification result of the three signature information is used to indicate whether the total input amount is equal to the total output amount.
需要注意的是, 虽然步骤 8501至 8503未提到第一账号以及第二账号的相关处理 步骤, 但为了实现交易处理方法, 本领域技术人员可以根据本发明实施例所述的第一 账号以及交易金额的相关处理步骤或现有技术中如图 2中对第一账号以及交易金额的 相关处理步骤相结合, 验证第二账号的准入资格、 交易金额的正确性以及第一账号的 准入资格, 来完成交易处理过程。 例如, 假设仅保护交易金额的匿名性, 第一账号和 第二账号均采用现有技术中的处理方法, 则除了终端生成第三签名信息外, 交易内容 中还需要携带第一账号和第二账号的通常意义的证书以使交易处理设备验证第一账 号和第二账号的准入资格, 同时, 终端还需要根据第一账号的一次性私钥或长期私钥 生成交易内容的第一签名信息, 以使的第一账号对该交易不得抵赖; 终端还需要将第 二账号的长期公钥的哈希值作为接收地址; 故第一验证结果还包括交易处理设备对第 一账号第二账号的证书的验证结果, 第一验证结果和第二验证结果还同时包括的有对 第一签名信息的验证结果。 It should be noted that, although steps 8501 to 8503 do not mention the related processing steps of the first account and the second account, in order to implement the transaction processing method, a person skilled in the art may perform the first account and the transaction according to the embodiment of the present invention. The relevant processing steps of the amount or the prior art, in combination with the processing steps of the first account number and the transaction amount in FIG. 2, verify the qualification of the second account, the correctness of the transaction amount, and the qualification of the first account. , to complete the transaction process. For example, suppose only the anonymity of the transaction amount is protected, the first account number and The second account uses the processing method in the prior art, and in addition to the third signature information generated by the terminal, the transaction content also needs to carry the certificate of the usual meaning of the first account and the second account to enable the transaction processing device to verify the first account. And the second account is eligible for admission, and the terminal further needs to generate the first signature information of the transaction content according to the one-time private key or the long-term private key of the first account, so that the first account does not deny the transaction; The hash value of the long-term public key of the second account is required to be the receiving address. Therefore, the first verification result further includes the verification result of the certificate of the second account of the first account by the transaction processing device, and the first verification result and the second verification result are further Also included is the verification result of the first signature information.
其中, 终端确定各输入金额的密文和各输出金额的密文具体可以采用加法同态加 密算法。 其中, 加法同态加密算法是指对加密的数据进行运算处理得到一个输出, 将 这一输出进行解密, 其结果与用加法处理未加密的原始数据得到的输出结果是一样。 因此, 终端直接利用各输入金额的密文和各输出金额的密文, 获得总输入金额的密文 以及总输出金额的密文。  Wherein, the terminal determines the ciphertext of each input amount and the ciphertext of each output amount, and specifically adopts an addition homomorphic encryption algorithm. The addition homomorphic encryption algorithm refers to performing arithmetic processing on the encrypted data to obtain an output, and decrypting the output, and the result is the same as the output obtained by adding the unencrypted original data by addition. Therefore, the terminal directly uses the ciphertext of each input amount and the ciphertext of each output amount to obtain the ciphertext of the total input amount and the ciphertext of the total output amount.
在一些实施例中, 该第三签名信息也可以为零知识证明的签名, 即验证者如交易 处理设备可以根据第三签名信息中的验证参数、 各输入金额的密文和各输出金额的密 文进行零知识证明的验证计算, 根据计算的结果可以获知交易的正确性。 例如, 假设 交易输入金额分别为 input l,input2 ; 交易输出金额分别为 output 1 和 output2, 利用加 法同态加密算法 HEncpk 0 分别获得的交易输入金额的密文为 (]^和(^2, 获得的交易 输出金额的密文为 C。^PC。2, 则 In some embodiments, the third signature information may also be a zero-knowledge signature, that is, the verifier, such as the transaction processing device, may be based on the verification parameters in the third signature information, the ciphertext of each input amount, and the density of each output amount. The verification calculation of the zero-knowledge proof is carried out, and the correctness of the transaction can be known based on the calculated result. For example, suppose the transaction input amount is input l, input2; the transaction output amount is output 1 and output2 respectively, and the ciphertext of the transaction input amount obtained by the addition homomorphic encryption algorithm HEnc pk 0 is (]^ and (^ 2 , respectively). The ciphertext of the obtained transaction output amount is C.^PC. 2 , then
c ' = Cil Ci2/c0lc02 = HEncPk(0) c ' = Cil Ci2 /c 0l c 02 = HEnc P k ( 0 )
然后, 终端可以生成“该 C'为加密了明文为 0的密文”的零知识证明的签名, 作为 第三签名信息即可。 Then, the terminal can generate a signature of the zero-knowledge proof that "the C ' is a ciphertext in which the plaintext is 0", and the third signature information can be used.
例如, 假设付款方发起的交易有一个输入金额和一个输出金额, 即付款方与收款 方是一对一的关系, 交易输入金额的明文为 min, 密文为 Cin = gTin glin, 其中, rin为 付款方加密的随机数; 交易输出金额的明文为爪 密文为 Cout = gl°ut, 其中, 为付款方加密的随机数; 则该第三签名信息为零知识证明的签名时的表达式为: For example, suppose the transaction initiated by the payer has an input amount and an output amount, that is, the payer and the payee are in a one-to-one relationship. The plain text of the transaction input is m in , and the ciphertext is C in = gT in gl in wherein, r in the encrypted random number to the payer; plaintext output transaction amount claw ciphertext C out = gl ° ut, wherein the encrypted random number to the payer; the third zero knowledge proof signature information The expression when signing is:
SoK{(r') : Cin/Cout = gi} (Txl) SoK{(r ' ) : C in /C out = gi} (Txl)
其中, Txl为要签名的交易内容, r' = rin - rout , g4为系统参数。 Where Txl is the transaction content to be signed, r ' = r in - r out , g 4 is the system parameter.
具体的, 终端计算该零知识证明的签名可以包括以下计算过程:  Specifically, the terminal calculating the signature of the zero knowledge certificate may include the following calculation process:
〇随机生成7^, e zp 〇 Randomly generated 7^, ez p
〇计算:  〇 Calculation:
Ri = g/rp Ri = g/ rp
〇计算 c = H (par am, Rl Msg) ,其中, param为系统参数, Msg为艾 易内容。 〇 Calculate c = H (par am, R l Msg) , where param is the system parameter and Msg is the Ai Yi content.
〇计算  〇 calculation
〇第二
Figure imgf000025_0001
〇 second
Figure imgf000025_0001
交易处理设备利用交易内容中输入金额的密文 输出金额的密文 和上述 \¥0 2019/132767 ?01/802017/050654 第三签名信息进行如下验证计算: The transaction processing device utilizes the ciphertext of the amount of the ciphertext outputted in the transaction content and the above \¥0 2019/132767 ?01/802017/050654 The third signature information is verified as follows:
〇收到第三签名信息 = (^7, 2^^后, 计算:  〇 After receiving the third signature information = (^7, 2^^, calculate:
0
Figure imgf000026_0001
则验证通过。
0
Figure imgf000026_0001
Then the verification is passed.
也就是说, 第三签名信息验证通过时, 交易处理设备可以获知该交易金额是正确 的, 从而保证交易的正确性。  That is to say, when the third signature information is verified, the transaction processing device can know that the transaction amount is correct, thereby ensuring the correctness of the transaction.
可见, 本发明实施例中利用第三签名信息来保证交易的正确性, 从而避免了交易 请求消息和交易记录中携带交易金额, 保护了交易金额的隐私性。 上述实施例一至三, 分别从保护付款方即第一账号、 收款方即第二账号或交易金 额的隐私性三个方面, 阐述了本申请所述的交易处理方法。  It can be seen that in the embodiment of the present invention, the third signature information is used to ensure the correctness of the transaction, thereby avoiding the transaction request message and the transaction record carrying the transaction amount, and protecting the privacy of the transaction amount. In the first embodiment to the third embodiment, the transaction processing method described in the present application is described in terms of protecting the payer, that is, the first account, the payee, the second account, or the privacy of the transaction amount.
在一些实施例中, 根据业务设置, 也可以选择包括付款方即第一账号、 收款方即 第二账号以及交易金额中任一项或多项的隐私性, 具体的交易处理方法可以相应的包 括上述实施例一至三中相关的步骤和实现方式。 本发明实施例不做限定。  In some embodiments, according to the service setting, the privacy of the first party account, the second party account, and the transaction amount may be selected, and the specific transaction processing method may be corresponding. The steps and implementations related to the above embodiments 1 to 3 are included. The embodiments of the present invention are not limited.
例如, 本发明实施例中, 若终端除了保护交易金额的隐私性外, 还包括第一账号 或第二账号的隐私性保护, 则可以采用上述实施例一和 /或实施例二的方式, 执行相关 的操作, 来实现交易金额以及第一账号的隐私性保护, 或者实现交易金额以及第二账 号的隐私性保护, 或者实现交易金额、 第一账号和第二账号的隐私保护。 相应的, 若 终端根据图 8所示的用户界面的输入只需保护交易金额的隐私性, 则可以采用现有技 术中利用第一账号的长期私钥或一次性私钥生成交易内容的第一签名信息, 第二账号 的长期公钥的哈希值作为第二账号的地址。 也就是说, 本发明实施例所述的交易处理 方法中的隐私性保护操作可以和现有技术中的交易处理方法相结合, 实现交易金额的 隐私性保护、交易金额和第一账号的隐私性保护、交易金额和第二账号的隐私性保护、 第一账号和第二账号的隐私性保护、 以及第一账号、 第二账号和交易金额的隐私性保 护等方案, 以上组合方式均属于本申请的保护范围。 实施方式四  For example, in the embodiment of the present invention, if the terminal protects the privacy of the transaction amount, and further includes the privacy protection of the first account or the second account, the terminal may be executed in the manner of the first embodiment and/or the second embodiment. Related operations, to achieve the transaction amount and the privacy protection of the first account, or to realize the transaction amount and the privacy protection of the second account, or to realize the privacy protection of the transaction amount, the first account and the second account. Correspondingly, if the terminal only needs to protect the privacy of the transaction amount according to the input of the user interface shown in FIG. 8, the first method of generating the transaction content by using the long-term private key or the one-time private key of the first account in the prior art may be used. The signature information, the hash value of the long-term public key of the second account is used as the address of the second account. That is to say, the privacy protection operation in the transaction processing method according to the embodiment of the present invention can be combined with the transaction processing method in the prior art to realize the privacy protection of the transaction amount, the transaction amount, and the privacy of the first account. Protection, transaction amount and privacy protection of the second account, privacy protection of the first account and the second account, and privacy protection of the first account, the second account, and the transaction amount, all of the above combinations belong to the present application. The scope of protection. Embodiment 4
为了便于理解本申请的上述三个发明点, 本申请以实施例四为例, 详细阐述如何 同时保护第一账号、 第二账号以及交易金额的隐私性。  In order to facilitate the understanding of the above three inventive points of the present application, the present application uses the fourth embodiment as an example to explain in detail how to protect the privacy of the first account, the second account, and the transaction amount at the same time.
请参阅图 7, 图 7是本发明实施例提供的又一种交易处理方法的流程示意图, 另 外, 为了阐述方便, 将登陆第一账号的终端称为付款终端, 将登陆第二账号的终端称 为收款终端, 将第一账号称为付款账号, 第二账号称为收款账号, 基于图 3(:所示的 交易处理系统, 该图 7所示的交易处理方法可以包括以下步骤: Please refer to FIG. 7. FIG. 7 is a schematic flowchart diagram of still another transaction processing method according to an embodiment of the present invention. In addition, for convenience of description, a terminal that logs in to the first account is referred to as a payment terminal, and a terminal that logs in to the second account is called For the payment terminal, the first account is called a payment account, and the second account is called a payment account. Based on the transaction processing system shown in FIG. 3 ( the transaction processing system shown in FIG. 7), the transaction processing method shown in FIG. 7 may include the following steps:
601、 终端向管理设备发送凭据请求消息;  601. The terminal sends a credential request message to the management device.
其中, 该终端为登陆第一账号的终端。 该凭据请求消息中包括第一账号的一次性 公钥和/或第一账号具有的交易金额的密文。该第一账号的一次性公钥是第一账号作为 收款账号时, 相应的付款账号根据第一账号的长期公钥生成的。  The terminal is a terminal that logs in to the first account. The credential request message includes a one-time public key of the first account and/or a ciphertext of the transaction amount of the first account. When the one-time public key of the first account is the first account as the payment account, the corresponding payment account is generated according to the long-term public key of the first account.
602、 管理设备根据该第一账号的一次性公钥和/或第一账号具有的交易金额的密 \¥0 2019/132767 ?01/802017/050654 文, 生成第一账号的凭据; 602. The management device is configured according to the one-time public key of the first account and/or the transaction amount of the first account. \¥0 2019/132767 ?01/802017/050654 text, generate the credentials of the first account;
603、 管理设备向终端返回凭据响应消息;  603. The management device returns a credential response message to the terminal.
其中, 该凭据响应消息中携带该第一账号的凭据。  The credential response message carries the credential of the first account.
604、 终端根据第二账号的长期公钥生成第二账号的一次性公钥, 将该一次性公 钥作为交易内容的接收地址;  604. The terminal generates a one-time public key of the second account according to the long-term public key of the second account, and uses the one-time public key as the receiving address of the transaction content.
其中, 终端可以根据实施例二中的一次性公钥生成函数来生成第二账号的一次性 公钥, 此处不再详述。  The terminal may generate a one-time public key of the second account according to the one-time public key generation function in the second embodiment, which is not described in detail herein.
605、 终端确定各输入金额的密文以及各输出金额的密文, 根据所述各输入金额 的密文和所述各输出金额的密文, 计算总输入金额与总输出金额之间差值的密文; 605. The terminal determines a ciphertext of each input amount and a ciphertext of each output amount, and calculates a difference between the total input amount and the total output amount according to the ciphertext of each input amount and the ciphertext of each output amount. Cipher text
606、 终端根据第一账号的一次性私钥、 凭据, 第二账号的证书, 总输入金额与 总输出金额之间的差值的密文, 生成交易内容的签名信息。 606. The terminal generates signature information of the transaction content according to the one-time private key of the first account, the credential, the certificate of the second account, and the ciphertext of the difference between the total input amount and the total output amount.
也就是说, 该交易内容的签名信息包括实施例一至三中的第一签名信息、 第二签 名信息以及第三签名信息。  That is, the signature information of the transaction content includes the first signature information, the second signature information, and the third signature information in Embodiments 1 to 3.
607、 终端向交易处理设备发送交易请求消息, 该交易请求消息中携带交易内容 的签名信息、 作为接收地址的第二账号的一次性公钥以及交易内容。  607. The terminal sends a transaction request message to the transaction processing device, where the transaction request message carries signature information of the transaction content, a one-time public key of the second account that is the receiving address, and transaction content.
其中, 该交易内容中可以包括终端生成第二账号的一次性公钥时, 获得的一次性 私钥生成函数的参数和一次性公钥检查函数的参数。 登录第二账号的终端可以根据第 一次性公钥检查函数的参数以及自身的长期私钥来检查交易内容的接收地址是否为 自身; 并在消费该次交易的交易金额时, 可以根据一次性私钥生成函数的参数和长期 私钥来生成第二账号的一次性私钥,进而,使用该一次性私钥来生成交易内容的签名, 从而保护第二账号作为付款账号时的匿名性。  The transaction content may include a parameter of the one-time private key generation function and a parameter of the one-time public key check function obtained when the terminal generates the one-time public key of the second account. The terminal logging in to the second account may check whether the receiving address of the transaction content is itself according to the parameter of the first-time public key checking function and its long-term private key; and when the transaction amount of the transaction is consumed, it may be based on one time The parameter of the private key generation function and the long-term private key are used to generate a one-time private key of the second account, and then the one-time private key is used to generate a signature of the transaction content, thereby protecting the anonymity of the second account as a payment account.
另外, 第二账号的凭据, 可以为登录第一账号的终端在申请第一账号的凭据时, 同时为第二账号申请该凭据; 也可以为登录第二账号的终端在消费该笔交易的交易金 额时, 申请第二账号的凭据, 本发明实施例不做限定。  In addition, the credential of the second account may be, when the terminal that logs in the first account applies for the credential of the first account, and simultaneously requests the credential for the second account; or the transaction that the terminal that logs in the second account consumes the transaction. The amount of the credentials of the second account is not limited in the embodiment of the present invention.
另外, 图 3(:与图 30相比, 基于图 3(:所示的交易处理系统中, 交易处理方法会 多一些与管理设备交互来生成第一账号和 /或第二账号的凭据的步骤。  In addition, FIG. 3 (compared with FIG. 30, based on the transaction processing system shown in FIG. 3, the transaction processing method may have more steps of interacting with the management device to generate credentials of the first account and/or the second account. .
608、 交易处理设备验证该交易请求消息, 获得第一验证结果, 当该第一验证结 果为通过时, 模拟运行交易内容, 获得交易结果信息。  608. The transaction processing device verifies the transaction request message, and obtains a first verification result. When the first verification result is passed, the transaction content is simulated and the transaction result information is obtained.
其中, 交易处理设备中可以包括至少一个背书节点, 每个背书节点验证该交易请 求消息通过时, 都可以模拟运行交易内容, 获得交易结果, 并利用自身的私钥对交易 结果签名, 因此, 该交易结果信息中包括至少一个背书节点的交易结果以及相应的签 名。  The transaction processing device may include at least one endorsement node. When each endorsement node verifies that the transaction request message passes, it may simulate running the transaction content, obtain the transaction result, and use the private key of the transaction to sign the transaction result. Therefore, the The transaction result information includes the transaction result of at least one endorsement node and the corresponding signature.
609、 交易处理设备向终端返回交易响应消息, 该交易响应消息中携带该交易结 果信息;  609. The transaction processing device returns a transaction response message to the terminal, where the transaction response message carries the transaction result information.
610、 终端向交易处理设备发送交易记录消息; 该交易记录消息携带的交易记录 中包括交易内容、 交易内容的签名信息、 至少一个背书节点的交易结果以及相应的签 名;  610. The terminal sends a transaction record message to the transaction processing device. The transaction record carried by the transaction record message includes the transaction content, the signature information of the transaction content, the transaction result of the at least one endorsement node, and the corresponding signature.
611、 交易处理设备接收该交易记录消息, 并验证交易记录, 获得第二验证结果, 并在第二验证结果为通过时, 将交易记录存储到区块链上。 611. The transaction processing device receives the transaction record message, and verifies the transaction record, and obtains a second verification result. And when the second verification result is passed, the transaction record is stored on the blockchain.
本发明实施例中, 如图 7所示, 交易处理设备中的共识节点接收该交易记录消息 后, 还需要将其他共识节点接收的交易记录一起根据接收时间进行排序, 生成包括第 一账号的交易记录的区块, 将交易记录以区块形式提交给提交节点, 由提交节点来验 证区块中的交易记录, 其中, 提交节点验证每个交易记录的操作类似, 故以第一账号 发起交易的交易记录为例, 第二验证结果中包括交易内容的签名信息的验证结果和交 易结果的签名信息的验证结果, 其中, 交易内容的签名信息的验证结果是提交节点根 据管理设备的公钥、 第二账号的一次性公钥、 CA设备的公钥以及签名信息中的验证 参数进行验证的。 另外, 第二验证结果中还包括交易结果信息是否满足预设条件的验 证结果, 即提交节点还需要验证至少一个背书节点的交易结果和相应的签名是否满足 预设条件, 例如, 预设条件为每条交易记录中需至少有十个背书节点的签名及相应的 交易结果且各签名对应的交易结果是一致的。  In the embodiment of the present invention, as shown in FIG. 7, after receiving the transaction record message, the consensus node in the transaction processing device needs to sort the transaction records received by other consensus nodes according to the receiving time to generate a transaction including the first account. The recorded block submits the transaction record to the submitting node in the form of a block, and the submitting node verifies the transaction record in the block, wherein the operation of submitting the node to verify each transaction record is similar, so the transaction is initiated by the first account. The transaction record is taken as an example. The second verification result includes a verification result of the signature information of the transaction content and a verification result of the signature information of the transaction result, wherein the verification result of the signature information of the transaction content is a public key of the submitting node according to the management device, The one-time public key of the second account, the public key of the CA device, and the verification parameters in the signature information are verified. In addition, the second verification result further includes a verification result that the transaction result information meets the preset condition, that is, the submitting node further needs to verify whether the transaction result of the at least one endorsement node and the corresponding signature meet the preset condition, for example, the preset condition is Each transaction record requires at least ten signatures of the endorsement nodes and corresponding transaction results, and the transaction results corresponding to each signature are consistent.
其中, 背书节点运行交易内容之所以成为模拟, 是因为在提交节点中验证多个背 书节点的交易结果均一致, 该交易结果才被接受, 才可以称为实际交易结果, 因此, 在提交节点之前, 可以称为模拟运行交易内容获得的交易结果, 也保证了交易内容运 行的准确性。  Among them, the reason why the endorsement node runs the transaction content becomes the simulation, because the transaction results of the multiple endorsement nodes are consistent in the submitting node, and the transaction result is accepted, which can be called the actual transaction result. Therefore, before submitting the node It can be called the transaction result obtained by simulating the running transaction content, and also ensures the accuracy of the transaction content running.
举例来说, 假设第一账号发起的交易有一个输入金额和一个输出金额, 输入金额 的明文为 min, 密文为 Cin = g^inglin, 其中, rin为付款方加密的随机数; 输出金额的 明文为 771。 , 密文为 Cout = gT。utgl。ut , 其中, 为付款方加密的随机数; 登录第一 账号 Alice 的终端利用第二账号 Bob 的长期公钥 ¾ 生成 Bob 的一次性公钥 otpkBb= :^ 与随机数 (Rtx,R 'tx ); 第二账号 Bob 的证书为
Figure imgf000028_0001
第一账号 Alice的一次性私钥为 ots½ice, 管理设备为 Alice签发的凭据为
Figure imgf000028_0002
则交 易内容的签名信息为零知识证明的签名时, 该零知识证明来证明“第一账号具有一次 性私钥以及管理设备为其签发的凭据, 第二账号具有长期公钥对应的证书, 以及输入 金额与输出金额之间差值的密文为加密了明文为 0的密文”的签名的表达式为:
For example, if the first account transactions initiated amount having an input and an output value, the amount of input plaintext m in, ciphertext C in = g ^ in gl in , wherein, r in the encryption of the random payer Number; The plain text of the output amount is 771. The ciphertext is C out = gT. Ut gl. Ut , where the random number encrypted for the payer; the terminal logging in to the first account Alice uses the long-term public key of the second account Bob 3⁄4 to generate Bob's one-time public key otpk B . b = :^ with a random number (R tx , R ' tx ); the second account Bob's certificate is
Figure imgf000028_0001
The one-time private key of the first account Alice is ots1⁄2 ice , and the credentials issued by the management device for Alice are
Figure imgf000028_0002
When the signature information of the transaction content is a signature of the knowledge certificate, the zero knowledge certificate proves that "the first account has a one-time private key and the certificate issued by the management device, and the second account has a certificate corresponding to the long-term public key, and The ciphertext of the difference between the input amount and the output amount is the ciphertext encrypted with plaintext 0. The expression of the signature is:
Figure imgf000028_0003
Figure imgf000028_0003
e(AAlice, g2 - g2 AUce) = e(h - Cin, g2) . e(g1;〇tskAlice) e(A Alice , g 2 - g 2 AUce ) = e(h - C in , g 2 ) . e(g 1; 〇tsk Alice )
Figure imgf000028_0004
Figure imgf000028_0004
其中, Txl为要签名的交易内容, r = rin - rout, gi > g2以及 h为系统参数。 具体的, 终端计算该零知识证明的签名可以包括以下计算过程: \¥0 2019/132767 ?01/802017/050654 Where Txl is the transaction content to be signed, r = r in - r out , gi > g 2 and h are system parameters. Specifically, the terminal calculating the signature of the zero knowledge certificate may include the following calculation process: \¥0 2019/132767 ?01/802017/050654
Figure imgf000029_0001
Figure imgf000029_0001
相应的, 交易处理设备使用管理设备的公钥
Figure imgf000029_0003
设备的公钥
Figure imgf000029_0002
第二账号的一次性公钥  ^10^与系统参数验证该零知识证明的签名可以包括以下计 算过程:
Correspondingly, the transaction processing device uses the public key of the management device
Figure imgf000029_0003
Device public key
Figure imgf000029_0002
The one-time public key of the second account ^10^ and the system parameter verification that the signature of the zero-knowledge proof can include the following calculation process:
0
Figure imgf000029_0004
0
Figure imgf000029_0004
验证通过就表明该零知识证明的签名所证明的内容是正确的, 即第一账号具有一 次性私钥以及管理设备为其签发的凭据, 第二账号具有长期公钥对应的证书, 以及输 入金额与输出金额之间差值的密文为加密了明文为 0的密文; 也就是说, 该签名的验 证结果指示了第一账号和第二账号具有使用该区块链的条件、 该交易是正确的。  The verification proves that the content proved by the signature of the zero-knowledge proof is correct, that is, the first account has a one-time private key and the certificate issued by the management device, the second account has a certificate corresponding to the long-term public key, and the input amount The ciphertext of the difference between the output amount and the output amount is a ciphertext encrypted with a plaintext of 0; that is, the verification result of the signature indicates that the first account and the second account have the condition for using the blockchain, and the transaction is correct.
可见, 本发明实施例根据第一账号的一次性私钥、 凭据、 第二账号的证书以及输 入金额与输出金额之间差值的密文生成交易内容的签名信息, 使得验证方如交易处理 设备利用该签名信息来验证第一账号和第二账号的准入资格, 以及将第二账号的一次 性公钥作为交易内容的接收地址, 与现有技术中交易处理设备需要利用第一账号的公 钥验证利用第一账号的私钥生成交易内容的签名、 第二账号的公钥来验证第二账号的 长期公钥的哈希值以及需要具体交易金额验证交易准确性相比, 本发明实施例保护了 第一账号、 第二账号以及交易金额的隐私性。 在一些可能的实现方式中, 上述实施例中, 交易内容中还可以具有各输入金额的 \¥0 2019/132767 ?01/802017/050654 密文以及各输出金额的密文, 各输入金额的密文以及各输出金额的密文的加密密钥为 第三方审核账号的公钥。 例如, 实施例三或四中, 终端获取各输入金额的密文以及各 输出金额的密文, 可以为利用加法同态加密算法以及第三方审核账号的公钥获得各输 入金额的密文和各输出金额的密文, 这样, 在保护交易金额隐私性的同时, 还可以方 便审计员使用第三方审核账号的私钥来解密上述各输入金额的密文和各输出金额的 密文, 从而获得各输入金额的明文和各输出金额的明文, 以便于审计员的审计。 It can be seen that, in the embodiment of the present invention, the signature information of the transaction content is generated according to the one-time private key of the first account, the credential, the certificate of the second account, and the ciphertext of the difference between the input amount and the output amount, so that the verification party is a transaction processing device. The signature information is used to verify the access qualification of the first account and the second account, and the one-time public key of the second account is used as the receiving address of the transaction content, and the transaction processing device in the prior art needs to utilize the first account. The key verification uses the private key of the first account to generate the signature of the transaction content, the public key of the second account to verify the hash value of the long-term public key of the second account, and the specific transaction amount is required to verify the transaction accuracy, and the embodiment of the present invention Protects the privacy of the first account, the second account, and the transaction amount. In some possible implementation manners, in the foregoing embodiment, the transaction content may also have each input amount. \¥0 2019/132767 ?01/802017/050654 The ciphertext and the ciphertext of each output amount, the ciphertext of each input amount and the encryption key of the ciphertext of each output amount are the public key of the third-party audit account. For example, in the third or fourth embodiment, the terminal obtains the ciphertext of each input amount and the ciphertext of each output amount, and obtains the ciphertext and each of the input amounts for the public key using the addition homomorphic encryption algorithm and the third-party audit account. The ciphertext of the output amount, so that while protecting the privacy of the transaction amount, the auditor can also use the private key of the third-party audit account to decrypt the ciphertext of each input amount and the ciphertext of each output amount, thereby obtaining each Enter the plain text of the amount and the clear text of each output amount to facilitate the auditor's audit.
可选的, 若上述实施例三或四中, 不需要配合审计员的审计时, 加法同态加密算 法的加密密钥可为一随机数, 则各输入金额的密文和各输出金额的密文将不能被解密, 从而在保证交易正确性的同时, 可以实现交易金额的隐私性保护。  Optionally, if the third or fourth embodiment does not need to cooperate with the auditor's audit, the encryption key of the addition homomorphic encryption algorithm may be a random number, and the ciphertext and the output amount of each input amount are dense. The text will not be decrypted, so as to ensure the correctness of the transaction, the privacy protection of the transaction amount can be realized.
在一些可能的实现方式中, 上述实施例所述的交易处理方法中, 还可以包括终端 根据所述第一账号的所述一次性私钥生成所述各输入金额的标识; 所述各输入金额的 标识用于防止所述各输入金额被二次消费。 例如, 若区块链中已存在具有输入金额的 标识了的交易记录, 则交易处理设备验证该交易内容时再发现具有该输入金额的标识 I, 则可以确定为二次消费, 验证不通过。 可见, 该实现方式可以利用各输入金额的 标识来防止输入金额的二次消费。  In some possible implementation manners, the transaction processing method of the foregoing embodiment may further include: the terminal generating, according to the one-time private key of the first account, an identifier of each input amount; The identifier is used to prevent the respective input amounts from being consumed twice. For example, if there is already an identified transaction record with the input amount in the blockchain, if the transaction processing device verifies the transaction content and then finds the identifier I with the input amount, it can be determined as secondary consumption, and the verification fails. It can be seen that this implementation can use the identification of each input amount to prevent secondary consumption of the input amount.
进一步的, 该实现方式所述的交易处理方法还可以包括: 终端根据所述各输入金 额的标识生成所述交易内容的第四签名信息; 其中, 所述交易请求消息和所述交易记 录中还包括所述第四签名信息以及所述各输入金额的标识; 所述各输入金额的标识用 于防止所述各输入金额被二次消费; 所述第一验证结果和所述第二验证结果还包括所 述第四签名信息的验证结果, 所述第四签名信息的验证结果是由所述交易处理设备根 据所述各输入金额的标识和所述第四签名信息中的验证参数进行验证计算获得的, 所 述第四签名信息的验证结果用于指示所述各输入金额的标识是否正确。 可见, 若输入 金额的标识不正确, 则该第四签名信息的验证结果也是不通过的, 进一步的避免输入 金额的二次消费。  Further, the transaction processing method of the implementation manner may further include: the terminal generating fourth signature information of the transaction content according to the identifier of each input amount; wherein, the transaction request message and the transaction record further And including the fourth signature information and the identifier of each input amount; the identifier of each input amount is used to prevent the input amount from being consumed twice; the first verification result and the second verification result are further And a verification result of the fourth signature information, where the verification result of the fourth signature information is obtained by the transaction processing device according to the identifier of each input amount and the verification parameter in the fourth signature information. The verification result of the fourth signature information is used to indicate whether the identifier of each input amount is correct. It can be seen that if the identifier of the input amount is incorrect, the verification result of the fourth signature information is also not passed, and the secondary consumption of the input amount is further avoided.
其中, 第四签名信息可以为零知识证明的签名, 终端可以根据各输入金额的标识 以及零知识证明算法计算所述交易内容的第四签名信息, 相应的, 交易处理设备验证 交易请求消息和交易记录中的第四签名信息时也可以利用零知识证明算法来验证。  The fourth signature information may be a signature of the zero-knowledge proof, and the terminal may calculate the fourth signature information of the transaction content according to the identifier of each input amount and the zero-knowledge proof algorithm, and correspondingly, the transaction processing device verifies the transaction request message and the transaction. The fourth signature information in the record can also be verified using a zero-knowledge proof algorithm.
在一些可能的实现方式中, 上述实施例所述的交易处理方法还可以包括: 终端根 据所述第三方审核账号的公钥加密所述第一账号的所述一次性公钥, 获得所述第一账 号的所述一次性公钥的密文, 交易请求消息和交易记录中还包括第一账号的一次性公 钥的密文, 这样, 审计员审计发起交易的账号时可以利用第三方审核账号的私钥来解 密获得第一账号的一次性公钥, 进一步, 根据该一次性公钥可以获知第一账号的长期 公钥, 以便于审计员对该第一账号进行审计。  In some possible implementations, the transaction processing method of the foregoing embodiment may further include: the terminal encrypting the one-time public key of the first account according to a public key of the third-party auditing account, and obtaining the first The ciphertext of the one-time public key of the account, the transaction request message and the transaction record further include the ciphertext of the one-time public key of the first account, so that the auditor can use the third-party audit account when auditing the account of the initiated transaction. The private key is used to decrypt the one-time public key of the first account. Further, the long-term public key of the first account can be obtained according to the one-time public key, so that the auditor can audit the first account.
进一步的, 该实现方式中的交易处理方法还可以包括: 终端根据第一账号的所述 一次性公钥的密文, 生成所述交易内容的第五签名信息; 相应的, 交易请求消息和所 述交易记录中还包括所述第五签名信息, 所述第一验证结果和所述第二验证结果还包 括所述第五签名信息的验证结果, 所述第五签名信息的验证结果是由所述交易处理设 备根据所述第五签名信息中的验证参数进行验证计算获得的, 所述第五签名信息的验 \¥0 2019/132767 ?01/802017/050654 证结果用于指示所述第一账号的所述一次性公钥的密文是否正确。 Further, the transaction processing method in the implementation manner may further include: the terminal generating, according to the ciphertext of the one-time public key of the first account, the fifth signature information of the transaction content; correspondingly, the transaction request message and the The fifth signature information is further included in the transaction record, the first verification result and the second verification result further include a verification result of the fifth signature information, and the verification result of the fifth signature information is The verification of the fifth signature information obtained by the transaction processing device according to the verification parameter in the fifth signature information \¥0 2019/132767 ?01/802017/050654 The result of the certificate is used to indicate whether the ciphertext of the one-time public key of the first account is correct.
其中, 第五签名信息可以为零知识证明的签名, 终端可以根据各输入金额的标识 以及零知识证明算法计算所述交易内容的第五签名信息, 相应的, 交易处理设备验证 交易请求消息和交易记录中的第五签名信息时也可以利用零知识证明算法来验证。  The fifth signature information may be a signature of the zero-knowledge proof, and the terminal may calculate the fifth signature information of the transaction content according to the identifier of each input amount and the zero-knowledge proof algorithm, and correspondingly, the transaction processing device verifies the transaction request message and the transaction. The fifth signature information in the record can also be verified using a zero-knowledge proof algorithm.
在一些可能的实现方式中, 上述实施例所述的交易处理方法还可以包括: 终端根 据所述第三方审核账号的公钥加密所述第二账号的所述长期公钥, 获得所述第二账号 的所述长期公钥的密文; 相应的, 交易请求消息和所述交易记录中还包括该长期公钥 的密文。 这样, 具有第三方审核账号的审计员就可以利用自身的私钥来解密该长期公 钥的密文, 获得第二账号的长期公钥, 从而获知该第二账号的身份信息, 便于审计员 的审计。  In some possible implementations, the transaction processing method of the foregoing embodiment may further include: the terminal encrypting the long-term public key of the second account according to the public key of the third-party audit account, and obtaining the second a ciphertext of the long-term public key of the account; correspondingly, the transaction request message and the transaction record further include a ciphertext of the long-term public key. In this way, the auditor with the third-party audit account can use his private key to decrypt the ciphertext of the long-term public key, obtain the long-term public key of the second account, and thereby obtain the identity information of the second account, which is convenient for the auditor. audit.
进一步的, 该实现方式中的交易处理方法还可以包括: 终端根据所述第二账号的 所述长期公钥的密文, 生成所述交易内容的第六签名信息; 相应的, 所述交易请求消 息和所述交易记录中还包括所述第六签名信息; 所述第一验证结果和所述第二验证结 果还包括所述第六签名信息的验证结果, 所述第六签名信息的验证结果是由所述交易 处理设备根据所述第六签名信息中的验证参数进行验证计算获得的, 所述第六签名信 息的验证结果用于指示所述第二账号的所述长期公钥的密文是否正确。  Further, the transaction processing method in the implementation manner may further include: the terminal generating, according to the ciphertext of the long-term public key of the second account, sixth signature information of the transaction content; correspondingly, the transaction request The sixth signature information is further included in the message and the transaction record; the first verification result and the second verification result further include a verification result of the sixth signature information, and a verification result of the sixth signature information The verification processing is performed by the transaction processing device according to the verification parameter in the sixth signature information, and the verification result of the sixth signature information is used to indicate the ciphertext of the long-term public key of the second account. is it right or not.
其中, 第六签名信息可以为零知识证明的签名, 终端可以根据各输入金额的标识 以及零知识证明算法计算所述交易内容的第六签名信息, 相应的, 交易处理设备验证 交易请求消息和交易记录中的第六签名信息时也可以利用零知识证明算法来验证。  The sixth signature information may be a signature of the zero-knowledge proof, and the terminal may calculate the sixth signature information of the transaction content according to the identifier of each input amount and the zero-knowledge proof algorithm, and correspondingly, the transaction processing device verifies the transaction request message and the transaction. The sixth signature information in the record can also be verified using a zero-knowledge proof algorithm.
上述各种可选的实施例和可选的实现方式, 分别从登陆第一账号的终端、 交易处 理设备、 管理设备以及证书颁发设备交互的角度对本发明实施例提供的交易处理方法 中如何保护第一账号的隐私性、 如何保护第二账号的隐私性、 如何保护交易内容中交 易金额的隐私性以及如何配合审计员的审计等方面进行了阐述。 可以理解的是, 为了 执行上述功能, 交易处理设备、 管理设备以及证书颁发设备可以包括相应的硬件结果 和/软件模块, 例如, 交易处理设备可以包括至少一个背书节点、 共识节点以及提交节 点等, 还可以由背书节点执行管理设备生成凭据的功能, 还可以管理设备与证书颁发 设备由同一个设备执行相应的功能。 总之, 本领域技术人员应该很容易意识到, 结合 本文中所公开的实施例或实现方式中中描述的各步骤或单元, 本发明能够以硬件或已 安检和计算机软件的结合形式来实现。 某个功能究竟以硬件还是计算机软件驱动硬件 的方式来执行, 取决于技术方案的特定应用和设计约束条件。 专业技术人员可以对每 个特定的应用来使用不同方法来实现所描述的功能, 但是这种实现不应认为超出本发 明的范围。 请参阅图 9, 图 9是本发明实施例提供的一种终端的结构示意图, 所述终端包括 处理器 901、 存储器 902和通信接口 903, 存储器 902用于存储程序指令, 所述处理 器 901用于调用该程序指令来执行以下操作。  The foregoing various optional embodiments and the optional implementations respectively protect the transaction processing method provided by the embodiment of the present invention from the perspective of the interaction of the terminal, the transaction processing device, the management device, and the certificate issuing device that are logged in to the first account. The privacy of an account, how to protect the privacy of the second account, how to protect the privacy of the transaction amount in the transaction content, and how to cooperate with the auditor's audit are elaborated. It can be understood that, in order to perform the above functions, the transaction processing device, the management device, and the certificate issuing device may include corresponding hardware results and/or software modules. For example, the transaction processing device may include at least one endorsement node, a consensus node, a submit node, and the like. The function of managing the device to generate credentials may also be performed by the endorsement node, and the management device and the certificate issuing device may perform corresponding functions by the same device. In sum, those skilled in the art will readily appreciate that the present invention can be implemented in a combination of hardware or security and computer software in combination with the various steps or units described in the embodiments or implementations disclosed herein. Whether a function is implemented in hardware or computer software to drive hardware depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods for implementing the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the present invention. Referring to FIG. 9, FIG. 9 is a schematic structural diagram of a terminal according to an embodiment of the present invention. The terminal includes a processor 901, a memory 902, and a communication interface 903. The memory 902 is configured to store program instructions, and the processor 901 is used by the processor 901. The program instruction is called to perform the following operations.
所述处理器 901, 用于根据第一账号的凭据生成交易内容的第一签名信息, 所述 交易内容是所述终端基于所述第一账号发起的, 所述凭据是是由处理所述交易内容的 \¥0 2019/132767 卩(:17802017/050654 交易处理设备为所述第一账号生成的; The processor 901 is configured to generate first signature information of the transaction content according to the credential of the first account, where the transaction content is initiated by the terminal based on the first account, and the credential is processed by the transaction contents \¥0 2019/132767 卩(:17802017/050654 The transaction processing device is generated for the first account;
所述通信接口 903, 用于向所述交易处理设备发送交易请求消息, 所述交易请求 消息包括所述第一签名信息和所述交易内容;  The communication interface 903 is configured to send a transaction request message to the transaction processing device, where the transaction request message includes the first signature information and the transaction content;
所述通信接口 903, 还用于接收所述交易处理设备返回的交易响应消息, 所述交 易响应消息包括所述交易处理设备根据所述交易内容生成的交易结果信息;  The communication interface 903 is further configured to receive a transaction response message returned by the transaction processing device, where the transaction response message includes transaction result information generated by the transaction processing device according to the transaction content;
所述通信器 903, 还用于根据所述交易响应消息向所述交易处理设备发送交易记 录消息, 所述交易记录消息用于指示所述交易处理设备将所述交易记录存储到区块链 上, 所述交易记录包括所述交易内容、 所述第一签名信息以及所述交易结果信息。  The communicator 903 is further configured to send, according to the transaction response message, a transaction record message to the transaction processing device, where the transaction record message is used to instruct the transaction processing device to store the transaction record on a blockchain The transaction record includes the transaction content, the first signature information, and the transaction result information.
所述处理器根据第一账号的凭据生成交易内容的第一签名信息, 具体为: 将第一账号的长期私钥/一次性私钥、所述第一账号的凭据以及交易内容作为零知 识证明算法的输入, 计算所述交易内容的第一签名信息。  The processor generates the first signature information of the transaction content according to the credential of the first account, specifically: the long-term private key/one-time private key of the first account, the credential of the first account, and the transaction content as zero-knowledge proof The input of the algorithm calculates the first signature information of the transaction content.
其中, 所述交易响应消息是所述交易处理设备验证所述交易请求消息获得的第一 验证结果为通过时返回的; 所述交易记录是所述交易处理设备验证所述交易记录消息 获得的第二验证结果为通过时存储的;  The transaction response message is returned when the transaction processing device verifies that the first verification result obtained by the transaction request message is a pass; the transaction record is obtained by the transaction processing device verifying the transaction record message The second verification result is stored when passed;
其中, 所述第一验证结果和所述第二验证结果中均包括所述第一签名信息的验证 结果;  The first verification result and the second verification result both include a verification result of the first signature information;
所述第一签名信息的验证结果是由所述交易处理设备根据自身的公钥以及所述 第一签名信息中的验证参数进行验证计算获得的。  The verification result of the first signature information is obtained by the transaction processing device performing verification calculation according to the public key of the transaction and the verification parameter in the first signature information.
其中, 所述交易内容是所述终端基于所述第一账号针对第二账号发起的, 所述处 理器 901, 还用于根据所述第二账号的长期公钥生成所述第二账号的一次性公钥; 所述处理器 901, 还用于根据所述第二账号的一次性公钥和所述第二账号的证书 生成所述交易内容的第二签名信息;  The transaction content is that the terminal is initiated according to the first account for the second account, and the processor 901 is further configured to generate the second account once according to the long-term public key of the second account. The processor 901 is further configured to generate second signature information of the transaction content according to the one-time public key of the second account and the certificate of the second account;
其中, 所述证书是根据证书颁发设备的私钥生成的; 所述交易请求消息和所述交 易记录中包括所述第二账号的一次性公钥和所述第二签名信息, 所述第二账号的所述 一次性公钥为所述第二账号的地址;  The certificate is generated according to a private key of the certificate issuing device; the transaction request message and the transaction record include a one-time public key and the second signature information of the second account, the second The one-time public key of the account is an address of the second account;
其中, 所述第一验证结果和所述第二验证结果还包括所述第二签名信息的验证结 果, 所述第二签名信息的验证结果是由所述交易处理设备根据所述第二账号的所述一 次性公钥、 所述证书颁发设备的公钥以及所述第二签名信息中的验证参数进行验证获 得的。  The first verification result and the second verification result further include a verification result of the second signature information, and the verification result of the second signature information is determined by the transaction processing device according to the second account The one-time public key, the public key of the certificate issuing device, and the verification parameter in the second signature information are obtained by verifying.
在一种可能的实现方式中,  In a possible implementation,
所述处理器 901, 还用于根据所述交易内容中各输入金额的密文和所述各输出金 额的密文, 计算总输入金额与总输出金额之间差值的密文;  The processor 901 is further configured to calculate a ciphertext of a difference between the total input amount and the total output amount according to the ciphertext of each input amount in the transaction content and the ciphertext of each output amount;
所述处理器 901,还用于根据所述差值的密文生成所述交易内容的第三签名信息; 其中, 所述交易请求消息和所述交易记录中还包括所述第三签名信息; 所述第一验证结果和所述第二验证结果还包括所述第三签名信息的验证结果, 所 述第三签名信息的验证结果是由所述交易处理设备根据所述第三签名信息中的验证 参数、 所述各输入金额的密文以及所述各输出金额的密文进行验证计算获得的, 所述 第三签名信息的验证结果用于指示所述总输入金额是否等于所述总输出金额。 \¥0 2019/132767 卩(:17802017/050654 在一种可能的实现方式中, 所述各输入金额的密文以及所述各输出金额的密文的 加密密钥为第三方审核账号的公钥。 The processor 901 is further configured to generate third signature information of the transaction content according to the ciphertext of the difference value, where the transaction request message and the transaction record further include the third signature information; The first verification result and the second verification result further include a verification result of the third signature information, and the verification result of the third signature information is determined by the transaction processing device according to the third signature information. The verification parameter, the ciphertext of each input amount, and the ciphertext of each output amount are obtained by verification calculation, and the verification result of the third signature information is used to indicate whether the total input amount is equal to the total output amount. . \¥0 2019/132767 卩 (:17802017/050654 In a possible implementation manner, the ciphertext of each input amount and the ciphertext encryption key of each output amount are the public key of the third party audit account .
在一种可能的实现方式中, 所述处理器, 还用于根据所述第一账号的所述一次性 私钥生成所述各输入金额的标识;  In a possible implementation manner, the processor is further configured to generate, according to the one-time private key of the first account, an identifier of each input amount;
所述处理器, 还用于根据所述各输入金额的标识生成所述交易内容的第四签名信 息;  The processor is further configured to generate fourth signature information of the transaction content according to the identifier of each input amount;
其中, 所述交易请求消息和所述交易记录中还包括所述第四签名信息以及所述各 输入金额的标识;  The transaction request message and the transaction record further include the fourth signature information and an identifier of each input amount;
所述各输入金额的标识用于防止所述各输入金额被二次消费;  The identifiers of the input amounts are used to prevent the respective input amounts from being consumed twice;
所述第一验证结果和所述第二验证结果还包括所述第四签名信息的验证结果, 所 述第四签名信息的验证结果是由所述交易处理设备根据所述各输入金额的标识和所 述第四签名信息中的验证参数进行验证计算获得的, 所述第四签名信息的验证结果用 于指示所述各输入金额的标识是否正确。  The first verification result and the second verification result further include a verification result of the fourth signature information, and the verification result of the fourth signature information is determined by the transaction processing device according to the identifiers of the input amounts The verification result in the fourth signature information is obtained by the verification calculation, and the verification result of the fourth signature information is used to indicate whether the identifier of each input amount is correct.
在一种可能的实现方式中, 所述处理器 901, 还用于根据所述第三方审核账号的 公钥加密所述第一账号的所述一次性公钥, 获得所述第一账号的所述一次性公钥的密 文;  In a possible implementation, the processor 901 is further configured to encrypt, according to the public key of the third-party auditing account, the one-time public key of the first account, to obtain the first account. a ciphertext describing a one-time public key;
所述处理器 901, 还用于根据所述第一账号的所述一次性公钥的密文, 生成所述 交易内容的第五签名信息;  The processor 901 is further configured to generate fifth signature information of the transaction content according to the ciphertext of the one-time public key of the first account.
其中, 所述交易请求消息和所述交易记录中还包括所述第五签名信息以及所述第 一账号的所述一次性公钥的密文;  The transaction request message and the transaction record further include the fifth signature information and the ciphertext of the one-time public key of the first account;
所述第一验证结果和所述第二验证结果还包括所述第五签名信息的验证结果, 所 述第五签名信息的验证结果是由所述交易处理设备根据所述第五签名信息中的验证 参数进行验证计算获得的, 所述第五签名信息的验证结果用于指示所述第一账号的所 述一次性公钥的密文是否正确。  The first verification result and the second verification result further include a verification result of the fifth signature information, and the verification result of the fifth signature information is determined by the transaction processing device according to the fifth signature information. The verification result is obtained by the verification calculation, and the verification result of the fifth signature information is used to indicate whether the ciphertext of the one-time public key of the first account is correct.
在一种可能的实现方式中, 所述处理器 901, 还用于根据所述第三方审核账号的 公钥加密所述第二账号的所述长期公钥, 获得所述第二账号的所述长期公钥的密文; 所述处理器 901, 还用于根据所述第二账号的所述长期公钥的密文, 生成所述交 易内容的第六签名信息;  In a possible implementation, the processor 901 is further configured to encrypt, according to the public key of the third-party auditing account, the long-term public key of the second account, to obtain the a cipher text of the long-term public key; the processor 901, configured to generate sixth signature information of the transaction content according to the ciphertext of the long-term public key of the second account;
其中, 所述交易请求消息和所述交易记录中还包括所述第六签名信息以及所述第 二账号的所述长期公钥的密文;  The transaction request message and the transaction record further include the sixth signature information and the ciphertext of the long-term public key of the second account;
所述第一验证结果和所述第二验证结果还包括所述第六签名信息的验证结果, 所 述第六签名信息的验证结果是由所述交易处理设备根据所述第六签名信息中的验证 参数进行验证计算获得的, 所述第六签名信息的验证结果用于指示所述第二账号的所 述长期公钥的密文是否正确。  The first verification result and the second verification result further include a verification result of the sixth signature information, and the verification result of the sixth signature information is determined by the transaction processing device according to the sixth signature information. The verification result is obtained by the verification calculation, and the verification result of the sixth signature information is used to indicate whether the ciphertext of the long-term public key of the second account is correct.
在一种可能的实现方式中, 所述通信接口 903, 还用于向所述交易处理设备发送 凭据请求消息,所述凭据请求消息中包括所述第一账号的所述一次性公钥和/或所述第 一账号具有的交易金额的密文;  In a possible implementation, the communication interface 903 is further configured to send a credential request message to the transaction processing device, where the credential request message includes the one-time public key of the first account and/or Or the ciphertext of the transaction amount of the first account;
所述通信接口 903, 还用于接收所述交易处理设备返回的凭据响应消息, 所述凭 \¥0 2019/132767 卩(:17802017/050654 据响应消息中包括所述第一账号的凭据, 所述第一账号的凭据是所述交易处理设备根 据所述第一账号的所述一次性公钥和/或所述第一账号具有的交易金额的密文生成的。 The communication interface 903 is further configured to receive a credential response message returned by the transaction processing device, where \¥0 2019/132767 卩 (:17802017/050654) According to the response message, the credentials of the first account are included, and the credentials of the first account are the one-time public of the transaction processing device according to the first account. The key and/or the ciphertext of the transaction amount of the first account is generated.
在一种可能的实现方式中, 所述凭据请求消息中还包括所述第二账号的所述一次 性公钥和/或所述第二账号具有的交易金额的密文;所述凭据响应消息中还包括所述第 二账号的凭据; 所述第二账号的凭据是所述交易处理设备根据所述第一账号的所述一 次性公钥和/或所述第一账号具有的交易金额的密文生成的;所述交易请求消息以及所 述交易记录中还包括所述第二账号的凭据。 请参阅图 10, 图 10是本发明实施例提供的一种交易处理设备的结构示意图, 如 图 10所示, 该交易处理设备可以包括至少一个背书模块 1001、 共识模块 1002以及提 交模块 1003 ;  In a possible implementation, the credential request message further includes the one-time public key of the second account and/or the ciphertext of the transaction amount of the second account; the credential response message The credential of the second account is further included; the credential of the second account is the one-time public key of the transaction processing device according to the first account and/or the transaction amount of the first account The ciphertext is generated; the transaction request message and the transaction record further include a credential of the second account. Referring to FIG. 10, FIG. 10 is a schematic structural diagram of a transaction processing device according to an embodiment of the present invention. As shown in FIG. 10, the transaction processing device may include at least one endorsement module 1001, a consensus module 1002, and a delivery module 1003.
所述至少一个背书模块 1001, 用于接收终端发送的交易请求消息, 所述交易请求 消息中包括交易内容的第一签名信息, 所述交易内容是第一账号发起的;  The at least one endorsement module 1001 is configured to receive a transaction request message sent by the terminal, where the transaction request message includes first signature information of the transaction content, where the transaction content is initiated by the first account;
所述至少一个背书模块 1001,还用于验证所述交易请求消息,获得第一验证结果, 在所述第一验证结果为通过时, 模拟运行所述交易内容获得交易结果信息, 向所述终 端返回携带了所述交易结果信息的交易响应消息;  The at least one endorsement module 1001 is further configured to verify the transaction request message, obtain a first verification result, and when the first verification result is a pass, simulate running the transaction content to obtain transaction result information, to the terminal Returning a transaction response message carrying the transaction result information;
所述共识模块 1002,用于接收所述终端根据所述至少一个交易响应消息发送的交 易记录消息, 并将所述交易记录消息携带的交易记录与从其他终端接收的交易记录一 并根据接收时间进行排序, 生成包括所述交易记录的区块, 并将所述区块提交给所述 提交模块;  The consensus module 1002 is configured to receive a transaction record message sent by the terminal according to the at least one transaction response message, and compare the transaction record carried by the transaction record message with the transaction record received from other terminals according to the receiving time. Sorting, generating a block including the transaction record, and submitting the block to the submitting module;
所述提交模块 1003, 用于接收所述区块, 并验证所述区块中的所述交易记录, 获 得第二验证结果, 在所述第二验证结果为通过时, 将所述交易记录以所述区块的形式 存储到区块链上;  The submitting module 1003 is configured to receive the block, and verify the transaction record in the block to obtain a second verification result. When the second verification result is a pass, the transaction record is The form of the block is stored on the blockchain;
所述第一验证结果和所述第二验证结果均包括所述第一签名信息的验证结果, 所 述第一签名信息的验证结果是所述交易处理设备根据所述背书模块中授权背书模块 10011 的公钥验证获得的, 用于指示所述第一账号是否具有将所述交易记录存储到区 块链上的条件;  The first verification result and the second verification result both include a verification result of the first signature information, and the verification result of the first signature information is that the transaction processing device is authorized according to the endorsement module 10011 in the endorsement module Obtained by the public key verification, used to indicate whether the first account has a condition for storing the transaction record on a blockchain;
所述授权背书模块用于根据自身的私钥生成所述第一账号的凭据, 所述第一账号 的凭据用于生成所述第一签名信息。  The authorization endorsement module is configured to generate the credential of the first account according to the private key of the first account, and the credential of the first account is used to generate the first signature information.
请参阅图 11, 图 11是本发明实施例提供的另一种交易处理设备的结构示意图, 如图 11所示, 该交易处理设备包括至少一个背书模块 1101、 共识模块 1102、 提交模 块 1103 以及管理模块 1104 ;  Referring to FIG. 11, FIG. 11 is a schematic structural diagram of another transaction processing device according to an embodiment of the present invention. As shown in FIG. 11, the transaction processing device includes at least one endorsement module 1101, a consensus module 1102, a submission module 1103, and management. Module 1104;
所述至少一个背书模块 1101, 用于接收终端发送的交易请求消息, 所述交易请求 消息中包括交易内容的第一签名信息, 所述交易内容是第一账号发起的;  The at least one endorsement module 1101 is configured to receive a transaction request message sent by the terminal, where the transaction request message includes first signature information of the transaction content, where the transaction content is initiated by the first account;
所述至少一个背书模块 1101,还用于验证所述交易请求消息,获得第一验证结果, 在所述第一验证结果为通过时, 模拟运行所述交易内容获得交易结果信息, 向所述终 端返回携带了所述交易结果信息的交易响应消息;  The at least one endorsement module 1101 is further configured to verify the transaction request message, obtain a first verification result, and when the first verification result is a pass, simulate running the transaction content to obtain transaction result information, to the terminal Returning a transaction response message carrying the transaction result information;
所述共识模块 1102,用于接收所述终端根据所述至少一个交易响应消息发送的交 \¥0 2019/132767 卩(:17802017/050654 易记录消息, 并将所述交易记录消息携带的交易记录与从其他终端接收的交易记录一 并根据接收时间进行排序, 生成包括所述交易记录的区块, 并将所述区块提交给所述 提交模块; The consensus module 1102 is configured to receive, by the terminal, the delivery according to the at least one transaction response message. \¥0 2019/132767 卩 (: 17802017/050654 easy to record messages, and the transaction records carried by the transaction record message together with the transaction records received from other terminals are sorted according to the receiving time, generating the transaction record including a block, and submitting the block to the submitting module;
所述提交模块 1103, 用于接收所述区块, 并验证所述区块中的所述交易记录, 获 得第二验证结果, 在所述第二验证结果为通过时, 将所述交易记录以所述区块的形式 存储到区块链上;  The submitting module 1103 is configured to receive the block, and verify the transaction record in the block to obtain a second verification result. When the second verification result is a pass, the transaction record is The form of the block is stored on the blockchain;
所述第一验证结果和所述第二验证结果均包括所述第一签名信息的验证结果, 所 述第一签名信息的验证结果是所述交易处理设备根据所述管理模块的公钥验证获得 的, 用于指示所述第一账号是否具有将所述交易记录存储到区块链上的条件;  The first verification result and the second verification result both include a verification result of the first signature information, and the verification result of the first signature information is obtained by the transaction processing device according to the public key verification of the management module. And indicating whether the first account has a condition for storing the transaction record on a blockchain;
所述管理模块 1104, 用于根据自身的私钥生成所述第一账号的凭据, 所述第一账 号的凭据用于生成所述第一签名信息。  The management module 1104 is configured to generate a credential of the first account according to a private key of the first account, where the credential of the first account is used to generate the first signature information.
另外, 本发明实施例中, 图 10和图 11所述的交易处理设备还可以调用相关模块 来执行图 4至图 7中涉及的交易处理设备的处理过程和 /或用于本申请所描述的技术的 其他过程。 例如, 交易处理设备中的管理模块或授权背书模块执行相关步骤为第一账 号生成凭据等; 至少一个背书模块和提交模块验证交易请求消息和交易记录中的相关 内容等。 请参阅图 12, 图 12是本发明实施例提供的一种终端的结构示意图, 图 12所示的 终端可以为图 3八-30, 图 4至图 8中的终端, 所述终端可以包括处理器、 存储器、 控 制电路、天线以及输入输出装置。处理器主要用于对通信协议以及通信数据进行处理, 以及对整个终端设备进行控制, 执行软件程序, 处理软件程序的数据, 例如用于支持 终端设备执行上述传输预编码矩阵的指示方法实施例中所描述的动作。 存储器主要用 于存储软件程序和数据, 例如存储上述实施例中所描述的第一账号的凭据, 第一账号 的长期私钥或一次性私钥等。 控制电路主要用于基带信号与射频信号的转换以及对射 频信号的处理。 控制电路和天线一起也可以叫做收发器, 主要用于收发电磁波形式的 射频信号。 输入输出装置, 例如触摸屏、 显示屏, 键盘等主要用于接收用户输入的数 据以及对用户输出数据。  In addition, in the embodiment of the present invention, the transaction processing device described in FIG. 10 and FIG. 11 may also invoke a related module to perform the processing of the transaction processing device involved in FIG. 4 to FIG. 7 and/or for the description of the present application. Other processes of technology. For example, the management module or the authorization endorsement module in the transaction processing device performs the relevant steps to generate credentials for the first account, etc.; at least one endorsement module and the submission module verify the transaction request message and related content in the transaction record, and the like. Referring to FIG. 12, FIG. 12 is a schematic structural diagram of a terminal according to an embodiment of the present invention. The terminal shown in FIG. 12 may be the terminal in FIG. 3-8, FIG. 4 to FIG. 8, and the terminal may include processing. , memory, control circuitry, antennas, and input and output devices. The processor is mainly used for processing the communication protocol and the communication data, and controlling the entire terminal device, executing the software program, and processing the data of the software program, for example, in the embodiment of the indication method for supporting the terminal device to perform the foregoing transmission precoding matrix. The action described. The memory is mainly used for storing software programs and data, such as storing the credentials of the first account described in the above embodiment, the long-term private key or the one-time private key of the first account. The control circuit is mainly used for the conversion of the baseband signal and the radio frequency signal and the processing of the radio frequency signal. The control circuit together with the antenna can also be called a transceiver, and is mainly used to transmit and receive RF signals in the form of electromagnetic waves. Input and output devices, such as touch screens, display screens, keyboards, etc., are mainly used to receive data input by a user and output data to a user.
当终端开机后, 处理器可以读取存储单元中的软件程序, 解释并执行软件程序的 指令, 处理软件程序的数据。 当需要通过无线发送数据时, 处理器对待发送的数据进 行基带处理后, 输出基带信号至射频电路, 射频电路将基带信号进行射频处理后将射 频信号通过天线以电磁波的形式向外发送。 当有数据发送到终端设备时, 射频电路通 过天线接收到射频信号, 将射频信号转换为基带信号, 并将基带信号输出至处理器, 处理器将基带信号转换为数据并对该数据进行处理。  When the terminal is powered on, the processor can read the software program in the storage unit, interpret and execute the instructions of the software program, and process the data of the software program. When the data needs to be transmitted wirelessly, the processor performs baseband processing on the data to be transmitted, and then outputs the baseband signal to the radio frequency circuit. The radio frequency circuit performs radio frequency processing on the baseband signal, and then transmits the radio frequency signal to the outside through the antenna in the form of electromagnetic waves. When data is transmitted to the terminal device, the RF circuit receives the RF signal through the antenna, converts the RF signal into a baseband signal, and outputs the baseband signal to the processor, which converts the baseband signal into data and processes the data.
本领域技术人员可以理解, 为了便于说明, 图 12仅示出了一个存储器和处理器。 在实际的终端设备中, 可以存在多个处理器和存储器。 存储器也可以称为存储介质或 者存储设备等, 本发明实施例对此不做限制。  Those skilled in the art will appreciate that FIG. 12 shows only one memory and processor for ease of illustration. In an actual terminal device, there may be multiple processors and memories. The memory may also be referred to as a storage medium or a storage device, and the like.
作为一种可选的实现方式, 处理器可以包括基带处理器和中央处理器, 基带处理 器主要用于对通信协议以及通信数据进行处理, 中央处理器主要用于对整个终端设备 \¥0 2019/132767 卩(:17802017/050654 进行控制, 执行软件程序, 处理软件程序的数据。 图 12 中的处理器集成了基带处理 器和中央处理器的功能, 本领域技术人员可以理解, 基带处理器和中央处理器也可以 是各自独立的处理器, 通过总线等技术互联。 本领域技术人员可以理解, 终端设备可 以包括多个基带处理器以适应不同的网络制式, 终端设备可以包括多个中央处理器以 增强其处理能力, 终端设备的各个部件可以通过各种总线连接。 所述基带处理器也可 以表述为基带处理电路或者基带处理芯片。 所述中央处理器也可以表述为中央处理电 路或者中央处理芯片。 对通信协议以及通信数据进行处理的功能可以内置在处理器中, 也可以以软件程序的形式存储在存储单元中, 由处理器执行软件程序以实现基带处理 功能。 As an optional implementation, the processor may include a baseband processor and a central processing unit, and the baseband processor is mainly used to process communication protocols and communication data, and the central processing unit is mainly used for the entire terminal device. \¥0 2019/132767 卩 (:17802017/050654 Control, execute software program, process software program data. The processor in Figure 12 integrates the functions of the baseband processor and the central processor, as will be understood by those skilled in the art, The baseband processor and the central processing unit may also be independent processors, and are interconnected by technologies such as a bus. Those skilled in the art may understand that the terminal device may include multiple baseband processors to adapt to different network standards, and the terminal device may include multiple Central processing units to enhance their processing capabilities, the various components of the terminal device can be connected through various buses. The baseband processor can also be expressed as a baseband processing circuit or a baseband processing chip. The central processing unit can also be expressed as a central processing. The circuit or the central processing chip. The functions of processing the communication protocol and the communication data may be built in the processor, or may be stored in the storage unit in the form of a software program, and the processor executes the software program to implement the baseband processing function.
示例性的, 在发明实施例中, 可以将具有收发功能的天线和控制电路视为终端的 收发单元 1201, 将具有处理功能的处理器视为终端的处理单元 1202。 如图 12所示, 终端包括收发单元 1201和处理单元 1202。 收发单元也可以称为收发器、 收发机、 收 发装置等。可选的,可以将收发单元 1201 中用于实现接收功能的器件视为接收单元, 将收发单元 1201 中用于实现发送功能的器件视为发送单元, 即收发单元 1201包括接 收单元和发送单元示例性的, 接收单元也可以称为接收机、 接收器、 接收电路等, 发 送单元可以称为发射机、 发射器或者发射电路等。 本发明实施例中, 该交易处理设备可以包括通信单元和处理单元, 所述处理单元 和所述通信单元相结合执行上述实施例中交易处理设备所执行的相关操作, 或者执行 至少一个背书节点、 共识节点、 提交节点的相关功能, 或者, 还可以执行管理设备、 证书颁发设备等的相关功能。  Illustratively, in the embodiment of the invention, the antenna and control circuit having the transceiving function can be regarded as the transceiving unit 1201 of the terminal, and the processor having the processing function can be regarded as the processing unit 1202 of the terminal. As shown in FIG. 12, the terminal includes a transceiver unit 1201 and a processing unit 1202. The transceiver unit can also be referred to as a transceiver, transceiver, transceiver, and the like. Optionally, the device for implementing the receiving function in the transceiver unit 1201 can be regarded as a receiving unit, and the device for implementing the sending function in the transceiver unit 1201 is regarded as a sending unit, that is, the transceiver unit 1201 includes a receiving unit and a sending unit. The receiving unit may also be referred to as a receiver, a receiver, a receiving circuit, etc., and the transmitting unit may be referred to as a transmitter, a transmitter, or a transmitting circuit. In the embodiment of the present invention, the transaction processing device may include a communication unit and a processing unit, where the processing unit and the communication unit perform the related operations performed by the transaction processing device in the foregoing embodiment, or execute at least one endorsement node, The consensus node, the related function of the submitting node, or the related functions of the management device, the certificate issuing device, and the like can also be performed.
可选的, 请参阅图 13, 图 13是本发明实施例提供的一种交易处理设备的结构示 意图, 该交易处理设备可以包括处理器 1301和存储器 1302。 该存储器 1302用于存储 指令, 该处理器 1301用于执行该存储器 1302存储的指令, 以实现如上图 4至 8对应 的方法中的步骤以及实施例。  Optionally, please refer to FIG. 13, FIG. 13 is a schematic diagram of a structure of a transaction processing device according to an embodiment of the present invention. The transaction processing device may include a processor 1301 and a memory 1302. The memory 1302 is for storing instructions for executing the instructions stored by the memory 1302 to implement the steps and embodiments of the method corresponding to Figures 4 through 8 above.
进一步的, 该交易处理设备还可以包括输入口 1304和输出口 1305。 进一步的, 该设备还可以进一步包括总线系统 1303, 其中, 处理器 1301、 存储器 1302、 通信接 口 1304可以通过总线系统 1303相连。  Further, the transaction processing device may further include an input port 1304 and an output port 1305. Further, the device may further include a bus system 1303, wherein the processor 1301, the memory 1302, and the communication interface 1304 may be connected by the bus system 1303.
处理器 1301 用于执行该存储器 1302存储的指令, 以控制通信接口 1304接收信 号, 并控制通信接口 1304 发送信号, 完成上述方法中终端的步骤。 其中, 通信接口 1304可以为相同或者不同的物理实体。 为相同的物理实体时, 可以统称为收发器。 所 述存储器 1302可以集成在所述处理器 1301中,也可以与所述处理器 1301分开设置。  The processor 1301 is configured to execute the instructions stored by the memory 1302 to control the communication interface 1304 to receive the signal, and control the communication interface 1304 to send a signal to complete the steps of the terminal in the above method. The communication interface 1304 can be the same or different physical entity. When they are the same physical entity, they can be collectively referred to as transceivers. The memory 1302 may be integrated in the processor 1301 or may be provided separately from the processor 1301.
作为一种实现方式, 通信接口 1304 的功能可以考虑通过收发电路或者收发的专 用芯片实现。 处理器 1301 可以考虑通过专用处理芯片、 处理电路、 处理器或者通用 芯片实现。  As an implementation, the function of the communication interface 1304 can be implemented by a dedicated chip through a transceiver circuit or a transceiver. The processor 1301 can be implemented by a dedicated processing chip, a processing circuit, a processor, or a general purpose chip.
作为另一种实现方式, 可以考虑使用通用计算机的方式来实现本申请实施例提供 的终端。 即将实现处理器 1301, 通信接口 1304功能的程序代码存储在存储器中, 通 用处理器通过执行存储器中的代码来实现处理器 1301, 通信接口 1304的功能。 \¥0 2019/132767 卩(:17802017/050654 该设备所涉及的与本申请实施例提供的技术方案相关的概念, 解释和详细说明及 其他步骤请参见前述方法或其他实施例中关于这些内容的描述, 此处不做贅述。 所属领域的技术人员可以清楚地了解到, 为描述的方便和简洁,上述描述的系统、 装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再贅述。 As another implementation manner, a terminal provided by the embodiment of the present application may be implemented by using a general-purpose computer. The program code for the function of the processor 1301, the communication interface 1304 is stored in a memory, and the general purpose processor implements the functions of the processor 1301, the communication interface 1304 by executing the code in the memory. \¥0 2019/132767 卩 (: 17802017/050654 The concepts, explanations, detailed descriptions and other steps related to the technical solutions provided by the embodiments of the present application are referred to the foregoing methods or other embodiments. The descriptions are not described herein. It will be apparent to those skilled in the art that, for the convenience and simplicity of the description, the specific processes of the systems, devices, and units described above may be referred to the corresponding processes in the foregoing method embodiments. I will not repeat them here.
在本申请所提供的几个实施例中, 应该理解到, 所揭露的系统、 装置和方法, 可 以通过其它的方式实现。 例如, 以上所描述的装置实施例仅仅是示意性的, 例如, 所 述单元的划分, 仅仅为一种逻辑功能划分, 实际实现时可以有另外的划分方式, 例如 多个单元或组件可以结合或者可以集成到另一个系统, 或一些特征可以忽略, 或不执 行。 另一点, 所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些 接口, 装置或单元的间接耦合或通信连接, 可以是电性, 机械或其它的形式。  In the several embodiments provided herein, it should be understood that the disclosed systems, devices, and methods may be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner, for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be electrical, mechanical or otherwise.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的, 作为单元显 示的部件可以是或者也可以不是物理单元, 即可以位于一个地方, 或者也可以分布到 多个网络单元上。 可以根据实际的需要选择其中的部分或者全部单元来实现本实施例 方案的目的。  The units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, i.e., may be located in one place, or may be distributed over multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the embodiment.
另外, 在本发明各个实施例中的各功能单元可以集成在一个处理单元中, 也可以 是各个单元单独物理存在, 也可以两个或两个以上单元集成在一个单元中。  In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
在上述实施例中, 可以全部或部分地通过软件、 硬件、 固件或者其任意组合来实 现。 当使用软件实现时, 可以全部或部分地以计算机程序产品的形式实现。 所述计算 机程序产品包括一个或多个计算机指令。 在计算机上加载和执行所述计算机程序指令 时, 全部或部分地产生按照本发明实施例所述的流程或功能。 所述计算机可以是通用 计算机、 专用计算机、 计算机网络、 或者其他可编程装置。 所述计算机指令可以存储 在计算机可读存储介质中, 或者从一个计算机可读存储介质向另一个计算机可读存储 介质传输, 例如, 所述计算机指令可以从一个网站站点、 计算机、 服务器或数据中心 通过有线 (例如同轴电缆、 光纤、 数字用户线 (DSL)) 或无线 (例如红外、 无线、 微波等) 方式向另一个网站站点、 计算机、 服务器或数据中心进行传输。 所述计算机 可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介 质集成的服务器、 数据中心等数据存储设备。 所述可用介质可以是磁性介质, (例如, 软盘、 硬盘、 磁带)、 光介质(例如, DVD), 或者半导体介质 (例如固态硬盘 Solid State Disk(SSD)) 等。  In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented in software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in accordance with embodiments of the present invention are generated in whole or in part. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be from a website site, computer, server or data center Transfer to another website site, computer, server, or data center by wire (such as coaxial cable, fiber, digital subscriber line (DSL), or wireless (eg, infrared, wireless, microwave, etc.). The computer readable storage medium can be any available media that can be accessed by a computer or a data storage device such as a server, data center, or the like that includes one or more of the available media. The usable medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a Solid State Disk (SSD)).
以上所述, 仅为本发明的具体实施方式, 但本发明的保护范围并不局限于此, 任 何熟悉本技术领域的技术人员在本发明揭露的技术范围内, 可轻易想到变化或替换, 都应涵盖在本发明的保护范围之内。 因此, 本发明的保护范围应以所述权利要求的保 护范围为准。  The above is only the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily think of changes or substitutions within the technical scope of the present invention. It should be covered by the scope of the present invention. Therefore, the scope of the invention should be determined by the scope of the appended claims.

Claims

\¥0 2019/132767 卩(:17802017/050654 权利要求 \¥0 2019/132767 卩(:17802017/050654 Claims
1、 一种交易处理方法, 其特征在于, 包括: A transaction processing method, comprising:
终端根据第一账号的凭据生成交易内容的第一签名信息, 所述交易内容是所述终 端基于所述第一账号发起的; 所述凭据是由处理所述交易内容的交易处理设备为所述 第一账号生成的;  The terminal generates first signature information of the transaction content according to the credential of the first account, where the transaction content is initiated by the terminal based on the first account; the credential is determined by the transaction processing device that processes the transaction content. Generated by the first account;
所述终端向所述交易处理设备发送交易请求消息, 所述交易请求消息包括所述第 一签名信息和所述交易内容;  The terminal sends a transaction request message to the transaction processing device, where the transaction request message includes the first signature information and the transaction content;
所述终端接收所述交易处理设备返回的交易响应消息, 所述交易响应消息中包括 所述交易处理设备根据所述交易内容生成的交易结果信息;  Receiving, by the terminal, a transaction response message returned by the transaction processing device, where the transaction response message includes transaction result information generated by the transaction processing device according to the transaction content;
所述终端根据所述交易响应消息向所述交易处理设备发送交易记录消息, 所述交 易记录消息用于指示所述交易处理设备将所述交易记录消息携带的交易记录存储到 区块链上, 所述区块链为所述交易处理设备中保存所述交易记录的分布式数据库, 所 述交易记录包括所述交易内容、 所述第一签名信息以及所述交易结果信息。  Transmitting, by the terminal, a transaction record message to the transaction processing device according to the transaction response message, where the transaction record message is used to instruct the transaction processing device to store the transaction record carried by the transaction record message on a blockchain. The blockchain is a distributed database in the transaction processing device that stores the transaction record, and the transaction record includes the transaction content, the first signature information, and the transaction result information.
2、 根据权利要求 1 所述的方法, 其特征在于, 所述终端根据第一账号的凭据生 成交易内容的第一签名信息, 包括:  The method according to claim 1, wherein the terminal generates the first signature information of the transaction content according to the credentials of the first account, including:
终端将第一账号的私钥、 所述第一账号的凭据以及交易内容作为零知识证明算法 的输入, 计算所述交易内容的第一签名信息, 所述私钥包括长期私钥或一次性私钥。  The terminal calculates the first signature information of the transaction content by using the private key of the first account, the credential of the first account, and the transaction content as an input of a zero-knowledge proof algorithm, where the private key includes a long-term private key or a one-time private key.
3、 根据权利要求 2 所述的方法, 其特征在于, 所述交易响应消息是所述交易处 理设备验证所述交易请求消息获得的第一验证结果为通过时返回的; 所述交易记录是 所述交易处理设备验证所述交易记录消息获得的第二验证结果为通过时存储的; 其中, 所述第一验证结果和所述第二验证结果中均包括所述第一签名信息的验证 结果;  The method according to claim 2, wherein the transaction response message is returned when the transaction processing device verifies that the first verification result obtained by the transaction request message is a pass; the transaction record is The second verification result obtained by the transaction processing device for verifying the transaction record message is stored as a pass-through; wherein the first verification result and the second verification result both include a verification result of the first signature information;
所述第一签名信息的验证结果是由所述交易处理设备根据自身的公钥以及所述 第一签名信息中的验证参数进行验证计算获得的。  The verification result of the first signature information is obtained by the transaction processing device performing verification calculation according to the public key of the transaction and the verification parameter in the first signature information.
4、 根据权利要求 3 所述的方法, 其特征在于, 所述交易内容是所述终端基于所 述第一账号针对第二账号发起的, 所述方法还包括:  The method according to claim 3, wherein the transaction content is that the terminal initiates the second account based on the first account, the method further includes:
所述终端根据所述第二账号的长期公钥生成所述第二账号的一次性公钥; 所述终端根据所述第二账号的一次性公钥和所述第二账号的证书生成所述交易 内容的第二签名信息;  Generating, by the terminal, a one-time public key of the second account according to the long-term public key of the second account; the terminal generating, according to the one-time public key of the second account and the certificate of the second account Second signature information of the transaction content;
其中, 所述证书是根据证书颁发设备的私钥生成的; 所述交易请求消息和所述交 易记录中包括所述第二账号的一次性公钥和所述第二签名信息, 所述第二账号的所述 一次性公钥为所述第二账号的地址;  The certificate is generated according to a private key of the certificate issuing device; the transaction request message and the transaction record include a one-time public key and the second signature information of the second account, the second The one-time public key of the account is an address of the second account;
其中, 所述第一验证结果和所述第二验证结果还包括所述第二签名信息的验证结 果, 所述第二签名信息的验证结果是由所述交易处理设备根据所述第二账号的所述一 次性公钥、 所述证书颁发设备的公钥以及所述第二签名信息中的验证参数进行验证计 算获得的。  The first verification result and the second verification result further include a verification result of the second signature information, and the verification result of the second signature information is determined by the transaction processing device according to the second account The one-time public key, the public key of the certificate issuing device, and the verification parameter in the second signature information are obtained through verification calculation.
5、 根据权利要求 3或 4所述的方法, 其特征在于, 所述方法还包括: \¥0 2019/132767 卩(:17802017/050654 所述终端根据所述交易内容中各输入金额的密文和各输出金额的密文, 计算总输 入金额与总输出金额之间差值的密文; The method according to claim 3 or 4, wherein the method further comprises: \¥0 2019/132767 卩(:17802017/050654 The terminal calculates the ciphertext of the difference between the total input amount and the total output amount according to the ciphertext of each input amount in the transaction content and the ciphertext of each output amount. ;
所述终端根据所述差值的密文生成所述交易内容的第三签名信息;  The terminal generates third signature information of the transaction content according to the ciphertext of the difference value;
其中, 所述交易请求消息和所述交易记录中还包括所述第三签名信息; 所述第一验证结果和所述第二验证结果还包括所述第三签名信息的验证结果, 所 述第三签名信息的验证结果是由所述交易处理设备根据所述第三签名信息中的验证 参数、 所述各输入金额的密文以及所述各输出金额的密文进行验证计算获得的, 所述 第三签名信息的验证结果用于指示所述总输入金额是否等于所述总输出金额。  The transaction request message and the transaction record further include the third signature information; the first verification result and the second verification result further include a verification result of the third signature information, where The verification result of the three signature information is obtained by the transaction processing device according to the verification parameter in the third signature information, the ciphertext of each input amount, and the ciphertext of each output amount. The verification result of the third signature information is used to indicate whether the total input amount is equal to the total output amount.
6、 根据权利要求 5所述的方法, 其特征在于,  6. The method of claim 5, wherein
所述各输入金额的密文以及所述各输出金额的密文的加密密钥为第三方审核账 号的公钥。  The ciphertext of each input amount and the encryption key of the ciphertext of each of the output amounts are the public key of the third party audit account.
7、 根据权利要求 5或 6所述的方法, 其特征在于, 所述方法还包括:  The method according to claim 5 or 6, wherein the method further comprises:
所述终端根据所述第一账号的所述一次性私钥生成所述各输入金额的标识; 所述终端根据所述各输入金额的标识生成所述交易内容的第四签名信息; 其中, 所述交易请求消息和所述交易记录中还包括所述第四签名信息以及所述各 输入金额的标识;  The terminal generates an identifier of each input amount according to the one-time private key of the first account; the terminal generates fourth signature information of the transaction content according to the identifier of each input amount; The transaction request message and the transaction record further include the fourth signature information and an identifier of each input amount;
所述各输入金额的标识用于防止所述各输入金额被二次消费;  The identifiers of the input amounts are used to prevent the respective input amounts from being consumed twice;
所述第一验证结果和所述第二验证结果还包括所述第四签名信息的验证结果, 所 述第四签名信息的验证结果是由所述交易处理设备根据所述各输入金额的标识和所 述第四签名信息中的验证参数进行验证计算获得的, 所述第四签名信息的验证结果用 于指示所述各输入金额的标识是否正确。  The first verification result and the second verification result further include a verification result of the fourth signature information, and the verification result of the fourth signature information is determined by the transaction processing device according to the identifiers of the input amounts The verification result in the fourth signature information is obtained by the verification calculation, and the verification result of the fourth signature information is used to indicate whether the identifier of each input amount is correct.
8、 根据权利要求 1至 7任一项所述的方法, 其特征在于, 所述方法还包括: 所述终端根据所述第三方审核账号的公钥加密所述第一账号的所述一次性公钥, 获得所述第一账号的所述一次性公钥的密文;  The method according to any one of claims 1 to 7, wherein the method further comprises: the terminal encrypting the one-time of the first account according to a public key of the third-party audit account a public key, obtaining a ciphertext of the one-time public key of the first account;
所述终端根据所述第一账号的所述一次性公钥的密文, 生成所述交易内容的第五 签名信息;  Transmitting, by the terminal, the fifth signature information of the transaction content according to the ciphertext of the one-time public key of the first account;
其中, 所述交易请求消息和所述交易记录中还包括所述第五签名信息以及所述第 一账号的所述一次性公钥的密文;  The transaction request message and the transaction record further include the fifth signature information and the ciphertext of the one-time public key of the first account;
所述第一验证结果和所述第二验证结果还包括所述第五签名信息的验证结果, 所 述第五签名信息的验证结果是由所述交易处理设备根据所述第五签名信息中的验证 参数进行验证计算获得的, 所述第五签名信息的验证结果用于指示所述第一账号的所 述一次性公钥的密文是否正确。  The first verification result and the second verification result further include a verification result of the fifth signature information, and the verification result of the fifth signature information is determined by the transaction processing device according to the fifth signature information. The verification result is obtained by the verification calculation, and the verification result of the fifth signature information is used to indicate whether the ciphertext of the one-time public key of the first account is correct.
9、 根据权利要求 1至 8任一项所述的方法, 其特征在于, 所述方法还包括: 所述终端根据所述第三方审核账号的公钥加密所述第二账号的所述长期公钥, 获 得所述第二账号的所述长期公钥的密文;  The method according to any one of claims 1 to 8, wherein the method further comprises: the terminal encrypting the long-term public account of the second account according to a public key of the third-party audit account Key, obtaining a ciphertext of the long-term public key of the second account;
所述终端根据所述第二账号的所述长期公钥的密文, 生成所述交易内容的第六签 名信息;  The terminal generates sixth signing information of the transaction content according to the ciphertext of the long-term public key of the second account;
其中, 所述交易请求消息和所述交易记录中还包括所述第六签名信息以及所述第 \¥0 2019/132767 卩(:17802017/050654 二账号的所述长期公钥的密文; The transaction request message and the transaction record further include the sixth signature information and the first \¥0 2019/132767 卩 (: 17802017/050654 The ciphertext of the long-term public key of the second account;
所述第一验证结果和所述第二验证结果还包括所述第六签名信息的验证结果, 所 述第六签名信息的验证结果是由所述交易处理设备根据所述第六签名信息中的验证 参数进行验证计算获得的, 所述第六签名信息的验证结果用于指示所述第二账号的所 述长期公钥的密文是否正确。  The first verification result and the second verification result further include a verification result of the sixth signature information, and the verification result of the sixth signature information is determined by the transaction processing device according to the sixth signature information. The verification result is obtained by the verification calculation, and the verification result of the sixth signature information is used to indicate whether the ciphertext of the long-term public key of the second account is correct.
10、 根据权利要求 4至 9任一项所述的方法, 其特征在于, 所述方法还包括: 所述终端向所述交易处理设备发送凭据请求消息, 所述凭据请求消息中包括所述 第一账号的所述一次性公钥和/或所述第一账号具有的交易金额的密文;  The method according to any one of claims 4 to 9, wherein the method further comprises: the terminal sending a credential request message to the transaction processing device, where the credential request message includes the The one-time public key of an account and/or the ciphertext of the transaction amount of the first account;
所述终端接收所述交易处理设备返回的凭据响应消息, 所述凭据响应消息中包括 所述第一账号的凭据, 所述第一账号的凭据是所述交易处理设备根据所述第一账号的 所述一次性公钥和/或所述第一账号具有的交易金额的密文生成的。  Receiving, by the terminal, the credential response message returned by the transaction processing device, where the credential response message includes the credential of the first account, and the credential of the first account is the transaction processing device according to the first account The one-time public key and/or the ciphertext of the transaction amount of the first account is generated.
11、 根据权利要求 10 所述的方法, 其特征在于, 所述凭据请求消息中还包括所 述第二账号的所述一次性公钥和/或所述第二账号具有的交易金额的密文;所述凭据响 应消息中还包括所述第二账号的凭据; 所述第二账号的凭据是所述交易处理设备根据 所述第一账号的所述一次性公钥和 /或所述第一账号具有的交易金额的密文生成的;所 述交易请求消息以及所述交易记录中还包括所述第二账号的凭据。  The method according to claim 10, wherein the credential request message further includes the one-time public key of the second account and/or the ciphertext of the transaction amount of the second account The credential response message further includes the credential of the second account; the credential of the second account is the one-time public key and/or the first of the transaction processing device according to the first account The account has the ciphertext of the transaction amount; the transaction request message and the transaction record further include the credentials of the second account.
12、 一种交易处理方法, 其特征在于, 包括: 12. A transaction processing method, comprising:
交易处理设备接收终端发送的交易请求消息, 所述交易请求消息中包括交易内容 和第一签名信息, 所述交易内容是所述终端基于第一账号发起的, 所述第一签名信息 是由所述终端根据所述第一账号的凭据生成的;  The transaction processing device receives the transaction request message sent by the terminal, where the transaction request message includes the transaction content and the first signature information, where the transaction content is initiated by the terminal based on the first account, and the first signature information is The terminal is generated according to the credentials of the first account;
所述交易处理设备根据所述交易请求消息向所述终端返回交易响应消息, 所述交 易响应消息中包括所述交易处理设备根据所述交易内容生成的交易结果信息;  And the transaction processing device returns a transaction response message to the terminal according to the transaction request message, where the transaction response message includes transaction result information generated by the transaction processing device according to the transaction content;
所述交易处理设备接收所述终端根据所述交易响应消息发送的交易记录消息; 所述交易处理设备将所述交易记录消息中携带的交易记录存储到区块链上, 所述 区块链为所述交易处理方中保存所述交易记录的分布式数据库, 所述交易记录包括所 述交易内容、 所述第一签名信息以及所述交易结果信息。  The transaction processing device receives a transaction record message sent by the terminal according to the transaction response message; the transaction processing device stores the transaction record carried in the transaction record message on a blockchain, and the blockchain is The transaction processor saves a distributed database of the transaction records, the transaction record including the transaction content, the first signature information, and the transaction result information.
13、 根据权利要求 12所述的方法, 其特征在于,  13. The method of claim 12, wherein
所述交易处理设备根据所述交易请求消息向所述终端返回交易响应消息之前, 所 述方法还包括:  Before the transaction processing device returns a transaction response message to the terminal according to the transaction request message, the method further includes:
所述交易处理设备验证所述交易请求消息, 获得第一验证结果;  The transaction processing device verifies the transaction request message to obtain a first verification result;
当所述第一验证结果为通过时, 所述交易处理设备运行所述交易内容, 获得交易 结果信息;  When the first verification result is passed, the transaction processing device runs the transaction content to obtain transaction result information;
所述方法还包括:  The method further includes:
所述交易处理设备验证所述交易记录消息, 获得第二验证结果;  The transaction processing device verifies the transaction record message to obtain a second verification result;
当所述第二验证结果为通过时, 所述交易处理设备执行将所述交易记录消息携带 的交易记录存储到区块链上的步骤。 \¥0 2019/132767 卩(:17802017/050654 When the second verification result is a pass, the transaction processing device performs the step of storing the transaction record carried by the transaction record message on a blockchain. \¥0 2019/132767 卩(:17802017/050654
14、 根据权利要求 13 所述的方法, 其特征在于, 所述第一验证结果和所述第二 验证结果中均包括所述第一签名信息的验证结果; The method according to claim 13, wherein the first verification result and the second verification result both include a verification result of the first signature information;
所述第一签名信息的验证结果是由所述交易处理设备利用自身的公钥与所述第 一签名信息中的验证参数进行验证计算获得的。  The verification result of the first signature information is obtained by the transaction processing device performing verification calculation using the public key of the transaction and the verification parameter in the first signature information.
15、 根据权利要求 12至 14任一项所述的方法, 其特征在于, 所述第一账号是针 对所述第二账号发起的交易内容,  The method according to any one of claims 12 to 14, wherein the first account is a transaction initiated by the second account.
所述交易请求消息以及所述交易记录中还包括第二签名信息以及第二账号的一 次性公钥;  The transaction request message and the transaction record further include second signature information and a one-time public key of the second account;
所述第二账号的所述一次性公钥为所述第二账号的地址;  The one-time public key of the second account is an address of the second account;
所述第一验证结果和所述第二验证结果还包括所述第二签名信息的验证结果, 所 述第二签名信息的验证结果是所述交易处理设备根据所述第二账号的一次性公钥、 证 书颁发设备的公钥以及所述第二签名信息中的验证参数进行验证计算获得的。  The first verification result and the second verification result further include a verification result of the second signature information, and the verification result of the second signature information is a one-time publicization of the transaction processing device according to the second account The key is obtained by verifying the key, the public key of the certificate issuing device, and the verification parameter in the second signature information.
16、 根据权利要求 12至 15任一项所述的方法, 其特征在于,  16. A method according to any one of claims 12 to 15, characterized in that
所述交易请求消息以及所述交易记录中还包括第三签名信息、 各输入金额的密文 以及所述各输出金额的密文;  The transaction request message and the transaction record further include third signature information, a ciphertext of each input amount, and a ciphertext of each output amount;
所述第一验证结果和所述第二验证结果还包括所述第三签名信息的验证结果, 所 述第三签名信息的验证结果是由所述交易处理设备根据所述第三签名信息中的验证 参数、 所述各输入金额的密文以及所述各输出金额的密文进行验证计算获得的, 所述 第三签名信息的验证结果用于指示所述交易记录中总输入金额是否等于总输出金额。  The first verification result and the second verification result further include a verification result of the third signature information, and the verification result of the third signature information is determined by the transaction processing device according to the third signature information. The verification parameter, the ciphertext of each input amount, and the ciphertext of each output amount are obtained by verification calculation, and the verification result of the third signature information is used to indicate whether the total input amount in the transaction record is equal to the total output. Amount.
17、 根据权利要求 16所述的方法, 其特征在于,  17. The method of claim 16 wherein:
所述各输入金额的密文以及所述各输出金额的密文的加密密钥为第三方审核账 号的公钥。  The ciphertext of each input amount and the encryption key of the ciphertext of each of the output amounts are the public key of the third party audit account.
18、 根据权利要求 16或 17所述的方法, 其特征在于,  18. A method according to claim 16 or 17, characterized in that
所述交易请求消息和所述交易记录中还包括所述第四签名信息以及所述各输入 金额的标识;  The transaction request message and the transaction record further include the fourth signature information and an identifier of each input amount;
所述第一验证结果和所述第二验证结果还包括所述第四签名信息的验证结果, 所 述第四签名信息的验证结果是由所述交易处理设备根据所述各输入金额的标识和所 述第四签名信息中的验证参数进行验证计算获得的, 所述第四签名信息的验证结果用 于指示所述各输入金额的标识是否正确;  The first verification result and the second verification result further include a verification result of the fourth signature information, and the verification result of the fourth signature information is determined by the transaction processing device according to the identifiers of the input amounts The verification result in the fourth signature information is obtained by performing verification, and the verification result of the fourth signature information is used to indicate whether the identifier of each input amount is correct.
所述各输入金额的标识用于防止所述各输入金额的二次花费。  The identifiers of the respective input amounts are used to prevent the secondary spending of the respective input amounts.
19、 根据权利要求 12至 18任一项所述的方法, 其特征在于,  19. A method according to any one of claims 12 to 18, characterized in that
所述交易请求消息和所述交易记录中还包括所述第五签名信息以及所述第一账 号的所述一次性公钥的密文;  The transaction request message and the transaction record further include the fifth signature information and the ciphertext of the one-time public key of the first account;
所述第一验证结果和所述第二验证结果还包括所述第五签名信息的验证结果, 所 述第五签名信息的验证结果是由所述交易处理设备根据所述第五签名信息中的验证 参数进行验证计算获得的, 所述第五签名信息的验证结果用于指示所述第一账号的所 述一次性公钥的密文是否正确;  The first verification result and the second verification result further include a verification result of the fifth signature information, and the verification result of the fifth signature information is determined by the transaction processing device according to the fifth signature information. The verification result obtained by the verification calculation is performed, and the verification result of the fifth signature information is used to indicate whether the ciphertext of the one-time public key of the first account is correct;
所述第一账号的所述一次性公钥的密文的加密密钥为第三方审核账号的公钥。 \¥0 2019/132767 ?01/802017/050654 The encryption key of the ciphertext of the one-time public key of the first account is a public key of a third-party audit account. \¥0 2019/132767 ?01/802017/050654
20、 根据权利要求 12至 19任一项所述的方法, 其特征在于, 20. A method according to any one of claims 12 to 19, characterized in that
所述交易请求消息和所述交易记录中还包括所述第六签名信息以及所述第二账 号的所述长期公钥的密文;  The transaction request message and the transaction record further include the sixth signature information and the ciphertext of the long-term public key of the second account;
所述第一验证结果和所述第二验证结果还包括所述第六签名信息的验证结果, 所 述第六签名信息的验证结果是由所述交易处理设备根据所述第六签名信息中的验证 参数进行验证计算获得的, 所述第六签名信息的验证结果用于指示所述第二账号的所 述长期公钥的密文是否正确;  The first verification result and the second verification result further include a verification result of the sixth signature information, and the verification result of the sixth signature information is determined by the transaction processing device according to the sixth signature information. The verification result obtained by the verification calculation is performed, and the verification result of the sixth signature information is used to indicate whether the ciphertext of the long-term public key of the second account is correct;
所述第二账号的所述长期公钥的密文的加密密钥为所述第三方审核账号的公钥。 The encryption key of the ciphertext of the long-term public key of the second account is the public key of the third-party audit account.
21、 根据权利要求 20所述的方法, 其特征在于, 所述方法还包括: The method according to claim 20, wherein the method further comprises:
所述交易处理设备接收所述终端发送的凭据请求消息, 所述凭据请求消息中包括 所述第一账号的所述一次性公钥和/或所述第一账号具有的交易金额的密文;  The transaction processing device receives a credential request message sent by the terminal, where the credential request message includes the one-time public key of the first account and/or the ciphertext of the transaction amount of the first account;
所述交易处理设备根据所述凭据请求消息生成所述第一账号的凭据;  The transaction processing device generates a credential of the first account according to the credential request message;
所述交易处理设备向所述终端发送凭据响应消息, 所述凭据响应消息中携带所述 第一账号的凭据。  The transaction processing device sends a credential response message to the terminal, where the credential response message carries the credential of the first account.
22、 根据权利要求 21 所述的方法, 其特征在于, 所述凭据请求消息中还包括所 述第二账号的所述一次性公钥和/或所述第二账号具有的交易金额的密文;所述凭据响 应消息中还包括所述第二账号的凭据; 所述交易请求消息以及所述交易记录中还包括 所述第二账号的凭据所述第二账号的凭据是所述交易处理设备根据所述第二账号的 所述一次性公钥和/或所述第二账号具有的交易金额的密文生成的。  The method according to claim 21, wherein the credential request message further includes the one-time public key of the second account and/or the ciphertext of the transaction amount of the second account The credential response message further includes the credential of the second account; the transaction request message and the transaction record further include a credential of the second account, and the credential of the second account is the transaction processing device And generated according to the one-time public key of the second account and/or the ciphertext of the transaction amount of the second account.
23、 一种交易处理设备, 其特征在于, 交易处理设备包括至少一个背书模块、 共 识模块、 提交模块以及管理模块; A transaction processing device, characterized in that the transaction processing device comprises at least one endorsement module, a consensus module, a submission module, and a management module;
所述至少一个背书模块, 用于接收终端发送的交易请求消息, 所述交易请求消息 中包括交易内容和第一签名信息, 所述交易内容是所述终端基于第一账号发起的, 所 述第一签名信息是由所述终端根据所述第一账号的凭据生成的;  The at least one endorsement module is configured to receive a transaction request message sent by the terminal, where the transaction request message includes a transaction content and first signature information, where the transaction content is initiated by the terminal based on the first account, a signature information is generated by the terminal according to the credentials of the first account;
所述至少一个背书模块, 还用于根据所述交易请求消息向所述终端返回交易响应 消息, 所述交易响应消息中包括所述交易处理设备根据所述交易内容生成的交易结果 信息;  The at least one endorsement module is further configured to: return, according to the transaction request message, a transaction response message to the terminal, where the transaction response message includes transaction result information generated by the transaction processing device according to the transaction content;
所述共识模块, 用于接收所述终端根据所述至少一个交易响应消息发送的交易记 录消息, 并将所述交易记录消息携带的交易记录与从其他终端接收的交易记录一并根 据接收时间进行排序, 生成包括所述交易记录的区块, 并将所述区块提交给所述提交 模块;  The consensus module is configured to receive a transaction record message sent by the terminal according to the at least one transaction response message, and compare the transaction record carried by the transaction record message with the transaction record received from other terminals according to the receiving time. Sorting, generating a block including the transaction record, and submitting the block to the submitting module;
所述提交模块, 用于接收所述区块, 并将所述交易记录以所述区块的形式存储到 区块链上;  The submitting module is configured to receive the block, and store the transaction record in the form of the block onto a blockchain;
所述管理模块,用于根据自身的私钥以及所述第一账号的一次性公钥和/或具有的 交易金额的密文生成所述第一账号的凭据。  The management module is configured to generate the credential of the first account according to the private key of the first account and the one-time public key of the first account and/or the ciphertext of the transaction amount.
24、 一种终端, 其特征在于, 所述终端包括处理器和通信接口, \¥0 2019/132767 ?01/802017/050654 所述处理器, 用于根据第一账号的凭据生成交易内容的第一签名信息, 所述交易 内容是所述终端基于所述第一账号发起的, 所述凭据是是由处理所述交易内容的交易 处理设备为所述第一账号生成的; 24, A terminal, wherein the terminal comprises a processor and a communication interface, \¥0 2019/132767 ?01/802017/050654 the processor, configured to generate first signature information of the transaction content according to the credential of the first account, where the transaction content is initiated by the terminal based on the first account The credential is generated by the transaction processing device that processes the transaction content for the first account;
所述通信接口, 用于向所述交易处理设备发送交易请求消息, 所述交易请求消息 包括所述第一签名信息和所述交易内容;  The communication interface is configured to send a transaction request message to the transaction processing device, where the transaction request message includes the first signature information and the transaction content;
所述通信接口, 还用于接收所述交易处理设备返回的交易响应消息, 所述交易响 应消息包括所述交易处理设备根据所述交易内容生成的交易结果信息;  The communication interface is further configured to receive a transaction response message returned by the transaction processing device, where the transaction response message includes transaction result information generated by the transaction processing device according to the transaction content;
所述通信接口, 还用于根据所述交易响应消息向所述交易处理设备发送交易记录 消息, 所述交易记录消息用于指示所述交易处理设备将所述交易记录存储到区块链上, 所述交易记录包括所述交易内容、 所述第一签名信息以及所述交易结果信息。  The communication interface is further configured to send a transaction record message to the transaction processing device according to the transaction response message, where the transaction record message is used to instruct the transaction processing device to store the transaction record on a blockchain. The transaction record includes the transaction content, the first signature information, and the transaction result information.
25、 根据权利要求 24 所述的终端, 其特征在于, 所述处理器根据第一账号的凭 据生成交易内容的第一签名信息, 具体为:  The terminal according to claim 24, wherein the processor generates the first signature information of the transaction content according to the credential of the first account, which is specifically:
第一账号的私钥、 所述第一账号的凭据以及交易内容作为零知识证明算法的输入, 计算所述交易内容的第一签名信息, 所述私钥包括长期私钥或一次性私钥。  The private key of the first account, the credential of the first account, and the transaction content are input as a zero-knowledge proof algorithm, and the first signature information of the transaction content is calculated, and the private key includes a long-term private key or a one-time private key.
26、 根据权利要求 25 所述的终端, 其特征在于, 所述交易响应消息是所述交易 处理设备验证所述交易请求消息获得的第一验证结果为通过时返回的; 所述交易记录 是所述交易处理设备验证所述交易记录消息获得的第二验证结果为通过时存储的; 其中, 所述第一验证结果和所述第二验证结果中均包括所述第一签名信息的验证 结果;  The terminal according to claim 25, wherein the transaction response message is returned when the transaction processing device verifies that the first verification result obtained by the transaction request message is a pass; the transaction record is The second verification result obtained by the transaction processing device for verifying the transaction record message is stored as a pass-through; wherein the first verification result and the second verification result both include a verification result of the first signature information;
所述第一签名信息的验证结果是由所述交易处理设备根据自身的公钥以及所述 第一签名信息中的验证参数进行验证计算获得的。  The verification result of the first signature information is obtained by the transaction processing device performing verification calculation according to the public key of the transaction and the verification parameter in the first signature information.
27、 根据权利要求 26 所述的终端, 其特征在于, 所述交易内容是所述终端基于 所述第一账号针对第二账号发起的,  The terminal according to claim 26, wherein the transaction content is initiated by the terminal for the second account based on the first account,
所述处理器, 还用于根据所述第二账号的长期公钥生成所述第二账号的一次性公 钥;  The processor is further configured to generate a one-time public key of the second account according to the long-term public key of the second account;
所述处理器, 还用于根据所述第二账号的一次性公钥和所述第二账号的证书生成 所述交易内容的第二签名信息;  The processor is further configured to generate second signature information of the transaction content according to the one-time public key of the second account and the certificate of the second account;
其中, 所述证书是根据证书颁发设备的私钥生成的; 所述交易请求消息和所述交 易记录中包括所述第二账号的一次性公钥和所述第二签名信息, 所述第二账号的所述 一次性公钥为所述第二账号的地址;  The certificate is generated according to a private key of the certificate issuing device; the transaction request message and the transaction record include a one-time public key and the second signature information of the second account, the second The one-time public key of the account is an address of the second account;
其中, 所述第一验证结果和所述第二验证结果还包括所述第二签名信息的验证结 果, 所述第二签名信息的验证结果是由所述交易处理设备根据所述第二账号的所述一 次性公钥、 所述证书颁发设备的公钥以及所述第二签名信息中的验证参数进行验证获 得的。  The first verification result and the second verification result further include a verification result of the second signature information, and the verification result of the second signature information is determined by the transaction processing device according to the second account The one-time public key, the public key of the certificate issuing device, and the verification parameter in the second signature information are obtained by verifying.
28、 根据权利要求 26或 27所述的终端, 其特征在于,  The terminal according to claim 26 or 27, characterized in that
所述处理器, 还用于根据所述交易内容中各输入金额的密文和所述各输出金额的 密文, 计算总输入金额与总输出金额之间差值的密文;  The processor is further configured to calculate a ciphertext of a difference between the total input amount and the total output amount according to the ciphertext of each input amount in the transaction content and the ciphertext of each output amount;
所述处理器, 还用于根据所述差值的密文生成所述交易内容的第三签名信息; \¥0 2019/132767 ?01/802017/050654 其中, 所述交易请求消息和所述交易记录中还包括所述第三签名信息; 所述第一验证结果和所述第二验证结果还包括所述第三签名信息的验证结果, 所 述第三签名信息的验证结果是由所述交易处理设备根据所述第三签名信息中的验证 参数、 所述各输入金额的密文以及所述各输出金额的密文进行验证计算获得的, 所述 第三签名信息的验证结果用于指示所述总输入金额是否等于所述总输出金额。 The processor is further configured to generate third signature information of the transaction content according to the ciphertext of the difference value; The first request result and the second verification result further include the third verification information. a verification result of the third signature information, where the verification result of the third signature information is determined by the transaction processing device according to the verification parameter in the third signature information, the ciphertext of each input amount, and the output The ciphertext of the amount is obtained by the verification calculation, and the verification result of the third signature information is used to indicate whether the total input amount is equal to the total output amount.
29、 根据权利要求 28所述的终端, 其特征在于,  29. The terminal of claim 28, wherein:
所述各输入金额的密文以及所述各输出金额的密文的加密密钥为第三方审核账 号的公钥。  The ciphertext of each input amount and the encryption key of the ciphertext of each of the output amounts are the public key of the third party audit account.
30、 根据权利要求 28或 29所述的终端, 其特征在于, 所述方法还包括: 所述处理器, 还用于根据所述第一账号的所述一次性私钥生成所述各输入金额的 标识;  The terminal according to claim 28 or 29, wherein the method further comprises: the processor, further configured to generate the input amount according to the one-time private key of the first account Identification
所述处理器, 还用于根据所述各输入金额的标识生成所述交易内容的第四签名信 息;  The processor is further configured to generate fourth signature information of the transaction content according to the identifier of each input amount;
其中, 所述交易请求消息和所述交易记录中还包括所述第四签名信息以及所述各 输入金额的标识;  The transaction request message and the transaction record further include the fourth signature information and an identifier of each input amount;
所述各输入金额的标识用于防止所述各输入金额被二次消费;  The identifiers of the input amounts are used to prevent the respective input amounts from being consumed twice;
所述第一验证结果和所述第二验证结果还包括所述第四签名信息的验证结果, 所 述第四签名信息的验证结果是由所述交易处理设备根据所述各输入金额的标识和所 述第四签名信息中的验证参数进行验证计算获得的, 所述第四签名信息的验证结果用 于指示所述各输入金额的标识是否正确。  The first verification result and the second verification result further include a verification result of the fourth signature information, and the verification result of the fourth signature information is determined by the transaction processing device according to the identifiers of the input amounts The verification result in the fourth signature information is obtained by the verification calculation, and the verification result of the fourth signature information is used to indicate whether the identifier of each input amount is correct.
31、 根据权利要求 24至 30任一项所述的终端, 其特征在于,  The terminal according to any one of claims 24 to 30, characterized in that
所述处理器, 还用于根据所述第三方审核账号的公钥加密所述第一账号的所述一 次性公钥, 获得所述第一账号的所述一次性公钥的密文;  The processor is further configured to encrypt the one-time public key of the first account according to the public key of the third-party audit account, and obtain the ciphertext of the one-time public key of the first account;
所述处理器, 还用于根据所述第一账号的所述一次性公钥的密文, 生成所述交易 内容的第五签名信息;  The processor is further configured to generate fifth signature information of the transaction content according to the ciphertext of the one-time public key of the first account;
其中, 所述交易请求消息和所述交易记录中还包括所述第五签名信息以及所述第 一账号的所述一次性公钥的密文;  The transaction request message and the transaction record further include the fifth signature information and the ciphertext of the one-time public key of the first account;
所述第一验证结果和所述第二验证结果还包括所述第五签名信息的验证结果, 所 述第五签名信息的验证结果是由所述交易处理设备根据所述第五签名信息中的验证 参数进行验证计算获得的, 所述第五签名信息的验证结果用于指示所述第一账号的所 述一次性公钥的密文是否正确。  The first verification result and the second verification result further include a verification result of the fifth signature information, and the verification result of the fifth signature information is determined by the transaction processing device according to the fifth signature information. The verification result is obtained by the verification calculation, and the verification result of the fifth signature information is used to indicate whether the ciphertext of the one-time public key of the first account is correct.
32、 根据权利要求 24至 3 1任一项所述的终端, 其特征在于,  The terminal according to any one of claims 24 to 31, characterized in that
所述处理器, 还用于根据所述第三方审核账号的公钥加密所述第二账号的所述长 期公钥, 获得所述第二账号的所述长期公钥的密文;  The processor is further configured to encrypt the long-term public key of the second account according to the public key of the third-party audit account, and obtain the ciphertext of the long-term public key of the second account;
所述处理器, 还用于根据所述第二账号的所述长期公钥的密文, 生成所述交易内 容的第六签名信息;  The processor is further configured to generate sixth signature information of the transaction content according to the ciphertext of the long-term public key of the second account;
其中, 所述交易请求消息和所述交易记录中还包括所述第六签名信息以及所述第 二账号的所述长期公钥的密文; \¥0 2019/132767 ?01/802017/050654 所述第一验证结果和所述第二验证结果还包括所述第六签名信息的验证结果, 所 述第六签名信息的验证结果是由所述交易处理设备根据所述第六签名信息中的验证 参数进行验证计算获得的, 所述第六签名信息的验证结果用于指示所述第二账号的所 述长期公钥的密文是否正确。 The transaction request message and the transaction record further include the sixth signature information and the ciphertext of the long-term public key of the second account; \¥0 2019/132767 ?01/802017/050654 The first verification result and the second verification result further include a verification result of the sixth signature information, and the verification result of the sixth signature information is The transaction processing device obtains the verification result according to the verification parameter in the sixth signature information, and the verification result of the sixth signature information is used to indicate whether the ciphertext of the long-term public key of the second account is correct.
33、 根据权利要求 24至 32任一项所述的终端, 其特征在于,  The terminal according to any one of claims 24 to 32, characterized in that
所述通信接口, 还用于向所述交易处理设备发送凭据请求消息, 所述凭据请求消 息中包括所述第一账号的所述一次性公钥和/或所述第一账号具有的交易金额的密文; 所述通信接口, 还用于接收所述交易处理设备返回的凭据响应消息, 所述凭据响 应消息中包括所述第一账号的凭据, 所述第一账号的凭据是所述交易处理设备根据所 述第一账号的所述一次性公钥和/或所述第一账号具有的交易金额的密文生成的。  The communication interface is further configured to send a credential request message to the transaction processing device, where the credential request message includes the one-time public key of the first account and/or the transaction amount of the first account The communication interface is further configured to receive a credential response message returned by the transaction processing device, where the credential response message includes credentials of the first account, and the credential of the first account is the transaction The processing device is generated according to the one-time public key of the first account and/or the ciphertext of the transaction amount of the first account.
34、 根据权利要求 33 所述的终端, 其特征在于, 所述凭据请求消息中还包括所 述第二账号的所述一次性公钥和/或所述第二账号具有的交易金额的密文;所述凭据响 应消息中还包括所述第二账号的凭据; 所述第二账号的凭据是所述交易处理设备根据 所述第一账号的所述一次性公钥和 /或所述第一账号具有的交易金额的密文生成的;所 述交易请求消息以及所述交易记录中还包括所述第二账号的凭据。  The terminal according to claim 33, wherein the credential request message further includes the one-time public key of the second account and/or the ciphertext of the transaction amount of the second account. The credential response message further includes the credential of the second account; the credential of the second account is the one-time public key and/or the first of the transaction processing device according to the first account The account has the ciphertext of the transaction amount; the transaction request message and the transaction record further include the credentials of the second account.
PCT/SG2017/050654 2017-12-28 2017-12-28 Transaction processing method and related equipment WO2019132767A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/SG2017/050654 WO2019132767A1 (en) 2017-12-28 2017-12-28 Transaction processing method and related equipment
CN201780097441.XA CN111433800B (en) 2017-12-28 2017-12-28 Transaction processing method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/SG2017/050654 WO2019132767A1 (en) 2017-12-28 2017-12-28 Transaction processing method and related equipment

Publications (1)

Publication Number Publication Date
WO2019132767A1 true WO2019132767A1 (en) 2019-07-04

Family

ID=67067956

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/SG2017/050654 WO2019132767A1 (en) 2017-12-28 2017-12-28 Transaction processing method and related equipment

Country Status (2)

Country Link
CN (1) CN111433800B (en)
WO (1) WO2019132767A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111260349A (en) * 2020-01-10 2020-06-09 中国工商银行股份有限公司 Real-time payment method and system based on block chain
CN114389819A (en) * 2021-12-31 2022-04-22 航天信息股份有限公司 Signature verification method and device

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112785307A (en) * 2021-01-28 2021-05-11 联想(北京)有限公司 Request message processing method and device
CN113469690B (en) * 2021-07-23 2024-03-26 佳乔(深圳)投资有限公司 Transaction settlement method based on blockchain

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106372941A (en) * 2016-08-31 2017-02-01 江苏通付盾科技有限公司 CA authentication management method, device and system based on block chain
CN106934619A (en) * 2017-03-13 2017-07-07 杭州复杂美科技有限公司 A kind of method and system of transaction record
CN107230056A (en) * 2017-06-28 2017-10-03 无锡井通网络科技有限公司 A kind of fast transaction system based on block chain contract
EP3236403A2 (en) * 2016-04-22 2017-10-25 Sony Corporation Client, server, method and identity verification system
CN107426157A (en) * 2017-04-21 2017-12-01 杭州趣链科技有限公司 A kind of alliance's chain authority control method based on digital certificate and ca authentication system
CN107451874A (en) * 2017-07-27 2017-12-08 武汉天喻信息产业股份有限公司 Electronic invoice integrated conduct method and system based on block chain

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2825543B1 (en) * 2001-06-01 2003-09-26 Radiotelephone Sfr METHOD AND DEVICE FOR CERTIFYING A TRANSACTION
US20170147808A1 (en) * 2015-11-19 2017-05-25 International Business Machines Corporation Tokens for multi-tenant transaction database identity, attribute and reputation management
US10230756B2 (en) * 2015-11-25 2019-03-12 International Business Machines Corporation Resisting replay attacks efficiently in a permissioned and privacy-preserving blockchain network
CN113435994A (en) * 2017-03-31 2021-09-24 唐晓领 Method, device and system for sharing transaction metadata information by multiple financial borrowing parties based on block chain

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3236403A2 (en) * 2016-04-22 2017-10-25 Sony Corporation Client, server, method and identity verification system
CN106372941A (en) * 2016-08-31 2017-02-01 江苏通付盾科技有限公司 CA authentication management method, device and system based on block chain
CN106934619A (en) * 2017-03-13 2017-07-07 杭州复杂美科技有限公司 A kind of method and system of transaction record
CN107426157A (en) * 2017-04-21 2017-12-01 杭州趣链科技有限公司 A kind of alliance's chain authority control method based on digital certificate and ca authentication system
CN107230056A (en) * 2017-06-28 2017-10-03 无锡井通网络科技有限公司 A kind of fast transaction system based on block chain contract
CN107451874A (en) * 2017-07-27 2017-12-08 武汉天喻信息产业股份有限公司 Electronic invoice integrated conduct method and system based on block chain

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111260349A (en) * 2020-01-10 2020-06-09 中国工商银行股份有限公司 Real-time payment method and system based on block chain
CN111260349B (en) * 2020-01-10 2023-10-03 中国工商银行股份有限公司 Real-time payment method and system based on block chain
CN114389819A (en) * 2021-12-31 2022-04-22 航天信息股份有限公司 Signature verification method and device

Also Published As

Publication number Publication date
CN111433800B (en) 2024-04-09
CN111433800A (en) 2020-07-17

Similar Documents

Publication Publication Date Title
US9871655B2 (en) Method for deriving a verification token from a credential
US12058248B2 (en) Quantum-safe networking
TWI760149B (en) Determining a common secret for the secure exchange of information and hierarchical, deterministic cryptographic keys
KR102678262B1 (en) Non-archival tools for building distributed computer applications
CN102594558B (en) Anonymous digital certificate system and verification method of trustable computing environment
US7581107B2 (en) Anonymity revocation
TW201914254A (en) Method, apparatus and system for data encryption and decryption
CN109981287B (en) Code signing method and storage medium thereof
US20160294553A1 (en) Information delivery system
CN106576043A (en) Virally distributable trusted messaging
CN103856478A (en) Certificate signing and issuing method of trusted network, attestation method of trusted network and corresponding devices
WO2019132767A1 (en) Transaction processing method and related equipment
CN101815091A (en) Cipher providing equipment, cipher authentication system and cipher authentication method
WO2018166359A1 (en) Mobile payment sublicensing method and payment system implemented by using same
US20080141035A1 (en) Limited Blind Signature System
CN113193961B (en) Digital certificate management method and device
Tan et al. Challenges of post-quantum digital signing in real-world applications: A survey
CN115913513A (en) Distributed credible data transaction method, system and device supporting privacy protection
CN115396096A (en) Encryption and decryption method and protection system for secret file based on national cryptographic algorithm
CN115277010A (en) Identity authentication method, system, computer device and storage medium
CN107104804A (en) A kind of platform integrity verification method and device
CN113206746B (en) Digital certificate management method and device
Chen et al. How to bind a TPM’s attestation keys with its endorsement key
Thammarat et al. A secure mobile payment protocol for handling accountability with formal verification
Yang et al. A New Third-party Payment Scheme with Anonymity for Mobile Commerce

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17936558

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17936558

Country of ref document: EP

Kind code of ref document: A1