WO2020216078A1 - 一种基于区块链的竞争排名方法及装置 - Google Patents

一种基于区块链的竞争排名方法及装置 Download PDF

Info

Publication number
WO2020216078A1
WO2020216078A1 PCT/CN2020/084317 CN2020084317W WO2020216078A1 WO 2020216078 A1 WO2020216078 A1 WO 2020216078A1 CN 2020084317 W CN2020084317 W CN 2020084317W WO 2020216078 A1 WO2020216078 A1 WO 2020216078A1
Authority
WO
WIPO (PCT)
Prior art keywords
competitor
ciphertext
competition
blockchain
public key
Prior art date
Application number
PCT/CN2020/084317
Other languages
English (en)
French (fr)
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 深圳前海微众银行股份有限公司
Publication of WO2020216078A1 publication Critical patent/WO2020216078A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0407Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the identity of one or more communicating identities is hidden
    • H04L63/0414Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the identity of one or more communicating identities is hidden during transmission, i.e. party's identity is protected against eavesdropping, e.g. by using temporary identifiers, but is known to the other party or parties involved in the communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/06Network architectures or network communication protocols for network security for supporting key management in a packet data network
    • 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/008Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols involving homomorphic encryption
    • 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/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • 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/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0819Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
    • H04L9/0822Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s) using key encryption key
    • 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/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
    • 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
    • H04L9/3247Cryptographic 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 involving digital signatures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks

Definitions

  • the embodiment of the present invention relates to the field of technology and finance technology, and in particular to a method and device for competitive ranking based on blockchain.
  • embodiments of the present invention provide a blockchain-based competitive ranking method and device.
  • an embodiment of the present invention provides a blockchain-based competitive ranking method, including:
  • each competing ciphertext pair is downloaded from the blockchain.
  • the two competing ciphertexts in the competing ciphertext pair are encrypted by the same public key, and each competing ciphertext is Including the competitive attribute value, one competitive attribute value includes the sensitive attribute value of the competitor corresponding to the public key, and the other competitive attribute value includes the sensitive attribute value of any competitor except the competitor corresponding to the public key ;
  • the first private key is used to decrypt the competing ciphertext in the target competing ciphertext pair, and the target competing attribute pair is determined.
  • the first public key and the first private key are Generated by the first competitor;
  • the values of the two target competition attributes in each target competition attribute pair are sequentially compared to determine the ranking of the first competitor.
  • the competing ciphertext pair is generated in the following manner:
  • a competition ciphertext, the second competition ciphertext includes a second competition attribute value, and the second competition attribute value is an attribute value obtained by confusing the sensitive attribute value of the second competitor;
  • the competing ciphertext pair consisting of the first competing ciphertext and the second competing ciphertext is sent to the blockchain through an anonymous network.
  • the method further includes:
  • the first public key and the ciphertext of the first competitor are sent to the blockchain through an anonymous network.
  • it also includes:
  • it also includes:
  • the verification message includes:
  • an embodiment of the present invention provides a blockchain-based competitive ranking device, including:
  • the download module is used to download all the competing ciphertext pairs from the blockchain when the first message broadcast by the blockchain is received, and the two competing ciphertexts in the competing ciphertext pair are encrypted by the same public key,
  • Each competition ciphertext includes a competition attribute value, one competition attribute value includes the sensitive attribute value of the competitor corresponding to the public key, and the other competition attribute value includes any competition other than the competitor corresponding to the public key Party’s sensitive attribute value;
  • the matching module is used to determine the target competing ciphertext pair encrypted by the first public key from all the competing ciphertext pairs;
  • the decryption module is used for each target competing ciphertext pair, using a first private key to decrypt the competing ciphertext in the target competing ciphertext pair to determine the target competing attribute pair, the first public key and the The first private key is generated by the first competitor;
  • the processing module is used to sequentially compare the values of the two target competition attributes in each target competition attribute pair to determine the ranking of the first competitor.
  • it also includes a sending module
  • the download module is further configured to download the public keys and ciphertexts of all competitors from the blockchain when the second message broadcast by the blockchain is received;
  • the processing module is further configured to select a first random number and a second random number for any second competitor except the first competitor; adopting the first random number and the second random number Confuse the sensitive attribute value of the first competitor to determine the first competitive attribute value; use the public key of the second competitor to encrypt the first competitive attribute value to determine the first competitive ciphertext; Use the public key of the second competitor to encrypt the second random number, and determine the second random number according to the first random number, the ciphertext of the second competitor, and the encrypted second random number
  • a competition ciphertext, the second competition ciphertext includes a second competition attribute value, and the second competition attribute value is an attribute value obtained by confusing the sensitive attribute value of the second competitor;
  • the sending module is specifically configured to send a competition ciphertext pair composed of the first competition ciphertext and the second competition ciphertext to the blockchain via an anonymous network.
  • the processing module is further configured to, when receiving the second message broadcast by the blockchain, before downloading the public keys and ciphertexts of all competitors from the blockchain, use the first A public key encrypts the sensitive attribute value of the first competitor, and determines the ciphertext of the first competitor;
  • the sending module is further configured to send the first public key and the ciphertext of the first competitor to the blockchain via an anonymous network.
  • the processing module is further configured to use a first signature private key to sign the first public key and the ciphertext of the first competitor to determine the label of the first competitor;
  • the first public key encrypts the label of the first competitor, and determines the encryption commitment of the first competitor;
  • the sending module is further configured to send the encryption commitment of the first competitor to the blockchain via an anonymous network.
  • the sending module is further configured to send a verification request to the blockchain, and the verification request carries the identity of the second competitor, so that the blockchain obtains from the second competitor
  • the label of the second competitor and the second public key are used to encrypt the label of the second competitor using the second public key to determine the temporary encryption commitment of the second competitor; when determining the temporary encryption commitment When it matches the saved encryption commitment of the second competitor and the verification of the label of the second competitor is passed, it is determined that the second competitor has passed the verification and a verification passed message is returned;
  • the download module is also used to receive a verification pass message sent by the blockchain.
  • the sending module is specifically configured to send a verification request to the blockchain, and the verification request carries the identity of the second competitor, so that the blockchain obtains from the second competitor
  • the competitor’s public key encrypts the sensitive attribute value of the second competitor
  • the data corresponding to the second competitor is generated based on the random number, the temporary ciphertext, the saved public key, and the ciphertext.
  • Temporary competition ciphertext pair when it is determined that the temporary encryption promise matches the saved encryption promise of the second competitor, the temporary competition ciphertext pair matches the saved competition ciphertext pair generated by the second competitor, and When the verification of the label of the second competitor is passed, it is determined that the verification of the second competitor is passed and a verification passed message is returned.
  • an embodiment of the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor.
  • a computer program stored in the memory and capable of running on the processor.
  • the processor executes the program, a blockchain-based The steps of the competitive ranking method.
  • an embodiment of the present invention provides a computer-readable storage medium that stores a computer program executable by a computer device.
  • the program runs on the computer device, the computer device executes a blockchain-based The steps of the competitive ranking method.
  • an embodiment of the present invention provides a computer program product containing instructions that, when run on a computer device, causes the computer device to execute the steps of a blockchain-based competitive ranking method.
  • the ranking of the competitors is determined by sequentially comparing the magnitudes of the two competing attribute values in each competing attribute pair, which ensures that any competition Party cannot know the sensitive attribute values of other competitors.
  • the competitive ciphertext pair is obtained after encryption using the public key, and the identity of the competitor cannot be determined based on the public key, so when the competitive attribute value in the competitive ciphertext pair is used to determine the ranking, any competitor can only get Its own ranking among all competitors without knowing the ranking of other competitors, thus effectively protecting the privacy data of each competitor.
  • FIG. 1 is a system architecture diagram to which an embodiment of the present invention is applicable
  • FIG. 2 is a schematic flowchart of a competitive ranking method based on blockchain according to an embodiment of the present invention
  • FIG. 3 is a schematic flowchart of a method for determining a competing ciphertext pair according to an embodiment of the present invention
  • FIG. 4 is a schematic flowchart of a verification method provided by an embodiment of the present invention.
  • Figure 5 is a schematic structural diagram of a blockchain-based competitive ranking device provided by an embodiment of the present invention.
  • Fig. 6 is a schematic structural diagram of a computer device provided by an embodiment of the present invention.
  • a blockchain is a chain composed of a series of blocks. In addition to recording the data of this block, each block also records the Hash value of the previous block. In this way, a chain is formed.
  • a block is composed of a block header and a block body.
  • the block header definition includes important fields such as the block height h and the hash value of the previous block.
  • the block body mainly stores transaction data.
  • Competitor The main body participating in the ranking.
  • Sensitive attribute value Each competitor has a sensitive attribute value V.
  • the competitor wants to know the ranking of its sensitive attribute value V among all competitors.
  • the sensitive attribute value V can be a positive integer, or any other data type that can be converted into a positive integer through a suitable encoding method.
  • the character string "123" can be converted into the integer 123 for comparison; the character string “A” and “B” can be converted into the numerical value 1, 2 for comparison.
  • the floating point number 3.14 can be converted into an integer 314 for comparison.
  • Vectors or other composite data types ⁇ a, b> can be converted into integers for comparison through the coding formula a*1000+b, assuming that the maximum value of b is ⁇ 1000.
  • Data storage smart contract is a smart contract deployed on the blockchain that provides the following data storage functions:
  • the block data written in the previous step can be read and verified through the network.
  • a digital certificate is a string of numbers that mark the identity information of all parties in the Internet communication. It provides a way to verify the identity of the communication entity on the Internet.
  • a digital certificate is not a digital ID, but an identity certification authority covers the digital identity.
  • CA Certificate Authority
  • Additive homomorphic cipher algorithm The ciphertext generated by the additive homomorphic cipher algorithm is homomorphic for the addition operation, that is, it meets the following conditions:
  • Additive homomorphism refers to the ciphertext obtained after the addition and summation of the ciphertext encrypted with the same key, which is equivalent to the addition and summation of the corresponding plaintext first , And then encrypt the obtained ciphertext with the sum value.
  • the Paillier cipher algorithm is an implementation of a classic additive homomorphic cipher, and it is also a provably secure asymmetric cipher algorithm. The algorithm generates a pair of public and private keys for each user. The ciphertext encrypted with the public key meets the additive homomorphism, and the ciphertext after the addition can be correctly decrypted by the corresponding private key.
  • Anonymous network is a network technology that hides the identity of the sender of network messages (including IP and other information that can be used indirectly to identify the sender).
  • An anonymous network can be implemented in many ways. The most common one is to use the onion routing protocol.
  • the message sent by the sender is forwarded multiple times in the form of ciphertext in multiple anonymous network nodes.
  • the receiver can decrypt the original text sent and the IP of the last forwarding network node, but cannot track the original sender's IP.
  • the blockchain-based competitive ranking method in the embodiment of the present invention can be applied to rank multiple competitors without a trusted third party.
  • the system architecture is shown in Figure 1.
  • the distributed network includes multiple A competitor 101 and a blockchain 102, the blockchain 102 includes a data storage smart contract.
  • Each competitor 101 stores a competition attribute value.
  • Each competitor 101 obtains its own ranking among all competitors by interacting with the blockchain 102, while meeting the following requirements:
  • Any competitor does not disclose its competitive attribute value V to other competitors. Any competitor will not disclose its competitive attribute value to a third party that does not participate in the ranking. Any competitor does not disclose its ranking of competitive attribute values to other competitors. Any competitor will not disclose its ranking of competitive attribute values to third parties that do not participate in the ranking.
  • the embodiment of the present invention provides a process of a blockchain-based competitive ranking method.
  • the process of the method can be executed by a blockchain-based competitive ranking device corresponding to the first competitor.
  • the blockchain-based competitive ranking device may be the competitor 101 shown in FIG. 1, as shown in FIG. 2, including the following steps:
  • Step S201 upon receiving the first message broadcast by the blockchain, download all competing ciphertext pairs from the blockchain.
  • the competing ciphertext pair is generated by each competitor and sent to the blockchain for data storage certification smart contract.
  • the data storage smart contract broadcasts the first message to all the competitors.
  • Each competing ciphertext pair includes two competing ciphertexts.
  • the two competing ciphertexts in the competing ciphertext pair are encrypted by the same public key.
  • Each competing ciphertext includes a competing attribute value, and one competing attribute value includes a public key corresponding The sensitive attribute value of the competitor, and the other competitive attribute value includes the sensitive attribute value of any competitor except the competitor corresponding to the public key.
  • Step 202 Determine the target competing ciphertext pair encrypted by the first public key from all competing ciphertext pairs.
  • Step 203 For each target competition ciphertext pair, the first private key is used to decrypt the competition ciphertext in the target competition ciphertext pair, and the target competition attribute pair is determined.
  • the first public key and the first private key are generated by the first competitor.
  • the first competitor uses the agreed asymmetric additive homomorphic cryptographic algorithm to generate a new temporary key pair, and the key pair includes the first competitor.
  • a public key and a first private key other competitors can also use this method to generate a key pair, which will not be repeated here.
  • the first public key and the first private key cannot be associated with the signature private key and signature public key of the first competitor to verify its own identity. Only the first competitor knows the first private key. Except for the first competitor itself, other competing methods cannot decrypt the competing ciphertext pair encrypted by the first public key.
  • Step 204 Comparing the values of the two target competition attributes in each target competition attribute pair in turn to determine the ranking of the first competitor.
  • the competitive attribute value is obtained by confusing the sensitive attribute values, so the first competitor only knows its own sensitive attribute value, but not the sensitive attribute value of any second competitor.
  • the first competitor can indirectly compare the sensitive attribute values by comparing the target competitive attribute values, and then determine the ranking.
  • the ranking of the competitors is determined by comparing the values of the two competing attributes in each competitive attribute pair in turn, ensuring that any one of the competitors cannot learn about other competitors Sensitive attribute value.
  • the competitive ciphertext pair is obtained after encryption using the public key, and the identity of the competitor cannot be determined based on the public key, so when the competitive attribute value in the competitive ciphertext pair is used to determine the ranking, any competitor can only get Its own ranking among all competitors without knowing the ranking of other competitors, thus effectively protecting the privacy data of each competitor.
  • Step 301 When receiving the second message broadcast by the blockchain, download the public keys and ciphertexts of all competitors from the blockchain.
  • each competitor generates a public key and a ciphertext and sends it to the data storage smart contract of the blockchain.
  • the data storage smart contract broadcasts a second message to all competitors.
  • the ciphertext with the first competitor is sent to the blockchain through the anonymous network.
  • the process of generating the public key and ciphertext by other competitors is the same as the process of generating the public key and ciphertext by the first competitor, and will not be repeated here.
  • the competitor uses the agreed asymmetric additive homomorphic cryptographic algorithm to generate a new temporary key pair, the key pair including the first public key PK_i_ephemeral and the first private key SK_i_ephemeral.
  • Use PK_i_ephemeral to encrypt the sensitive attribute value V_i of the first competitor obtain the ciphertext E_PK_i_ephemeral (V_i) of the first competitor, and send PK_i_ephemeral and E_PK_i_ephemeral (V_i) to the blockchain through the anonymous network.
  • Step 302 For any second competitor except the first competitor, select a first random number and a second random number.
  • the first random number and the second random number are two independent and irrelevant random numbers. After the first competitor selects the first random number and the second random number, only oneself knows it, and it will not be disclosed to other competitors. square.
  • Step 303 Use the first random number and the second random number to confuse the sensitive attribute value of the first competitor, and determine the first competitive attribute value.
  • Step 304 Use the public key of the second competitor to encrypt the first competition attribute value to determine the first competition ciphertext.
  • the first random number and the second random number are used to confuse the sensitive attribute value of the first competitor to obtain the first competitive attribute value: d1_ij*V_i+d2_ij, where V_i is the sensitive attribute of the first competitor Value, d1_ij is the first random number, d2_ij is the second random number.
  • E_PK_j_ephemeral of the second competitor is used to encrypt the first competition attribute value, and the first competition ciphertext is determined: E_PK_j_ephemeral(d1_ij*V_i+d2_ij).
  • Step 305 Use the public key of the second competitor to encrypt the second random number, and determine the second competition ciphertext according to the first random number, the ciphertext of the second competitor, and the encrypted second random number.
  • the second competition ciphertext includes a second competition attribute value
  • the second competition attribute value is an attribute value obtained by confusing the sensitive attribute value of the second competitor.
  • the second competition ciphertext can be: E_PK_j_ephemeral(d1_ij*V_j+d2_ij), where d1_ij*V_j+d2_ij is the second competition attribute value, and the second competition attribute value is used
  • the attribute value obtained after the first random number d1_ij and the second random number d2_ij confuse the sensitive attribute V_j value of the second competitor.
  • the range of the input and output values of the cryptographic algorithm is on the Z_n ring, and the maximum value of Z_n is set to n.
  • n In order to avoid overflow, n needs to be greater than V_max*d1_max+d2_max.
  • d1_max and d2_max cannot be less than V_max. Therefore, based on the above points, all competitors need to pre-appoint the values of V_max, d1_max, d2_max, and n.
  • Step 306 Send the competitive ciphertext pair consisting of the first competitive ciphertext and the second competitive ciphertext to the blockchain through the anonymous network.
  • the competing ciphertext pair consisting of ⁇ PK_i_ephemeral, E_PK_j_ephemeral(d1_ij*V_i+d2_ij)> and ⁇ PK_j_ephemeral, E_PK_j_ephemeral(d1_ij*V_j+d2_ij)> is sent to the blockchain through the anonymous network, where emeral and PK_i_ephemeral are used
  • the corresponding sensitive attribute values in marking the first competition ciphertext and the second competition ciphertext are V_i and V_j.
  • each competitor uses random numbers to confuse the sensitive attribute value, obtains the competitive attribute value, and then sends it to the blockchain network through the anonymous network, when ranking, any competitor cannot obtain the sensitive attribute value of other competitors.
  • the competing ciphertext in the competing ciphertext pair is encrypted by the public key and sent to the blockchain through the anonymous network. Therefore, the competing ciphertext pair cannot be associated with the identity of the competitor, so that in the competition ranking, any competitor cannot obtain The ranking of other competitors effectively protects the sensitive data of each competitor.
  • each competitor needs to send an encryption commitment to the blockchain so that the blockchain can subsequently verify the competitor based on the encryption commitment.
  • the first signature private key for the first competitor, use the first signature private key to sign the ciphertext of the first public key and the first competitor to determine the label of the first competitor.
  • the signature private key and the signature public key are determined by the CA Issued by institutions to uniquely identify the identity of competitors.
  • the first signature public key in the digital certificate that identifies the identity of the first competitor can be used for verification.
  • Use the first public key to encrypt the label of the first competitor determine the encryption commitment of the first competitor, and then send the encryption commitment of the first competitor to the blockchain through the anonymous network.
  • the label of the first competitor is encrypted by the first public key, so that other competitors cannot associate the label of the first competitor with the first competitor.
  • irresponsible evidence such as the label of the first competitor and the encryption commitment of the first competitor can be used to determine whether the first competitor is fraudulent, thereby protecting the privacy of the honest competitor.
  • an automated verification server can be set up in the blockchain or an autonomous verification smart contract can be deployed to verify the competitors.
  • the verification process is performed by the first competitor, the second competitor and the blockchain Interactive execution includes the following steps, as shown in Figure 4:
  • Step 401 The first competitor sends a verification request to the blockchain, and the verification request carries the identity of the second competitor.
  • the first competitor suspects that the second competitor is cheating, it can send a verification request to the blockchain to request verification of whether the second competitor is cheating.
  • step 402 the blockchain individually contacts the second competitor.
  • Step 403 The blockchain obtains the label and the second public key of the second competitor from the second competitor.
  • the second competitor needs to provide the second public key used when competing for ranking and the label of the second competitor.
  • Step 404 The blockchain uses the second public key to encrypt the label of the second competitor, and determines the temporary encryption commitment of the second competitor.
  • step 405 when the blockchain determines that the temporary encryption commitment matches the saved encryption commitment of the second competitor, and the label verification of the second competitor passes, the blockchain determines that the second competitor passes the verification.
  • the encryption promise sent by the second competitor during the competition ranking is pre-stored in the blockchain. Compare the temporary encryption promise with the saved encryption promise. If they are inconsistent, the second competitor may be fraudulent. If they are consistent, in order to ensure the accuracy of the verification, the label of the second competitor can be further verified. Specifically, the digital certificate of the second competitor can be used to verify the signature private key of the second competition method, and then the second public key in the label of the second competitor and the cipher text of the second competitor If the second public key matches the ciphertext of the second competitor, if all the verifications are passed, it means that the second competitor did not cheat, otherwise, it means that the second competitor cheated.
  • Step 406 the blockchain returns the verification pass message to the first competitor.
  • the blockchain determines whether the competitor is fraudulent by comparing the stored encryption commitments with the temporary encryption commitments generated and the verification of the competitor's labels, which can not be denied, thereby protecting the privacy of honest competitors and maintaining the order of competition.
  • the blockchain verifies whether the second competition is fraudulent, it can be verified by combining the label of the second competitor, the encryption commitment of the second competitor, and the competition ciphertext generated by the second competitor.
  • the blockchain obtains from the second competitor the random number used by the second competitor to generate each competing ciphertext pair and the temporary ciphertext generated by the second competitor.
  • the temporary ciphertext is used in addition to the second competitor.
  • the public key of any other competitor is determined after encrypting the sensitive attribute value of the second competitor. According to the random number, the temporary ciphertext, the saved public key and the ciphertext, a temporary competition ciphertext pair corresponding to the second competitor is generated.
  • two random data are used.
  • the public key and ciphertext stored in the blockchain include the public key and ciphertext sent by the second competitor during the competition ranking.
  • the temporary encryption promise matches the saved encryption promise of the second competitor
  • the temporary competition ciphertext pair matches the stored competition ciphertext pair generated by the second competitor
  • the label verification of the second competitor passes, confirm The second competitor passes the verification and returns a verification passed message.
  • the blockchain obtains the label Sig_SK_2_signature (Hash(PK_2_ephemeral
  • the label of 2 is encrypted to confirm the temporary encryption commitment of competitor 2. Compare the temporary encryption promise of competitor 2 with the saved encryption promise of competitor 2. If they are consistent, it means that the temporary encryption promise of competitor 2 matches the saved encryption promise of competitor 2.
  • the label of competitor 2 is verified. Specifically, the digital certificate of competitor 2 can be used to verify the signature private key of competitor 2 Sig_SK_2_signature, and then it can be further verified whether the Hash (PK_2_ephemeral
  • the digital certificate of competitor 2 can be used to verify the signature private key of competitor 2 Sig_SK_2_signature, and then it can be further verified whether the Hash (PK_2_ephemeral
  • the competitive ciphertext 1 E_PK_1_ephemeral (d1_21*V_1+d2_2)
  • the competitive ciphertext 2 E_PK_1_ephemeral (d1_21*V_2+d2_2) are included.
  • the random number obtained by the blockchain from competitor 2 includes random number d1_21 and random number d2_21
  • the sensitive attribute value of competitor 2 is V_2
  • the temporary ciphertext obtained from competitor 2 is E_PK_1_ephemeral(V_2).
  • the temporary competition ciphertext 1 and the temporary competition ciphertext 2 form a temporary competition ciphertext pair A'. Then compare the temporary competition ciphertext 1 with the competition ciphertext 1, that is, whether d1_21*E_PK_1_ephemeral(V_1)+E_PK_1_ephemeral(d2_21) is equal to E_PK_1_ephemeral(d1_21*V_1+d2_2).
  • P_i represents the competitor i
  • V_i represents the sensitive attribute value V of the competitor i
  • R_i represents the ranking of the sensitive attribute value V of the competitor i among all competitors
  • PK_i represents the product generated by the competitor i Public key
  • SK_i represents the private key corresponding to PK_i generated by competitor i
  • E_k(m) represents the use of key k to encrypt message m
  • D_k(m) represents the use of key k to decrypt message m
  • Sig_k(m) represents the use of signed private
  • the key k digitally signs the message m
  • Hash(m) represents the hash value of the message m
  • B represents the character string B appended to the character string A, for example "ab"
  • "c" "abc”.
  • Contract_Seal represents a smart contract with data storage function on the blockchain.
  • the first stage is a first stage
  • Competitor i uses the agreed asymmetric addition homomorphic cryptographic algorithm to generate a new temporary key pair, the public key is PK_i_ephemeral, and the private key is SK_i_ephemeral.
  • Competitor i uses the public key PK_i_ephemeral to encrypt its own sensitive attribute value V_i, and obtains the ciphertext E_PK_i_ephemeral(V_i).
  • Competitor i uses the signature private key SK_i_signature to identify its own identity to sign Hash(PK_i_ephemeral
  • the competitor i uses the public key PK_i_ephemeral to encrypt the Sig_SK_i_signature (Hash(PK_i_ephemeral
  • Hidden_Commitment_i E_PK_i_ephemeral(Sig_SK_i_ephemeral(Sig_SK_i_ephemeral)_ephemeral(ephemeral)_ephemeral(ephemeral)_i_e_em_e_emeral)
  • Competitor i sends the public key PK_i_ephemeral, ciphertext E_PK_i_ephemeral (V_i), and encryption commitment Hidden_Commitment_i to a data storage smart contract Contract_Seal on the blockchain through the anonymous network.
  • the second stage After all competitors have completed the first stage, Contract_Seal broadcasts a notification to all competitors, and the second stage starts.
  • Competitor i downloads all public keys and ciphertexts from Contract_Seal.
  • the ciphertext E_PK_j_ephemeral(V_j) of the competitor j determines the second competition ciphertext: d1_ij*E_PK_j_ephemeral(V_j)+E_PK_j_ephemeral(d2_ij).
  • the second competitive ciphertext can be transformed into: E_PK_j_ephemeral(d1_ij*V_j+d2_ij).
  • Competitor i can generate N-1 pairs of competing ciphertexts using the same method described above.
  • the third stage After all competitors have completed the second stage, Contract_Seal broadcasts a notification to all competitors, and the third stage starts.
  • Competitor i downloads all competing ciphertext pairs from Contract_Seal.
  • Competitor i selects the N-1 pair that can be decrypted by its own temporary private key SK_i_ephemeral and the competing ciphertext pair encrypted with its own public key PK_i_ephemeral.
  • Set the competing ciphertext pair as: E_PK_i_ephemeral(d1_ji*V_i+d2_ji) and E_PK_i_ephemeral(d1_ji*V_j+d2_ji).
  • Competitor i uses its own private key SK_i_ephemeral to decrypt it, and the following results are obtained:
  • V_i' and V_j' are a pair of competing attribute values.
  • V_i’ compares the magnitudes of V_i’ and V_j’. If V_i’>V_j’, it means that the value of V_i of competitor i is greater than that of competitor j.
  • the ranking of the competitor i can be obtained. If there are R_i competition attribute values greater than the competition attribute value of competitor i, then competitor i can determine its own ranking as R_i.
  • the blockchain contacts the competitor j, and obtains the Sig_SK_j_signature (Hash(PK_j_ephemeral
  • the block chain uses the temporary public key E_PK_j_ephemeral to encrypt the Sig_SK_j_signature(Hash(PK_j_ephemeral
  • the blockchain compares the temporary encryption promise with the saved encryption promise, uses the digital certificate of competitor j to verify the signature private key Sig_SK_j_signature of competitor j, and then further verifies whether Hash(PK_j_ephemeral
  • the saved PK_j_ephemeral matches E_PK_j_ephemeral(V_j). If all the verifications are passed, it means that the historical message in the blockchain is indeed sent by competitor j, otherwise competitor j is fraudulent.
  • the blockchain can filter out all N-1 competitive ciphertext pairs sent by competitor j in the second stage from the block data of Contract_Seal, ⁇ PK_i_ephemeral,E_PK_i_ephemeral(d1_ji*V_i+ d2_ji)>, ⁇ PK_j_ephemeral,E_PK_i_ephemeral(d1_ji*V_j+d2_ji))>.
  • the blockchain obtains the random numbers d1_ji and d2_ji used to generate each competing ciphertext pair from the competitor j, and uses the temporary public key PK_i_ephemeral to encrypt the random number d2_ji to obtain E_PK_i_ephemeral(d2_ji).
  • the blockchain requires competitor j to encrypt its sensitive attribute value V_j using the temporary public key PK_i_ephemeral of other competitors, and send the encrypted N-1 temporary ciphertext E_PK_i_ephemeral(V_j) to the blockchain.
  • the blockchain generates a temporary competition ciphertext d1_ji*E_PK_i_ephemeral(V_j)+E_PK_i_ephemeral(d2_ji) according to the random number d1_ji, the encrypted random number E_PK_i_ephemeral(d2_ji), and the temporary ciphertext E_PK_i_ephemeral(V_j).
  • E_PK_i_ephemeral(d1_ji*V_j+d2_ji)) d1_ji*E_PK_i_ephemeral(V_j)+E_PK_i_ephemeral(d2_ji)
  • E_PK_i_ephemeral(d1_ji*V_i+d2_ji) d1_ji*E_PK_i_ephemeral(V_i)+ E_PK_i_ephemeral(d2_ji)
  • any pair of competing ciphertexts does not match the temporary competing ciphertexts, that is, the left and right sides of the equation are not equal, it means that the competitor j is fraudulent, and the competitor uses different sensitive attribute values for different competition methods when competing for ranking. Misled other competitors.
  • the ranking of the competitors is determined by sequentially comparing the magnitudes of the two competing attribute values in each competing attribute pair, which ensures that any competition Party cannot know the sensitive attribute values of other competitors.
  • the competitive ciphertext pair is obtained after encryption using the public key, and the identity of the competitor cannot be determined based on the public key, so when the competitive attribute value in the competitive ciphertext pair is used to determine the ranking, any competitor can only get Its own ranking among all competitors without knowing the ranking of other competitors, thus effectively protecting the privacy data of each competitor.
  • an embodiment of the present invention provides a blockchain-based competitive ranking device, as shown in FIG. 5, including:
  • the download module 501 is configured to download all competing ciphertext pairs from the blockchain when the first message broadcast by the blockchain is received, and the two competing ciphertexts in the competing ciphertext pairs are encrypted by the same public key
  • Each competitive ciphertext includes the competitive attribute value, one competitive attribute value includes the sensitive attribute value of the competitor corresponding to the public key, and the other competitive attribute value includes any one other than the competitor corresponding to the public key Competitor’s sensitive attribute value;
  • the matching module 502 is configured to determine the target competing ciphertext pair encrypted by the first public key from all the competing ciphertext pairs;
  • the decryption module 503 is configured to, for each target competing ciphertext pair, use the first private key to decrypt the competing ciphertext in the target competing ciphertext pair, and determine the target competing attribute pair, the first public key and the The first private key is generated by the first competitor;
  • the processing module 504 is configured to sequentially compare the values of the two target competition attributes in each target competition attribute pair, and determine the ranking of the first competitor.
  • it further includes a sending module 505;
  • the download module 501 is further configured to download the public keys and ciphertexts of all competitors from the blockchain when the second message broadcast by the blockchain is received;
  • the processing module 504 is further configured to select a first random number and a second random number for any second competitor except the first competitor; according to the first random number, the second random number
  • the random number and the sensitive attribute value of the first competitor determine the first competition attribute value
  • the public key of the second competitor is used to encrypt the first competition attribute value to determine the first competition ciphertext
  • the public key of the second competitor encrypts the second random number, and determines the second competition secret according to the first random number, the ciphertext of the second competitor, and the encrypted second random number Text
  • the sending module 505 is specifically configured to send a competing ciphertext pair composed of the first competing ciphertext and the second competing ciphertext to the blockchain via an anonymous network.
  • the processing module 504 is further configured to, when receiving the second message broadcast by the blockchain, before downloading the public keys and ciphertexts of all competitors from the blockchain, use the The first public key encrypts the sensitive attribute value of the first competitor, and determines the ciphertext of the first competitor;
  • the sending module 505 is further configured to send the first public key and the ciphertext of the first competitor to the blockchain via an anonymous network.
  • the processing module 504 is further configured to use a first signature private key to sign the first public key and the ciphertext of the first competitor to determine the label of the first competitor; Encrypting the label of the first competitor by the first public key to determine the encryption commitment of the first competitor;
  • the sending module 505 is further configured to send the encryption commitment of the first competitor to the blockchain via an anonymous network.
  • the sending module 505 is further configured to send a verification request to the blockchain, and the verification request carries the identity of the second competitor, so that the blockchain can transfer the verification request from the second competitor.
  • Obtain the label and the second public key of the second competitor use the second public key to encrypt the label of the second competitor, and determine the temporary encryption commitment of the second competitor;
  • the promise matches the saved encryption promise of the second competitor, and the verification of the label of the second competitor is passed, it is determined that the verification of the second competitor is passed and a verification passed message is returned;
  • the download module 501 is further configured to receive a verification pass message sent by the blockchain.
  • the sending module 505 is specifically configured to send a verification request to the blockchain, and the verification request carries the identity of the second competitor, so that the blockchain can transfer the verification request from the second competitor.
  • the verification request carries the identity of the second competitor, so that the blockchain can transfer the verification request from the second competitor.
  • the second competitor’s public key encrypts the sensitive attribute value of the second competitor
  • the second competitor’s corresponding value is generated based on the random number, the temporary ciphertext, the saved public key and the ciphertext.
  • the temporary competition ciphertext pair matches the saved competition ciphertext pair generated by the second competitor.
  • the verification of the label of the second competitor is passed, it is determined that the verification of the second competitor is passed and a verification passed message is returned.
  • an embodiment of the present invention provides a computer device. As shown in FIG. 6, it includes at least one processor 601 and a memory 602 connected to the at least one processor.
  • the embodiment of the present invention does not limit the processor.
  • the connection between the processor 601 and the memory 602 in FIG. 6 is taken as an example.
  • the bus can be divided into address bus, data bus, control bus, etc.
  • the memory 602 stores instructions that can be executed by at least one processor 601. By executing the instructions stored in the memory 602, the at least one processor 601 can execute the aforementioned blockchain-based competitive ranking method. A step of.
  • the processor 601 is the control center of the computer equipment, which can use various interfaces and lines to connect to various parts of the computer equipment, and compete by running or executing instructions stored in the memory 602 and calling data stored in the memory 602. Ranking.
  • the processor 601 may include one or more processing units, and the processor 601 may integrate an application processor and a modem processor.
  • the application processor mainly processes the operating system, user interface, and application programs, etc.
  • the adjustment processor mainly deals with wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 601.
  • the processor 601 and the memory 602 may be implemented on the same chip, and in some embodiments, they may also be implemented on separate chips.
  • the processor 601 may be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application specific integrated circuit (ASIC), a field programmable gate array or other programmable logic devices, discrete gates or transistors Logic devices and discrete hardware components can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present invention.
  • the general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of the present invention may be directly embodied as being executed and completed by a hardware processor, or executed and completed by a combination of hardware and software modules in the processor.
  • the memory 602 as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules.
  • the memory 602 may include at least one type of storage medium, for example, may include flash memory, hard disk, multimedia card, card type memory, random access memory (Random Access Memory, RAM), static random access memory (Static Random Access Memory, SRAM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), magnetic memory, disk , CD, etc.
  • the memory 602 is any other medium that can be used to carry or store desired program codes in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto.
  • the memory 602 in the embodiment of the present invention may also be a circuit or any other device capable of realizing a storage function, for storing program instructions and/or data.
  • the embodiments of the present invention provide a computer-readable storage medium that stores a computer program executable by a computer device.
  • the program runs on the computer device, the computer device executes a region-based The steps of the blockchain competition ranking method.
  • the embodiments of the present invention provide a computer program product containing instructions that, when run on a computer device, cause the computer device to execute the steps of the blockchain-based competitive ranking method.
  • the embodiments of the present invention may be provided as methods or computer program products. Therefore, the present invention may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
  • a computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
  • the instructions provide steps for implementing functions specified in a flow or multiple flows in the flowchart and/or a block or multiple blocks in the block diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Storage Device Security (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

本发明实施例提供了一种基于区块链的竞争排名方法及装置,涉及科技金融技术领域,该方法包括:从区块链中下载所有竞争密文对,从所有竞争密文对中确定由第一公钥加密的目标竞争密文对。采用第一私钥对目标竞争密文对中的竞争密文进行解密,确定目标竞争属性对。依次比较每个目标竞争属性对中两个目标竞争属性值的大小,确定第一竞争方的排名。由于将所有竞争方的敏感属性值隐藏在竞争属性值中,保证了任一竞争方不能获知其他竞争方的敏感属性值。其次,竞争密文对是采用公钥进行加密后获得的,而基于公钥并不能确定竞争方的身份,故任一竞争方只能得到自身在所有竞争方的排名,而不能知道其他竞争方的排名,从而有效保护了各个竞争方的隐私数据。

Description

一种基于区块链的竞争排名方法及装置
相关申请的交叉引用
本申请要求在2019年04月26日提交中国专利局、申请号为201910342449.9、申请名称为“一种基于区块链的竞争排名方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明实施例涉及科技金融技术领域,尤其涉及一种基于区块链的竞争排名方法及装置。
背景技术
随着计算机技术的发展,越来越多的技术应用在金融领域,传统金融业正在逐步向金融科技(Finteh)转变,区块链技术也不例外,但由于金融行业的安全性、实时性要求,也对技术提出的更高的要求。目前,在对各竞争方进行排名时,依赖可信的第三方机构,第三方机构从所有竞争方收集并验证敏感值V的明文,确定各竞争方的排名,然后使用一定的密码学运算产生V不同的密文,并发回到各个竞争方。该方案中,第三方机构可以获得所有竞争方的敏感值V以及各竞争方的排名,而对于竞争方案来说,敏感值V以及排名是很隐私的数据,这样可能导致竞争方的隐私数据泄露。
发明内容
由于依赖第三方进行竞争排名时,容易导致竞争方的隐私数据泄露的问题,本发明实施例提供了一种基于区块链的竞争排名方法及装置。
一方面,本发明实施例提供了一种基于区块链的竞争排名方法,包括:
在接收到区块链广播的第一消息时,从所述区块链中下载所有竞争密文对,竞争密文对中的两个竞争密文由相同的公钥加密,每个竞争密文中包括竞争属性值,一个竞争属性值中包括所述公钥对应的竞争方的敏感属性值,另一个竞争属性值中包括除所述公钥对应的竞争方以外的任一竞争方的敏感属性值;
从所有竞争密文对中确定由第一公钥加密的目标竞争密文对;
针对每个目标竞争密文对,采用第一私钥对所述目标竞争密文对中的竞争密文进行解密,确定目标竞争属性对,所述第一公钥和所述第一私钥是由第一竞争方生成的;
依次比较每个目标竞争属性对中两个目标竞争属性值的大小,确定所述第一竞争方的排名。
可选地,所述竞争密文对是采用以下方式生成的:
在接收到所述区块链广播的第二消息时,从所述区块链中下载所有竞争方的公钥和密文;
针对除所述第一竞争方之外的任意一个第二竞争方,选取第一随机数和第二随机数;
采用所述第一随机数、所述第二随机数对所述第一竞争方的敏感属性值进行混淆,确 定第一竞争属性值;
采用所述第二竞争方的公钥对所述第一竞争属性值进行加密,确定第一竞争密文;
采用所述第二竞争方的公钥对所述第二随机数进行加密,并根据所述第一随机数、所述第二竞争方的密文以及加密后的第二随机数,确定第二竞争密文,所述第二竞争密文中包括第二竞争属性值,所述第二竞争属性值是对所述第二竞争方的敏感属性值进行混淆之后的属性值;
将由所述第一竞争密文和所述第二竞争密文组成的竞争密文对通过匿名网络发送至所述区块链。
可选地,所述在接收到所述区块链广播的第二消息时,从所述区块链中下载所有竞争方的公钥和密文之前,还包括:
采用所述第一公钥对所述第一竞争方的敏感属性值进行加密,确定所述第一竞争方的密文;
将所述第一公钥和所述第一竞争方的密文通过匿名网络发送至所述区块链。
可选地,还包括:
采用第一签名私钥对所述第一公钥和所述第一竞争方的密文进行签名,确定所述第一竞争方的标签;
采用所述第一公钥对所述第一竞争方的标签进行加密,确定所述第一竞争方的加密承诺;
将所述第一竞争方的加密承诺通过匿名网络发送至所述区块链。
可选地,还包括:
向所述区块链发送验证请求,所述验证请求中携带第二竞争方的标识,以使所述区块链从所述第二竞争方获取第二竞争方的标签和第二公钥,采用所述第二公钥对所述第二竞争方的标签进行加密,确定所述第二竞争方的临时加密承诺;在确定所述临时加密承诺与保存的第二竞争方的加密承诺匹配,且对所述第二竞争方的标签验证通过时,确定所述第二竞争方验证通过并返回验证通过消息;
接收所述区块链发送的验证通过消息。
可选地,所述在确定所述临时加密承诺与保存的第二竞争方的加密承诺匹配,且对所述第二竞争方的标签验证通过时,确定所述第二竞争方验证通过并返回验证通过消息,包括:
从所述第二竞争方获取所述第二竞争方生成每个竞争密文对时使用的随机数以及所述第二竞争方生成的临时密文,所述临时密文是采用除所述第二竞争方以外的其他任一竞争方的公钥对所述第二竞争方的敏感属性值进行加密后确定的,根据所述随机数、所述临时密文、保存的公钥和密文生成所述第二竞争方对应的临时竞争密文对,在确定所述临时加密承诺与保存的第二竞争方的加密承诺匹配,所述临时竞争密文对与保存的所述第二竞争方生成的竞争密文对匹配,且对所述第二竞争方的标签验证通过时,确定所述第二竞争方验证通过并返回验证通过消息。
一方面,本发明实施例提供了一种基于区块链的竞争排名装置,包括:
下载模块,用于在接收到区块链广播的第一消息时,从所述区块链中下载所有竞争密文对,竞争密文对中的两个竞争密文由相同的公钥加密,每个竞争密文中包括竞争属性值,一个竞争属性值中包括所述公钥对应的竞争方的敏感属性值,另一个竞争属性值中包括除 所述公钥对应的竞争方以外的任一竞争方的敏感属性值;
匹配模块,用于从所有竞争密文对中确定由第一公钥加密的目标竞争密文对;
解密模块,用于针对每个目标竞争密文对,采用第一私钥对所述目标竞争密文对中的竞争密文进行解密,确定目标竞争属性对,所述第一公钥和所述第一私钥是由第一竞争方生成的;
处理模块,用于依次比较每个目标竞争属性对中两个目标竞争属性值的大小,确定所述第一竞争方的排名。
可选地,还包括发送模块;
所述下载模块还用于,在接收到所述区块链广播的第二消息时,从所述区块链中下载所有竞争方的公钥和密文;
所述处理模块还用于,针对除所述第一竞争方之外的任意一个第二竞争方,选取第一随机数和第二随机数;采用所述第一随机数、所述第二随机数对所述第一竞争方的敏感属性值进行混淆,确定第一竞争属性值;采用所述第二竞争方的公钥对所述第一竞争属性值进行加密,确定第一竞争密文;采用所述第二竞争方的公钥对所述第二随机数进行加密,并根据所述第一随机数、所述第二竞争方的密文以及加密后的第二随机数,确定第二竞争密文,所述第二竞争密文中包括第二竞争属性值,所述第二竞争属性值是对所述第二竞争方的敏感属性值进行混淆之后的属性值;
所述发送模块具体用于,将由所述第一竞争密文和所述第二竞争密文组成的竞争密文对通过匿名网络发送至所述区块链。
可选地,所述处理模块还用于,在接收到所述区块链广播的第二消息时,从所述区块链中下载所有竞争方的公钥和密文之前,采用所述第一公钥对所述第一竞争方的敏感属性值进行加密,确定所述第一竞争方的密文;
所述发送模块还用于,将所述第一公钥和所述第一竞争方的密文通过匿名网络发送至所述区块链。
可选地,所述处理模块还用于,采用第一签名私钥对所述第一公钥和所述第一竞争方的密文进行签名,确定所述第一竞争方的标签;采用所述第一公钥对所述第一竞争方的标签进行加密,确定所述第一竞争方的加密承诺;
所述发送模块还用于,将所述第一竞争方的加密承诺通过匿名网络发送至所述区块链。
可选地,所述发送模块还用于,向所述区块链发送验证请求,所述验证请求中携带第二竞争方的标识,以使所述区块链从所述第二竞争方获取第二竞争方的标签和第二公钥,采用所述第二公钥对所述第二竞争方的标签进行加密,确定所述第二竞争方的临时加密承诺;在确定所述临时加密承诺与保存的第二竞争方的加密承诺匹配,且对所述第二竞争方的标签验证通过时,确定所述第二竞争方验证通过并返回验证通过消息;
所述下载模块还用于,接收所述区块链发送的验证通过消息。
可选地,所述发送模块具体用于,向所述区块链发送验证请求,所述验证请求中携带第二竞争方的标识,以使所述区块链从所述第二竞争方获取所述第二竞争方生成每个竞争密文对时使用的随机数以及所述第二竞争方生成的临时密文,所述临时密文是采用除所述第二竞争方以外的其他任一竞争方的公钥对所述第二竞争方的敏感属性值进行加密后确定的,根据所述随机数、所述临时密文、保存的公钥和密文生成所述第二竞争方对应的临时竞争密文对,在确定所述临时加密承诺与保存的第二竞争方的加密承诺匹配,所述临时 竞争密文对与保存的所述第二竞争方生成的竞争密文对匹配,且对所述第二竞争方的标签验证通过时,确定所述第二竞争方验证通过并返回验证通过消息。
一方面,本发明实施例提供了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现基于区块链的竞争排名方法的步骤。
一方面,本发明实施例提供了一种计算机可读存储介质,其存储有可由计算机设备执行的计算机程序,当所述程序在计算机设备上运行时,使得所述计算机设备执行基于区块链的竞争排名方法的步骤。
一方面,本发明实施例提供了一种包含指令的计算机程序产品,当其在计算机设备上运行时,使得所述计算机设备执行基于区块链的竞争排名方法的步骤。
本发明实施例中,由于将所有竞争方的敏感属性值隐藏在竞争属性值中,通过依次比较每个竞争属性对中两个竞争属性值的大小,确定竞争方的排名,保证了任一竞争方不能获知其他竞争方的敏感属性值。其次,竞争密文对是采用公钥进行加密后获得的,而基于公钥并不能确定竞争方的身份,故采用竞争密文对中的竞争属性值确定排名时,任一竞争方只能得到自身在所有竞争方的排名,而不能知道其他竞争方的排名,从而有效保护了各个竞争方的隐私数据。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简要介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域的普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本发明实施例适用的一种系统架构图;
图2为本发明实施例提供的一种基于区块链的竞争排名方法的流程示意图;
图3为本发明实施例提供的一种确定竞争密文对的方法的流程示意图;
图4为本发明实施例提供的一种验证方法的流程示意图;
图5为本发明实施例提供的一种基于区块链的竞争排名装置的结构示意图;
图6为本发明实施例提供的一种计算机设备的结构示意图。
具体实施方式
为了使本发明的目的、技术方案及有益效果更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。
为了方便理解,下面对本发明实施例中涉及的名词进行解释。
区块链是由一系列区块组成的一条链,每个块上除了记录本块的数据还会记录上一块的Hash值,通过这种方式组成一条链。区块链的核心理念有两个,一个是密码学技术,另一个是去中心化思想,基于这两个理念做到区块链上的历史信息无法被篡改。一个区块由块头和块体组成,其中块头定义包括该区块高度h,上一个区块的Hash值等重要字段, 而块体主要存储交易数据。
竞争方:参与排名的主体。
敏感属性值:每个竞争方都有一个敏感属性值V,竞争方想了解自身的敏感属性值V在所有的竞争方中的排名。敏感属性值V可以是一个正整数,或者是其他任意一个可以通过合适的编码方式转化成一个正整数的数据类型。比如,字符串“123”可以转化成整数123进行比较;字符串“A”,“B”,可以转化成数值1,2进行比较。浮点数3.14可以转化成整数314进行比较。向量或其他复合数据类型<a,b>,可以通过编码公式a*1000+b转化成整数进行比较,假定b的最大值<1000。字符串“A”,“B”,“Top”,可以通过非线性编码公式V=1if字符串=“Top”else 0转化成整数进行比较。
数据存证智能合约:数据存证智能合约是的一个部署在区块链上的智能合约,提供以下数据存证功能:
1、从网络中接收数据,将收到的数据写入到防篡改的区块数据中。
2、上一步写入的区块数据可以通过网络被读取和验证。
数字证书:数字证书是互联网通讯中标志通讯各方身份信息的一串数字,提供了一种在Internet上验证通信实体身份的方式,数字证书不是数字身份证,而是身份认证机构盖在数字身份证上的一个章或印(或者说加在数字身份证上的一个签名)。它是由权威机构——CA机构,又称为证书授权(Certificate Authority)中心发行的,可以用它来识别对方的身份。
加法同态密码算法:加法同态密码算法产生的密文对于加法操作有同态性,即满足以下条件:
E(p)+E(q)=E(p+q)
E(k*p)=k*E(p)
以上E(x)表示x在加密后生成的密文,加法同态性指使用同一密钥加密的密文在经过加法求和之后获得的密文,等同于将对应的明文先进行加法求和,然后再对和值加密获得的密文。Paillier密码算法是一种经典的加法同态密码的实现,同时还是一种可证明安全的非对称密码算法。该算法会为每位使用者产生一对公钥和私钥,用其公钥加密的密文满足加法同态性,经过加法运算的密文可以被对应的私钥正确地解密。
匿名网络:匿名网络是一种隐藏网络消息发送方的身份(包括IP和其他可间接用于识别发送方身份的信息)的网络技术。匿名网络可以有多种实现方式,最常见的是使用洋葱路由协议,在到最终的接收方之前,发送方发出的消息,在多个匿名网络节点中以密文的形式被多次转发。最终接收方可以解密发送的原文以及上一个转发网络节点的IP,但无法追踪最初发送方的IP。
本发明实施例中的基于区块链的竞争排名方法可以应用于在无可信第三方的情况下,对多个竞争方进行排名,其系统架构如图1所示,分布式网络中包括多个竞争方101以及区块链102,区块链102上包括数据存证智能合约。每个竞争方101保存一个竞争属性值。每个竞争方101通过与区块链102进行交互获得自身在所有竞争方中的排名,同时满足以下要求:
任一竞争方都不透露自己竞争属性值V给其他竞争方。任一竞争方都不透露自己竞争属性值给不参与排名的第三方。任一竞争方都不透露自己的竞争属性值的排名给其他竞争方。任一竞争方都不透露自己的竞争属性值的排名给不参与排名的第三方。
基于图1所示的系统架构,本发明实施例提供了一种基于区块链的竞争排名方法的流程,该方法的流程可以由第一竞争方对应的基于区块链的竞争排名装置执行,基于区块链的竞争排名装置可以是图1所示的竞争方101,如图2所示,包括以下步骤:
步骤S201,在接收到区块链广播的第一消息时,从区块链中下载所有竞争密文对。
具体地,竞争密文对是由各竞争方生成并发送至区块链的数据存证智能合约的。当所有的竞争方将生成的竞争密文对发送至数据存证智能合约时,数据存证智能合约向所有的竞争方广播第一消息。每个竞争密文对包括两个竞争密文,竞争密文对中的两个竞争密文由相同的公钥加密,每个竞争密文中包括竞争属性值,一个竞争属性值中包括公钥对应的竞争方的敏感属性值,另一个竞争属性值中包括除公钥对应的竞争方以外的任一竞争方的敏感属性值。
步骤202,从所有竞争密文对中确定由第一公钥加密的目标竞争密文对。
步骤203,针对每个目标竞争密文对,采用第一私钥对目标竞争密文对中的竞争密文进行解密,确定目标竞争属性对。
第一公钥和第一私钥是由第一竞争方生成的,具体地,第一竞争方采用约定的非对称加法同态密码算法生成一个新的临时密钥对,该密钥对包括第一公钥和第一私钥,其他竞争方也可以采用该方法生成密钥对,此处不再赘述。第一公钥和第一私钥无法关联到第一竞争方的验证自身身份的签名私钥和签名公钥。第一私钥只有第一竞争方知道,除了第一竞争方自己,其他竞争方法不能解密由第一公钥加密的竞争密文对。
步骤204,依次比较每个目标竞争属性对中两个目标竞争属性值的大小,确定第一竞争方的排名。
竞争属性值是将敏感属性值混淆后获得的,因此第一竞争方只知道自身的敏感属性值,而不知道任意一个第二竞争方的敏感属性值。第一竞争方可以通过比较目标竞争属性值来间接比较敏感属性值,然后确定排名。
由于将所有竞争方的敏感属性值隐藏在竞争属性值中,通过依次比较每个竞争属性对中两个竞争属性值的大小,确定竞争方的排名,保证了任一竞争方不能获知其他竞争方的敏感属性值。其次,竞争密文对是采用公钥进行加密后获得的,而基于公钥并不能确定竞争方的身份,故采用竞争密文对中的竞争属性值确定排名时,任一竞争方只能得到自身在所有竞争方的排名,而不能知道其他竞争方的排名,从而有效保护了各个竞争方的隐私数据。
下面具体介绍确定竞争密文对的过程,如图3所示,包括以下步骤:
步骤301,在接收到区块链广播的第二消息时,从区块链中下载所有竞争方的公钥和密文。
具体地,各竞争方生成公钥和密文并发送至区块链的数据存证智能合约。当所有的竞争方将生成的公钥和密文发送至数据存证智能合约时,数据存证智能合约向所有的竞争方广播第二消息。
针对第一竞争方,首先生成第一公钥和第一私钥,采用第一公钥对第一竞争方的敏感属性值进行加密,确定第一竞争方的密文,然后将第一公钥和第一竞争方的密文通过匿名网络发送至区块链。其他竞争方生成公钥和密文的过程与第一竞争方生成公钥和密文的过程相同,此处不再赘述。
示例性地,设定竞争方采用约定的非对称加法同态密码算法生成一个新的临时密钥对, 该密钥对包括第一公钥PK_i_ephemeral和第一私钥SK_i_ephemeral。采用PK_i_ephemeral对第一竞争方的敏感属性值V_i进行加密,获得第一竞争方的密文E_PK_i_ephemeral(V_i),将PK_i_ephemeral和E_PK_i_ephemeral(V_i)通过匿名网络发送至区块链。
步骤302,针对除第一竞争方之外的任意一个第二竞争方,选取第一随机数和第二随机数。
具体地,第一随机数和第二随机数为两个独立且互不相干的随机数,第一竞争方选取第一随机数和第二随机数之后,只有自己知道,不会透露给其他竞争方。
步骤303,采用第一随机数、第二随机数对第一竞争方的敏感属性值进行混淆,确定第一竞争属性值。
步骤304,采用第二竞争方的公钥对第一竞争属性值进行加密,确定第一竞争密文。
具体实施中,采用第一随机数和第二随机数对第一竞争方的敏感属性值进行混淆,得到第一竞争属性值:d1_ij*V_i+d2_ij,其中,V_i为第一竞争方的敏感属性值,d1_ij为第一随机数,d2_ij为第二随机数。
然后采用第二竞争方的公钥E_PK_j_ephemeral对第一竞争属性值进行加密,确定的第一竞争密文:E_PK_j_ephemeral(d1_ij*V_i+d2_ij)。
步骤305,采用第二竞争方的公钥对第二随机数进行加密,并根据第一随机数、第二竞争方的密文以及加密后的第二随机数,确定第二竞争密文。
具体实施中,第二竞争密文中包括第二竞争属性值,第二竞争属性值是对第二竞争方的敏感属性值进行混淆之后的属性值。采用第二竞争方的公钥对第二随机数进行加密,获得E_PK_j_ephemeral(d2_ij)。根据第一随机数、第二竞争方的密文以及加密后的第二随机数,确定第二竞争密文:d1_ij*E_PK_j_ephemeral(V_j)+E_PK_j_ephemeral(d2_ij)。进一步地,根据加法同态密码算法的特征,第二竞争密文可以为:E_PK_j_ephemeral(d1_ij*V_j+d2_ij),其中,d1_ij*V_j+d2_ij为第二竞争属性值,第二竞争属性值是采用第一随机数d1_ij和第二随机数d2_ij对第二竞争方的敏感属性V_j值进行混淆之后获得的属性值。
密码算法的输入输出值的值域都是在Z_n环上,设定Z_n的最大值为n。为了避免溢出,n需要大于V_max*d1_max+d2_max,为了保证足够的混淆强度,d1_max和d2_max不能小于V_max,因此,基于上述几点,所有竞争方需要预先约定好V_max、d1_max、d2_max、n值。
步骤306,将由第一竞争密文和第二竞争密文组成的竞争密文对通过匿名网络发送至区块链。
具体地,将<PK_i_ephemeral,E_PK_j_ephemeral(d1_ij*V_i+d2_ij)>和<PK_j_ephemeral,E_PK_j_ephemeral(d1_ij*V_j+d2_ij)>组成的竞争密文对通过匿名网络发送至区块链,其中,PK_i_ephemeral和PK_j_ephemeral用于标记第一竞争密文和第二竞争密文中对应的敏感属性值为V_i和V_j。
由于各竞争方采用随机数将敏感属性值进行混淆,获取竞争属性值,然后通过匿名网络发送至区块链网络,故在进行排名时,任一竞争方不能获得其他竞争方的敏感属性值,其次,竞争密文对中的竞争密文由公钥加密并通过匿名网络发送至区块链,因此竞争密文对不能关联到竞争方的身份,使得在竞争排名时,任一竞争方不能获得其他竞争方的排名,从而有效保护了各竞争方的敏感数据。
可选地,为了便于后续对各竞争方进行验证,确定出作假的竞争方,每个竞争方需要 发送加密承诺至区块链,便于区块链后续基于加密承诺对竞争方进行验证。
具体地,针对第一竞争方,采用第一签名私钥对第一公钥和第一竞争方的密文进行签名,确定第一竞争方的标签,其中,签名私钥和签名公钥由CA机构发行,用于唯一标识竞争方的身份。第一签名私钥进行加密后,可以采用被标识第一竞争方身份的数字证书中的第一签名公钥验证。采用第一公钥对第一竞争方的标签进行加密,确定第一竞争方的加密承诺,然后将第一竞争方的加密承诺通过匿名网络发送至区块链。通过第一公钥对第一竞争方的标签进行加密,使其他竞争方不能将第一竞争方的标签与第一竞争方关联。后续对第一竞争方进行验证时,可以采用第一竞争方的标签、第一竞争方的加密承诺这些无法抵赖的证据确定第一竞争方是否作假,从而保护诚实竞争方的隐私。
在一种可能的实施方式中,可以在区块链中设置自动化的验证服务器或部署自主验证智能合约,实现对竞争方进行验证,验证过程由第一竞争方、第二竞争方和区块链交互执行,具体包括以下步骤,如图4所示:
步骤401,第一竞争方发送验证请求至区块链,验证请求中携带第二竞争方的标识。
当第一竞争方怀疑第二竞争方作假时,可以向区块链发送验证请求,用于请求验证第二竞争方是否作假。
步骤402,区块链单独联系第二竞争方。
步骤403,区块链从第二竞争方获取第二竞争方的标签和第二公钥。
第二竞争方需要提供竞争排名时使用的第二公钥以及第二竞争方的标签。
步骤404,区块链采用第二公钥对第二竞争方的标签进行加密,确定第二竞争方的临时加密承诺。
步骤405,区块链在确定临时加密承诺与保存的第二竞争方的加密承诺匹配,且对第二竞争方的标签验证通过时,确定第二竞争方验证通过。
区块链中预先保存了在竞争排名时,第二竞争方发送的加密承诺。将临时加密承诺与保存的加密承诺进行比对,若不一致,则可以说明第二竞争方作假。若一致,为了保证验证的准确性,可以进一步对第二竞争方的标签进行验证。具体地,首先可以采用第二竞争方的数字证书验证第二竞争方法的签名私钥,然后进一步验证第二竞争方的标签中的第二公钥以及第二竞争方的密文是否与保存的第二公钥以及第二竞争方的密文匹配,若全部验证通过,则说明第二竞争方没有作假,否则说明第二竞争方作假。
步骤406,区块链返回验证通过消息至第一竞争方。
区块链通过比较保存的加密承诺和生成的临时加密承诺以及验证竞争方的标签这些无法抵赖的证据,确定竞争方是否作假,从而保护诚实竞争方的隐私,维护了竞争秩序。
进一步地,区块链在验证第二竞争是否作假时,可以结合第二竞争方的标签、第二竞争方的加密承诺以及第二竞争方生成的竞争密文对进行验证。
具体地,区块链从第二竞争方获取第二竞争方生成每个竞争密文对时使用的随机数以及第二竞争方生成的临时密文,临时密文是采用除第二竞争方以外的其他任一竞争方的公钥对第二竞争方的敏感属性值进行加密后确定的。根据随机数、临时密文、保存的公钥和密文生成第二竞争方对应的临时竞争密文对。具体实施中,第二竞争方生成每个竞争密文对时,使用了两个随机数据,区块链保存的公钥和密文包括第二竞争方在竞争排名时发送的公钥和密文以及其他竞争方在竞争排名时发送的公钥和密文。在确定临时加密承诺与保存的第二竞争方的加密承诺匹配,临时竞争密文对与保存的第二竞争方生成的竞争密文对 匹配,且对第二竞争方的标签验证通过时,确定第二竞争方验证通过并返回验证通过消息。
示例性地,区块链从竞争方2中获取竞争方2的标签Sig_SK_2_signature(Hash(PK_2_ephemeral||E_PK_2_ephemeral(V_2)))和竞争方2的公钥PK_2_ephemeral,采用竞争方2的公钥对竞争方2的标签进行加密,确定竞争方2的临时加密承诺。将竞争方2的临时加密承诺与保存的竞争方2的加密承诺进行比对,若一致,说明竞争方2的临时加密承诺与保存的竞争方2的加密承诺匹配。
进一步,对竞争方2的标签进行验证。具体地,首先可以采用竞争方2的数字证书验证竞争方2的签名私钥Sig_SK_2_signature,然后进一步验证竞争方2的标签中的Hash(PK_2_ephemeral||E_PK_2_ephemeral(V_2))是否与保存的公钥PK_2_ephemeral以及第二竞争方的密文E_PK_2_ephemeral(V_2)匹配,若全部验证通过,则说明对竞争方2的标签验证通过。
进一步,针对竞争方2在竞争排名时生成的一个竞争密文对A,包括竞争密文1:E_PK_1_ephemeral(d1_21*V_1+d2_2)和竞争密文2:E_PK_1_ephemeral(d1_21*V_2+d2_2)。区块链从竞争方2获取的随机数包括随机数d1_21和随机数d2_21,竞争方2的敏感属性值为V_2,从竞争方2获取的临时密文为E_PK_1_ephemeral(V_2)。
采用保存的竞争方1的公钥对随机数d2_21进行加密,得到E_PK_1_ephemeral(d2_21),然后根据随机数d1_21、加密后的随机数E_PK_1_ephemeral(d2_21)、保存的竞争方1的密文E_PK_1_ephemeral(V_1)生成临时竞争密文1为:
d1_21*E_PK_1_ephemeral(V_1)+E_PK_1_ephemeral(d2_21)
采用保存的竞争方1的公钥对随机数d2_21进行加密,得到E_PK_1_ephemeral(d2_21),然后根据随机数d1_21、加密后的随机数E_PK_1_ephemeral(d2_21)、临时密文E_PK_1_ephemeral(V_2)生成临时竞争密文2为:
d1_21*E_PK_1_ephemeral(V_2)+E_PK_1_ephemeral(d2_21)
将临时竞争密文1和临时竞争密文2组成临时竞争密文对A’。然后将临时竞争密文1和竞争密文1进行比对,即d1_21*E_PK_1_ephemeral(V_1)+E_PK_1_ephemeral(d2_21)是否等于E_PK_1_ephemeral(d1_21*V_1+d2_2)。将临时竞争密文2和竞争密文3进行比对,即d1_21*E_PK_1_ephemeral(V_2)+E_PK_1_ephemeral(d2_21)是否等于E_PK_1_ephemeral(d1_21*V_2+d2_2)。若均匹配,则说明临时竞争密文对A’与保存的第二竞争方生成的竞争密文对A匹配,其他竞争密文对也可以采用相同的方法进行匹配,若都匹配,则说明竞争方2对应的临时竞争密文对与保存的竞争方2生成的竞争密文对匹配。
当竞争方2的临时加密承诺与保存的竞争方2的加密承诺匹配,对竞争方2的标签验证通过,且竞争方2对应的临时竞争密文对与保存的竞争方2生成的竞争密文对匹配时,说明竞争方2没有作假,否则,说明竞争方2作假。
在验证竞争方是否作假时,采用竞争方的标签、竞争方的加密承诺这些竞争方法无法抵赖证据判断区块链中的数据是否由竞争方发送,通过对竞争方生成的竞争密文对进行验证,判断竞争方在参与竞争时是否采用了一致的敏感属性值,从而保证了诚实竞争方获得正确的排名,维护了竞争排名的秩序。
为了更好的解释本发明实施例,下面结合具体的实施场景描述本发明实施例提供的一种基于区块链的竞争排名方法,主要包括四个阶段。
设定竞争方为N个,P_i表示竞争方i,V_i表示竞争方i的敏感属性值V,R_i表示竞争方i的敏感属性值V在所有竞争方中的排名,PK_i表示竞争方i产生的公钥,SK_i表示竞争方i产生的对应PK_i的私钥,E_k(m)表示使用密钥k加密消息m,D_k(m)表示使用密钥k解密消息m,Sig_k(m)表示使用签名私钥k对消息m进行数字签名,Hash(m)表示消息m的哈希值,A||B表示在A字符串之后附加B字符串,例如“ab”||“c”=“abc”。Contract_Seal表示区块链上的一个具有数据存证功能的智能合约。
第一阶段:
1、竞争方i采用约定的非对称加法同态密码算法生成一个新的临时密钥对,公钥为PK_i_ephemeral,私钥为SK_i_ephemeral。
2、竞争方i使用公钥PK_i_ephemeral加密自己的敏感属性值V_i,获得密文E_PK_i_ephemeral(V_i)。
3、竞争方i使用标识自身身份的签名私钥SK_i_signature对Hash(PK_i_ephemeral||E_PK_i_ephemeral(V_i))进行不可抵赖的签名,获得竞争方i的标签Sig_SK_i_signature(Hash(PK_i_ephemeral||E_PK_i_ephemeral(V_i)))。
4、竞争方i使用公钥PK_i_ephemeral加密Sig_SK_i_signature(Hash(PK_i_ephemeral||E_PK_i_ephemeral(V_i)))获得不可抵赖的加密承诺Hidden_Commitment_i=E_PK_i_ephemeral(Sig_SK_i_signature(Hash(PK_i_ephemeral||E_PK_i_ephemeral(V_i))))。
5、竞争方i将公钥PK_i_ephemeral、密文E_PK_i_ephemeral(V_i)、加密承诺Hidden_Commitment_i通过匿名网络发送到区块链上的一个数据存证智能合约Contract_Seal。
第二阶段:当所有竞争方都完成第一阶段之后,Contract_Seal向所有竞争方广播通知,开始第二阶段。
1、竞争方i从Contract_Seal中下载所有的公钥和密文。
2、针对除竞争方i之外的任意一个竞争方j,选取两个独立不相干的随机正整数d1_ij和d2_ij。
3、根据随机正整数d1_ij和d2_ij、竞争方i的敏感属性值V_i确定第一竞争属性值d1_ij*V_i+d2_ij,使用竞争方j的公钥E_PK_j_ephemeral加密第一竞争属性值,获得第一竞争密文:E_PK_j_ephemeral(d1_ij*V_i+d2_ij)。
4、使用竞争方j的公钥E_PK_j_ephemeral加密d2_ij,获得E_PK_j_ephemeral(d2_ij)。
5、根据随机正整数d1_ij、竞争方j的密文E_PK_j_ephemeral(V_j)以及加密后的随机正整数E_PK_j_ephemeral(d2_ij),确定第二竞争密文:d1_ij*E_PK_j_ephemeral(V_j)+E_PK_j_ephemeral(d2_ij)。根据加法同态密码算法的特性,可以将第二竞争密文转化为:E_PK_j_ephemeral(d1_ij*V_j+d2_ij)。
6、将第一竞争密文和第二竞争密文组成的竞争密文对<PK_i_ephemeral,E_PK_j_ephemeral(d1_ij*V_i+d2_ij)>,<PK_j_ephemeral,E_PK_j_ephemeral(d1_ij*V_j+d2_ij)>通过匿名网络再次发送到Contract_Seal。竞争方i采用上述同样的方法可以生成N-1对竞争密文对。
第三阶段:当所有竞争方都完成第二阶段之后,Contract_Seal向所有竞争方广播通知,开始第三阶段。
1、竞争方i从Contract_Seal中下载所有的竞争密文对。
2、竞争方i选出自己临时私钥SK_i_ephemeral可以解密的N-1对的用自己公钥PK_i_ephemeral加密的竞争密文对。设定竞争密文对为:E_PK_i_ephemeral(d1_ji*V_i+d2_ji)和E_PK_i_ephemeral(d1_ji*V_j+d2_ji),竞争方i使用自己私钥SK_i_ephemeral对其解密,得到以下结果:
V_i’=d1_ji*V_i+d2_ji=D_SK_i_ephemeral(E_PK_i_ephemeral(d1_ji*V_i+d2_ji))
V_j’=d1_ji*V_j+d2_ji=D_SK_i_ephemeral(E_PK_i_ephemeral(d1_ji*V_j+d2_ji))
其中,V_i’和V_j’为一对竞争属性值。
3、比较V_i’和V_j’的大小,如果V_i’>V_j’,说明竞争方i的V_i值大于竞争方j的V_j。
4、比较N-1对竞争密文对后,可以得到竞争方i的排名。如果有R_i个竞争属性值大于竞争方i的竞争属性值,则竞争方i可以确定自身的排名为R_i。
第四阶段:
1、竞争方i怀疑竞争方j作假时,向区块链发送验证请求。
2、区块链联系竞争方j,从竞争方j中获取Hidden_Commitment消息中的Sig_SK_j_signature(Hash(PK_j_ephemeral||E_PK_j_ephemeral(V_j))和临时公钥E_PK_j_ephemeral。
3、区块链使用临时公钥E_PK_j_ephemeral加密获得的Sig_SK_j_signature(Hash(PK_j_ephemeral||E_PK_j_ephemeral(V_j)),以此重新算出临时加密承诺E_PK_j_ephemeral(Sig_SK_j_signature(Hash(PK_j_ephemeral||E_PK_j_ephemeral(V_j)))。
4、区块链将临时加密承诺与保存的加密承诺进行比对,采用竞争方j的数字证书验证竞争方j的签名私钥Sig_SK_j_signature,然后进一步验证Hash(PK_j_ephemeral||E_PK_j_ephemeral(V_j))是否与保存的PK_j_ephemeral和E_PK_j_ephemeral(V_j)匹配,若全部验证通过,则说明区块链中的历史消息确实由竞争方j所发,否则竞争方j作假。
5、根据临时公钥E_PK_j_ephemeral,区块链可以在Contract_Seal的区块数据中筛选出所有由竞争方j在第二阶段发送的N-1个竞争密文对,<PK_i_ephemeral,E_PK_i_ephemeral(d1_ji*V_i+d2_ji)>,<PK_j_ephemeral,E_PK_i_ephemeral(d1_ji*V_j+d2_ji))>。
6、区块链从竞争方j中获取生成每个竞争密文对时使用的随机数d1_ji和d2_ji,采用临时公钥PK_i_ephemeral加密随机数d2_ji得到E_PK_i_ephemeral(d2_ji)。
7、区块链要求竞争方j使用其他竞争方的临时公钥PK_i_ephemeral加密自己的敏感属性值V_j,并向区块链发送加密之后的N-1个临时密文E_PK_i_ephemeral(V_j)。
8、区块链根据随机数d1_ji、加密后的随机数E_PK_i_ephemeral(d2_ji)、临时密文E_PK_i_ephemeral(V_j)生成临时竞争密文d1_ji*E_PK_i_ephemeral(V_j)+E_PK_i_ephemeral(d2_ji)。根据随机数d1_ji、加密后的随机数E_PK_i_ephemeral(d2_ji)、保存的其他竞争方的密文E_PK_i_ephemeral(V_i)生成临时竞争密文d1_ji*E_PK_i_ephemeral(V_i)+E_PK_i_ephemeral(d2_ji)。将竞争密文对和临时竞争密文对进行验证:
E_PK_i_ephemeral(d1_ji*V_j+d2_ji))=d1_ji*E_PK_i_ephemeral(V_j)+E_PK_i_ephemeral(d2_ji)
E_PK_i_ephemeral(d1_ji*V_i+d2_ji)=d1_ji*E_PK_i_ephemeral(V_i)+ E_PK_i_ephemeral(d2_ji)
如果有任意一对竞争密文对和临时竞争密文不匹配,即等式左右不相等,说明竞争方j作假,竞争方在竞争排名时,针对不同的竞争方法采用了不同的敏感属性值,误导了其他竞争方。
本发明实施例中,由于将所有竞争方的敏感属性值隐藏在竞争属性值中,通过依次比较每个竞争属性对中两个竞争属性值的大小,确定竞争方的排名,保证了任一竞争方不能获知其他竞争方的敏感属性值。其次,竞争密文对是采用公钥进行加密后获得的,而基于公钥并不能确定竞争方的身份,故采用竞争密文对中的竞争属性值确定排名时,任一竞争方只能得到自身在所有竞争方的排名,而不能知道其他竞争方的排名,从而有效保护了各个竞争方的隐私数据。
基于相同的技术构思,本发明实施例提供了一种基于区块链的竞争排名装置,如图5所示,包括:
下载模块501,用于在接收到区块链广播的第一消息时,从所述区块链中下载所有竞争密文对,竞争密文对中的两个竞争密文由相同的公钥加密,每个竞争密文中包括竞争属性值,一个竞争属性值中包括所述公钥对应的竞争方的敏感属性值,另一个竞争属性值中包括除所述公钥对应的竞争方以外的任一竞争方的敏感属性值;
匹配模块502,用于从所有竞争密文对中确定由第一公钥加密的目标竞争密文对;
解密模块503,用于针对每个目标竞争密文对,采用第一私钥对所述目标竞争密文对中的竞争密文进行解密,确定目标竞争属性对,所述第一公钥和所述第一私钥是由第一竞争方生成的;
处理模块504,用于依次比较每个目标竞争属性对中两个目标竞争属性值的大小,确定所述第一竞争方的排名。
可选地,还包括发送模块505;
所述下载模块501还用于,在接收到所述区块链广播的第二消息时,从所述区块链中下载所有竞争方的公钥和密文;
所述处理模块504还用于,针对除所述第一竞争方之外的任意一个第二竞争方,选取第一随机数和第二随机数;根据所述第一随机数、所述第二随机数和所述第一竞争方的敏感属性值确定第一竞争属性值;采用所述第二竞争方的公钥对所述第一竞争属性值进行加密,确定第一竞争密文;采用所述第二竞争方的公钥对所述第二随机数进行加密,并根据所述第一随机数、所述第二竞争方的密文以及加密后的第二随机数,确定第二竞争密文;
所述发送模块505具体用于,将由所述第一竞争密文和所述第二竞争密文组成的竞争密文对通过匿名网络发送至所述区块链。
可选地,所述处理模块504还用于,在接收到所述区块链广播的第二消息时,从所述区块链中下载所有竞争方的公钥和密文之前,采用所述第一公钥对所述第一竞争方的敏感属性值进行加密,确定所述第一竞争方的密文;
所述发送模块505还用于,将所述第一公钥和所述第一竞争方的密文通过匿名网络发送至所述区块链。
可选地,所述处理模块504还用于,采用第一签名私钥对所述第一公钥和所述第一竞争方的密文进行签名,确定所述第一竞争方的标签;采用所述第一公钥对所述第一竞争方的标签进行加密,确定所述第一竞争方的加密承诺;
所述发送模块505还用于,将所述第一竞争方的加密承诺通过匿名网络发送至所述区块链。
可选地,所述发送模块505还用于,向所述区块链发送验证请求,所述验证请求中携带第二竞争方的标识,以使所述区块链从所述第二竞争方获取第二竞争方的标签和第二公钥,采用所述第二公钥对所述第二竞争方的标签进行加密,确定所述第二竞争方的临时加密承诺;在确定所述临时加密承诺与保存的第二竞争方的加密承诺匹配,且对所述第二竞争方的标签验证通过时,确定所述第二竞争方验证通过并返回验证通过消息;
所述下载模块501还用于,接收所述区块链发送的验证通过消息。
可选地,所述发送模块505具体用于,向所述区块链发送验证请求,所述验证请求中携带第二竞争方的标识,以使所述区块链从所述第二竞争方获取所述第二竞争方生成每个竞争密文对时使用的随机数以及所述第二竞争方生成的临时密文,所述临时密文是采用除所述第二竞争方以外的其他任一竞争方的公钥对所述第二竞争方的敏感属性值进行加密后确定的,根据所述随机数、所述临时密文、保存的公钥和密文生成所述第二竞争方对应的临时竞争密文对,在确定所述临时加密承诺与保存的第二竞争方的加密承诺匹配,所述临时竞争密文对与保存的所述第二竞争方生成的竞争密文对匹配,且对所述第二竞争方的标签验证通过时,确定所述第二竞争方验证通过并返回验证通过消息。
基于相同的技术构思,本发明实施例提供了一种计算机设备,如图6所示,包括至少一个处理器601,以及与至少一个处理器连接的存储器602,本发明实施例中不限定处理器601与存储器602之间的具体连接介质,图6中处理器601和存储器602之间通过总线连接为例。总线可以分为地址总线、数据总线、控制总线等。
在本发明实施例中,存储器602存储有可被至少一个处理器601执行的指令,至少一个处理器601通过执行存储器602存储的指令,可以执行前述的基于区块链的竞争排名方法中所包括的步骤。
其中,处理器601是计算机设备的控制中心,可以利用各种接口和线路连接计算机设备的各个部分,通过运行或执行存储在存储器602内的指令以及调用存储在存储器602内的数据,从而进行竞争排名。可选的,处理器601可包括一个或多个处理单元,处理器601可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器601中。在一些实施例中,处理器601和存储器602可以在同一芯片上实现,在一些实施例中,它们也可以在独立的芯片上分别实现。
处理器601可以是通用处理器,例如中央处理器(CPU)、数字信号处理器、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件,可以实现或者执行本发明实施例中公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者任何常规的处理器等。结合本发明实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。
存储器602作为一种非易失性计算机可读存储介质,可用于存储非易失性软件程序、非易失性计算机可执行程序以及模块。存储器602可以包括至少一种类型的存储介质,例如可以包括闪存、硬盘、多媒体卡、卡型存储器、随机访问存储器(Random Access Memory,RAM)、静态随机访问存储器(Static Random Access Memory,SRAM)、可编程只读存储 器(Programmable Read Only Memory,PROM)、只读存储器(Read Only Memory,ROM)、带电可擦除可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,EEPROM)、磁性存储器、磁盘、光盘等等。存储器602是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。本发明实施例中的存储器602还可以是电路或者其它任意能够实现存储功能的装置,用于存储程序指令和/或数据。
基于相同的技术构思,本发明实施例提供了一种计算机可读存储介质,其存储有可由计算机设备执行的计算机程序,当所述程序在计算机设备上运行时,使得所述计算机设备执行基于区块链的竞争排名方法的步骤。
基于相同的技术构思,本发明实施例提供了一种包含指令的计算机程序产品,当其在计算机设备上运行时,使得所述计算机设备执行基于区块链的竞争排名方法的步骤。
本领域内的技术人员应明白,本发明的实施例可提供为方法、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。

Claims (13)

  1. 一种基于区块链的竞争排名方法,其特征在于,包括:
    在接收到区块链广播的第一消息时,从所述区块链中下载所有竞争密文对,竞争密文对中的两个竞争密文由相同的公钥加密,每个竞争密文中包括竞争属性值,一个竞争属性值中包括所述公钥对应的竞争方的敏感属性值,另一个竞争属性值中包括除所述公钥对应的竞争方以外的任一竞争方的敏感属性值;
    从所有竞争密文对中确定由第一公钥加密的目标竞争密文对;
    针对每个目标竞争密文对,采用第一私钥对所述目标竞争密文对中的竞争密文进行解密,确定目标竞争属性对,所述第一公钥和所述第一私钥是由第一竞争方生成的;
    依次比较每个目标竞争属性对中两个目标竞争属性值的大小,确定所述第一竞争方的排名。
  2. 如权利要求1所述的方法,其特征在于,所述竞争密文对是采用以下方式生成的:
    在接收到所述区块链广播的第二消息时,从所述区块链中下载所有竞争方的公钥和密文;
    针对除所述第一竞争方之外的任意一个第二竞争方,选取第一随机数和第二随机数;
    采用所述第一随机数、所述第二随机数对所述第一竞争方的敏感属性值进行混淆,确定第一竞争属性值;
    采用所述第二竞争方的公钥对所述第一竞争属性值进行加密,确定第一竞争密文;
    采用所述第二竞争方的公钥对所述第二随机数进行加密,并根据所述第一随机数、所述第二竞争方的密文以及加密后的第二随机数,确定第二竞争密文,所述第二竞争密文中包括第二竞争属性值,所述第二竞争属性值是对所述第二竞争方的敏感属性值进行混淆之后的属性值;
    将由所述第一竞争密文和所述第二竞争密文组成的竞争密文对通过匿名网络发送至所述区块链。
  3. 如权利要求2所述的方法,其特征在于,所述在接收到所述区块链广播的第二消息时,从所述区块链中下载所有竞争方的公钥和密文之前,还包括:
    采用所述第一公钥对所述第一竞争方的敏感属性值进行加密,确定所述第一竞争方的密文;
    将所述第一公钥和所述第一竞争方的密文通过匿名网络发送至所述区块链。
  4. 如权利要求2所述的方法,其特征在于,还包括:
    采用第一签名私钥对所述第一公钥和所述第一竞争方的密文进行签名,确定所述第一竞争方的标签;
    采用所述第一公钥对所述第一竞争方的标签进行加密,确定所述第一竞争方的加密承诺;
    将所述第一竞争方的加密承诺通过匿名网络发送至所述区块链。
  5. 如权利要求4所述的方法,其特征在于,还包括:
    向所述区块链发送验证请求,所述验证请求中携带第二竞争方的标识,以使所述区块链从所述第二竞争方获取第二竞争方的标签和第二公钥,采用所述第二公钥对所述第二竞争方的标签进行加密,确定所述第二竞争方的临时加密承诺;在确定所述临时加密承诺与 保存的第二竞争方的加密承诺匹配,且对所述第二竞争方的标签验证通过时,确定所述第二竞争方验证通过并返回验证通过消息;
    接收所述区块链发送的验证通过消息。
  6. 如权利要求4所述的方法,其特征在于,所述在确定所述临时加密承诺与保存的第二竞争方的加密承诺匹配,且对所述第二竞争方的标签验证通过时,确定所述第二竞争方验证通过并返回验证通过消息,包括:
    从所述第二竞争方获取所述第二竞争方生成每个竞争密文对时使用的随机数以及所述第二竞争方生成的临时密文,所述临时密文是采用除所述第二竞争方以外的其他任一竞争方的公钥对所述第二竞争方的敏感属性值进行加密后确定的,根据所述随机数、所述临时密文、保存的公钥和密文生成所述第二竞争方对应的临时竞争密文对,在确定所述临时加密承诺与保存的第二竞争方的加密承诺匹配,所述临时竞争密文对与保存的所述第二竞争方生成的竞争密文对匹配,且对所述第二竞争方的标签验证通过时,确定所述第二竞争方验证通过并返回验证通过消息。
  7. 一种基于区块链的竞争排名装置,其特征在于,包括:
    下载模块,用于在接收到区块链广播的第一消息时,从所述区块链中下载所有竞争密文对,竞争密文对中的两个竞争密文由相同的公钥加密,每个竞争密文中包括竞争属性值,一个竞争属性值中包括所述公钥对应的竞争方的敏感属性值,另一个竞争属性值中包括除所述公钥对应的竞争方以外的任一竞争方的敏感属性值;
    匹配模块,用于从所有竞争密文对中确定由第一公钥加密的目标竞争密文对;
    解密模块,用于针对每个目标竞争密文对,采用第一私钥对所述目标竞争密文对中的竞争密文进行解密,确定目标竞争属性对,所述第一公钥和所述第一私钥是由第一竞争方生成的;
    处理模块,用于依次比较每个目标竞争属性对中两个目标竞争属性值的大小,确定所述第一竞争方的排名。
  8. 如权利要求7所述的装置,其特征在于,还包括发送模块;
    所述下载模块还用于,在接收到所述区块链广播的第二消息时,从所述区块链中下载所有竞争方的公钥和密文;
    所述处理模块还用于,针对除所述第一竞争方之外的任意一个第二竞争方,选取第一随机数和第二随机数;采用所述第一随机数、所述第二随机数对所述第一竞争方的敏感属性值进行混淆,确定第一竞争属性值;采用所述第二竞争方的公钥对所述第一竞争属性值进行加密,确定第一竞争密文;采用所述第二竞争方的公钥对所述第二随机数进行加密,并根据所述第一随机数、所述第二竞争方的密文以及加密后的第二随机数,确定第二竞争密文,所述第二竞争密文中包括第二竞争属性值,所述第二竞争属性值是对所述第二竞争方的敏感属性值进行混淆之后的属性值;
    所述发送模块具体用于,将由所述第一竞争密文和所述第二竞争密文组成的竞争密文对通过匿名网络发送至所述区块链。
  9. 如权利要求8所述的装置,其特征在于,所述处理模块还用于,在接收到所述区块链广播的第二消息时,从所述区块链中下载所有竞争方的公钥和密文之前,采用所述第一公钥对所述第一竞争方的敏感属性值进行加密,确定所述第一竞争方的密文;
    所述发送模块还用于,将所述第一公钥和所述第一竞争方的密文通过匿名网络发送至 所述区块链。
  10. 如权利要求9所述的装置,其特征在于,所述处理模块还用于,采用第一签名私钥对所述第一公钥和所述第一竞争方的密文进行签名,确定所述第一竞争方的标签;采用所述第一公钥对所述第一竞争方的标签进行加密,确定所述第一竞争方的加密承诺;
    所述发送模块还用于,将所述第一竞争方的加密承诺通过匿名网络发送至所述区块链。
  11. 一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述程序时实现权利要求1~6任一权利要求所述方法的步骤。
  12. 一种计算机可读存储介质,其特征在于,其存储有可由计算机设备执行的计算机程序,当所述程序在计算机设备上运行时,使得所述计算机设备执行权利要求1~6任一所述方法的步骤。
  13. 一种计算机程序产品,其特征在于,所述计算机程序产品包括存储在计算机可读存储介质上的计算程序,所述计算机程序包括程序指令,当所述程序指令被计算机设备执行时,使所述计算机设备执行权利要求1~6任一所述方法的步骤。
PCT/CN2020/084317 2019-04-26 2020-04-10 一种基于区块链的竞争排名方法及装置 WO2020216078A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910342449.9A CN110113326B (zh) 2019-04-26 2019-04-26 一种基于区块链的竞争排名方法及装置
CN201910342449.9 2019-04-26

Publications (1)

Publication Number Publication Date
WO2020216078A1 true WO2020216078A1 (zh) 2020-10-29

Family

ID=67486899

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/084317 WO2020216078A1 (zh) 2019-04-26 2020-04-10 一种基于区块链的竞争排名方法及装置

Country Status (2)

Country Link
CN (1) CN110113326B (zh)
WO (1) WO2020216078A1 (zh)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110113326B (zh) * 2019-04-26 2021-07-06 深圳前海微众银行股份有限公司 一种基于区块链的竞争排名方法及装置
CN110674521B (zh) * 2019-09-27 2021-04-02 合肥工业大学 一种隐私保护的证据管理系统及方法
CN112288523B (zh) * 2020-10-29 2023-09-05 中国银联股份有限公司 一种基于区块链的数值排名方法及装置
CN113111357B (zh) * 2021-03-09 2022-02-22 深圳市教育信息技术中心(深圳市教育装备中心) 字段加密方法、装置、设备和介质
CN113411384B (zh) * 2021-06-10 2022-09-27 华中科技大学 针对物联网数据安全共享过程中隐私保护的系统及方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102984156A (zh) * 2012-11-30 2013-03-20 无锡赛思汇智科技有限公司 一种可验证的分布式隐私数据比较与排序方法及装置
CN106506165A (zh) * 2016-11-02 2017-03-15 西安电子科技大学 基于同态加密的虚拟资产匿名排序方法
US20190058580A1 (en) * 2017-08-15 2019-02-21 Acronis International Gmbh System and method for publication of private data using a blockchain network
CN109495465A (zh) * 2018-11-05 2019-03-19 河南师范大学 基于智能合约的隐私集合交集方法
CN110113326A (zh) * 2019-04-26 2019-08-09 深圳前海微众银行股份有限公司 一种基于区块链的竞争排名方法及装置

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103248478A (zh) * 2013-05-08 2013-08-14 天津大学 基于多方安全协议的密封式电子拍卖方案与验证方法
US10789249B2 (en) * 2017-05-23 2020-09-29 Sap Se Optimal offset pushdown for multipart sorting

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102984156A (zh) * 2012-11-30 2013-03-20 无锡赛思汇智科技有限公司 一种可验证的分布式隐私数据比较与排序方法及装置
CN106506165A (zh) * 2016-11-02 2017-03-15 西安电子科技大学 基于同态加密的虚拟资产匿名排序方法
US20190058580A1 (en) * 2017-08-15 2019-02-21 Acronis International Gmbh System and method for publication of private data using a blockchain network
CN109495465A (zh) * 2018-11-05 2019-03-19 河南师范大学 基于智能合约的隐私集合交集方法
CN110113326A (zh) * 2019-04-26 2019-08-09 深圳前海微众银行股份有限公司 一种基于区块链的竞争排名方法及装置

Also Published As

Publication number Publication date
CN110113326B (zh) 2021-07-06
CN110113326A (zh) 2019-08-09

Similar Documents

Publication Publication Date Title
WO2020216078A1 (zh) 一种基于区块链的竞争排名方法及装置
US10395012B2 (en) Media client device authentication using hardware root of trust
WO2021120861A1 (zh) 多方联合进行模型数据处理的方法及装置
WO2019144612A1 (zh) 基于区块链的零知识多账本兑换转账方法、装置及存储介质
CN105337736B (zh) 全同态消息认证方法、装置及系统
CN109325331A (zh) 基于区块链和可信计算平台的大数据采集交易系统
JP2020502856A5 (zh)
US10880100B2 (en) Apparatus and method for certificate enrollment
JP6950745B2 (ja) 鍵交換装置、鍵交換システム、鍵交換方法、及び鍵交換プログラム
CN112287377A (zh) 基于联邦学习的模型训练方法、计算机设备及存储介质
US11575501B2 (en) Preserving aggregation using homomorphic encryption and trusted execution environment, secure against malicious aggregator
CN111339565B (zh) 基于区块链的业务服务提供方法、装置、设备及系统
JP7101031B2 (ja) ブロックチェーン・ネットワーク及びそのための確定方法
CN109361508A (zh) 数据传输方法、电子设备及计算机可读存储介质
CN112765652B (zh) 叶节点分类权值的确定方法、装置、及设备
JP2012528532A (ja) リセット可能な耐タンパー性ハードウェアトークンを使用する、効率的な秘匿関数計算の方法
US20200252208A1 (en) Key exchange method and key exchange system
Madathil et al. Private signaling
Karl et al. Non-interactive mpc with trusted hardware secure against residual function attacks
US11496287B2 (en) Privacy preserving fully homomorphic encryption with circuit verification
CN114611129A (zh) 一种数据隐私保护方法和系统
US11095429B2 (en) Circuit concealing apparatus, calculation apparatus, and program
CN112925535A (zh) 一种密码芯片嵌入式应用安装方法及装置
CN111552950A (zh) 一种软件授权方法、装置及计算机可读存储介质
CN116070247B (zh) 一种按顺序履约的电子合同的生成及履约方法

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: 20795902

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 18/02/2022)

122 Ep: pct application non-entry in european phase

Ref document number: 20795902

Country of ref document: EP

Kind code of ref document: A1