Encryption Scheme of Veriﬁable Search Based on Blockchain in Cloud Environment

: While transferring data to cloud servers frees users from having to manage it, it eventually raises new problems, such as data privacy. The concept of searchable encryption has drawn more and more focus in research as a means of resolving the tension between data accessibility and data privacy. Due to the lack of integrity and correctness authentication in most searchable encryption techniques, malicious cloud servers may deliver false search results to users. Based on public key encryption with searching (PEKS), the study suggests a privacy-preserving method for veriﬁable fuzzy keyword searches based on the Ethernet blockchain in a cloud context to overcome the aforementioned security concerns. The search user can check the accuracy and integrity of the query document using the unalterability characteristics of the Ethernet blockchain system in this scheme to prevent the cloud server from giving incorrect query results. Furthermore, a fair transaction between the cloud server and the data user is achieved and can be tracked back to the malicious user using hash functions and Ethereum smart contracts, even if the user or the cloud is malicious. Finally, the security analysis shows that, under the random oracle model, our technique fulﬁls the adaptive selection keyword’s semantic security. The performance assessment demonstrates that the proposed scheme outperforms other related schemes in terms of computational efﬁciency


Introduction
Cloud storage has gained popularity due to its low cost, high power, and low-cost benefits, but there are significant security risks associated with its use, such as malicious use of system or network vulnerabilities and other methods to steal or tamper with user data during data transmission, resulting in the leakage of private information, so users must carefully consider these risks before using cloud storage.
At the same time, cloud service providers are not completely trustworthy. Companies storing data on cloud servers run the risk of having their information leaked to users, including rivals; people storing sensitive information on cloud servers run the risk of having their privacy violated; and malicious cloud servers run the risk of deleting files that users have not used in a while and compromising data integrity. Additionally, some cloud service providers will conceal their data leaks as much as they can to preserve their good reputation and avoid repercussions.
Most users choose to encrypt file contents before uploading data operations in order to prevent privacy leaks from cloud service providers and to stop private file contents from being revealed during the search process. To resolve the aforementioned issue, the searchable encryption (SE) approach for keywords is required. Searchable encryption is a crucial method that may easily search the data in the cloud storage without downloading the entire ciphertext document and extracting the ciphertext directly. Schemes for a single keyword query [1,2], multi-keyword query [3,4], fuzzy keyword query [5,6], and sorted keyword query [7,8] searches have all been proposed for searchable encryption.
Cloud servers that are "semi-honest and curious" can only complete a portion of the search operation and provide inaccurate search results [9]. Verifiable search encryption techniques are suggested as a solution to these issues, where the ciphertext must be delivered to the user only after being confirmed to be accurate and authentic. Additionally, the majority of customers enter into a payment agreement with the cloud service provider before using the search function; thus, the cloud server can only be paid for the outsourced computation when the user obtains accurate and comprehensive search results. In addition, if the payment model is adjusted to pay when results are received, there may be cases where malicious users refuse to pay for the service even when they obtain the right results.
Ethernet is a public blockchain platform with smart contract functionality, and its smart contracts [10] allow it to enable trusted transactions between anonymous parties without a central authority. Therefore, smart contracts are more suitable for searchable cryptosystems.
The concerns of data privacy leakage, unverifiability, insecure transmissions, untraceable harmful users, and unfair payments are all addressed by the blockchain-based verifiable search encryption method that we present in this work. The following are the primary research topics covered in this essay: (1) The paper proposes a verifiable fuzzy keyword search encryption scheme based on blockchain in a cloud environment. Users enter keywords, and the system provides the document data that most closely matches them. The searchable encryption system, which accomplishes fair payment, maintains the dependability and credibility of the scheme and has superior security and efficiency, verifying the accuracy and integrity of the search results; (2) In order to achieve the traceability of malevolent users or unfair transaction information, the user's identity information and transaction records are saved on the blockchain after the transaction is complete; (3) The security analysis demonstrates that this strategy successfully protects data privacy from adaptive selection keyword attacks while maintaining the confidentiality of encrypted data.
The remainder of this paper is organised as follows. We present related work in Section 2 and briefly describe some scenario models in Section 3, which include a system model, a threat model, and a security model. We give a concrete scheme in Section 4, which is divided into eight steps and described in detail. We demonstrate the security of the proposed solution in Section 5, as well as a functional comparison and performance comparison with other solutions. We draw the concluding remarks in Section 6.

