Fuzzy Message Detection Method and System Based on Blockchain Platform and Historical Records

Through the fuzzy message detection method based on the blockchain platform and history records, the fuzzy detection key is generated using identity-based passwords and the history record method of Dodis verified random functions VRF and Schnorr signatures, solving the problem of high cost of public key cryptography and client forked record chain, and achieving efficient fuzzy message detection and ledger recovery.

CN115622711BActive Publication Date: 2025-07-08NANJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211225185.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-10
Publication Date
2025-07-08
Estimated Expiration
2042-10-10

AI Technical Summary

Technical Problem

In the existing fuzzy message detection methods, public key cryptography is costly and inefficient, and there is a problem of client forking record chains on the blockchain platform.

Method used

The fuzzy message detection method based on the blockchain platform and history records is adopted, and the fuzzy detection key is generated using identity-based passwords. Combined with the history recording method of Dodis that can verify the random function VRF and Schnorr signatures, quadruples are generated and verified to prevent the client from providing a forked record chain.

Benefits of technology

Reduces the cost of public key certificate management, improves detection efficiency, and restores the correct ledger when a fork occurs on the blockchain platform.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115622711B_ABST
    Figure CN115622711B_ABST
Patent Text Reader

Abstract

The present invention provides a fuzzy message detection method and system based on a blockchain platform and historical records. The method requests registration from the blockchain platform and the storage cloud respectively through the client. After successful verification by the blockchain platform and the storage cloud, the registration is completed. The client generates a quadruple using a historical record method based on the Dodis verifiable random function VRF and Schnorr signature, and adds the quadruple to the transaction, which is verified by the blockchain platform. The storage cloud stores data documents and the corresponding tag ciphertext CF generated using an identity-based off-line tag ciphertext generation method. Using an identity-based password generation method for fuzzy detection keys, the client obtains the target document. This method can protect the privacy of the client while reducing the cost of certificate management, improve the efficiency of fuzzy search, and add the function of historical records. It can help restore the correct ledger by providing the transaction history of the client.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method and system for fuzzy message detection based on a blockchain platform and historical records, belonging to the technical field of data detection. Background Art

[0002] Fuzzy Message Detection (FMD) is a new cryptographic primitive that allows a client to provide a fuzzy detection key to a storage cloud for fuzzy detection. In FMD, the tag ciphertext of each data document can be accurately detected by the client key or identified by a fuzzy detection key with a certain false positive rate. The client pre-sets the false positive rate and generates a fuzzy detection key according to the false positive rate. When the client sends the fuzzy detection key to the cloud, the detection work can be outsourced to an untrusted storage cloud. However, the untrusted storage cloud cannot distinguish between the correct result and the false positive result. That is, the storage cloud cannot determine which results are exact matches and which are incorrect matches, so they are used as "confused messages" to cover up the correct messages of the client.

[0003] The following problems exist in the existing fuzzy message detection methods:

[0004] 1) Most of the existing FMD schemes are implemented based on public key cryptography. These public key schemes require many public keys to generate a tag ciphertext, which brings huge costs to the management of public key certificates. In the existing methods, computationally expensive pairing operations are required, and the efficiency is low.

[0005] 2) In the currently implemented schemes based on the blockchain platform, there is a problem that the client provides a forked record chain. In this case, if the worst-case scenario occurs, such as an adversary occupying most of the nodes on the blockchain platform, it will be difficult to recover the correct ledger, which will cause irreparable damage to the ledgers stored in these nodes.

[0006] The above problems should be considered and solved in the process of fuzzy message detection based on the blockchain platform and historical records. Summary of the Invention

[0007] The purpose of the present invention is to provide a method and system for fuzzy message detection based on a blockchain platform and historical records to solve the problems of high certificate management cost and low efficiency in the existing technology.

[0008] The technical solution of the present invention is:

[0009] A method for fuzzy message detection based on a blockchain platform and historical records includes the following steps.

[0010] S1. The client requests registration from the blockchain platform and the storage cloud respectively. After successful verification by the blockchain platform and the storage cloud, the registration is completed.

[0011] S2. The client sends data storage requests to the blockchain platform and the storage cloud respectively. The client generates a quadruple using the historical record method based on the Dodis verifiable random function VRF and Schnorr signature, and adds the quadruple to the transaction. The blockchain platform verifies the transaction. After the blockchain platform verifies and passes, the blockchain platform writes the storage record and the hash value of the data document ER. The client sends the data document and the user's identity set to the storage cloud. After the storage cloud verifies and passes, the storage cloud stores the data document and stores the corresponding tag ciphertext CF generated using the identity-based off-line tag ciphertext generation method.

[0012] S3. Using the identity-based password generation method for fuzzy detection keys, the client requests detection from the storage cloud. The storage cloud retrieves the data document with a false positive rate. The client calculates the document hash value and compares it with the hash value of the data document ER saved by the blockchain platform to obtain the target document.

[0013] Further, in step S1, when the client requests registration from the blockchain platform and the storage cloud respectively, and after successful verification by the blockchain platform and the storage cloud, the registration is completed. Specifically,

[0014] S11. The client sends a request to the blockchain platform to register an account on the blockchain platform. After receiving the request, the blockchain platform sends a public-private key pair (S, s) to the client, where the random number field, g is the generator of the group G, S = g s ;

[0015] S12. The client receives the public-private key pair (S, s), then selects an initial random number c0 and calculates the commitment The client sends a transaction T p =(S, C0, Timestamp) to the blockchain platform, where S is the public key, C0 is the commitment generated for the initial random number c0, Timestamp is the timestamp of the current transaction, and signs the transaction T p to generate a Schnorr signature σ0 = c0 + s·T p ;

