A data security transaction method based on searchable re-encryption technology

Through a data security transaction method based on searchable re-encryption technology, using smart contracts and blockchain, combined with keyword trapdoors generated by consumers and re-encryption keys generated by data owners, the transaction fairness and data privacy issues in existing data transactions are solved, and efficient and secure data transactions are achieved without relying on trusted third parties.

CN120525532BActive Publication Date: 2025-10-17CHINA ACADEMY OF INFORMATION & COMM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511013750.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-23
Publication Date
2025-10-17
Estimated Expiration
2045-07-23

AI Technical Summary

Technical Problem

Existing data trading methods, without relying on a trusted third party, are unable to guarantee transaction fairness and data privacy security. Especially when facing malicious cloud servers, the integrity and correctness of search results cannot be guaranteed. At the same time, traditional solutions may leak the data owner's decryption key.

Method used

A data security transaction method based on searchable re-encryption technology is adopted, which takes advantage of the tamper-proof characteristics of smart contracts and blockchain. Through the keyword trapdoor generated by consumers and the re-encryption key generated by data owners, combined with the retrieval and re-encryption processing of cloud storage providers, the fairness of transactions and data privacy are ensured.

Benefits of technology

It ensures transaction fairness and data privacy without relying on a trusted third party, prevents dishonest behavior of cloud storage providers and consumers, improves transaction security and efficiency, simplifies processes and enhances system compatibility and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120525532B_ABST
    Figure CN120525532B_ABST
Patent Text Reader

Abstract

The application discloses a data security transaction method based on searchable re-encryption technology and belongs to the technical field of data transaction, and solves the problem that fairness and security of the existing data transaction mode are difficult to guarantee. The method comprises the following steps: a data owner encrypts data itself based on the key of the data, and uploads the encrypted data to a cloud storage provider; a consumer generates a key trapdoor according to the key of the required data, generates a transaction request and sends the transaction request to a smart contract, and pays a deposit; when the data owner monitors the transaction request initiated to itself through the smart contract, a re-encryption key is generated and sent to the smart contract; the cloud storage provider retrieves the matched encrypted data according to the transaction request and the re-encryption key, and performs re-encryption processing on the encrypted data, and sends the re-encrypted data to the consumer; the consumer verifies the re-encrypted data, and if the verification is passed, the consumer transfers the deposit of the payment transaction request to the cloud storage provider through the smart contract, and ends the data transaction.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data transaction, and in particular to a data secure transaction method based on searchable re-encryption technology. BACKGROUND

[0002] In the traditional data transaction process, the data owner usually stores the data on the cloud server so that the consumer can conveniently retrieve and obtain the required data. However, the credibility of the cloud server is a key issue. On the one hand, the cloud server may tamper with the search results, causing the consumer to be unable to obtain the truly required data; on the other hand, without a trusted third party, the dishonest behavior of the transaction parties may cause the transaction to fail to proceed smoothly. For example, the cloud server may refuse to send data after receiving payment, or the consumer may refuse to pay after obtaining the data.

[0003] In order to solve these problems, searchable encryption (SE) and proxy re-encryption technology are introduced into the data transaction process. The searchable encryption technology allows users to search encrypted data without revealing the plaintext data, while the proxy re-encryption technology can convert the data owner's ciphertext into ciphertext that the consumer can decrypt, thereby protecting data privacy. However, the existing searchable encryption and proxy re-encryption schemes still have some limitations. For example, the traditional searchable encryption method cannot guarantee the integrity and correctness of the search results when facing a malicious cloud server; at the same time, the proxy re-encryption scheme may leak the decryption key of the data owner during data conversion, thereby affecting the security of the data. In addition, the existing data transaction model usually relies on a trusted third party to ensure the fairness of the transaction. However, this dependence not only increases the transaction cost, but also may cause single point failure and privacy leakage and other problems.

[0004] Therefore, how to ensure the fairness of the data transaction and the security of the data privacy without relying on a trusted third party has become a technical problem to be solved. SUMMARY

[0005] In view of the above analysis, the embodiments of the present application aim to provide a data secure transaction method based on searchable re-encryption technology, to solve the problem that the existing data transaction method is difficult to guarantee the fairness and security of the data transaction.

[0006] The present application discloses a data secure transaction method based on searchable re-encryption technology, the method comprising:

[0007] The data owner encrypts the data itself based on the keyword of the data, and uploads the formed encrypted data to a cloud storage provider;

[0008] The consumer generates a keyword trapdoor according to a keyword of required data, generates a transaction request by combining address information of the target data owner, and sends the transaction request to the smart contract, and pays a deposit of the transaction request;

