A method and system for realizing multi-party secure transaction of private data based on blockchain

Encrypting car data through differential privacy and homomorphic proxy re-encryption technology on the blockchain solves the problem of unprotected car owner data, realizes the privacy and value utilization of data, and ensures that the data can only be controlled by the car owner and used for A sound used car acquisition strategy.

CN117874812BActive Publication Date: 2024-10-11LINGSHU TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410021098.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-05
Publication Date
2024-10-11
Estimated Expiration
2044-01-05

AI Technical Summary

Technical Problem

In the second-hand car pricing process, the private data of car owners is not effectively protected, and data control is concentrated in the hands of car companies, resulting in the failure to fully utilize the value of the data.

Method used

Using blockchain-based differential privacy and homomorphic agent re-encryption technology to encrypt car data to ensure the privacy and controllability of the data, so that the data can only be accessed by the data party, and the value of the data can be obtained through joint calculations .

Benefits of technology

It achieves the true ownership and control of the data by car owners and alleviates the problem of centralized institutions selling data without permission. At the same time, through joint calculation of encrypted data, the value of the data is fully utilized to help guide the formulation of second-hand car purchase prices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117874812B_ABST
    Figure CN117874812B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for realizing multi-party secure transaction of private data based on blockchain, wherein the method comprises: obtaining original plaintext data, including type data and private data; calculating the type hash value of the type data, blurring and encrypting the private data to generate encrypted fuzzy ciphertext, and writing the encrypted fuzzy ciphertext into a block document; obtaining a transaction request issued by a data user, the transaction request including a target type hash value and a temporary public key of the data user; judging whether the type hash value is a target type hash value; if the type hash value is a target type hash value, calculating a re-encryption key based on a pre-generated private key and a temporary public key of the data user; encrypting the encrypted fuzzy ciphertext using the re-encryption key to obtain a re-encrypted ciphertext, so that the data user can perform joint calculation and decryption on all the re-encrypted ciphertexts to obtain a joint calculation result. The method of the present invention improves the privacy security of multi-party data in transactions and its use value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of blockchain technology, and in particular to a method and system for realizing multi-party secure transaction of private data based on blockchain. Background Art

[0002] Currently, in the process of second-hand car pricing, there is a problem of centralized institutions selling the data party's (i.e., car owner's) data without permission. The control of the data party's car data is concentrated in the car company, and the data party's privacy data is not protected. At the same time, it is protected by relevant national data security laws and regulations, and the value of a large amount of data cannot be fully utilized. Summary of the invention

[0003] To solve the above problems, the present invention provides a method and system for realizing multi-party secure transactions of private data based on blockchain, which encrypts private data by combining differential privacy and quasi-isomorphic proxy re-encryption privacy computing technology, thereby improving the privacy of automobile data during the transaction process while making full use of the data value, thus realizing controllable, available and invisible data.

[0004] To achieve the above-mentioned purpose, the present invention provides a method for realizing multi-party secure transaction of private data based on blockchain, comprising: obtaining original plaintext data, wherein the original plaintext data includes type data and private data; calculating the type hash value of the type data based on a hash algorithm, blurring and encrypting the private data to generate encrypted fuzzy ciphertext, and writing the encrypted fuzzy ciphertext into a block document; obtaining a transaction request issued by a data user, wherein the transaction request includes a target type hash value and a temporary public key of the data user; judging whether the type hash value is the target type hash value; if the type hash value is the target type hash value, calculating a re-encryption key based on a pre-generated private key and the temporary public key of the data user; encrypting the encrypted fuzzy ciphertext using the re-encryption key to obtain a re-encrypted ciphertext, and writing the re-encrypted ciphertext into the block document, so that the data user can jointly calculate and decrypt all the re-encrypted ciphertexts to obtain a joint calculation result.

[0005] Optionally, before obtaining the original plaintext data, it includes: obtaining a request for calling the blockchain platform digital identity registration interface and identity information to complete identity registration.