[0016] S13. The blockchain platform verifies the Schnorr signature σ0 of the transaction T p . If the equation holds, the verification passes, and the transaction T p is written to the blockchain platform.

[0017] S14. The client sends a registration request to the storage cloud. The storage cloud checks whether the blockchain platform is (S, C0). When the transaction T has been correctly written to the blockchain platform, the storage cloud will accept the client's registration request. p is written to the blockchain platform, the storage cloud will accept the client's registration request.

[0018] Furthermore, in step S2, the client sends data storage requests to the blockchain platform and the storage cloud respectively. The client generates a quadruple using the historical record method based on the Dodis verifiable random function VRF and Schnorr signature, and adds the quadruple to the transaction. The blockchain platform verifies the transaction. After the blockchain platform passes the verification, the blockchain platform writes the storage record and the hash value of the data document ER. The client sends the data document and the user's identity set Λ to the storage cloud. After the storage cloud passes the verification, the storage cloud stores the data document and stores the corresponding tag ciphertext CF generated using the identity-based offline tag ciphertext generation method. Specifically,

[0019] S21. The storage cloud generates an offline ciphertext C o ;

[0020] S22. Before storing the data document ER in the storage cloud, the client calculates the hash value of the data document ER as CER, and randomly selects γ identifiers for the data document ER to form the user's identity set Λ = {ID1,..., ID γ};

[0021] S23. The client uses the historical record method based on the Dodis verifiable random function VRF and Schnorr signature to generate a quadruple ω i = (σ i , C i , C i-1 , P s ), where σ i is the Schnorr signature generated by the record R i , the commitment C i generated by the current random number, the commitment C i-1 generated by the current random number, and P s is a zero-knowledge proof;

[0022] S24. The client sends a transaction T s = (S, Timestamp, Λ, CER) to the blockchain platform, where S is the public key, Λ is the user's identity set, and CER is the hash value of the data document ER, and adds the quadruple ω i to T s ; The published transaction passes through the quadruple ω iPerform the verification of the historical index and Schnorr signature. The verification is successful if and only if both the historical index and Schnorr signature verifications pass, and then transaction T s is written into the blockchain platform. Among them, the verification equation for the historical index is e(C i-1 S,P s ) = e(g,g) and the verification equation for the Schnorr signature is where e is a mapping relationship of groups G, G, and G T , g is the generator of group G, σ i is the Schnorr signature generated by record R i , C i-1 , C i are the commitments generated by the previous and current random numbers respectively, P s is the zero-knowledge proof, and S is the public key of the Schnorr signature and Dodis's VRF;

[0023] S25. The client sends the data document ER and the user's identity set Λ to the storage cloud;

[0024] S26. The storage cloud checks whether the blockchain platform is Λ; when transaction T s has been correctly written into the blockchain platform, the storage cloud will store the data document ER and store the corresponding tag ciphertext CF generated by using the identity-based offline tag ciphertext generation method.

[0025] Furthermore, in step S21, the storage cloud generates the offline ciphertext C o , specifically,

[0026] S211. Select a random number in the domain;

[0027] S212. Calculate the partial offline ciphertext where C 1i represents the first partial offline ciphertext generated by the identity identifier ID i , C 2i represents the second partial offline ciphertext generated by the identity identifier ID i , α i represents the random number selected by the identity identifier ID i , g1 is the mapping of the generator g of group G and g on group G T , y is the public parameter generated in the initialization stage, γ is the number of user identity identifiers, and i ∈ [γ];

[0028] S213. Output the offline ciphertext C o = {C o1 ,…,C oi ,…,Coγ}。

[0029] Further, in step S23, the client uses a historical record method based on the Dodis Verifiable Random Function (VRF) and Schnorr signature to generate a quadruple ω i =(σ i , C i , C i-1 , P s ), specifically as follows:

[0030] S231. The Private Key Generation Center (PKG) generates the parameters {G, G T , e: G×G→G T} of the bilinear group according to the input security parameter λ. The groups G and G T have a prime order p; select g as the generator of G; select random numbers s and c0 in the field, calculate S = g s , calculate g1 = e(g, g); generate the public key pk = (S, C0, g1) and the private key sk = (s, c0), where S is the public key of the Schnorr signature and Dodis's VRF, C0 is the commitment generated for the initial random number c0, g1 is the mapping of the generator g in group G and g in group G T , e is a mapping relationship among groups G, G, and G T , g is the generator of group G, s is the private key of the Schnorr signature and Dodis's VRF, and c0 is the initial random number of the signature;

[0031] S232. Generate a random number through the VRF proposed by Dodis, where i represents the index of the i-th record, and c i-1 is the previous random number, and s is the private key of the Schnorr signature and Dodis's VRF;

[0032] S233. Use the VRF proposed by Dodis to generate a zero-knowledge proof i for the random number c , where c i-1 is the previous random number, and s is the private key of the Schnorr signature and Dodis's VRF;

[0033] S234. Generate two commitments and

[0034] for the previous random number and the current random number; i S235. Use s as the private key and c i as the random number to generate a Schnorr signature σ i= c i + s·R i ;

[0035] S236. From the obtained zero - knowledge proof P s , two commitments C i , C i-1 and the Schnorr signature σ i , generate a quadruple ω i = (σ i , C i , C i-1 , P s ).

[0036] Furthermore, in step S26, the corresponding tag ciphertext CF generated by the identity - based off - line tag ciphertext generation method is specifically as follows