[0009] When the data owner monitors the transaction request initiated to itself through the smart contract, a re-encryption key of the response transaction request is generated and sent to the smart contract;

[0010] The cloud storage provider retrieves matched encrypted data from the encrypted data of the target data owner according to the transaction request and the corresponding re-encryption key obtained from the smart contract, performs re-encryption processing on the encrypted data, and sends the generated re-encrypted data to the consumer;

[0011] The consumer verifies the re-encrypted data within a specified time, and if the verification is passed, the consumer transfers the deposit of the transaction request to the cloud storage provider through the smart contract, and ends the data transaction.

[0012] On the basis of the above-mentioned scheme, the present application further makes the following improvements:

[0013] Further, the method further comprises:

[0014] If the cloud storage provider does not receive the deposit of the transaction request within a specified time, the generated re-encrypted data is sent to the smart contract within the upper limit of the verification time, and the re-encrypted data is verified by the smart contract based on the keyword trapdoor,

[0015] If the verification is passed, the smart contract transfers the deposit of the transaction request to the cloud storage provider, and ends the data transaction;

[0016] Otherwise, the smart contract transfers the deposit of the transaction request to the consumer, and ends the data transaction.

[0017] Further, the method further comprises:

[0018] If the smart contract does not receive the re-encrypted data sent by the cloud storage provider within the upper limit of the verification time, the smart contract transfers the deposit of the transaction request to the consumer, and ends the data transaction.

[0019] Further, the consumer generates the keyword trapdoor in the following manner, and executes:

[0020] The consumer generates a keyword trapdoor according to a keyword of required data and a private key of the consumer.

[0021] Further, the consumer generates the transaction request in the following manner:

[0022] The consumer generates a transaction request by combining a public key and address information of the consumer, the generated keyword trapdoor, and address information of the target data owner.

[0023] Further, the data owner determines whether the transaction request is initiated to itself by the following way:

[0024] The data owner monitors the transaction request received by the smart contract in real time, and determines whether the address information of the target data owner in the transaction request is consistent with the address information of itself.

[0025] Further, the data owner generates the re-encryption key responding to the transaction request and sends it to the smart contract by the following way:

[0026] If the data owner authorizes the corresponding transaction request, the data owner generates the re-encryption key responding to the transaction request by using the private key of itself and the public key of the consumer.

[0027] Further, the cloud storage provider retrieves the matched encrypted data by the following way:

[0028] The cloud storage provider continuously monitors the smart contract, and when the transaction request received by the smart contract and the corresponding re-encryption key generated by the data owner are monitored, the cloud storage provider retrieves the encrypted data of the target data owner stored by itself according to the transaction request and the corresponding re-encryption key obtained from the smart contract, and retrieves the matched encrypted data.

[0029] Further, the cloud storage provider retrieves the encrypted data of the target data owner stored by itself according to the transaction request and the corresponding re-encryption key obtained from the smart contract, and performs:

[0030] The cloud storage provider verifies the access right of the encrypted data of the target data owner by using the re-encryption key, and locates the encrypted data with the same keyword as the required data in the cloud storage provider by using the keyword trapdoor.

[0031] Further, the cloud storage provider retrieves the matched encrypted data and performs re-encryption processing, and performs:

[0032] The cloud storage provider performs re-encryption processing on the retrieved matched encrypted data according to the re-encryption key, and generates re-encrypted data.

[0033] Compared with the prior art, the present application can at least achieve one of the following beneficial effects.

[0034] The data security transaction method based on searchable re-encryption technology provided by the present application has the following advantages:

[0035] (1) Fairness of transaction is guaranteed

[0036] Based on the searchable re-encryption scheme, the application designs a data transaction scheme based on smart contract. By using the tamper-proof and traceable characteristics of the blockchain, the fairness of the transaction and the integrity of the data are ensured. The consumer pays a deposit at the beginning of the transaction, and only after successfully obtaining the required data does the transaction complete; otherwise, the consumer can recover the deposit. This mechanism effectively prevents dishonest behavior by cloud storage providers and consumers, ensuring the smooth progress of the transaction and solving the problem of the difficulty of ensuring the fairness of the existing data transaction method.

[0037] (2) Privacy improvement

[0038] The decryption key of the data owner is not exposed to the cloud storage provider during the re-encryption process. The cloud storage provider only converts the ciphertext of the data owner into ciphertext that can be decrypted by the consumer through a temporary negotiated re-encryption key, achieving data sharing while ensuring the core privacy of the data owner is not violated.

[0039] (3) Enhanced autonomy