[0006] Optionally, the blurring and encrypting the privacy data to generate encrypted blur ciphertext includes: obtaining system parameters, and generating a public key and a private key based on the system parameters; the system parameters are generated by a genesis block and stored in the genesis block; based on a differential privacy algorithm, randomly selecting a corresponding noise blur value from any probability distribution with a mean of zero, and calculating the sum of the privacy data and the noise blur value to obtain a differential blur value of the privacy data; and encrypting the differential blur value of the privacy data based on a quasi-homomorphic proxy re-encryption algorithm and the public key to obtain a blur ciphertext.

[0007] Optionally, determining whether the type hash value is the target type hash value includes: calling a smart contract data filtering interface to determine whether the type hash value is the target type hash value.

[0008] Optionally, the using the re-encryption key to encrypt the encrypted fuzzy ciphertext to obtain the re-encrypted ciphertext includes: calling a smart contract re-encryption interface to use the re-encryption key to encrypt the encrypted fuzzy ciphertext to obtain the re-encrypted ciphertext.

[0009] On the other hand, the present invention provides a system for implementing multi-party secure transactions of private data based on blockchain, including: an original plaintext data acquisition module, used to acquire original plaintext data, the original plaintext data including type data and private data; a type hash value and fuzzy ciphertext acquisition module, used to calculate the type hash value of the type data based on a hash algorithm, fuzzify and encrypt the private data to generate encrypted fuzzy ciphertext, and write the encrypted fuzzy ciphertext into a block document. A transaction request receiving module, used to acquire a transaction request issued by a data user, the transaction request including a target type hash value and a temporary public key of the data user; a hash value judgment module, used to judge whether the type hash value is the target type hash value; a re-encryption key acquisition module, used to calculate the re-encryption key based on a pre-generated private key and the temporary public key of the data user if the type hash value is the target type hash value; a fuzzy re-ciphertext acquisition module, used to encrypt the encrypted fuzzy ciphertext using the re-encryption key to obtain a re-encrypted ciphertext, and write the re-encrypted ciphertext into the block document, so that the data user can perform joint calculation and decryption on all the re-encrypted ciphertexts to obtain a joint calculation result.

[0010] Optionally, it also includes: a blockchain platform digital identity registration module, which is used to obtain a request for calling the blockchain platform digital identity registration interface and identity information to complete identity registration.

[0011] Optionally, the type hash value and fuzzy ciphertext acquisition module includes: a system parameter acquisition unit, used to obtain the system parameters generated by the genesis block, and generate a public key and a private key based on the system parameters; a privacy data differential fuzzy value acquisition unit, used to randomly select a corresponding noise fuzzy value from any probability distribution with a mean of zero based on a differential privacy algorithm, and calculate the sum of the privacy data and the noise fuzzy value to obtain a privacy data differential fuzzy value; a fuzzy ciphertext acquisition unit, used to encrypt the privacy data differential fuzzy value based on a quasi-homomorphic proxy re-encryption algorithm and the public key to obtain a fuzzy ciphertext.

[0012] Optionally, the hash value judgment module includes: a smart contract data filtering interface calling unit, used to call the smart contract data filtering interface to determine whether the type hash value is the target type hash value.

[0013] Optionally, the fuzzy re-encrypted text acquisition module includes: a smart contract re-encryption interface calling unit, used to call the smart contract re-encryption interface to use the re-encryption key to encrypt the encrypted fuzzy ciphertext to obtain the re-encrypted ciphertext.

[0014] Beneficial effects of the present invention:

[0015] By optimizing differential privacy and quasi-homomorphic proxy re-encryption and combining them to encrypt private data, on the one hand, after encryption, private data can only be accessed by the data party, so that the ownership and control of the private data truly belong to the data party, that is, the car owner, rather than the car company, which to a certain extent alleviates the problem of centralized institutions selling user data without permission; on the other hand, while protecting the data privacy of the data party, the encrypted and obfuscated private data are jointly calculated to obtain the joint calculation value of the private data, which makes full use of the data value and helps to more reasonably guide the data users to use the data, such as the formulation of the purchase price of used cars. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 It is a flow chart of a method for realizing multi-party secure transaction of private data based on blockchain provided by an embodiment of the present invention;

[0017] Figure 2 is a flow chart of obtaining encrypted fuzzy ciphertext provided by an embodiment of the present invention;

[0018] Figure 3 It is a schematic diagram of the structure of a system for implementing multi-party secure transactions of private data based on blockchain provided by an embodiment of the present invention;

