Blockchain privacy query method and system based on inadvertent transmission technology
By employing multiple encryption and obfuscation processes using inadvertent transmission technology on the blockchain, the problem of unprotected user privacy in blockchain queries is solved, thus achieving privacy protection for data queries.
Patent Information
- Application Number
- CN202111623621.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-28
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2041-12-28
AI Technical Summary
During blockchain queries, user privacy cannot be effectively protected, and third parties can obtain user query records, leading to the risk of personal data leakage and price discrimination based on big data.
A blockchain privacy query method based on inadvertent transmission technology is adopted, which includes multiple encryption, obfuscation and negotiation processes on both the user end and the blockchain end to ensure the privacy of data transmission.
Through multiple encryption and obfuscation processes, the privacy of data queryers is protected, preventing data leaks and price discrimination based on big data.
Smart Images

Figure CN114462075B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of blockchains, and in particular to a blockchain privacy query method and system based on an inadvertent transmission technology. BACKGROUND
[0002] At present, blockchain queries are mostly in plaintext, and details of data calls are registered in the blockchain, without privacy protection for the querying party. Third parties can query transactions on the chain and obtain details of the query through smart contract description files. For example, an e-commerce customer queries product information on the chain, and a third party can obtain the customer's query record on the chain and analyze the record to determine user behavior characteristics, which may cause user personal data leakage risks or big data killing familiar people. SUMMARY
[0003] The present application aims to overcome the shortcomings of the prior art and proposes a blockchain privacy query method based on inadvertent transmission, which realizes privacy query on the blockchain and effectively protects the privacy of data querying parties.
[0004] The purpose of the present application is achieved by the following technical solution: a blockchain privacy query method based on an inadvertent transmission technology, comprising the following steps:
[0005] (1) the user end encrypts the query record and transmits it to the blockchain end, and the blockchain end encrypts the full record and transmits it to the user end;
[0006] (2) the user end and the blockchain end respectively encrypt the encryption results of the other party twice; the blockchain end transmits the twice-encrypted result to the user end; and the user end performs an intersection operation on the two twice-encrypted results;
[0007] (3) the user end obfuscates the intersection result in step (2) and transmits the obfuscated result to the blockchain end;
[0008] (4) the blockchain end queries the obfuscated result to obtain a plaintext result, encrypts the plaintext result using the agreed key, and transmits it to the user end, and the user end decrypts the result using the agreed key.
[0009] Further, in step (1), specifically:
[0010] (1.1) there are full data on the blockchain, denoted as a; the user needs to query part of the data, and the records to be queried form a set u, the elements in the set u being query target ids; the user end uses its own key to symmetrically encrypt the target id set u, and the encryption result is ENC(u);
[0011] (1.2) The blockchain end uses the blockchain key to symmetrically encrypt the full amount id, and the encryption result is ENC(a);
[0012] (1.3) The user end transmits its own encryption result ENC(u) to the blockchain end, and the blockchain end transmits its own encryption result ENC(a) to the user end.
[0013] Further, in step (2), specifically:
[0014] (2.1) The user end uses the same key in step (1.1) to symmetrically encrypt the encryption result ENC(a) of the blockchain end twice, and the result is recorded as EENC(a);
[0015] (2.2) The blockchain end uses the same key in step (1.2) to symmetrically encrypt the encryption result ENC(u) of the user end twice, and the result is recorded as EENC(u);
[0016] (2.3) The blockchain end sends the twice-encrypted result EENC(u) to the user end, and the user end performs intersection on EENC(u) and EENC(a); the intersection result is recorded as EENC(j);
[0017] Further, in step (3), specifically: the user end performs confusion on EENC(j), and the confusion method is to randomly select n records in EENC(a) based on a given encryption strength s, where n = |EENC(j)|, and repeat s times, and send all s+1 doubly-encrypted query target id sets to the blockchain end.
[0018] Further, in step (4), specifically:
[0019] (4.1) The blockchain end queries the s+1 results, and the plaintext result is recorded as m i , i ∈ (1, s+1);
[0020] (4.2) The user end generates large prime numbers g, h, and sends g, h, y = g r h α to the blockchain end as the negotiated completed key, r is a random number, and α is the position of EENC(j) in the confused data, α ∈ (1, s+1);
[0021] (4.3) The blockchain end uses the negotiated completed key to encrypt the plaintext result: k i is a random number; and transmits the encryption result to the user end;
[0022] (4.4) The user end records the obtained encryption result as c i = (a, b), and calculates each item only when i = a, The user end obtains the decrypted plaintext result.
[0023] The application also provides a blockchain privacy query system based on the inadvertent transmission technology, which comprises a first encryption module, a second encryption module, a confusion module and a query module.
[0024] The first encryption module is used for the user end to encrypt the query record and the blockchain end to encrypt the full-amount record, and the user end and the blockchain end transmit the encrypted results to each other.
[0025] The second encryption module is used for the user end and the blockchain end to respectively perform secondary encryption on the encrypted results of each other; meanwhile, the blockchain end transmits the secondary encrypted result to the user end.
[0026] The confusion module is used for the user end to perform intersection on the two secondary encrypted results and transmit the intersection result to the blockchain end after confusion.
[0027] The query module is used for the blockchain end to query the confused result to obtain the plaintext result, and the blockchain uses the negotiated key to encrypt the plaintext result and transmit it to the user end, and the user end uses the negotiated key to decrypt.
[0028] Further, the implementation process of the first encryption module is that there is full-amount data on the blockchain, denoted as a; the user needs to query part of the data, and the record to be queried constitutes a set u, the elements in the set u are query target ids, the user end uses its own key to perform symmetric encryption on the target id set u, and the encrypted result is ENC(u); the blockchain end uses the blockchain key to perform symmetric encryption on the full-amount id, and the encrypted result is ENC(a).
[0029] Further, the implementation process of the second encryption module is that the user end uses the same key in the first encryption module to perform secondary symmetric encryption on the encrypted result ENC(a) of the blockchain end, and the result is denoted as EENC(a); the blockchain end uses the same key in the first encryption module to perform secondary symmetric encryption on the encrypted result ENC(u) of the user end, and the result is denoted as EENC(u).
[0030] Further, the implementation process of the confusion module is that the user end performs intersection on EENC(u) and EENC(a), and the intersection result is denoted as EENC(j); the user end confuses EENC(j) in the confusion mode of randomly selecting n records in EENC(a) based on a given encryption strength s, wherein n = |EENC(j)|, and the operation is repeated s times, and all s+1 double-encrypted query target id sets are sent to the blockchain end.
[0031] Furthermore, the implementation process of the query module is as follows: the blockchain terminal queries s+1 results, and the plaintext result is recorded as m. i , i∈(1, s+1); The user generates large prime numbers g and h, and sets g, h, y=g r h α The negotiated key is sent to the blockchain, where r is a random number and α is the position of EENC(j) in the obfuscated data, α∈(1, s+1). The blockchain uses the negotiated key to encrypt the plaintext result. k i The result is a random number; the encrypted result is transmitted to the user terminal; the user terminal records the obtained encrypted result as c. i = (a, b), calculate each term Only when i = α, The user receives the decrypted plaintext result.
[0032] The beneficial effects of this invention are as follows: By applying this invention, the data owner cannot know the specific information of the data query, thus effectively protecting the privacy of the data query party. The data owner cannot obtain user behavior information, preventing the currently widespread risks of user personal data leakage and price discrimination based on big data. Attached Figure Description
[0033] Figure 1 A schematic diagram of the process of this invention.
[0034] Figure 2 This is a system block diagram of the present invention. Detailed Implementation
[0035] The specific embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
[0036] Firstly, such as Figure 1 As shown, the present invention provides a blockchain privacy query method based on inadvertent transmission technology, which includes the following steps:
[0037] (1) The user needs to query one or more records, and the target set is u;
[0038] (2) The blockchain contains a complete record;
[0039] (3) The user terminal uses its own key to perform symmetric encryption on the target id set u, and the encryption result is ENC(u);
[0040] (4) The blockchain side uses the blockchain key to perform symmetric encryption on all IDs, and the encryption result is ENC(a);
[0041] (5) The blockchain end and the user end exchange their respective encryption results; the user end transmits its own encryption result ENC(u) to the blockchain end, and the blockchain end transmits its own encryption result ENC(a) to the user end.
[0042] (6) The user terminal uses its own key from step 3 to perform a second symmetric encryption on the encryption result ENC(a) on the blockchain terminal, and the result is denoted as EENC(a);
[0043] (7) The blockchain side uses the blockchain key in step 4 to perform a second symmetric encryption on the encryption result ENC(u) of the user side, and the result is denoted as EENC(u).
[0044] (8) The blockchain sends the secondary encryption result EENC(u) to the user terminal, and the user terminal performs an intersection calculation on EENC(u) and EENC(a). The intersection result is denoted as EENC(i);
[0045] (9) Generate large prime numbers g and h on the user side, and set g, h, y = g r h α Send to the blockchain, where r is a random number and α is the record index value that the user needs to obtain;
[0046] (10) The user end obfuscates EENC(i) by randomly selecting n records in ENC(a) based on the given encryption strength s, where n = |EENC(i)|, repeating the process s times, and sending all s+1 sets of double-encrypted user IDs to the blockchain end.
[0047] (11) The blockchain queries s+1 results, and the plaintext result is denoted as m. i , i∈(1, s+1), and encrypt the result using the negotiated key. k i It is a random number;
[0048] (12) User terminal obtains results c i = (a, b), calculate each term Only when i = α, The user can obtain the plaintext result.
[0049] On the other hand, such as Figure 2 As shown, the present invention also provides a blockchain privacy query system based on unintended transmission technology, which includes an initial encryption module, a secondary encryption module, an obfuscation module, and a query module;
[0050] The first encryption module is used for encrypting the query record by the user end and encrypting the full-amount record by the blockchain end, and the user end and the blockchain end transmit the encrypted results to each other; the implementation process of the first encryption module is that there is full-amount data on the blockchain, denoted as a; the user needs to query part of the data, and the record to be queried constitutes a set u, the elements in the set u are query target ids, the user end uses its own key to symmetrically encrypt the target id set u, and the encryption result is ENC(u); the blockchain end uses the blockchain key to symmetrically encrypt the full-amount id, and the encryption result is ENC(a).
[0051] The second encryption module is used for the user end and the blockchain end to respectively perform second encryption on the encryption result of the other party; meanwhile, the blockchain end transmits the second encryption result to the user end; the implementation process of the second encryption module is that the user end uses the same key in the first encryption module to perform second symmetric encryption on the encryption result ENC(a) of the blockchain end, and the result is denoted as EENC(a); the blockchain end uses the same key in the first encryption module to perform second symmetric encryption on the encryption result ENC(u) of the user end, and the result is denoted as EENC(u).
[0052] The confusion module is used for the user end to perform intersection on the two second encryption results and to perform confusion on the intersection result and transmit the result to the blockchain end; the implementation process of the confusion module is that the user end performs intersection on EENC(u) and EENC(a), and the intersection result is denoted as EENC(j); the user end performs confusion on EENC(j), and the confusion manner is to randomly select n records in EENC(a) based on a given encryption strength s, wherein n = |EENC(j)|, and the selection is repeated s times, and all s+1 doubly encrypted query target id sets are sent to the blockchain end.
[0053] The query module is used for the blockchain end to query the confusion result and obtain the plaintext result, the blockchain uses the negotiated key to encrypt the plaintext result and transmit the result to the user end, and the user end decrypts the result with the negotiated key. The implementation process of the query module is that the blockchain end queries the s+1 results, and the plaintext result is denoted as m i , i∈(1, s+1); the user end generates large prime numbers g and h, and sends g, h and y = g r h α to the blockchain end as the negotiated key, r is a random number, and a is the position of EENC(j) in the confusion data, a∈(1, s+1); the blockchain end uses the negotiated key to encrypt the plaintext result: k i is a random number; the encryption result is transmitted to the user end; the user end records the obtained encryption result as c i = (a, b), and calculates each item Only when i = a, The user terminal obtains the decrypted plaintext result.
[0054] Embodiment:
[0055] (1) Assuming that there is a full amount record on the blockchain, as shown in the following table:
[0056] id Value 1 1 2 2 3 3 4 4 5 5
[0057] Then the full amount id set a = {1, 2, 3, 4, 5}
[0058] (2) The user needs to query the record of id = 1, and the target set is u = {1};
[0059] (3) The user terminal encrypts the target id set u, and assumes that the encryption method is f(x) = 6x, and the encryption result is ENC(u) = {6};
[0060] (4) The blockchain terminal encrypts the full amount id set a, and the encryption method is f(x) = 7x, and the encryption result is ENC(a) = {7, 14, 21, 28, 35};
[0061] (5) The blockchain terminal and the user terminal exchange their respective encryption results; the user terminal transmits its own encryption result ENC(u) to the blockchain terminal, and the blockchain terminal transmits its own encryption result ENC(a) to the user terminal;
[0062] (6) The user terminal uses the key in step 3 to perform secondary symmetric encryption on the encryption result ENC(a) of the blockchain terminal, and the result is recorded as EENC(a) = {42, 84, 126, 168, 210};
[0063] (7) The blockchain terminal uses the blockchain key in step 4 to perform secondary symmetric encryption on the encryption result ENC(u) of the user terminal, and the result is recorded as EENC(u) = {42};
[0064] (8) The blockchain terminal sends the secondary encryption result EENC(u) to the user terminal, and the user terminal performs intersection on EENC(u) and EENC(a). The intersection result is recorded as EENC(i) = {42};
[0065] (9) The user terminal generates a large prime number g = 97, h = 89, and sends g, h, y = g r h α = 8633 to the blockchain terminal, r = 1 is a random number, and a = 1 is the record index value required by the user;
[0066] (10) The user end obfuscates EENC(i) by randomly selecting n records from ENC(a) based on a given encryption strength s=3, where n|EENC(i)|=1. This process is repeated s=3 times. All sets of double-encrypted user IDs (s+1=4) are then sent to the blockchain. The sets sent are {7}, {21}, {14}, and {28}.
[0067] (11) The blockchain queries the s+1=4 results, and the plaintext result is denoted as m. i Let i ∈ (1, s+1), m1 = 1, m2 = 3, m3 = 2, m4 = 4, and encrypt the result using the negotiated key. k i It is a random number;
[0068] (12) m1=1,k i =1,
[0069] m2 = 3, k2 = 1
[0070] (13) The user terminal obtains the result c1 = (97, 97), and calculates... The plaintext result is obtained.
[0071] The result obtained is At that time, calculate Unable to obtain plaintext results.
[0072] Users can only access the target set in (2).
[0073] The above embodiments are used to explain and illustrate the present invention, but not to limit the present invention. Any modifications and changes made to the present invention within the spirit and scope of the claims shall fall within the protection scope of the present invention.
Claims
1. A blockchain privacy query method based on an inadvertent transmission technology, characterized in that, The method comprises the following steps: (1) the user end encrypts the query record and transmits it to the blockchain end, and the blockchain end encrypts the full record and transmits it to the user end; specifically: (1.1) there are full data on the blockchain, denoted as a; the user needs to query part of the data, and the records to be queried constitute a set u, the elements in the set u are query target ids, and the user end uses its own key to symmetrically encrypt the target id set u, and the encryption result is ENC(u); (1.2) the blockchain end uses the blockchain key to symmetrically encrypt the full id, and the encryption result is ENC(a); (1.3) the user end transmits its encryption result ENC(u) to the blockchain end, and the blockchain end transmits its encryption result ENC(a) to the user end; (2) the user end and the blockchain end respectively encrypt the encryption result of the other party twice; the blockchain end transmits the twice-encrypted result to the user end; the user end intersects the two twice-encrypted results; specifically: (2.1) the user end uses the same key in step (1.1) to twice-symmetrically encrypt the encryption result ENC(a) of the blockchain end, and the result is denoted as EENC(a); (2.2) the blockchain end uses the same key in step (1.2) to twice-symmetrically encrypt the encryption result ENC(u) of the user end, and the result is denoted as EENC(u); (2.3) the blockchain end sends the twice-encrypted result EENC(u) to the user end, and the user end intersects EENC(u) and EENC(a); the intersection result is denoted as EENC(j); (3) The user end obfuscates the intersection result in step (2) and transmits the obfuscated result to the blockchain end; specifically, the user end obfuscates EENC(j), and the obfuscation method is to randomly select n records in EENC(a) based on a given encryption strength s, where , repeat s times, and send all s+1 double-encrypted query target id sets to the blockchain end; (4) the blockchain end queries the obfuscated result to obtain the plaintext result, and uses the negotiated key to encrypt and transmit the plaintext result to the user end, and the user end decrypts with the negotiated key; specifically: (4.1) The blockchain end queries s+1 results, and the plaintext results are denoted as , ; (4.2) the user end generates large prime numbers g, h, and sends g, h to the blockchain end, constitutes the key of negotiation completion, sends to the blockchain end, r is a random number, the position in the obfuscated data, ; (4.3) The blockchain end uses the negotiated key to encrypt the plaintext result: , ; transmit the encrypted result to the user end; (4.4) The user end records the acquired encryption result as , calculates each item , only when , , the user end gets the decrypted plaintext result.
2. A blockchain privacy query system based on an inadvertent transmission technology for implementing the method of claim 1, characterized in that, The system comprises a first encryption module, a twice-encryption module, an obfuscation module and a query module; The first encryption module is used for the user end to encrypt the query record and the blockchain end to encrypt the full record, and the user end and the blockchain end transmit the encrypted results to each other; The twice-encryption module is used for the user end and the blockchain end to respectively encrypt the encryption result of the other party twice; meanwhile, the blockchain end transmits the twice-encrypted result to the user end; The obfuscation module is used for the user end to intersect the two twice-encrypted results, and to obfuscate the intersection result and transmit it to the blockchain end; The query module is used for the blockchain end to query the obfuscated result to obtain the plaintext result, and the blockchain uses the negotiated key to encrypt and transmit the plaintext result to the user end, and the user end decrypts with the negotiated key. 3.The blockchain privacy query system based on the passive transmission technology according to claim 2, characterized in that, The implementation process of the first encryption module is: there are full data on the blockchain, denoted as a; the user needs to query part of the data, and the records to be queried constitute a set u, the elements in the set u are query target ids, and the user end uses its own key to symmetrically encrypt the target id set u, and the encryption result is ENC(u); the blockchain end uses the blockchain key to symmetrically encrypt the full id, and the encryption result is ENC(a). 4.The blockchain privacy query system based on the passive transmission technology according to claim 3, characterized in that, The implementation process of the secondary encryption module is that the user end uses the same key in the first encryption module to perform secondary symmetric encryption on the encryption result ENC(a) of the blockchain end, and the result is recorded as EENC(a); the blockchain end uses the same key in the first encryption module to perform secondary symmetric encryption on the encryption result ENC(u) of the user end, and the result is recorded as EENC(u). 5.The blockchain privacy query system based on the passive transmission technology according to claim 4, characterized in that, The implementation process of the obfuscation module is: the user end intersects EENC(u) and EENC(a), and the intersection result is recorded as EENC(j); the user end obfuscates EENC(j), and the obfuscation mode is to randomly select n records in EENC(a) based on a given encryption strength s, wherein s times, and sends all s+1 double-encrypted query target id sets to the blockchain end.
6. The blockchain privacy query system based on the passive transmission technology according to claim 5, characterized in that, The implementation process of the query module is that the blockchain end queries s+1 results, and the plaintext results are denoted as , ; the user end generates large prime numbers g and h, and sends g and h, which constitute the negotiated key to the blockchain end, r is a random number, the position in the confusion data, ; The blockchain end uses the negotiated key to encrypt the plaintext result: , ; The encrypted result is transmitted to the user end; the user end records the obtained encrypted result as , calculates each item , only when , , the user end obtains the decrypted plaintext result.
Citation Information
Patent Citations
Hidden trace query method based on casual transmission protocol
CN113190584A
Consortium blockchain-based data transfer method and device
WO2020108019A1