[0040] The trapdoor in the application is completely generated independently by the consumer, without the need for the data owner to generate or confirm it. This changes the situation in traditional schemes where the data owner generates the trapdoor, increasing the interaction cost, possibly causing process delays or privacy leaks, and the consumer generates the trapdoor but needs the data owner to confirm, which risks the data owner refusing to confirm or tampering with the trapdoor. The design of this scheme allows the consumer to have higher autonomy in the data retrieval process, enabling independent trapdoor generation, simplifying the process, improving efficiency, and avoiding risks that may be caused by intermediate links.

[0041] (4) Process compatibility optimization

[0042] The trapdoor generation method in the application is closely integrated with the re-encryption process, seamlessly connecting the verification needs before and after re-encryption. This is in sharp contrast to traditional schemes where the trapdoor generation method is disconnected from the re-encryption process, the verification process is complex, and the trapdoor needs to be generated multiple times. This design of the scheme not only improves the compatibility of the process, but also supports two-stage verification in the retrieval and testing stages, further enhancing the security and reliability of the system.

[0043] The above technical solutions can be combined with each other in the application to achieve more preferred combination solutions. Other features and advantages of the application will be described in the subsequent specification, and some advantages will become apparent from the specification or by implementing the application. The purpose and other advantages of the application can be achieved and obtained from the specific content indicated in the specification and the drawings. BRIEF DESCRIPTION OF DRAWINGS

[0044] The accompanying drawings are only used for the purpose of illustrating specific embodiments and are not to be considered as limiting the present invention. Throughout the drawings, the same reference symbols denote the same components.

[0045] Figure 1 A flowchart of a data security transaction method based on searchable re-encryption technology provided by an embodiment of the present invention;

[0046] Figure 2 A flowchart of another data security transaction method based on searchable re-encryption technology provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0047] The preferred embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings, wherein the accompanying drawings constitute a part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, and are not used to limit the scope of the present invention.

[0048] A specific embodiment of the present invention discloses a data security transaction method based on searchable re-encryption technology. The flowchart of the method is as follows: Figure 1 and Figure 2 As shown, the specific steps include:

[0049] Step S1: The data owner encrypts the data itself based on the data's keywords and uploads the encrypted data to the cloud storage provider;

[0050] Step S2: The consumer generates a keyword trapdoor based on the keywords of the required data, combines the address information of the target data owner, generates a transaction request, and sends it to the smart contract, paying a deposit for the transaction request;

[0051] Step S3: When the data owner detects a transaction request initiated to it through the smart contract, it generates a re-encryption key in response to the transaction request and sends it to the smart contract;

[0052] Step S4: The cloud storage provider retrieves the matching encrypted data from the target data owner's encrypted data based on the transaction request and the corresponding re-encryption key obtained from the smart contract, performs re-encryption processing, and sends the generated re-encrypted data to the consumer;

[0053] Step S5: The consumer verifies the re-encrypted data within the specified time. If the verification is successful, the deposit for the payment transaction request is transferred to the cloud storage provider via the smart contract, ending the data transaction.

[0054] It should be noted that in the data security transaction method based on searchable re-encryption technology provided in this embodiment, key generation, data encryption, keyword trap, re-encryption key, re-encrypted data and its verification process are all implemented based on searchable re-encryption technology, as described below.

[0055] First, the data owner needs to generate his own public-private key pair before encrypting the data itself. In addition, the consumer also needs to generate his own public-private key pair before generating the keyword trapdoor. The process of generating the public-private key pair corresponds to the key generation phase in searchable re-encryption technology. The public key of the data owner is used for data encryption and authorization, and the private key is used for data decryption and signature verification. The public key of the consumer is used for authorization and verification, and the private key is used for data decryption and signature.

[0056] In step S1, the data owner encrypts the data itself based on the keyword of the data, generating encrypted data. The process of generating encrypted data corresponds to the searchable encryption phase in searchable re-encryption technology. That is, the data owner uses the searchable encryption algorithm to obtain the encrypted data according to his own private key, data and the keyword of the data.

[0057] Since the encrypted data contains the keyword, it is convenient for subsequent search and retrieval. At the same time, the encryption process can ensure the confidentiality and integrity of the data during transmission and storage, prevent unauthorized access and tampering. The data owner uploads the encrypted data to the cloud storage provider, which receives and stores the encrypted data, while ensuring the secure storage and availability of the data according to the instructions and protocols of the smart contract.