[0019] Figure 4 It is a structural diagram of a type hash value and fuzzy ciphertext acquisition module provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0020] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0021] In order to solve the problems in the prior art, the embodiment of the present invention provides a method for realizing multi-party secure transaction of private data based on blockchain, which is applied in a system for exchanging private data between data parties and data users. Figure 1 is a flow chart of a method for implementing multi-party secure transactions of private data based on blockchain provided by an embodiment of the present invention. Figure 1 As shown, the method includes:

[0022] S1. Obtain original plaintext data, where the original plaintext data includes type data and privacy data.

[0023] The scenario where data users and data parties realize the secure transaction of private data can be a used car acquisition scenario, where the car owner is the data party and the acquirer is the data user. Before acquiring a certain type of vehicle, the acquirer needs to obtain the data of that type of vehicle, such as the average mileage data and insurance data of that type of vehicle;

[0024] Before the data party registers its identity, the genesis block executes the parameter initialization algorithm SetUp to generate the system public parameters pp=(n,G,G1,e,g,h,q1,q2) and writes them into the genesis block as "partial transaction data".

[0025] The meaning of each parameter in the public parameters is: "q1, q2: large prime numbers; n = q1 × q2: modulus; G: finite field GF p Elliptic curve; G1: finite field ( n-order subgroup on G); e: bilinear mapping function; g: generator of G; h: generator of q1-order subgroup of G;

[0026] Get the data party's request to call the blockchain platform digital identity registration interface, based on the identity information entered by the data party, for example, when the data party is the car owner, the identity information is the ID card number, complete the registration of its on-chain digital identity DID. Each data party has a corresponding DID document and is stored in the block.

[0027] In the used car acquisition scenario, the privacy data may be vehicle mileage data, vehicle insurance claim data, etc., and the privacy data has homomorphic properties.

[0028] S2. Calculate the type hash value of the type data based on the hash algorithm, blur and encrypt the private data to generate encrypted blur ciphertext, and write the encrypted blur ciphertext into the block document.

[0029] The privacy data of different data parties correspond to different types. The data party calculates the hash value HASH of its own type data based on the hash algorithm. i , and as "publicly shareable data", write it into the DID document of the corresponding block, recorded as DIDocument i _HASH i .

[0030] The data party performs fuzzy calculation on the private data based on the differential privacy algorithm to obtain a differential fuzzy value; encrypts the differential value based on the homomorphic proxy re-encryption algorithm to obtain an encrypted fuzzy ciphertext C i ′, and write it into the DID document of the corresponding block as “privacy attribute data”, DIDocument i _C i ′.

[0031] S3. Obtain a transaction request issued by a data user, wherein the transaction request includes a target type hash value and a temporary public key of the data user.

[0032] The data user sends a data transaction request to the data party, which includes a target type hash value and a temporary public key. Different data parties have different types of privacy data, and the hash value of the type required by the user is the target type hash value. The data user generates a temporary private key sk0=x0 and a temporary public key based on the system public parameters.

[0033] In the used car acquisition scenario, the target type hash value may be the vehicle type data hash value required by the acquirer.

[0034] S4. Determine whether the type hash value is the target type hash value.

[0035] The data party determines whether its type hash value is the target type hash value in the request;

[0036] In the used car acquisition scenario, the car owner determines whether the type of his vehicle is the type of vehicle required by the acquirer.

[0037] S5. If the type hash value is the target type hash value, a re-encryption key is calculated based on a pre-generated private key and a temporary public key of the data user.

[0038] If the data party's type hash value is the target type hash value in the request, the data party is the target data party;

[0039] Call the smart contract data filtering interface SC.filter, based on the target type hash value HASH described in the block transaction published by the queried data user U B , according to formula (1), determine whether it is the target data

[0040] DIDocument i _HASH i ==HASH B (1)

[0041] Let's assume that the target data is quaO j∈[m] , the corresponding digital identity is recorded as did j .

[0042] The target data party uses the pre-generated private key SK i Calculate the re-encryption key rk using the temporary public key pk0 in the request i : The pre-generated private key SK i Generated by the data party according to the system public parameter pp.

[0043] The target data party writes the re-encryption key as a "temporary publicly shareable data asset" into its own DID document, recorded as DIDocument i _rk i .