[0037] S261. For each identifier ID i ∈ the user's identity set Λ, calculate the corresponding ciphertext where C 3i represents the partial on - line ciphertext generated for the identity identifier ID i , CT i represents the second part of the on - line ciphertext generated for the identity identifier ID i , C 1i , C 2i are respectively the first part of the off - line ciphertext and the second part of the off - line ciphertext calculated in step S212, γ is the number of user identity identifiers, and i ∈ [γ];

[0038] S262. Obtain the set of ciphertexts, that is, the tag ciphertext CF = (C1,..., C i ,..., C γ ).

[0039] Furthermore, in step S3, using the identity - based password generation method for fuzzy detection keys, the client requests detection from the storage cloud. The storage cloud retrieves the data document with the false - positive rate, and the client calculates the document hash value and compares it with the document hash value saved by the blockchain platform to obtain the target document. Specifically

[0040] S31. The client selects the false - positive rate p = 1 / 2 n , and generates a detection key based on the identity where represents the detection key generated for the i - th identity identifier, n is the length of the selected detection key, and i ∈ [n]; The client sends the detection key dsk Λ to the storage cloud;

[0041] S32. The storage cloud utilizes the detection key dsk Λ to test each tag ciphertext of the test data document, output all the data documents with successful searches, and send them to the client;

[0042] S33. The client selects the correct document ER from the received data documents with a false positive rate p;

[0043] S34. The client searches for the storage record of the data document ER in the blockchain platform to obtain the hash value CER of the data document ER; the client calculates the document hash value CER of the data document ER ′ = h(ER), and checks whether the equation CER ′ = CER holds. If it holds, the client accepts the data document ER; otherwise, it does not accept it.

[0044] Furthermore, in step S31, the detection key is generated based on the identity Specifically,

[0045] S311. According to the input security parameter λ, the PKG generates the parameters of the bilinear group {G, G T , e: G×G → G T}, where the groups G and G T have a prime order p;

[0046] S312. Select g as the generator of G; select a random number x ∈ Z p in the Z p field, and calculate y = g x ; two encrypted hash functions and H: G T → {0,1};

[0047] S313. Obtain the master public key as mpk = (p, g, G, G T , e, H1, H, y), where G, G T , e are the bilinear group parameters, p is the prime order of the groups G and G T , g is the generator of G, H1, H are two repaired hash functions, y = g x , and the master secret key is msk = x;

[0048] S314. From the user's identity set Λ, the master public key mpk, the master secret key x, and the false positive rate p, obtain the user's identity private key sk ID : The user's identity set Λ = {ID1,..., ID γ}, the master public key mpk and the master secret key x. For each identifier ID i in the user's identity set Λ, calculate the corresponding identity private key where i ∈ [γ]; according to the false positive rate p = 1 / 2n , the user's identity private key obtained is where 0 < n ≤ γ.

[0049] Furthermore, in step S32, the storage cloud uses the detection key dsk Λ to test each tag ciphertext of the data document. Specifically,

[0050] S321: Using the detection key dsk Λ and a tag ciphertext CF as inputs, decrypt the tag ciphertext CF. Among them, the decryption formula is m represents the detection result, CT i represents the second part of the online ciphertext generated for the identity identifier ID i H is a hash function, e is a mapping relationship of groups G, G, and G T is the identity private key extracted from the identity identifier ID i , i ∈ [n];

[0051] S322: When the operation results in 1 n , the detection result is 1, indicating a successful search; otherwise, it fails and returns 0.

[0052] A system adopting the fuzzy message detection method based on the blockchain platform and historical records described in any one of the above, including a client, a blockchain platform, and a storage cloud,

[0053] Client: Send requests to the blockchain platform and the storage cloud respectively, including registration requests, data storage requests, and detection requests; use the historical record method based on the Dodis verifiable random function VRF and Schnorr signature to generate a quadruple, and add the quadruple to the transaction, and send the transaction to the blockchain platform for verification; use the identity-based password generation method for generating fuzzy detection keys, the client requests detection from the storage cloud, calculates the document hash value for the data document with a false positive rate received from the storage cloud, and obtains the target document after comparing it with the document hash value saved by the blockchain platform;

[0054] Blockchain platform: After verification according to the client registration request, complete the registration; verify the transaction sent by the client, and after verification passes, record the hash value of the data document and the historical record;

[0055] Storage cloud: After verification according to the client registration request, complete the registration; receive the data document sent by the client and the user's identity set for verification, and after verification passes, store the data document and store the corresponding tag ciphertext CF generated by using the identity-based offline tag ciphertext generation method; according to the client detection request, retrieve the data document with a false positive rate and send it to the client. ​

[0056] The beneficial effects of the present invention are as follows:

[0057] First, compared with the existing technologies, this method and system for fuzzy message detection based on a blockchain platform and historical records use identity-based cryptography to generate fuzzy detection keys. Different from the traditional solution based on public-key cryptography, it does not require a Public Key Infrastructure (PKI) and the "expensive" management cost of public-key certificates. On the other hand, by using an online / offline algorithm, no computationally expensive pairing operations are required in the online phase, greatly improving the efficiency of fuzzy message detection.

[0058] Second, this method and system for fuzzy message detection based on a blockchain platform and historical records index the records in ascending order, which can prevent clients from providing a fork record chain. Even in the worst-case scenario of the blockchain platform, such as when an adversary occupies most of the nodes in the blockchain platform and destroys the ledger stored in the nodes, each client can provide the transaction history to restore the correct ledger. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 is a schematic flowchart of the method for fuzzy message detection based on a blockchain platform and historical records according to an embodiment of the present invention;

[0060] Figure 2 is a schematic flowchart of the method for historical records based on Dodis verifiable random function VRF and Schnorr signature in the embodiment;