[0058] In step S2, when the consumer wants to purchase the required data, the keyword trapdoor can be generated according to the keyword of the required data and the private key of the consumer. The process of generating the keyword trapdoor corresponds to the trapdoor generation phase in searchable re-encryption technology. In this embodiment, the keyword trapdoor is the encrypted representation of the required data and the keyword by the consumer, which is used for precise search in encrypted data while protecting the privacy of the consumer's query intention.

[0059] In the specific implementation process, the consumer generates a transaction request combining his own public key and (Ethereum) address information, the generated keyword trapdoor, and the (Ethereum) address information of the target data owner, and sends it to the smart contract. Among them, the (Ethereum) address information of the target data owner is used to determine the target object of the data transaction request. It should be noted that the smart contract does not perform special processing on the received keyword trapdoor, but only stores it in the smart contract as the assignment content of the defined variable. This keyword trapdoor will serve as a key basis for subsequent data retrieval and dispute verification.

[0060] After that, the consumer also pays a deposit for the transaction request to the smart contract. It should be noted that the smart contract only records the payment of the deposit and does not process the deposit immediately. The deposit payment is a kind of guarantee measure for the consumer's commitment to the transaction. By paying the deposit, the consumer shows that he has the sincerity to complete the transaction and is willing to bear the transaction risks caused by his own behavior. The smart contract processes the deposit according to the transaction result (such as whether the data meets the requirements, whether the consumer confirms on time, etc.) at the end of the transaction to constrain the behaviors of the two parties and ensure the smooth progress of the transaction. Through the above process, the transaction initiation stage lays the foundation for the subsequent data retrieval, delivery and verification, and at the same time, the fairness and transparency of the transaction are guaranteed by using the automation and tamper-proof characteristics of the smart contract.

[0061] In step S3, the following operations are specifically performed.

[0062] Step S31: The data owner monitors the transaction request received by the smart contract in real time, judges whether the (Ethereum) address information of the target data owner in the transaction request is consistent with the (Ethereum) address information of itself, and if so, it indicates that the current transaction request is a transaction request initiated to itself.

[0063] Step S32: If the data owner authorizes the corresponding transaction request, the data owner generates a re-encryption key for responding to the transaction request using the private key of itself and the public key of the consumer.

[0064] In the specific implementation process, the data owner can decide whether to authorize the transaction request according to his own business strategy, data use terms and the historical credit of the consumer. If it is decided to authorize the transaction request, the re-encryption key is generated. The process of generating the re-encryption key corresponds to the re-encryption key generation stage in the searchable re-encryption technology.

[0065] It should be noted that some existing schemes use a bidirectional re-encryption key that allows the proxy to convert the ciphertexts of both parties at the same time, which may lead to the risk of key leakage. However, the present embodiment uses a one-way re-encryption key that only allows conversion from the public key ciphertext of the data owner to the public key ciphertext of the consumer and cannot be converted in the opposite direction. That is, the above re-encryption key generation process only supports one-way conversion, avoiding the possibility of the consumer and the cloud storage provider conspiring to deduce the private key of the data owner in the opposite direction, thereby enhancing the security of the key. The generation process of the re-encryption key is the core link of the proxy re-encryption scheme, which allows the data owner to securely transfer the access rights of the encrypted data to the consumer without decrypting the data itself.

[0066] The data owner sends the generated re-encryption key to the smart contract. In this embodiment, the role of the proxy re-encryption key is similar to an authorization code, which is a credential granted by the data owner to the consumer to access specific encrypted data. The smart contract receives and stores this re-encryption key as key information for subsequent data decryption and transaction verification. By submitting the re-encryption key to the smart contract, the data owner ensures that only authorized consumers can decrypt and access the encrypted data through the key. In the authorization process, the data owner does not need to decrypt the data, and the consumer cannot obtain the private key information of the data owner from the re-encryption key, thereby ensuring the confidentiality and privacy of the data. In addition, the smart contract as the central node of the transaction stores the re-encryption key and is responsible for subsequent verification and decryption operations. This mechanism uses the non-tamperable and transparent nature of the smart contract to ensure the fairness and credibility of the authorization process.

[0067] In step S4, the following operations are specifically performed.

[0068] Step S41: The cloud storage provider continuously monitors the smart contract, and when it detects that the smart contract receives a transaction request and the corresponding re-encryption key generated by the data owner, the cloud storage provider retrieves the encrypted data of the target data owner stored by itself according to the transaction request and the corresponding re-encryption key obtained from the smart contract, and retrieves the matching encrypted data.

[0069] Specifically, the process of retrieving the encrypted data corresponds to the cloud ciphertext search phase of the searchable re-encryption technology.