[0044] S6. Use the re-encryption key to encrypt the encrypted obfuscated ciphertext to obtain a re-encrypted ciphertext, and write the re-encrypted ciphertext into the block document so that the data user can perform joint calculation and decryption on all the re-encrypted ciphertexts to obtain a joint calculation result.

[0045] The target data party calls the smart contract re-encryption interface SC.partDec, based on the temporary re-encryption key didocument under the DID document j _rk j The encrypted obfuscated ciphertext didocument j _C′ j Encrypt again to get the corresponding fuzzy re-encrypted text:

[0046] C″ j :(α,β)=(e(rk j ,C′ i,1 ),C′ i,2 ).

[0047] Among them, α is the privacy data i The first fuzzy re-encrypted text, β is the privacy data data iThe second fuzzy re-encrypted text, the private data data i The first fuzzy re-encrypted text and the private data data i The second fuzzy re-encrypted text constitutes the private data data i Fuzzy redaction.

[0048] The target data party writes the re-encrypted ciphertext into its own block document for the data user to decrypt and jointly calculate to obtain the joint calculation result. The target data party includes multiple data parties, and the multiple data parties write the obtained re-encrypted ciphertext into their own block documents.

[0049] The data user uses the partial decryption algorithm Part_decrypt and the temporary private key sk0 to decrypt the fuzzy re-encrypted text C″ in all the target data party’s documents. j Decrypt and obtain the partial decrypted ciphertext of each target data party: C j :

[0050] The data user jointly calculates all the partial decrypted ciphertexts C based on the additive homomorphic algorithm He_compute j Get the homomorphic aggregate ciphertext: C:

[0051] The data user decrypts the homomorphic aggregate ciphertext C again based on the homomorphic decryption algorithm He_decrypt and the queried genesis block data pp:

[0052] The data user then calculates the required "fuzzy joint calculation value of the privacy data of all target data parties" based on Plloard's lambda algorithm:

[0053]

[0054] The data user calculates the average value based on the fuzzy joint calculation value of the privacy data of all the target data parties to obtain the joint calculation result of the privacy data of all the target data parties.

[0055] Because, all the target data have a hidden data noise fuzzy value noise. j Randomly sample from a probability distribution χ with mean 0.

[0056] so,

[0057] Furthermore, all target data j∈[m] The average value of privacy data corresponding to the target type is:

[0058]

[0059] In the used car acquisition scenario, data user U obtains the average mileage AvgDistance of the required car brand B.

[0060] As an optional implementation, Figure 2 is a flowchart of obtaining encrypted fuzzy ciphertext provided by an embodiment of the present invention, such as Figure 2 As shown, blurring and encrypting the private data to generate encrypted blur ciphertext includes:

[0061] S201. Obtain system parameters, and generate a public key and a private key according to the system parameters; the system parameters are generated by a genesis block and stored in the genesis block.

[0062] Based on the queried public parameter pp, a private key SK is generated i =x i , public key Where Z = e(g,g).

[0063] S202: Based on the differential privacy algorithm, randomly select a corresponding noise fuzzy value from any probability distribution with a mean of zero, and calculate the sum of the private data and the noise fuzzy value to obtain a differential fuzzy value of the private data.

[0064] The probability distribution with a mean of zero can be a symmetrical uniform distribution, a standard normal distribution, etc. i∈[n] , based on the differential privacy algorithm, randomly select the noise fuzzy value noise from any probability distribution with a mean of 0 i ∈χ, calculate the private data data i The differential fuzzy value dp_data i :

[0065] dp_data i =data i +noise i

[0066] The data cube includes a plurality of data cubes, and when the number of the data cubes is greater than a preset threshold, the mean value of all the noise fuzzy values ​​is zero.

[0067] S203. Encrypt the differential fuzzy value of the private data based on a quasi-homomorphic proxy re-encryption algorithm and the public key to obtain a fuzzy ciphertext.

[0068] The data party uses the encryption algorithm encrypt based on the homomorphic proxy re-encryption system and its own public key PK i Differential fuzzy value dp_data of the privacy data iEncrypt and obtain the encrypted fuzzy ciphertext:

[0069]