[0061] Figure 3 is a schematic flowchart of the method for generating fuzzy detection keys based on identity-based cryptography in the embodiment;

[0062] Figure 4 is a schematic illustration of the system for fuzzy message detection based on a blockchain platform and historical records in the embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0063] The preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0064] Embodiment

[0065] A method for fuzzy message detection based on a blockchain platform and historical records, as Figure 1 , includes the following steps:

[0066] S1. The client requests registration from the blockchain platform and the storage cloud respectively. After successful verification by the blockchain platform and the storage cloud, the registration is completed;

[0067] S11. The client sends a request to the blockchain platform to register an account on the blockchain platform. After receiving the request, the blockchain platform sends a public-private key pair (S, s) to the client, where the random number field, g is the generator of the group G, and S = g s ;

[0068] S12. The client receives the public-private key pair (S, s), then selects an initial random number c0 and calculates the commitment The client sends a transaction T p =(S, C0, Timestamp) to the blockchain platform, where S is the public key, C0 is the commitment generated for the initial random number c0, Timestamp is the timestamp of the current transaction, and generates a Schnorr signature σ0 = c0 + s·T for the transaction T p ; p ;

[0069] S13. The blockchain platform verifies the Schnorr signature σ0 of the transaction T p . If the equation holds, the verification passes, and the transaction T p is written to the blockchain platform;

[0070] S14. The client sends a registration request to the storage cloud. The storage cloud checks whether the blockchain platform is (S, C0). When the transaction T p has been correctly written to the blockchain platform, the storage cloud will accept the client's registration request.

[0071] S2. The client sends data storage requests to the blockchain platform and the storage cloud respectively. The client uses a historical record method based on the Dodis verifiable random function VRF and Schnorr signature to generate a quadruple, adds the quadruple to the transaction, and the blockchain platform verifies the transaction. After the verification by the blockchain platform passes, the blockchain platform writes the storage record and the hash value of the data document ER. The client sends the data document and the user's identity set to the storage cloud. After the verification by the storage cloud passes, the storage cloud stores the data document and stores the corresponding tag ciphertext CF generated by using the identity-based offline tag ciphertext generation method;

[0072] S21. The storage cloud generates an offline ciphertext C o ;

[0073] S211. Select a random number

[0074] S212. Calculate the partial offline ciphertext where C 1i represents the first part of the offline ciphertext generated for the identity identifier ID i generated, C2i Denoted as the identity ID i The generated second part of the offline ciphertext, α i Denoted as the identity ID i The selected random number, where g1 is the generator g in the group G and the mapping of g in the group G T On the mapping, y is the public parameter generated in the initialization phase, γ is the number of user identity identifiers, and i ∈ [γ];

[0075] S213. Output the offline ciphertext C o ={C o1 ,…,C oi ,…,C oγ}.

[0076] S22. Before the client stores the data document ER in the storage cloud, calculate the hash value of the data document ER as CER, and randomly select a set of identities Λ = {ID1,…,ID γ} of γ users for the data document ER;

[0077] S23. The client uses the historical record method based on the Dodis verifiable random function VRF and the Schnorr signature to generate a quadruple ω i =(σ i ,C i ,C i-1 ,P s ), where σ i is the Schnorr signature generated by the record R i , the commitment C i generated by the current random number, the commitment C i-1 generated by the current random number, and P s is a zero-knowledge proof; such as Figure 2 :[[]]

[0078] S231. The key generation center PKG generates the parameters {G, G T , e:G×G→G T} of the bilinear group according to the input security parameter λ. The groups G and G T have prime order p; select g as the generator of G; in the field, select random numbers s, c0, calculate S = g s , calculate g1 = e(g, g); generate the public key pk = (S, C0, g1), and the private key sk = (s, c0), where S is the public key of the Schnorr signature and the Dodis VRF, C0 is the commitment generated for the initial random number c0, g1 is the mapping of the generator g in the group G and g in the group G T on, and e is the groups G, G, and G TA mapping relationship, where \(g\) is the generator of group \(G\), \(s\) is the private key of Schnorr signature and Dodis's VRF, and \(c_0\) is the initial random number of the signature;

[0079] S232. Generate a random number through the VRF proposed by Dodis where \(i\) represents the index of the \(i\)-th record, and \(c\) i-1 is the previous random number, and \(s\) is the private key of Schnorr signature and Dodis's VRF;

[0080] S233. Use the VRF proposed by Dodis to generate a zero-knowledge proof for the random number \(c\) i where \(c\) i-1 is the previous random number, and \(s\) is the private key of Schnorr signature and Dodis's VRF;

[0081] S234. Generate two commitments for the previous random number and the current random number and

[0082] S235. Using \(s\) as the private key and \(c\) i as the random number, generate a Schnorr signature \(\sigma\) for record \(R\) i i =\(c\) i +\(s\cdot R\) i ;

[0083] S236. From the obtained zero-knowledge proof \(P\) s , two commitments \(C\) i , \(C\) i-1 and Schnorr signature \(\sigma\) i , generate a quadruple \(\omega\) i =(\(\sigma\) i , \(C\) i , \(C\) i-1 , \(P\) s ).

[0084] In step S23, based on the historical record method of Dodis verifiable random function VRF and Schnorr signature, using Schnorr signature and Dodis's verifiable random function (VRF), first generate a new random function \(c\) through the VRF proposed by Dodis i , then use the VRF to generate a zero-knowledge proof \(P\) for the generated random number s , then generate two commitments \(C\) i , \(C\) i-1 for the previous random number and the current random number. Finally, using \(s\) as the key and \(c\) iis a random number, and R is a record i Generate a Schnorr signature σ i , and obtain a quadruple ω i =(σ i , C i , C i-1 , P s ).