Related Work
A keyword trapdoor was built to compare with each ciphertext keyword in the ciphertext document in order to achieve a single-keyword search of encrypted data, as proposed by Song et al. in their notion of searchable encryption [11]. However, retrieval based on a single keyword only yields a huge number of relevant articles, and numerous multi-keyword retrieval research approaches have been developed. The first searchable encryption technique based on concatenated keywords was presented by Golle et al. [12]; nevertheless, the retrieval efficiency of the scheme is low, making it less useful. Goh [13] proposed to build an index for each outsourced document and use the index to complete the retrieval without matching each document one by one, creating a searchable encryption scheme based on orthogonal indexing. While the sorted, searchable encryption scheme can return the top k search results related to the keywords and has achieved many research results in recent years, Goh's proposal can return the retrieval without matching each document one by one. Zhang et al. [14] designed a searchable encryption scheme combining keyword weights and a two-factor ranking function of keyword similarity to rank the search results and improve the usability of the scheme. Even when consumers enter terms with a few minor spelling mistakes, the fuzzy query makes it easy to receive pertinent results. The literature [15] suggests a privacy-preserving approach for fuzzy multi-keyword searches using cloud services, which addresses the issue of the previous schemes' poor performance and noticeably raises search efficiency and matching precision. The majority of these cloud-based searchable encryption techniques take into account honest and inquisitive server architectures. Verifying the retrieval results is necessary since, in practice, cloud servers may give users partial or inaccurate search results. Verifiable privacy-preserving search strategies have thus become a popular study area. The first verified search encryption method (VSSE), which offers consumers data privacy as well as query correctness and integrity, was proposed by Chai et al. [16] in 2012. A verified search system was proposed by Kurosawa et al. [17], but it has the disadvantage of a high verification overhead and cannot verify whether the returned results have been updated or deleted. Li et al. [18] used Paillier homomorphic encryption and the Key Hash Message Authentication Code (HMAC) to confirm the accuracy and integrity of the encrypted search results. A multi-keyword verification-enabled attribute-based encryption approach was suggested in the literature [19], adding a third-party entity to the scheme and utilizing a testing mechanism to stop unreliable cloud servers from generating inaccurate search results.
The above verifiable search encryption algorithms, however, lack a review mechanism that can be used for all search schemes; thus, blockchain and smart contracts are used to guarantee fairness for each participant. The literature [4] developed a blockchain-based multi-keyword sorted search and fair payment system in the blockchain-based verified scheme, returning accurate and comprehensive search results to the data users. In the literature [20], a search index was created using bitmaps, which increased search efficiency and enabled blockchain to verify the accuracy of the search results. In order to provide end users with privacy-preserving and verifiable query functionalities in industrial IoT systems, the literature [21] presents a blockchain-based query verification model enabling multiple signatures. Table 1 lists the main contributions of selected literature and their respective limitations. Therefore, we provide a blockchain-based verifiable search encryption technique for cloud services in this study and an improved existing verifiable searchable encryption scheme. To ensure the traceability of the identity information of the data user, this system uses a one-to-many search model and stores the identity information in the blockchain each time a search request is made by a data user. Additionally, it makes use of a smart contract to confirm the accuracy and reliability of the papers that are returned in order to guarantee that consumers only pay after receiving the proper results and stores the transaction data in the blockchain after the transaction is complete.

Literature
Year Main Contribution Drawbacks [22] 2016 Dynamic fuzzy verifiable search scheme Low verification efficiency [23] 2018 Propose a form of "deposit" in the blockchain Large number of signature verification computations [24] 2019 Multiple users, high search efficiency The authorization issue is not addressed [25] 2020 Proposed a dynamic single sign-on solution based on blockchain High workload and inefficient verification [26] 2020 Verification algorithms are added to the decryption process in this approach.
Problems between users and the cloud service platform cannot be resolved.
[4] 2021 Proposed a blockchain-enabled scheme with multi-keyword search (BPKEMS) Users are inefficient when they make spelling mistakes [20] 2022 Improved search efficiency by using bitmaps Only store a small quantity of information [21] 2021 Provide privacy protection and verifiable query capabilities for end users in IoT (Internet of Things) systems No security analysis of the scheme