[0070] Among them, si and ri are encrypted random numbers, C i ' ,1 For private data i The first fuzzy ciphertext, C i ' ,2 For private data i The second fuzzy ciphertext, the privacy data data i The first fuzzy ciphertext and the privacy data data i The second fuzzy ciphertext constitutes the privacy data data i Fuzzy ciphertext.

[0071] The embodiment of the present invention also provides a system for realizing multi-party secure transaction of private data based on blockchain. Figure 3 is a schematic diagram of the structure of a system for implementing multi-party secure transactions of private data based on blockchain provided by an embodiment of the present invention. Figure 3 As shown, the system includes:

[0072] The original plaintext data acquisition module 100 is used to acquire original plaintext data, where the original plaintext data includes type data and privacy data.

[0073] The scenario where data users and data parties realize the secure transaction of private data can be a used car acquisition scenario, where the car owner is the data party and the acquirer is the data user. Before acquiring a certain type of vehicle, the acquirer needs to obtain the data of that type of vehicle, such as the average mileage data and insurance data of that type of vehicle;

[0074] Before the data party registers his identity, the genesis block module 200 executes the parameter initialization algorithm SetUp, generates the system public parameters pp=(n, G, G1, e, g, h, q1, q2), and writes them into the genesis block as "partial transaction data".

[0075] The meaning of each parameter in the public parameters is: "q1, q2: large prime numbers; n = q1 × q2: modulus; G: GF over finite field p Elliptic curve; G1: finite field ( n-order subgroup on G); e: bilinear mapping function; g: generator of G; h: generator of q1-order subgroup of G;

[0076] Get the data party's request to call the blockchain platform digital identity registration interface, based on the identity information entered by the data party, for example, when the data party is the car owner, the identity information is the ID card number, complete the registration of its on-chain digital identity DID. Each data party has a corresponding DID document and is stored in the block.

[0077] In the used car acquisition scenario, the privacy data may be vehicle mileage data, vehicle insurance claim data, etc., and the privacy data has homomorphic properties.

[0078] A type hash value and fuzzy ciphertext acquisition module 200 is used to calculate the type hash value of the type data based on a hash algorithm, fuzzify and encrypt the private data to generate encrypted fuzzy ciphertext, and write the encrypted fuzzy ciphertext into a block document;

[0079] The privacy data of different data parties correspond to different types. The data party calculates the hash value HASH of its own type data based on the hash algorithm. i , and as "publicly shareable data", write it into the DID document of the corresponding block, recorded as DIDocument i _HASH i .

[0080] The data party performs fuzzy calculation on the private data based on the differential privacy algorithm to obtain a differential fuzzy value; encrypts the differential value based on the homomorphic proxy re-encryption algorithm to obtain an encrypted fuzzy ciphertext C i ′, and write it into the DID document of the corresponding block as “privacy attribute data”, DIDocument i _C i ′.

[0081] The transaction request receiving module 300 is used to obtain a transaction request issued by a data user, wherein the transaction request includes a target type hash value and a temporary public key of the data user;

[0082] The data user sends a data transaction request to the data party, which includes a target type hash value and a temporary public key. Different data parties have different types of privacy data, and the hash value of the type required by the user is the target type hash value. The data user generates a temporary private key sk0=x0 and a temporary public key based on the system public parameters.

[0083] In the used car acquisition scenario, the target type hash value may be the vehicle type data hash value required by the acquirer.

[0084] A hash value determination module 400 is used to determine whether the type hash value is the target type hash value;

[0085] The data party determines whether its type hash value is the target type hash value in the request;

[0086] In the used car acquisition scenario, the car owner determines whether the type of his vehicle is the type of vehicle required by the acquirer.

[0087] A re-encryption key acquisition module 500, configured to calculate a re-encryption key based on a pre-generated private key and a temporary public key of the data user if the type hash value is the target type hash value;

[0088] If the data party's type hash value is the target type hash value in the request, the data party is the target data party;

[0089] Call the smart contract data filtering interface SC.filter, based on the target type hash value HASH described in the block transaction published by the queried data user U B , according to formula (1), determine whether it is the target data

[0090] DIDocument i _HASH i ==HASH B (1)

[0091] Let's assume that the target data is quaO j∈[m] , the corresponding digital identity is recorded as did j .