[0085] S24. The client sends a transaction T s =(S, Timestamp, Λ, CER) to the blockchain platform, where S is the public key, Λ is the set of user identities, CER is the hash value of the data document ER, and add the quadruple ω i to T s ; The published transaction is verified for historical indexing and Schnorr signature through the quadruple ω i . Verification is successful if and only if both the historical indexing and Schnorr signature verifications pass, and the transaction T s is written to the blockchain platform. Among them, the verification equation for historical indexing is e(C i-1 S, P s ) = e(g, g) and The verification equation for the Schnorr signature is where e is a mapping relationship of groups G, G, and G T , g is the generator of group G, σ i is the Schnorr signature generated by the record R i , C i-1 , C i are the commitments generated by the previous and current random numbers respectively, P s is the zero-knowledge proof, and S is the public key of the Schnorr signature and Dodis's VRF;

[0086] S25. The client sends the data document ER and the set of user identities Λ to the storage cloud;

[0087] S26. The storage cloud checks whether the blockchain platform is Λ; when the transaction T s has been correctly written to the blockchain platform, the storage cloud will store the data document ER and store the corresponding tag ciphertext CF generated by the identity-based offline tag ciphertext generation method.

[0088] In step S26, the corresponding tag ciphertext CF generated by the identity-based offline tag ciphertext generation method is specifically, as Figure 3 :

[0089] S261. For each identifier ID i ∈ the set of user identities Λ, calculate the corresponding ciphertext Among them, C 3i represents the identity identifier ID i The generated partial online ciphertext, CT i represents the identity identifier ID i The generated second part of the online ciphertext, C 1i and C 2i are respectively the first part of the offline ciphertext and the second part of the offline ciphertext calculated in step S212, γ is the number of user identity identifiers, and i ∈ [γ];

[0090] S262. Obtain the set of ciphertexts, that is, the tag ciphertext CF = (C1,…, C i ,…, C γ ).

[0091] S3. Adopt the method of generating a fuzzy detection key based on identity. The client requests detection from the storage cloud. The storage cloud retrieves the data document with the false positive rate. The client calculates the document hash value and compares it with the hash value of the data document ER saved by the blockchain platform to obtain the target document.

[0092] S31. The client selects the false positive rate p = 1 / 2 n , and generates a detection key based on identity Among them, represents the detection key generated for the i-th identity identifier, n is the length of the selected detection key, and i ∈ [n]; The client sends the detection key dsk Λ to the storage cloud;

[0093] In step S31, generating a detection key based on identity Specifically,

[0094] S311. According to the input security parameter λ, the PKG generates the parameters of the bilinear group {G, G T , e: G×G → G T}, where the groups G and G T have prime order p;

[0095] S312. Select g as the generator of G; Select a random number x ∈ Z p in the Z p field, and calculate y = g x ; Two encrypted hash functions and H: G T → {0,1};

[0096] S313. Obtain the master public key as mpk = (p, g, G, G T , e, H1, H, y), where G, G T, e is the bilinear group parameter, p is the prime order of the groups G and G T , g is the generator of G, H1 and H are two repaired hash functions, y = g x , and the master secret key is msk = x;

[0097] S314. Obtain the user's identity private key sk from the user's identity set Λ, the master public key mpk, the master secret key x, and the false positive rate p ID : The user's identity set Λ = {ID1,…,ID γ}}, the master public key mpk and the master secret key x. For each identifier ID in the user's identity set Λ i calculate the corresponding identity private key where i ∈ [γ]; According to the false positive rate p = 1 / 2 n , the user's identity private key is obtained as where 0 < n ≤ γ.

[0098] S32. The storage cloud uses the detection key dsk Λ to test each tag ciphertext of the data document, and output all successfully searched data documents, and send them to the client;

[0099] In step S32, the storage cloud tests each tag ciphertext of the data document. Specifically,

[0100] S321. Use the detection key dsk Λ and a tag ciphertext CF as input to decrypt the tag ciphertext CF. The decryption formula is where m represents the detection result, CT i represents the second part of the online ciphertext generated for the identity identifier ID i , H is the hash function, and e is a mapping relationship of the groups G, G, and G T ; is the identity private key extracted for the identity identifier ID i , i ∈ [n];

[0101] S322. When the operation results in 1 n , the detection result is 1, indicating a successful search; otherwise, it fails and returns 0. S33. The client selects the correct document ER from the received data documents with the false positive rate p;

[0102] S34. The client searches for the storage record of the data document ER in the blockchain platform to obtain the hash value CER of the data document ER; The client calculates the document hash value CER' = h(ER) of the data document ER and checks whether the equation CER' = CER holds. If it holds, the client accepts the data document ER; otherwise, it does not accept it.

[0103] This fuzzy message detection method based on the blockchain platform and historical records, compared with existing technologies, uses identity-based cryptography to generate fuzzy detection keys. Different from traditional schemes based on public-key cryptography, it does not require a Public Key Infrastructure (PKI) and the "expensive" cost of public-key certificate management. On the other hand, by using an online / offline algorithm, it does not need to perform computationally expensive pairing operations in the online phase, greatly improving the efficiency of fuzzy message detection.