Scheme Model
This section provides an overview of a blockchain-based verifiable search encryption technique used in a cloud context, including the system model, algorithm specification, threat model, and security model. Figure 1 depicts the system model for the verifiable search encryption scheme based on blockchain in the cloud environment that is suggested in this paper. The key is distributed by the trusted authorization; the data owner encrypts the documents and sends them to the cloud server, the data user submits a search request, the cloud server completes the search, the blockchain completes the document's integrity and correctness verification, as well as the data user's authentication, and then it returns the correct encrypted document that has passed the verification to the data user. Participants can be categorized into one of five categories: semi-convertible cloud servers (SCS), data owners (DO), data users (DU), blockchain (BC), and trusted authorization (TA).

The System Model
IoT (Internet of Things) systems

Scheme Model
This section provides an overview of a blockchain-based verifiable search e technique used in a cloud context, including the system model, algorithm spe threat model, and security model. Figure 1 depicts the system model for the verifiable search encryption sch on blockchain in the cloud environment that is suggested in this paper. The key uted by the trusted authorization; the data owner encrypts the documents and s to the cloud server, the data user submits a search request, the cloud server com search, the blockchain completes the document's integrity and correctness verifi well as the data user's authentication, and then it returns the correct encrypted that has passed the verification to the data user. Participants can be categorize of five categories: semi-convertible cloud servers (SCS), data owners (DO), (DU), blockchain (BC), and trusted authorization (TA).  The following is a description of each entity's role and the functions to w belong:

The System Model
Trusted authorization. The trusted authorization is responsible for generat and private keys for each user and publishing the public parameters of the syst The following is a description of each entity's role and the functions to which they belong: Trusted authorization. The trusted authorization is responsible for generating public and private keys for each user and publishing the public parameters of the system. Cloud servers. Cloud servers with strong processing capacity and storage space but a dubious reputation will exist to attempt collecting users' personal information. In this case, the cloud server is primarily in charge of keeping the encrypted documents that the data owner has uploaded and carrying out search operations to deliver the most relevant documents to the data user.
Data owner. The data owner is a user who shares data with other users and owns the original data, D = {D 1 , D 2 , D 3 , · · · , D n }. The main work is to compute the secure index and encrypt the documents and upload them to the cloud server for storage.
Blockchain technology. In order to identify the data user who acquired this encrypted document, it is primarily responsible for documenting the identity ID of the data user and associated transactions. Additionally, it establishes an environment for fair payment from both sides by comparing the hash value to the integrity and correctness of the encrypted content.
Data users. Data users are users who have a search requirement, construct a search token by encrypting the terms they wish to use, and transmit it to the smart contract. They then wait to receive the appropriate document, which has been confirmed by the smart contract.

Threat Model and Security Model
The threat model in this instance is as follows. Since the cloud server is honest and curious, it tries to find out about the user's private information and make assumptions about it, risking the user's security and privacy. The blockchain is totally trusted to store the data user's id u and to verify the validity and reliability of the results that have been returned. Public and private keys are generated for each user by a completely trusted trust center, and the system's public parameters are made available to the public.
The security model in this instance is as follows. In this paper, we use the security model proposed in the literature [13], which was first proposed by Goh as Indistinguishability under Chosen Keyword Attack (IND-CKA). From the proof equivalence of the literature [16], it follows that a simulation-based proof of a game is equivalent to a proof of an indistinguishable game, where the adversary, A, will win by analysing the ciphertext generated by the simulator, the index, and the distinguishability of the search token game, and the CSP and external attackers will not obtain any additional information beyond the search pattern. Implementing IND-CKA security means that adversary A cannot infer the contents of documents, indexes, and search tokens from the leaked content. The game will be described below.
A simulation-based game between attacker A and simulator S is used to prove the security of the scheme while allowing the leakage of search patterns. Two leakage functions are used to represent the information leakage scenario of this method, L = (L 1 , L 2 ), L 1 is defined as L 1 (D) = (C R ), input plaintext document set, output ciphertext document C R , L 2 is defined as L 2 (D, w ) = F , π , T w , input document collection and keywords, output search token T w and function F , π . The game played between challenger C, adversary A, and simulator S is defined as follows.
Define the following games: Real Π A (λ): Completed by the contestant and foe, A. The initialization algorithm, Setup 1 λ , is executed by the game. Challenger C receives the document set, D, from adversary A. Adversary A receives the result (C R , I) after the challenger computes the encrypted document set, C R , and the security index, I. The antagonist chooses a keyword, w , at random and sends it to the challenger. The challenger computes and generates the relevant search token, T w , to send to the adversary during the search phase. The opponent eventually outputs bit, b.
Ideal Π A,S (λ): Executed by simulator S. The challenger receives the document set, D, after adversary A chooses it. Based on the leakage functions, L 1 and L 2 , S computes C R , I and transmits it to the challenger. Simulator S computes the relevant search token, T w , together with the pseudo-random function, PRF F, and pseudo-random permutation function, PRP π, based on the leakage function, L 2 , and sends it to the challenger after A chooses the keyword, w , and delivers it to them. The challenger sends the search token, T w , to adversary A. The adversary then outputs bit, b.  Table 2 displays some of the symbols used in this scheme along with the descriptions that go with them. In this section, we describe the scheme in eight steps, as follows. Trapdoor for w C R w Ciphertext set containing search keywords C T