[0092] The target data party uses the pre-generated private key SK i Calculate the re-encryption key using the temporary public key pk0 in the request The pre-generated private key SK i Generated by the data party according to the system public parameter pp.

[0093] The target data party writes the re-encryption key as a "temporary publicly shareable data asset" into its own DID document, recorded as DIDocument i _rk i .

[0094] The fuzzy re-encrypted text acquisition module 600 is used to use the re-encryption key to encrypt the encrypted fuzzy ciphertext to obtain the re-encrypted ciphertext, and write the re-encrypted ciphertext into the block document so that the data user can jointly calculate and decrypt all the re-encrypted ciphertexts to obtain the joint calculation result.

[0095] The target data party calls the smart contract re-encryption interface SC.partDec, based on the temporary re-encryption key didocument under the DID document j _rk jThe encrypted obfuscated ciphertext didocument j _C′ j Encrypt again to get the corresponding fuzzy re-encrypted text:

[0096] C″ j :(α,β)=(e(rk j ,C′ i,1 ),C′ i,2 ).

[0097] Among them, α is the privacy data i The first fuzzy re-encrypted text, β is the privacy data data i The second fuzzy re-encrypted text, the private data data i The first fuzzy re-encrypted text and the private data data i The second fuzzy re-encrypted text constitutes the private data data i Fuzzy redaction.

[0098] The target data party writes the re-encrypted ciphertext into its own block document for the data user to decrypt and jointly calculate to obtain the joint calculation result. The target data party includes multiple data parties, and the multiple data parties write the obtained re-encrypted ciphertext into their own block documents.

[0099] The data user uses the partial decryption algorithm Part_decrypt and the temporary private key sk0 to decrypt the fuzzy re-encrypted text C″ in all the target data party’s documents. j Decrypt and obtain the partial decrypted ciphertext of each target data party:

[0100] The data user jointly calculates all the partial decrypted ciphertexts C based on the additive homomorphic algorithm He_compute j Get the homomorphic aggregate ciphertext: C:

[0101] The data user decrypts the homomorphic aggregate ciphertext C again based on the homomorphic decryption algorithm He_decrypt and the queried genesis block data pp:

[0102] The data user then calculates the required "fuzzy joint calculation value of the privacy data of all target data parties" based on Plloard's lambda algorithm:

[0103]

[0104] The data user calculates the average value based on the fuzzy joint calculation value of the privacy data of all the target data parties to obtain the joint calculation result of the privacy data of all the target data parties.

[0105] Because, all the target data have a hidden data noise fuzzy value noise. j Randomly sample from a probability distribution χ with mean 0.

[0106] so,

[0107] Furthermore, all target data j∈[m] The average value of privacy data corresponding to the target type is:

[0108]

[0109] In the used car acquisition scenario, data user U obtains the average mileage AvgDistance of the required car brand B.

[0110] Figure 4 is a schematic diagram of the structure of the type hash value and fuzzy ciphertext acquisition module provided by an embodiment of the present invention, such as Figure 4 As shown, the type hash value and fuzzy ciphertext acquisition module 200 includes:

[0111] The system parameter acquisition unit 2001 is used to acquire the system parameters generated by the genesis block, and generate a public key and a private key according to the system parameters;

[0112] Based on the queried public parameter pp, a private key SK is generated i =x i , public key Where Z = e(g,g).

[0113] The privacy data differential fuzzy value acquisition unit 2002 is used to randomly select a corresponding noise fuzzy value from any probability distribution with a mean of zero based on a differential privacy algorithm, and calculate the sum of the privacy data and the noise fuzzy value to obtain the privacy data differential fuzzy value;

[0114] The probability distribution with a mean of zero can be a symmetrical uniform distribution, a standard normal distribution, etc. i∈[n] , based on the differential privacy algorithm, randomly select the noise fuzzy value noise from any probability distribution with a mean of 0 i ∈χ, calculate the private data data i The differential fuzzy value dp_data i :

[0115] dp_data i =data i+noise i

[0116] The data cube includes a plurality of data cubes, and when the number of the data cubes is greater than a preset threshold, the mean value of all the noise fuzzy values ​​is zero.