[0070] The re-encryption key ensures that only consumers authorized by the data owner can access specific data, while protecting the privacy and security of the data. The keyword trapdoor is a cryptographic representation of the content of the data that the consumer desires, ensuring that the data items matching the keyword can be quickly located without decrypting the data. The cloud storage provider retrieves the encrypted data items matching the consumer's request based on the keyword trapdoor and the re-encryption key. This process ensures the accuracy and efficiency of data search. It is worth noting that the searchable proxy re-encryption scheme allows the cloud storage provider to search for data by keyword trapdoor and re-encryption key without decrypting the data. This mechanism protects the privacy of the data and improves the efficiency of data search. The combination of keyword trapdoor and re-encryption key ensures the accuracy and security of data search. The cloud storage provider verifies the access rights of the target data owner to the encrypted data using the re-encryption key, and locates the encrypted data stored in the cloud storage provider whose keyword matches the desired data using the keyword trapdoor. The cloud storage provider, as the infrastructure provider for data storage and retrieval, is responsible for performing data search operations. Its role is neutral, and only operates according to the instructions of the smart contract and the provided keys. Through the operation of the above data search stage, the cloud storage provider can efficiently and securely complete the search task of the data, providing necessary data support for subsequent data delivery and transaction completion.

[0071] Step S42: The cloud storage provider re-encrypts the retrieved matching encrypted data based on the re-encryption key, and sends the generated re-encrypted data to the consumer.

[0072] In the implementation process, the cloud storage provider uses the re-encryption key obtained from the smart contract to perform re-encryption operations on the retrieved encrypted data. The re-encryption process corresponds to the data re-encryption phase in the searchable proxy re-encryption technology.

[0073] The re-encryption key converts the data owner's encrypted data into a form that can be decrypted by the consumer. This process does not require decryption of the original data, thereby ensuring the privacy and security of the data. The cloud storage provider applies the re-encryption key to each matching encrypted data to generate corresponding re-encrypted data, which can be decrypted by the consumer using their private key.

[0074] The cloud storage provider encapsulates the re-encrypted data to ensure the integrity and confidentiality of the data during transmission. The encapsulation process may include adding digital signatures, timestamps, and other information to prevent data tampering or forgery. After that, the cloud storage provider sends the re-encrypted data to the consumer through a secure communication channel (such as using encrypted network protocols). The transmission process needs to ensure the confidentiality and integrity of the data to prevent data from being stolen or tampered during transmission.

[0075] In step S5, the following operations are specifically performed.

[0076] Step S51: The consumer receives the re-encrypted data, verifies the re-encrypted data based on the keyword trapdoor, and recovers the required data from the re-encrypted data if the verification is passed within a specified time; and sends a message to the smart contract to confirm that the transaction is completed, and the smart contract transfers the deposit of the payment transaction request to the cloud storage provider to complete the data transaction.

[0077] The process of verifying the re-encrypted data and the process of recovering the required data from the re-encrypted data correspond to the ciphertext test phase in the searchable proxy re-encryption technology.

[0078] If the consumer does not send a message to the smart contract to confirm that the transaction is completed within the specified time t1, it may be one of the following three cases: (1) simple network delay; (2) the consumer obtains the correct data but does not want to pay the transaction amount; (3) the cloud storage provider does not send the correct data required by the consumer to the consumer. Corresponding to the above cases, the data security transaction method based on searchable re-encryption technology provided in the embodiment further includes the following steps.

[0079] Step S6: If the cloud storage provider does not receive the deposit of the payment transaction request within the specified time, the generated re-encrypted data is sent to the smart contract within the upper limit of the verification time, and the smart contract verifies the re-encrypted data based on the keyword trapdoor. If the verification is passed, the smart contract transfers the deposit of the payment transaction request to the cloud storage provider, and ends the data transaction; otherwise, the smart contract transfers the deposit of the payment transaction request to the consumer, and ends the data transaction.

[0080] More specifically, the cloud storage provider can choose to send these re-encrypted data to the smart contract within the specified time t1 to the upper limit of the verification time t2, so that the smart contract verifies whether the re-encrypted data is correct or not. If correct, the smart contract will transfer the deposit to the cloud storage provider. This process can solve the problems existing in the first and second cases. If the smart contract verifies that the re-encrypted data is incorrect, it corresponds to the third case, that is, the cloud storage provider sends incorrect data to the consumer, so the rational consumer does not send a message to the smart contract to confirm that the transaction is completed. Therefore, the smart contract will transfer the deposit back to the consumer.

[0081] In addition, the data security transaction method based on searchable re-encryption technology provided in the embodiment further includes the following steps.