Specific Structure
The ciphertext, after passing authentication

Algorithm Defined
The article suggests the following eight polynomial-time encryption algorithms as part of a blockchain-based, searchable, verifiable encryption system for cloud environments. π = (Setup, UserRegist, Enc, IndexGen, TokenGen, Search, Veri f y, Dec) Initialization algorithm Setup 1 λ → param, msk : the system's public parameter, param, and the system's private key, msk, are output by the trusted authorization after the security parameter is submitted.
Registration algorithm UserRegist(param, msk, id O , id U ) → PK O , PK U , psk O , psk U : In order to seek registration, the data owner sends the trust center their identification information. The trust center receives this information and uses it to input the public parameter, param, and the system's private keys, msk and id O , and to output a public key, PK O , and partial private key, psk O , in response. Similar circumstances arise when a data user requests registration.
Encryption algorithms Enc(param, D, K 1 , K 2 ) → C R : to create the ciphertext document, C R , the data owner, DO, uses K 1 , K 2 to encrypt the plaintext document, D i (i ∈ [n]).
Secure index generation algorithm IndexGen(param, D, K 1 , K 2 ) → I : the DO builds the index by scanning the plaintext to receive the keyword set and encrypt it with the keys K 1 ,K 2 to receive the secure index, I.
Search token generation algorithm TokenGen(param, w , id U , K 1 , K 3 ) → TD, T w : The data user, DU, enters the keyword, w , to be searched for and the key, K 1 , to create the trapdoor, TD. Based on the trapdoor, TD, K 3 , and the user identity code, id u , the search token, T w , is then created and sent to the smart contract.
Search algorithm Search(I, TD, C) → C T , EID : The cloud server runs the search operation to compare the trapdoor, TD, with the security index, I. The ciphertext, C T , containing the keyword and its matching identifier, EID, is acquired if the match is successful.
Verification algorithm Veri f y(C Rw , H O ) → n : The smart contract calculates the hash value, H N , after receiving the encrypted document, compares it to the hash value of the matching document stored in the blockchain, and outputs n = 1 if H N = H O ; otherwise, n = 0.
Decryption algorithm Dec(C T , K 2 ) → D T : The user receives the ciphertext result, C T , given by the blockchain after paying the service charge, which they then decrypt using the symmetric key, K 2 , to obtain the proper plaintext document, D T .

Content Initialization Phase
To create the master key and system parameters, the trusted authorization follows these procedures.

•
The trusted authorization takes the security parameter and creates two multiplicative cyclic groups, G 1 , G 2 on Z p , where p is a large prime, and g is the generating element of G 1 . e : G 1 × G 1 → G 2 is a bilinear mapping; • Randomly select s ∈ Z p * and calculate P = g s ; • Select two collision-resistant hash functions: • Take a pseudo-random function, PRF F, and a pseudo-random permutation function, PRP π, with the following parameters: Output the system's public parameter, param = (G 1 , G 2 , p, e, g, P, H 1 , H 2 , F, π) and the system's master key, msk = e< g, g > s .

Key Generation Phase
The DO randomly selects x O ∈ Z p * , calculates id O , and sends it to the trusted authorization, which calculates the DO's partial key, psk O = H 1 (id O ) msk , and public key, A part of the private key is sent to the data owner through the secure channel, and the data owner calculates the private key, Similarly, the DU obtains the public key, PK U = g id U , and the private key, The trustworthy center uses PK O to encrypt K 1 , K 2 to send to the data owner and PK U to encrypt K 1 , K 3 to send to the data user.