[0104] This fuzzy message detection method based on the blockchain platform and historical records can utilize a remote storage cloud to assist the client in performing fuzzy detection with a certain false positive rate, which not only protects the privacy of the client but also does not precisely display the matching messages to an untrusted cloud. Aiming at the problem of difficult public-key certificate management in existing public-key-based schemes, a new identity-based online / offline encryption scheme is adopted. All high-cost computational operations are carried out in the offline phase, such as costly pairing operations, and the identity of each message does not need to be known. Only a small amount of cost calculation is required in the online phase. Therefore, single-signature ciphertexts can be quickly generated using the identity of the message.

[0105] This fuzzy message detection method based on the blockchain platform and historical records, aiming at the decentralized feature of the blockchain platform and the possible problem of clients providing a forked record chain, adopts a historical record method based on the Dodis Verifiable Random Function (VRF) and Schnorr signature. Each client records the transaction history and the order of accessing the storage cloud and signs them. Thus, even in the worst-case scenario of the blockchain platform, such as an adversary occupying most nodes in the blockchain platform and destroying the ledger stored in these nodes, each client can help restore the correct ledger by providing their transaction history.

[0106] In the registration phase of this fuzzy message detection method based on the blockchain platform and historical records, the client sends a registration request to the blockchain platform and the storage cloud. The blockchain platform and the storage cloud verify the request sent by the client. If the verification is successful, the registration request is accepted, indicating that the client's registration is successful; otherwise, the registration fails. In the data storage phase, the storage cloud first calculates the offline ciphertext C o , and the client calculates the hash value CER of the data document ER to be stored, a set Λ composed of γ identifiers, and a quadruple ω i . Then the client sends a transaction T s =(S, Timestamp, Λ, CER, ω i ) to the blockchain platform. The blockchain platform verifies the transaction T sPerform verification. If the verification passes, write to the blockchain platform, which is used to record data storage and data detection. Finally, the client sends the data documents ER and Λ to the storage cloud. After the storage cloud checks and passes, it will generate the corresponding tagged ciphertext CF. In the data detection stage, first, the client sets the false positive rate p, and then generates the detection key dsk Λ . The client sends the detection key dsk Λ to the storage cloud. The cloud runs the tagged ciphertext of the test data document and outputs the data documents with the result of 1. Then, the client selects the correct document ER from these received data documents with the false positive rate p. Next, the client looks up the storage record of ER in the blockchain platform to obtain the hash value CER. Finally, the client verifies whether the hash values are equal. If they are equal, then the client accepts ER.

[0107] This fuzzy message detection method based on the blockchain platform and historical records uses identity-based cryptography to generate a fuzzy detection key ID-FMD. The transactions in ID-FMD are requests from the client for data storage or detection. By verifying the γ identities of each tagged ciphertext corresponding to the encrypted data document and binding the signature history to the client. This method, by indexing the records in ascending order, can prevent the client from providing a fork record chain and perform zero-knowledge proof on the nonce used for signing the records to ensure the correctness of the historical record order. Even in the worst-case scenario of the blockchain platform, such as an adversary occupying most of the nodes in the blockchain platform and destroying the ledger stored in the nodes, each client can provide the transaction history to restore the correct ledger.

[0108] The embodiment also provides a system adopting the fuzzy message detection method based on the blockchain platform and historical records described in any one of the above, such as Figure 4 , including a client, a blockchain platform, and a storage cloud,

[0109] Client: Send requests to the blockchain platform and the storage cloud respectively, including registration requests, data storage requests, and detection requests; use the historical record method based on Dodis verifiable random function VRF and Schnorr signature to generate a quadruple, add the quadruple to the transaction, and send the transaction to the blockchain platform for verification; use the method of generating a fuzzy detection key based on identity-based cryptography. The client requests detection from the storage cloud, calculates the document hash value of the data document with the false alarm rate received from the storage cloud, and compares it with the document hash value saved by the blockchain platform to obtain the target document;

[0110] Blockchain platform: Complete registration after verification according to the client registration request; verify the transaction sent by the client, and after verification passes, record the hash value and historical record of the data document;

[0111] Storage Cloud: After verification based on the client registration request, complete the registration; receive the data document sent by the client and the identity set of the user for verification, and after successful verification, store the data document and the corresponding label ciphertext CF generated by using the identity-based offline label ciphertext generation method; according to the client detection request, retrieve the data document with a false alarm rate and send it to the client.

[0112] This fuzzy message detection method and system based on the blockchain platform and historical records, in the registration stage, the client requests registration from the blockchain platform and the storage cloud, and the registration is completed if the verification by the blockchain platform and the storage cloud is successful; in the data storage stage, the client sends a storage request to the blockchain platform and the storage cloud, and after successful verification, using the historical record method based on the Dodis verifiable random function VRF and Schnorr signature, the blockchain platform writes the storage record and the document hash value, the storage cloud stores the data document, and stores the corresponding label ciphertext CF generated by using the identity-based offline label ciphertext generation method; in the data detection stage, the client requests detection from the storage cloud, the storage cloud retrieves the data document with a false alarm rate, the client calculates the document hash value and compares it with the hash value saved by the blockchain platform to accurately lock the target document. It can protect the privacy of the client while reducing the cost of certificate management, improving the efficiency of fuzzy search and adding the function of historical records, can help restore the correct ledger, does not require costly pairing operations in the online encryption stage, and the key length is also greatly shortened.

[0113] The above are only the preferred embodiments of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions falling within the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for those of ordinary skill in the art, several improvements and refinements made without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.

Claims