[0082] Step S7: If the smart contract does not receive the re-encrypted data sent by the cloud storage provider within the upper limit of the verification time, the smart contract transfers the deposit of the payment transaction request to the consumer, and ends the data transaction.

[0083] That is, if the cloud storage provider does not send the data to the smart contract within the time t1 to t2, it means that there is no data in the data owned by the data owner that meets the needs of the consumer, so the data transaction is not established, and the smart contract will transfer the deposit back to the consumer.

[0084] In summary, the results of the transaction process are as follows.

[0085] 1) The consumer sends a message to the smart contract within the specified time t1 to confirm the completion of the transaction, and the transaction is completed, and the smart contract will transfer the deposit to the cloud storage provider. This is the most normal case, and most transactions should follow.

[0086] 2) If the consumer does not send a message to the smart contract within the specified time t1 to confirm the completion of the transaction, and the cloud storage provider sends the re-encrypted data to the smart contract within the time t2, and the smart contract verifies the correctness of the data, the transaction is completed, and the smart contract will transfer the deposit to the cloud storage provider. This case is that the consumer party has a problem, and the smart contract provides a way for the cloud storage provider to ensure the fairness of the transaction.

[0087] 3) If the consumer does not send a message to the smart contract within the specified time t1 to confirm the completion of the transaction, and the cloud storage provider sends the re-encrypted data to the smart contract within the time t2, and the smart contract verifies the error of the data, the transaction is completed, and the smart contract will transfer the deposit back to the consumer. This case is that the cloud storage provider party has a problem, and the smart contract provides a way for the consumer to ensure the fairness of the transaction.

[0088] 4) If the consumer does not send a message to the smart contract within the specified time t1 to confirm the completion of the transaction, and the cloud storage provider also does not send the re-encrypted data to the smart contract within the time t2, the transaction is completed, and the smart contract will transfer the deposit back to the consumer. This case is that the cloud storage provider party has a problem, and the smart contract provides a way for the consumer to ensure the fairness of the transaction.

[0089] First of all, it needs to be explained that in Figure 2In the embodiment, the dashed line represents the interaction with the smart contract, the solid line represents the interaction between the participants in the data transaction model, and the serial number is used to identify the order of the normal transaction process. (6b), (7c) represent the flow channel of the deposit when malicious transaction behavior occurs. In the embodiment, a commitment scheme based on the time of the blockchain is formulated according to the public transparency of the blockchain. Therefore, two timers t1 and t2 are set in the scheme, which represent the time sequence through the height of the blockchain, and satisfy t1 < t2. Among them, t1: used to set the first key time point in the transaction process, for example, the deadline for data delivery. t2: used to set the second key time point in the transaction process, for example, the trigger time of deposit refund or punishment.

[0090] In summary, in the embodiment, the cloud storage provider can convert the ciphertext uploaded by the data owner into ciphertext that can be decrypted by the consumer through the re-encryption key temporarily negotiated by the consumer and the data owner. At the same time, the decryption key of the data owner is not displayed in this process, and the converted ciphertext can still maintain the ability of keyword search. The new scheme retains the advantages of both searchable encryption and proxy re-encryption. The advantage of the searchable encryption scheme is that it can search for the data required by the consumer without revealing the plaintext. The advantage of the proxy re-encryption scheme is that it can convert data that can only be decrypted by the data owner into data that can only be decrypted by the consumer, so as not to reveal any information to the intermediate cloud storage provider. Therefore, the cloud storage provider can convert the ciphertext uploaded by the data owner into ciphertext that can be decrypted by the consumer through the re-encryption key temporarily negotiated by the consumer and the data owner. At the same time, the decryption key of the data owner is not displayed in this process, and the converted ciphertext can still maintain the ability of keyword search.

[0091] Next, the searchable re-encryption technology used in the data security transaction method based on searchable re-encryption technology provided by the embodiment is described as follows.

[0092] In the embodiment, the searchable re-encryption technology has the functions of searchable encryption and proxy re-encryption, and therefore can generate a keyword trapdoor and a re-encryption key. In the embodiment, the searchable re-encryption scheme can be represented in the following polynomial time random form:

[0093] Γ= (KeyGen, KsEnc, Trapdoor, RekeyGen, Search, ReEnc, Test, , )。

[0094] First, let g and h be the generators of the additive cyclic groups and respectively, both of which have order p, and constitute a bilinear mapping e: × → , make Z = e(g, h) ∈ ; Hash function H: → ; Finally, let the data encrypted with the keyword w = e(g, ) be. On this basis, the following searchable proxy re-encryption scheme is constructed.

[0095] (1) Key generation phase