Index Building, Ciphertext Encryption Phase
The inverted index method is used to construct the index table. By scanning the plaintext document, the set of keywords, W = {w 1 , w 2 , . . . , w m }, is initially extracted, and the n-dimensional index vector of each keyword, w i , is indicated by v(w i ). If the keyword appears in the document, v(w i ) A fuzzy set, S w i ,d = {w i,1 , w i,2 , . . . , w i,t }, is constructed to represent the fuzzy set with the keyword, w i , and editing distance, d, where w i,t 1 ≤ i ≤ n, 1 ≤ t ≤ S w i ,d denotes the t keyword in the fuzzy set.
For each keyword, w i,t , in the fuzzy set, S w i ,d , the pseudo-random permutation function, PRP π, is used to confuse the real position of the keyword to obtain π k 1 (w i,t ). The pseudo-random function, PRF F, is used to calculate Ev(w i ) ← F k 2 π k 1 (w i ) v(w i ) , and the encrypted index vector, Ev(w i ), is obtained. π k 1 (w i,t ) is stored on the first node of the inverted index, and Ev(w i ) is stored on the second node to construct the security index, I, as shown in Figure 2.
For example, for plaintext documents, D 1 = I am happy everyday and D 2 = I am a good person. For extracting a collection of keywords, W = {w 1 , w 2 , w 3 , w 4 , w 5 , w 6 , w 7 } = {I, am, happy, everyday, a, good, person}.
Then, using the pseudo-random function, PRF F, the encrypted index vectors Ev(am), Ev(a), Ev(good) are computed and stored on the second node. The resulting security index is then shown in Figure 3.    For encryption with symmetric keys, Enc(param, D, K 1 , K 3 ) → C R , EID . To obtain the ciphertext C i (i ∈ [1, n]) and the encrypted document number N i = {n i |i ∈ [1, n]}, the DO encrypts the document, D i (i ∈ [1, n]), using K 1 . To encrypt the document identifier set, EID = {EID 1 , EID 2 , . . . , EID n }, you must first calculate the hash value, , pack the ciphertext set , C, and document number , N, and then use the key, K 2 , to encrypt to retrieve the ciphertext C R .
Send the encrypted document identifier, EID, and hash result, H O , to the blockchain for storage to make it easier to conduct the ensuing verification operation. Send the ciphertext, C R , security index,I, and encrypted document identifier, EID, to the cloud server for the search operation.

The Search Token Generation Phase
A search token is created when a user wishes to look up a keyword, and a deposit is needed to stop the user from backing out of the transaction in the middle of it. The user Cryptography 2023, 7, 16 9 of 17 types in the keyword w and then uses the keys K 1 , K 3 to construct the search trapdoor, TD w = π k 1 (w ), F k 3 π k 1 (w ) , and then combines the trapdoor with the user identity code, id U , to create the search token T w = (TD w , id U ), which is transmitted to the search.

Search Phase
The search phase is divided into the following three steps:

1.
Verification of identity. The user identity code, id U , is saved to the blockchain after the smart contract receives the user's search request and sends it to the trusted institution to be verified as the user's identity. Once the verification is legal, the keys K 2 , K 3 are sent to the smart contract through a secure channel, and the user identity code, id U , is saved to the blockchain, where the identity information of the malicious user can be traced using the blockchain's tamper-evident feature; 2.
Search for documents. The smart contract sends the trapdoor, TD w = π k 1 (w ), to the cloud server, and the cloud server pays the search deposit for the search operation. Compare π k 1 (w ) with the first element, π k 1 (w i,1 ), of each linked list in the list and then match the other encryption keywords, π k 1 (w i,t ); calculate v(w ) ← F k 2 π k 1 (w ) Ev(w ) to obtain the index vector, v(w ). If v(w )[j] = 1, add this ciphertext to ciphertext set C Rw to obtain ciphertext set C Rw , containing search keywords.

3.
Finally, the blockchain receives the ciphertext set, C Rw , and its matching encrypted document identification, EID w .
The detailed process of the search is shown in Algorithm 1.

Input:
The trapdoor, TD, the secure index, I, and the collection of all cipher documents, C; Output: The ciphertext, C Rw with the keyword and its matching encrypted document identification, EID w .