[0117] The fuzzy ciphertext obtaining unit 2003 is used to encrypt the differential fuzzy value of the private data based on a quasi-homomorphic proxy re-encryption algorithm and the public key to obtain the fuzzy ciphertext.

[0118] The data party uses the encryption algorithm encrypt based on the homomorphic proxy re-encryption system and its own public key PK i Differential fuzzy value dp_data of the privacy data i Encrypt and obtain the encrypted fuzzy ciphertext:

[0119]

[0120] Among them, si and ri are encrypted random numbers, C i ' ,1 For private data i The first fuzzy ciphertext, C i ' ,2 For private data i The second fuzzy ciphertext, the privacy data data i The first fuzzy ciphertext and the privacy data data i The second fuzzy ciphertext constitutes the privacy data data i Fuzzy ciphertext.

[0121] An embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the method for realizing multi-party secure transactions of private data based on blockchain is implemented.

[0122] The above-mentioned software is stored in the above-mentioned storage medium, which includes but is not limited to: a CD, a floppy disk, a hard disk, an erasable memory, etc.

[0123] The above technical solution has the following beneficial effects: differential privacy and quasi-homomorphic proxy re-encryption are optimized and combined to encrypt private data. On the one hand, after being encrypted, private data can only be accessed by the data party, so that the ownership and control of the private data truly belong to the data party, that is, the car owner, rather than the car company, which to a certain extent alleviates the problem of centralized institutions selling user data without permission; on the other hand, while protecting the data privacy of the data party, the encrypted and obfuscated private data are jointly calculated to obtain the joint calculation value of the private data, which makes full use of the data value and helps to more reasonably guide the data users to use the data, such as the formulation of the purchase price of used cars.

[0124] The specific implementation methods of the above invention further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above content is only the specific implementation methods of the present invention and is not intended to limit the protection scope of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for realizing multi-party secure transactions of private data based on blockchain. It is characterized in that include: Acquire original plaintext data, where the original plaintext data includes type data and privacy data; Calculate the type hash value of the type data based on the hash algorithm, blur and encrypt the private data to generate encrypted blur ciphertext, and write the encrypted blur ciphertext into the block document; Obtaining a transaction request issued by a data user, wherein the transaction request includes a target type hash value and a temporary public key of the data user; Determine whether the type hash value is the target type hash value; If the type hash value is the target type hash value, a re-encryption key is calculated based on a pre-generated private key and a temporary public key of the data user; the data party corresponding to the target type hash value is the target data party; Using the re-encryption key to encrypt the encrypted obfuscated ciphertext to obtain a re-encrypted ciphertext, and writing the re-encrypted ciphertext into the block document, so that the data user can perform joint calculation and decryption on all the re-encrypted ciphertexts to obtain a joint calculation result; The data user performs joint calculation and decryption on all the re-encrypted ciphertexts to obtain a joint calculation result, including: the data user decrypts the re-encrypted ciphertext of each target data party based on the partial decryption algorithm Part_decrypt and the temporary private key to obtain the partial decrypted ciphertext of each target data party; the data user jointly calculates the partial decrypted ciphertext of all target data parties based on the additive homomorphic algorithm to obtain the homomorphic aggregate ciphertext; the data user decrypts the homomorphic aggregate ciphertext based on the homomorphic decryption algorithm and the genesis block, and obtains the fuzzy joint calculation value of the privacy data of all target data parties based on the lambda algorithm of Plloard; the data user averages the fuzzy joint calculation values ​​of the privacy data of all target data parties to obtain the joint calculation result of the privacy data of all target data parties; The blurring and encrypting the private data to generate encrypted blur ciphertext includes: Obtaining system parameters, and generating a public key and a private key according to the system parameters; the system parameters are generated by the genesis block and stored in the genesis block; Based on the differential privacy algorithm, randomly select a corresponding noise fuzzy value from any probability distribution with a mean of zero, and calculate the sum of the private data and the noise fuzzy value to obtain a differential fuzzy value of the private data; The differential fuzzy value of the private data is encrypted based on a quasi-homomorphic proxy re-encryption algorithm and the public key to obtain an encrypted fuzzy ciphertext.

2. According to the method for realizing multi-party secure transaction of private data based on blockchain according to claim 1, It is characterized in that Before obtaining the original plaintext data, the following steps are included: Get the request and identity information to call the blockchain platform digital identity registration interface to complete the identity registration.