1. A fuzzy message detection method based on a blockchain platform and historical records, characterized in that: including the following steps, S1. The client requests registration from the blockchain platform and the storage cloud respectively. After successful verification by the blockchain platform and the storage cloud, the registration is completed; S2. The client sends data storage requests to the blockchain platform and the storage cloud respectively. The client generates a quadruple using the historical record method based on the Dodis Verifiable Random Function (VRF) and Schnorr signature, and adds the quadruple to the transaction. The blockchain platform verifies the transaction. After the blockchain platform verifies it successfully, the blockchain platform writes the storage record and the hash value of the data document ER. The client sends the data document and the user's identity set to the storage cloud. After the storage cloud verifies it successfully, the storage cloud stores the data document and stores the corresponding tag ciphertext CF generated using the identity-based off-line tag ciphertext generation method; S21. Store the cloud to generate the offline ciphertext C o ; S22. Before storing the data document ER in the storage cloud, the client calculates the hash value of the data document ER as CER, and randomly selects a set of identities Λ = {ID1, …, ID γ} of γ users for the data document ER; S23. The client uses a historical record method based on the Dodis Verifiable Random Function (VRF) and Schnorr signature to generate a quadruple ω i =(σ i , C i , C i-1 , P s ), where σ i is the Schnorr signature generated by record R i , the commitment C i generated by the current random number, the commitment C i-1 generated by the current random number, and P s is a zero-knowledge proof; In step S23, the client uses a historical record method based on the Dodis Verifiable Random Function (VRF) and Schnorr signatures to generate a quadruple ω i =(σ i , C i , C i-1 , P s ), specifically, S231. The Key Generation Center PKG generates the parameters {G, G T , e: G×G → G T} of the bilinear group according to the input security parameter λ. The groups G and G T have prime order p. Select g as the generator of G. In the field, select random numbers s and c0, calculate S = g s , calculate g1 = e(g, g); generate the public key pk = (S, C0, g1) and the private key sk = (s, c0), where S is the public key of the Schnorr signature and Dodis's VRF, C0 is the commitment generated for the initial random number c0, g1 is the mapping of the generator g in group G and g in group G T on G, w is a mapping relationship among groups G, G, and G T , g is the generator of group G, s is the private key of the Schnorr signature and Dodis's VRF, and c0 is the initial random number of the signature; S232. Generate a random number through the VRF proposed by Dodis where i represents the index of the i-th record, and c i-1 is the previous random number, s is the private key of the Schnorr signature and Dodis's VRF; S233. Use the VRF proposed by Dodis to generate a random number c i to generate a zero-knowledge proof where c i-1 is the previous random number, and s is the private key of the Schnorr signature and Dodis's VRF; S234. Generate two commitments for the previous random number and the current random number and S235, with s as the private key, c i as the random number, and R as the record i Generate a Schnorr signature σ i = c i + s·R i ; S236. From the obtained zero-knowledge proof P s , two commitments C i , C i-1 and the Schnorr signature σ i , generate a quadruple ω i = (σ i , C i , C i-1 , P s ); S24. The client sends a transaction T to the blockchain platform s =(S, Timestamp, Λ, CER), where S is the public key, Λ is the set of user identities, CER is the hash value of the data document ER, and the quadruple ω i is added to T s ; The published transaction is verified for historical indexing and Schnorr signature through the quadruple ω i . The verification is successful if and only if both the historical indexing and Schnorr signature verifications pass, and the transaction T s is written to the blockchain platform. Among them, the verification equation for historical indexing is e(C i-1 S, P s ) = e(g, g) and the verification equation for Schnorr signature is where r is a mapping relationship among the groups G, G, and G T , g is the generator of the group G, σ i is the Schnorr signature generated by the record R i , C i-1 , C i are the commitments generated by the previous and current random numbers respectively, P s is the zero-knowledge proof, and S is the public key of the Schnorr signature and Dodis's VRF; S25. The client sends the data document ER and the user's identity set Λ to the storage cloud; S26. Store whether the cloud inspection blockchain platform is Λ; when the transaction T has been correctly written into the blockchain platform, the storage cloud will store the data document ER and store the corresponding tag ciphertext CF generated by using the identity-based offline tag ciphertext generation method; s When the transaction T has been correctly written into the blockchain platform, the storage cloud will store the data document ER and store the corresponding tag ciphertext CF generated by using the identity-based offline tag ciphertext generation method; S3. Using the identity-based password generation method for fuzzy detection key, the client requests detection from the storage cloud. The storage cloud retrieves the data document with a false positive rate. The client calculates the document hash value and compares it with the hash value of the data document ER saved by the blockchain platform to obtain the target document.

2. The fuzzy message detection method based on a blockchain platform and historical records according to claim 1, wherein: In step S1, the client requests registration from the blockchain platform and the storage cloud respectively. After successful verification by the blockchain platform and the storage cloud, the registration is completed. Specifically, S11. The client sends a request to the blockchain platform to request an account registration on the blockchain platform. After receiving the request, the blockchain platform sends a public-private key pair (S, s) to the client, where the random number field, g is the generator of the group G, and S = g s ; S12. The client receives the public-private key pair (S, s), then selects an initial random number c0 and calculates a commitment The client sends a transaction T to the blockchain platform p =(S, C0, Timestamp), where S is the public key, C0 is the commitment generated for the initial random number c0, Timestamp is the timestamp of the current transaction, and for the transaction T p Generate a Schnorr signature σ0 = c0 + s·T p ; S13. The blockchain platform verifies the Schnorr signature σ0 of transaction T p and if the equation holds, the verification passes and transaction T p is written into the blockchain platform; S14. The client sends a registration request to the storage cloud. The storage cloud checks whether the blockchain platform is (S, C0). When the transaction T has been correctly written to the blockchain platform, the storage cloud will accept the client's registration request. p When the transaction T has been correctly written to the blockchain platform, the storage cloud will accept the client's registration request.