[0096] KeyGen(1λ) → (sk, pk): data owners and data consumers can be used. After inputting the security parameter 1λ, the key generation algorithm outputs the private key sk and the public key pk of the data owner and the data consumer.

[0097] Specifically, the key generation algorithm based on the bilinear mapping of the embodiment generates a public-private key pair.

[0098] For the first data owner, select a random number and to generate the private key = ( , ), and calculate the public key = ( , )。

[0099] For the first consumer, select a random number and to generate the private key = ( , ), and calculate the public key = ( , )。

[0100] (2) Searchable encryption phase

[0101] KsEnc( )→ ( ), data owners can be used.

[0102] For the first data owner, according to the private key of the data owner, the data and the keyword of the data, use the searchable encryption algorithm to output the encrypted data (“second-level ciphertext”) .

[0103] (3) Trapdoor generation phase

[0104] Trapdoor( , ) → ( ) : consumer available.

[0105] For the first consumer, for the data with the required data key , according to its own private key and the required data key , the trapdoor generation algorithm is used to generate the key trapdoor , H is a hash function.

[0106] (4) Rekey key generation phase

[0107] RekeyGen( , ) → ( ) : data owner available.

[0108] Suppose the first consumer requests data from the first data owner, at this time, the first data owner generates a rekey =

[0109] (5) Cloud ciphertext search phase

[0110] Search( , , ) → {0, 1} : cloud storage provider available.

[0111] After inputting the second level ciphertext = KsEncKsEnc( ), the key trapdoor = Trapdoor( , ) and the rekey = RekeyGen( , ), if = , the search algorithm outputs 1, which means matching the relevant message, otherwise 0.

[0112] (6) Data re-encryption phase​​​

[0113] ReEnc( , ) → : cloud storage provider available.

[0114] The cloud storage provider re-encrypts the retrieved matching encrypted data using the re-encryption key , and obtains re-encrypted data . .

[0115] (7) Ciphertext testing phase

[0116] Test( , ) → {0, 1} : consumer and smart contract available.

[0117] After inputting and the keyword trapdoor = Trapdoor( , ), if = , the testing algorithm outputs 1, indicating that the ciphertext and the trapdoor are matched, i.e., the keyword generating the trapdoor and the message being tested are matched, otherwise 0 is output.

[0118] Dec1( , ) → m : consumer available. After inputting the consumer's private key and the ciphertext , the decryption algorithm 1 outputs the decrypted message m.

[0119] In addition, the data owner can also decrypt his own data, which is described as follows.

[0120] Dec2( , ) → m : data owner available. After inputting the data owner's private key and the ciphertext , the decryption algorithm 2 outputs the decrypted message m.

[0121] Based on the above, the improvement points of the searchable re-encryption technology in the embodiment are mainly embodied as follows.

[0122] (1) The existing part of the scheme adopts bidirectional re-encryption key, allowing the agent to convert the ciphertext of both parties at the same time, which may lead to the risk of key leakage. The scheme of the application adopts unidirectional re-encryption key, and only allows conversion from the public key ciphertext of the data owner to the public key ciphertext of the consumer, and cannot be converted in reverse. The specific implementation is: the re-encryption key is generated by the private key of the data owner and the public key of the consumer. The re-encryption key only supports one-way conversion, avoids the reverse derivation of the data owner's private key by the consumer and the storage, and enhances the security of the key.

[0123] (2) The existing scheme requires the data owner to generate a trapdoor, which may lead to the leakage of keyword privacy (the data owner knows the search content of the consumer). The scheme of the application allows the consumer to independently generate the keyword trapdoor without exposing the keyword itself to the data owner or the cloud storage. The consumer directly submits the trapdoor to the cloud storage, reducing the risk of privacy leakage in the middle link. The cloud storage can only perform matching operations through the trapdoor, but cannot parse the keyword content, realizing "keyword privacy protection".

[0124] (3) The existing scheme does not realize strong binding of the message and the keyword, and the consumer cannot verify whether the search result is a real match with the trapdoor. The scheme of the application associates the message encryption with the keyword through bilinear mapping and hash function, ensuring that the ciphertext only contains the content corresponding to the legal keyword.

[0125] (4) The test function of most schemes only supports a single ciphertext type before or after re-encryption, which cannot meet the multi-level verification requirements in the transaction process. The trapdoor of the scheme of the application can act on the second level ciphertext (original ciphertext) and the first level ciphertext (re-encrypted ciphertext) at the same time. The specific application scenario is: the smart contract can verify whether the re-encrypted ciphertext returned by the cloud storage matches the consumer's trapdoor through the test algorithm, ensuring the fairness of the transaction. After receiving the ciphertext, the consumer can perform secondary verification (before decryption) to prevent the cloud storage from tampering with the result.