3. According to the method for realizing multi-party secure transaction of private data based on blockchain according to claim 1, It is characterized in that The determining whether the type hash value is the target type hash value comprises: The smart contract data filtering interface is called to determine whether the type hash value is the target type hash value.

4. According to claim 1, the method for realizing multi-party secure transaction of private data based on blockchain, It is characterized in that The step of using the re-encryption key to encrypt the encrypted fuzzy ciphertext to obtain the re-encrypted ciphertext comprises: The smart contract re-encryption interface is called to use the re-encryption key to encrypt the encrypted obfuscated ciphertext to obtain the re-encrypted ciphertext.

5. A system for realizing multi-party secure transactions of private data based on blockchain. It is characterized in that The system comprises: An original plaintext data acquisition module, used to acquire original plaintext data, wherein the original plaintext data includes type data and privacy data; A type hash value and fuzzy ciphertext acquisition module, used to calculate the type hash value of the type data based on the hash algorithm, blur and encrypt the private data to generate encrypted fuzzy ciphertext, and write the encrypted fuzzy ciphertext into the block document; A transaction request receiving module, used to obtain a transaction request issued by a data user, wherein the transaction request includes a target type hash value and a temporary public key of the data user; A hash value determination module, used to determine whether the type hash value is the target type hash value; A re-encryption key acquisition module, used for calculating the re-encryption key according to the pre-generated private key and the temporary public key of the data user if the type hash value is the target type hash value; the data party corresponding to the target type hash value is the target data party; A fuzzy re-encrypted text acquisition module, used to use the re-encryption key to encrypt the encrypted fuzzy ciphertext to obtain a re-encrypted ciphertext, and write the re-encrypted ciphertext into the block document, so that the data user can perform joint calculation and decryption on all the re-encrypted ciphertexts to obtain a joint calculation result; The data user performs joint calculation and decryption on all the re-encrypted ciphertexts to obtain a joint calculation result, including: the data user decrypts the re-encrypted ciphertext of each target data party based on the partial decryption algorithm Part_decrypt and the temporary private key to obtain the partial decrypted ciphertext of each target data party; the data user jointly calculates the partial decrypted ciphertext of all target data parties based on the additive homomorphic algorithm to obtain the homomorphic aggregate ciphertext; the data user decrypts the homomorphic aggregate ciphertext based on the homomorphic decryption algorithm and the genesis block, and obtains the fuzzy joint calculation value of the privacy data of all target data parties based on the lambda algorithm of Plloard; the data user averages the fuzzy joint calculation values ​​of the privacy data of all target data parties to obtain the joint calculation result of the privacy data of all target data parties; The type hash value and fuzzy ciphertext acquisition module includes: A system parameter acquisition unit, used to acquire the system parameters generated by the genesis block, and generate a public key and a private key according to the system parameters; A privacy data differential fuzzy value acquisition unit, configured to randomly select a corresponding noise fuzzy value from any probability distribution with a mean of zero based on a differential privacy algorithm, and calculate the sum of the privacy data and the noise fuzzy value to obtain a privacy data differential fuzzy value; The fuzzy ciphertext acquisition unit is used to encrypt the differential fuzzy value of the private data based on a quasi-homomorphic proxy re-encryption algorithm and the public key to obtain the fuzzy ciphertext.

6. The system for realizing multi-party secure transactions of private data based on blockchain according to claim 5, It is characterized in that Also includes: The blockchain platform digital identity registration module is used to obtain the request and identity information for calling the blockchain platform digital identity registration interface to complete identity registration.

7. The system for realizing multi-party secure transactions of private data based on blockchain according to claim 5, It is characterized in that The hash value determination module comprises: A smart contract data filtering interface calling unit is used to call the smart contract data filtering interface to determine whether the type hash value is the target type hash value.

8. The system for realizing multi-party secure transactions of private data based on blockchain according to claim 5, It is characterized in that The fuzzy re-encrypted text acquisition module includes: The smart contract re-encryption interface calling unit is used to call the smart contract re-encryption interface to use the re-encryption key to encrypt the encrypted fuzzy ciphertext to obtain the re-encrypted ciphertext.