1:
Resolution of TD into (α, β) 2: for i ← 1 to n do 3: for t ← 1 to S w i ,d do 4: if π k 1 (w i,t ) = α and t = 1 then 5: Obtain the corresponding second node in which the stored Ev(w i ) 6: Decrypting it to v(w i ) using β 7: for j ← 1 to N do 8: if v(w i )[j] = 1 then 9: Add C j to C Rw , EID j to EID w 10: end if 11: end for 12: return C Rw 13: end if 14: if π k 1 (w i,t ) = α and t = 1 then 15: Computes F k 2 π k 1 (w i ) 16

Validation Phase
The smart contract receives the hash value, H O , from the data owner in accordance with the blockchain search, EID w . The smart contract determines H N = H 2 (C T ||N T ) by decrypting the ciphertext set, C Rw , with the key, K 2 . It then retrieves the ciphertext, C T , and the document number, N T . We may determine whether H O and H N are equal by comparing the H O stored in the blockchain. The encrypted document, C, is provided to the data user, who then pays the service fee, and the transaction is successful if H O = H N , indicating that the server returned the proper result. If H O = H N , the transaction is abandoned because it suggests a malicious server that does not return the right document. The method is displayed in Figure 4.

Validation Phase
The smart contract receives the hash value, , from the data owner in accorda with the blockchain search, . The smart contract determines = ( || ) decrypting the ciphertext set, , with the key, . It then retrieves the ciphertext, and the document number, . We may determine whether and are equa comparing the stored in the blockchain. The encrypted document, , is provide the data user, who then pays the service fee, and the transaction is successful if = indicating that the server returned the proper result. If ≠ , the transaction is ab doned because it suggests a malicious server that does not return the right document. method is displayed in Figure 4:  The detailed procedure for verification is shown in Algorithm 2.  The detailed procedure for verification is shown in Algorithm 2.

Algorithm 2 Result Verification
Input: The ciphertext collection, C Rw obtained from the cloud search, H O . Output: Verification result, n.

1:
Decrypt the ciphertext collection, C Rw to obtain the ciphertext collection, C T , and the document number collection, N T . 2: n ← 1 3: for i ← 1 to m do 4: Finally, if the transaction is lawful and the verification results indicate that it is, the user will pay the server the service fee, and the deposits made by both parties will be reimbursed. If the transaction is illegal, the user will receive their deposit back from both parties without having to pay a service charge.

User Decryption Phase
Following the delivery of the service charge, the user receives the correct encrypted document, C T , and uses the key, K 1 , to decode the plaintext document, D T = Dec(K 1 , C T ). The collection of papers, called D T , that the data user requested has the correct keywords or those that are the closest to them. The encryption scheme timing of a verifiable search based on blockchain in the cloud environment is shown in Figure 5. Finally, if the transaction is lawful and the verification results indicate that it user will pay the server the service fee, and the deposits made by both parties reimbursed. If the transaction is illegal, the user will receive their deposit back fro parties without having to pay a service charge.