3. The fuzzy message detection method based on a blockchain platform and historical records according to claim 1, wherein: In step S21, the storage cloud generates an offline ciphertext C o , specifically, S211. Select a random number field; S212. Calculate the partial offline ciphertext Among them, C 1i represents the first partial offline ciphertext generated for the identity ID i C 2i represents the second partial offline ciphertext generated for the identity ID i α i represents the random number selected for the identity ID i g1 is the generator g in the group G and the mapping of g in the group G T above, y is the public parameter generated in the initialization phase, γ is the number of user identity identifiers, and i ∈ [γ]; S213. Output the offline ciphertext C o ={C o1 , …, C oi , …, C oγ}.

4. The fuzzy message detection method based on the blockchain platform and historical records according to claim 3, wherein: In step S26, the corresponding tag ciphertext CF generated using the identity-based off-line tag ciphertext generation method is specifically as follows S261. For each identity ID i ∈ the set Λ of the user's identities, calculate the corresponding ciphertext where C 3i represents the partial online ciphertext generated by the identity ID i CT i represents the second part of the online ciphertext generated by the identity ID i C 1i and C 2i are respectively the first part of the offline ciphertext and the second part of the offline ciphertext calculated in step S212, γ is the number of user identity identifiers, and i ∈ [γ]; S262. Obtain a set of ciphertexts, i.e., the tag ciphertext CF = (C1, …, C i , …, C γ ).

5. The fuzzy message detection method based on the blockchain platform and historical records according to any one of claims 1-4, characterized in that: In step S3, using the identity-based password generation method for fuzzy detection key, the client requests detection from the storage cloud. The storage cloud retrieves the data document with a false positive rate. The client calculates the document hash value and compares it with the hash value of the document saved by the blockchain platform to obtain the target document. Specifically, S31. The client selects a false positive rate p = 1 / 2 n , and generates a detection key based on the identity wherein represents the detection key generated for the i-th identity identifier, n is the length of the selected detection key, and i ∈ [n]; the client sends the detection key dsk Λ to the storage cloud; S32. The storage cloud utilizes the detection key dsk Λ Test each tag ciphertext of the test data document, output all successfully searched data documents, and send them to the client; S33. The client selects the correct document ER from the received data documents with a false positive rate p; S34. The client searches for the storage record of the data document ER in the blockchain platform to obtain the hash value CER of the data document ER. The client calculates the document hash value CER' = h(ER) of the data document ER and checks whether the equation CER' = CER holds. If it holds, the client accepts the data document ER; otherwise, it does not accept it.

6. The fuzzy message detection method based on a blockchain platform and historical records according to claim 5, wherein: In step S31, a detection key is generated based on the identity Specifically, S311. According to the input security parameter λ, the PKG generates the parameters {G, G T , e: G×G→G T} of the bilinear group, where the groups G and G T have a prime order p; S312. Select \(g\) as a generator of \(G\); in the \(Z\) p field, select a random number \(x\in Z\) p , and compute \(y = g\) x ; two cryptographic hash functions \(H1\): and \(H: G\) T \(\to \{0,1\}\); S313. Obtain the public master key as mpk = (p, g, G, G T , e, H1, H, y), where G, G T , e are bilinear group parameters, p is the prime order of groups G and G T , g is the generator of G, H1, H are two fixed hash functions, y = g x , and the master secret key is msk = x; S314. Obtain the identity private key sk of the user from the user's identity set Λ, the master public key mpk, the master secret key x, and the false positive rate p ID : The user's identity set Λ = {ID1, …, ID γ}, the master public key mpk and the master secret key x, for each identifier ID in the user's identity set Λ i calculate the corresponding identity private key where i ∈ [γ]; according to the false positive rate p = 1 / 2 n , obtain the identity private key of the user as where 0 < n ≤ γ.

7. The fuzzy message detection method based on a blockchain platform and historical records according to claim 5, characterized in that: In step S32, the storage cloud utilizes the detection secret key dsk Λ each tag ciphertext of the test data document, specifically, S321. Use the detection key dsk Λ and a tag ciphertext CF as inputs, decrypt the tag ciphertext CF, where the decryption formula is m represents the detection result, CT i represents the second part of the online ciphertext generated for the identity ID i H is a hash function, e is a mapping relationship of groups G, G, and G T and is the identity private key extracted from the identity ID i i ∈ [n]; S322. When the operation results in 1 n the detection result is 1, indicating a successful search; otherwise, it fails and returns 0.

8. A system adopting the fuzzy message detection method based on a blockchain platform and historical records according to any one of claims 1-7, characterized in that: including the client, the blockchain platform, and the storage cloud, Client: Sends requests to the blockchain platform and the storage cloud respectively, including registration requests, data storage requests, and detection requests; Generates a quadruple using the historical record method based on the Dodis Verifiable Random Function (VRF) and Schnorr signature, and adds the quadruple to the transaction, and sends the transaction to the blockchain platform for verification; Using the identity-based password generation method for fuzzy detection key, the client requests detection from the storage cloud, calculates the document hash value for the data document with a false positive rate received from the storage cloud, and compares it with the hash value of the document saved by the blockchain platform to obtain the target document; Blockchain platform: Completes registration after verification according to the client registration request; Verifies the transaction sent by the client. After successful verification, records the hash value of the data document and the historical record; Storage Cloud: After verification based on the client registration request, complete the registration; receive the data document sent by the client and the user's identity set for verification, and after successful verification, store the data document and the corresponding label ciphertext CF generated by using the identity-based offline label ciphertext generation method; according to the client detection request, retrieve the data document with a false alarm rate and send it to the client.