[0126] Those skilled in the art can understand that all or part of the processes of the above-mentioned embodiments can be completed by a computer program instructing related hardware, and the program can be stored in a computer readable storage medium. Among them, the computer readable storage medium is a disk, an optical disk, a read-only memory or a random access memory, etc.

[0127] The above is only a preferred specific embodiment of the application, but the protection scope of the application is not limited thereto. Any changes or replacements within the technical range disclosed by the application can be easily thought of by those skilled in the art, which should be covered within the protection scope of the application.​

Claims

1. A data security transaction method based on searchable re-encryption technology, characterized in that: The method comprises: The data owner encrypts the data itself based on the data's keywords and uploads the encrypted data to the cloud storage provider; The consumer generates a keyword trapdoor based on the keywords of the required data, combines the address information of the target data owner to generate a transaction request, and sends it to the smart contract to pay the deposit for the transaction request; When the data owner detects a transaction request initiated to it through the smart contract, it generates a re-encryption key in response to the transaction request and sends it to the smart contract; The cloud storage provider uses the re-encryption key to verify the target data owner's access rights to the encrypted data based on the transaction request and the corresponding re-encryption key obtained from the smart contract. It then uses a keyword trapdoor to locate encrypted data stored in the cloud storage provider that has the same keyword as the desired data, and retrieves the encrypted data as the matching data from the target data owner's encrypted data. The provider then re-encrypts the retrieved matching encrypted data using the re-encryption key and sends the generated re-encrypted data to the consumer. The consumer verifies the re-encrypted data based on the keyword trapdoor within the specified time. If the verification is successful, the required data is restored from the re-encrypted data, and the deposit for the payment transaction request is transferred to the cloud storage provider through the smart contract, completing the data transaction.

2. The data security transaction method based on searchable re-encryption technology according to claim 1 is characterized in that: The method further comprises: If the cloud storage provider does not receive the deposit for the payment transaction request within the specified time, the generated re-encrypted data will be sent to the smart contract within the verification time limit, and the smart contract will verify the re-encrypted data based on the keyword trapdoor. If the verification is successful, the smart contract transfers the deposit for the transaction request to the cloud storage provider, completing the data transaction. Otherwise, the smart contract transfers the deposit for the transaction request to the consumer, ending the data transaction.

3. The data security transaction method based on searchable re-encryption technology according to claim 2 is characterized in that: The method further comprises: If the smart contract does not receive the re-encrypted data sent by the cloud storage provider within the verification time limit, the smart contract will transfer the deposit for paying the transaction request to the consumer, ending the data transaction.

4. The data security transaction method based on searchable re-encryption technology according to any one of claims 1 to 3, characterized in that: The consumer generates a keyword trapdoor as follows and executes: The consumer generates a keyword trapdoor based on the keyword of the required data and its own private key.

5. The data security transaction method based on searchable re-encryption technology according to claim 4 is characterized in that: The consumer generates a transaction request as follows: The consumer generates a transaction request by combining his or her own public key and address information, the generated keyword trapdoor, and the address information of the target data owner.

6. The data security transaction method based on searchable re-encryption technology according to claim 5 is characterized in that: The data owner determines whether the transaction request is directed to him / her in the following ways: The data owner monitors the transaction requests received by the smart contract in real time and determines whether the address information of the target data owner in the transaction request is consistent with its own address information. If they are consistent, it indicates that the current transaction request is a transaction request initiated to itself.

7. The data security transaction method based on searchable re-encryption technology according to claim 6 is characterized in that: The data owner generates a re-encryption key in response to the transaction request and sends it to the smart contract in the following way: If the data owner authorizes the corresponding transaction request, he or she uses his or her own private key and the consumer's public key to generate a re-encryption key in response to the transaction request.

8. The data security transaction method based on searchable re-encryption technology according to claim 7 is characterized in that: The cloud storage provider retrieves the matching encrypted data as follows: The cloud storage provider continuously monitors the smart contract. When it detects a transaction request received by the smart contract and the corresponding re-encryption key generated by the data owner, the cloud storage provider searches the encrypted data of the target data owner stored in its own storage based on the transaction request and the corresponding re-encryption key obtained from the smart contract and retrieves the matching encrypted data.

Citation Information

Patent Citations

  • Supervisable data security sharing method and device based on double-chain architecture

    CN113868708A

  • Multi-keyword searchable encryption method based on block chain

    CN114741711A