User Decryption Phase
Following the delivery of the service charge, the user receives the correct enc document, , and uses the key, , to decode the plaintext document, = ( The collection of papers, called , that the data user requested has the correct key or those that are the closest to them. The encryption scheme timing of a verifiable based on blockchain in the cloud environment is shown in Figure 5.

Performance Analysis
In this section, we analyse our work in terms of privacy, verifiability, trace fairness, and security. We also compare our solution with other similar solutions in of functionality and performance.

Security Analysis
The proposed plan can accomplish the following security goals:

Performance Analysis
In this section, we analyse our work in terms of privacy, verifiability, traceability, fairness, and security. We also compare our solution with other similar solutions in terms of functionality and performance.

Security Analysis
The proposed plan can accomplish the following security goals: Privacy. No one can acquire plaintext or keyword information without a key when storing the data in this manner. Furthermore, the key is only available to participants who have been approved by the reliable centre. The block chain will keep track of the user identifying the information once the user makes the search request, authenticate its validity, and ensure that the user's privacy is preserved before returning the ciphertext to the user.
Verifiable and traceability. Using blockchain technology, this strategy Because the transaction records are stored in the blockchain, which is unchangeable and traceable, there is no malicious tampering of the results, and it is convenient to find the user information involved in the transaction at that time when there is an objection to the results. This ensures that data users get the best matching results they need.
Fairness. The scheme introduces the Ethereum trading mechanism. When the smart contract determines that the result returned by the cloud server is correct, the user will pay the service fee after refunding the deposit of both parties; otherwise, the deposit of the cloud server will be directly forwarded to the data user. Similarly, only after the user pays the service fee can he obtain the correct return result, and he cannot quit the transaction halfway; otherwise, he will not return the deposit. Transactions are stored openly and transparently in the blockchain, and users can view the transaction information at any time to realize fair and just payment.
Security. Under the random oracle model, our technique fulfils the adaptive selection keyword's semantic security (a full proof is given in Appendix A).

Functional Comparison
By comparing the existing searchable encryption schemes, we can find that the scheme in reference [27] implements a searchable encryption scheme that supports sorting but does not support the verification of the results. The literature of [28] can verify the correctness and integrity of the final results of documents, but it is not based on blockchain but checked by data users, which cannot avoid the failure of malicious verification by data users. The literature of [29] realizes verification on the blockchain, which ensures fairness. However, instead of searching based on the cloud server, a smart contract is used, and its search efficiency is far less than that of the former. Document [25] realizes the search based on the cloud server but does not realize the verification and traceability of the user identity. In the literature [30], the authorized search key is sent directly by the data owner to the data user without using the trusted centre, and the reliability of the trusted centre is stronger. Distributing the key by the trusted centre will also reduce the burden on the data owner.
This scheme realizes a searchable encryption scheme of fuzzy keywords based on blockchain in the cloud environment and the secure distribution of keys by trusted centres' the cloud server realizes the search operation and uses the blockchain's smart contract to verify the identity of its users and verify the correctness and completeness of the search results returned by the cloud server, so as to ensure the correctness of the results, realize fair payment, and store the transaction information in the blockchain to ensure the traceability of the scheme. The scenario pairs are shown in Table 3. Table 3. Comparison of various schemes. Here, we use the symbol "×" to indicate that the corresponding feature is not satisfied and " √ " indicates satisfied.

Scheme
Cloud Storage TA Blockchain Privacy Identity Authentication

Performance Analysis
The results shown in Table 4 compare the computational cost of this scheme with related schemes in the key building, security index building, search token building, search phase, and verification phase. T M and T A are used to represent the execution time of a multiplication operation and addition operation, respectively, T H and T E , respectively, represent the execution time of a hash operation and exponentiation operation, T P ; T F , and T S , respectively, represent the execution time of a linear pair operation, pseudo-random function operation, and signature operation, m and l, respectively, represent the number of encryption keywords and search keywords, n represents the number of documents, and j represents the number of files containing keywords.
In the key generation stage, the key generation time of this scheme is slightly longer than that of reference [32]. With the increase of the number of m, the cost of generating the security index and ciphertext will gradually increase, among which [31,32] increase the fastest, and the time of generating the search token is the same. In the search phase, the proposed scheme avoids complex computational operations, such as bilinear mapping, and has good search efficiency. The verification phase time is only one hash operation execution time, T H , which is lower than the scheme in reference [20]. Moreover, the proposed scheme does not need local verification by users and uses smart contracts to hash operations, thus reducing the computational overhead of users. The computational overhead of this scheme is similar to that of reference [20] in the search and verification phase, but it costs less to generate a secure index, ciphertext, and search token. To sum up, the scheme in this paper is the best in performance.
The implementation of the key generation and file encryption part of the experiment is based on the Pairing-Based Cryptography (PBC) library, and the experimental programs are written in C and run under PBCVC on a Windows 10 operating system AMD Ryzen 7 5800H with Radeon Graphics and 16.0 GB of RAM. The class A elliptic curve provided by the PBC library is selected. SHA-256 is used for hashes, and HMAC-SHA256 is used for pseudo-random functions. The PBC library is a free C library built on the GMP library that performs the mathematical operations underlying pairing-based cryptosystems. It provides routines such as elliptic curve generation, elliptic curve arithmetic, and pairing computation. The experiments compared the computational overheads, and the results are shown in Figures 6 and 7.

Conclusions
This study suggests a verifiable fuzzy keyword search encryption solution base blockchain in a cloud context to address the dishonest conduct of hostile servers in se able encryption schemes. The plan uses cloud servers for search operations to inc search efficiency and introduces a blockchain system, which not only stops cloud se from purposefully returning false results and validates the accuracy and integrity of uments that are returned but also makes use of the Ethereum blockchain's payment tem to safeguard the rights of cloud servers and data users and achieve fair paymen However, the scheme cannot achieve a dynamic update of encrypted files and limitations in practical applications, so a blockchain-based searchable encryption sch

Conclusions
This study suggests a verifiable fuzzy keyword search encryption solution base blockchain in a cloud context to address the dishonest conduct of hostile servers in sea able encryption schemes. The plan uses cloud servers for search operations to incr search efficiency and introduces a blockchain system, which not only stops cloud ser from purposefully returning false results and validates the accuracy and integrity of uments that are returned but also makes use of the Ethereum blockchain's payment tem to safeguard the rights of cloud servers and data users and achieve fair payment However, the scheme cannot achieve a dynamic update of encrypted files and limitations in practical applications, so a blockchain-based searchable encryption sch

Conclusions
This study suggests a verifiable fuzzy keyword search encryption solution based on blockchain in a cloud context to address the dishonest conduct of hostile servers in searchable encryption schemes. The plan uses cloud servers for search operations to increase search efficiency and introduces a blockchain system, which not only stops cloud servers from purposefully returning false results and validates the accuracy and integrity of documents that are returned but also makes use of the Ethereum blockchain's payment system to safeguard the rights of cloud servers and data users and achieve fair payment.
However, the scheme cannot achieve a dynamic update of encrypted files and has limitations in practical applications, so a blockchain-based searchable encryption scheme that can be applied to dynamic cloud environments in healthcare, education, and other fields will be considered in the next step of work. Furthermore, we considered combining blockchain with verifiable computing in the new scheme to provide more secure services. As a next step, we plan to try to use formal analysis in smart contracts to reduce potential errors and costs in the contract development by using the validation methods in the formal modelling mentioned in [33,34] and the application of blockchain-based verifiable search solutions in the healthcare sector to try to address the privacy issues of medically sensitive data.

Data Availability Statement:
No data were used to support this study.

Conflicts of Interest:
The authors declare no conflict of interest.
Appendix A Theorem A1. This scheme satisfies the semantic security of adaptive keyword selection under the random oracle model.

Proof.
Suppose there is a probabilistic polynomial time, (PPT) S, as the simulator and A as the adversary. The proof equivalence from the literature [16] can be it is known that simulation-based game proofs are equivalent to indistinguishable game proofs, proving that the adversary, A, will win the game by analyzing the ciphertext generated by the simulator and the index and search tokens generated by the simulator to win the game. If Pr Real Π A (λ) − Pr Ideal Π A,S (λ) ≤ negl(λ) , where negl(λ) is a negligible function, then the scheme is semantically safe for an adaptive keyword selection.
We will prove that no opponent of A can distinguish between Ideal Π A,S and Real Π A . The simulator generates the mock ciphertext document, C R , the mock security index, I , and the mock search token, T w , as follows: • Simulate the ciphertext document, C R . From the leak function, L 1 , the simulator inputs the document set, D, and generates simulated encrypted documents, C R = C R1 , C R2 , . . . , C Rn . Because the symmetric keys K 2 , K 3 are secure, C R and C R are computationally indistinguishable.
Pr[Enc(D, K 1 , K 2 ) → C R ] − Pr Random → C R ≤ negl 1 (λ) • Simulation security index, I . I π k 1 (w ) = Ev(w ), where Ev(w ) = v(w ) F k 2 π k 1 (w ) . In Real Π A (λ), the pseudo-random function, F, and the pseudo-random permutation function, π, are used to construct the security index. When simulating I , the random strings with the same length are used to replace the generated π k 1 (w ) and F k 2 (π k 1 (w )). Since the adversary, A, is unknown to K 1 and K 2 , and the security of the pseudo-random function and the pseudo-random permutation function is known, the adversary, A, cannot distinguish its output from the random strings with the same length; that is, I and I are indistinguishable in the calculation.

•
Simulated search token, T w . Using the leak function, L 2 (D, w ) = F, π, T w , where TD w = π k 1 (w ), F k 3 π k 1 (w ) , F is a pseudo-random function, and π is a pseudorandom permutation function (similar to 2), because K 1 and K 3 are unknown; T w and T w are computationally indistinguishable.