Dynamic searchable ciphertext cloud storage sharing method and system based on block chain technology

By adopting a blockchain-based dynamic searchable encrypted cloud storage sharing method, the problems of complex key management, difficult access control, and insecure updates are solved. This method achieves efficient and secure data management and fine-grained access control, resists tampering and collusion attacks, and ensures data privacy and security.

CN121664519APending Publication Date: 2026-03-13CHONGQING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-10
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Existing dynamic searchable encryption schemes are complex in key management and distribution, cannot achieve fine-grained search access control, struggle to balance efficient dynamic updates and security, and are susceptible to tampering and collusion attacks, making it difficult to guarantee data security and privacy.

Method used

A dynamic, searchable, encrypted cloud storage sharing method based on blockchain technology is adopted. Decentralized identity and public key management is achieved through blockchain, combined with asymmetric encryption for secure key distribution, a chain-based update structure to ensure forward and backward security, and fine-grained access control is achieved through attribute-based encryption to resist tampering and collusion attacks.

Benefits of technology

It achieves secure and auditable key management, provides flexible and fine-grained search permission control, balances the efficiency and security of dynamic updates, effectively resists various attacks, and ensures data privacy and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121664519A_ABST
    Figure CN121664519A_ABST
Patent Text Reader

Abstract

The invention relates to the field of data security and cloud storage, and provides a dynamic searchable ciphertext cloud storage sharing method and system based on a block chain technology. The method comprises the steps that a system is initialized, a system key is generated by a block chain, and a cloud server initializes an encrypted database and a user table; the user registers, the user negotiates a key with the block chain, obtains an attribute private key and a digital certificate, and securely distributes part of the key to the cloud server; data storage: a data owner generates an encrypted search tag, a chain node and a key ciphertext, and the encrypted search tag, the chain node and the key ciphertext are respectively stored in a cloud server and a block chain; and data access: the data user decrypts the block chain to obtain the search capability, drives the cloud server to traverse the chain structure and returns a result. According to the method, while dynamic data addition and deletion are supported, forward and backward security is naturally realized through a chain structure, fine-grained search permission control is realized in combination with attribute-based encryption, and tampering, counterfeit and collusion attacks can be resisted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data security, and further to the fields of blockchain and cloud storage security, and particularly to a dynamic searchable encrypted cloud storage sharing method and system based on blockchain technology. Background Technology

[0002] With the widespread adoption of cloud computing technology, businesses and individuals tend to outsource data storage to cloud service providers to save on local storage and management costs. However, this practice raises serious data privacy and security challenges. To ensure data confidentiality, data owners typically encrypt data before uploading, but this makes traditional keyword searches difficult.

[0003] To enable computation on encrypted data, techniques such as homomorphic encryption have been proposed, allowing arbitrary operations to be performed directly on encrypted data. However, fully homomorphic encryption schemes generally suffer from huge computational overhead and high communication costs, making them difficult to implement in practical large-scale data search scenarios.

[0004] Searchable encryption is the primary means of solving this problem, allowing users to perform direct searches on the ciphertext. Among these, Dynamically Searchable Symmetric Encryption (DSSE) schemes, which support CRUD operations on encrypted data, are particularly valuable. However, existing DSSE schemes still face several key challenges:

[0005] First, key management and distribution are complex. In the DSSE scheme, secure data sharing requires distributing keys to all authorized users. This process is complex to manage, and a key breach could jeopardize the security of all encrypted data. How to securely and efficiently manage and distribute search keys has been a long-standing challenge.

[0006] Second, there is a conflict between efficient dynamic updates and security attributes. DSSE solutions often struggle to balance forward and backward security when supporting data updates. Forward security means that newly added documents will not reveal previously searched keyword information, while backward security means that after a document is deleted, subsequent searches will no longer retrieve that document. Many solutions, in implementing dynamic updates, are either inefficient or sacrifice these critical security attributes.

[0007] Third, there is a lack of truly fine-grained search permission management. Most existing solutions are based on an "all or nothing" sharing model, making it difficult to achieve flexible search permission control based on user attributes. Although attribute-based encryption technology itself supports fine-grained access control, its computational overhead is high, and how to efficiently and securely combine it with searchable encryption remains a poorly resolved issue.

[0008] Fourth, it faces threats of tampering, impersonation, and collusion attacks. Malicious users may tamper with stored encrypted indexes or encrypted ciphertext. More seriously, cloud servers may collude with one or more unauthorized users to illegally access newly updated data using old keys they hold—a collusion attack.

[0009] Therefore, there is an urgent need in this field for a secure data management solution that can simultaneously solve the problems of secure key distribution, achieve truly fine-grained search access control, support efficient dynamic updates and possess forward and backward security, and effectively resist tampering, forgery and collusion attacks. Summary of the Invention

[0010] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:

[0011] A method and system for dynamically searchable encrypted cloud storage sharing based on blockchain technology, characterized in that the method includes system initialization, user registration, data storage, and data access processes, comprising the following steps:

[0012] S1. System Initialization: Construct a dynamic, searchable, symmetric encrypted cloud storage sharing system based on blockchain. This system includes entities such as cloud storage service provider CSP, users (which can be divided into data owner DO and data user DU according to their roles), and blockchain BC. BC executes the initialization algorithm to generate the system public key PK parameter and master key MSK parameter. At the same time, CSP initializes the empty encrypted database EDB and user table USER.

[0013] S2. User Registration: The user sends a registration request to BC, and the two parties negotiate a key through the ECDH protocol to obtain a shared key K. enc BC generates an attribute-based decryption private key SK for the user, and also generates a unique identity identifier, an asymmetric encryption key pair, and a digital certificate for the user, through K. enc The encrypted data is returned to the user; the user generates a partial key based on the encrypted information returned by BC. and seed key S DO It is transmitted to the CSP after being encrypted with the CSP public key;

[0014] S3. Data Storage: The user, as the data owner (DO), generates encrypted search tags (l), chained transformation nodes (TP), key material ciphertext (CT), and encrypted data ciphertext for all keywords corresponding to the data to be stored in the cloud. right After digitally signing and attaching its digital certificate, the DO is uploaded to the CSP. The CSP verifies the DO's digital certificate and digital signature before... The data is recorded in the encrypted database EDB; at the same time, DO digitally signs CT and uploads it to BC along with its digital certificate. After BC verifies DO's digital signature and digital certificate, it records CT on the blockchain.

[0015] S4. Data Access: As a data user, DU sends a request containing keywords, its digital signature, and digital certificate to BC; after verifying DU's digital signature and digital certificate, BC returns the corresponding key material ciphertext; DU uses its private key SK to decrypt and obtain the key material, and then initiates a search request to CSP containing the key, its digital signature, and digital certificate; after verifying DU's digital signature and digital certificate, CSP uses the key to traverse the chain structure and returns the matching encrypted data, which is then finally decrypted by DU.

[0016] Compared with the prior art, the technical method provided by the present invention has the following significant advantages:

[0017] First, it enables secure and auditable key management. By leveraging blockchain to achieve decentralized identity and public key management, and combining it with asymmetric encryption to securely distribute partial keys, core key materials are dispersed among DOs, CSPs, and DUs. This prevents a single entity from possessing all key information, fundamentally simplifying key management and enhancing security.

[0018] Second, it provides flexible, fine-grained search permission control. By deeply integrating attribute-based encryption with searchable encryption, data owners can precisely control keyword access permissions through rich access policies, meeting the privacy protection needs of complex application scenarios.

[0019] Third, it balances the efficiency of dynamic updates with forward and backward security. The innovative chained update structure ensures that each data update generates an irrelevant search token, preventing the cloud server from associating updates with historical searches, thus naturally providing forward security; through a logical deletion mechanism, backward security is effectively achieved, and the entire update process is efficient and traceable.

[0020] Fourth, construct a robust defense against various attacks. Anti-tampering and anti-forgery: Keyword access policies are stored in encrypted form on an immutable blockchain, and the legitimacy of a search request depends entirely on the successful decryption of this encrypted text. Attackers cannot impersonate legitimate users because they cannot obtain the attribute private key that satisfies the policy, nor can they forge the digital certificate issued by the blockchain. Anti-collusion attack: The generation of search capabilities requires the joint participation of a portion of the key held by the DO and the attribute private key held by the DU; neither can be missing. Even if the CSP colludes with a malicious DU, it cannot exceed its granted attribute permissions or impersonate other DOs to update, thus effectively resisting collusion attacks. Attached Figure Description

[0021] Figure 1 This is a schematic diagram of the architecture of a dynamic searchable encrypted cloud storage sharing method and system based on blockchain technology according to the present invention.

[0022] Figure 2 This is a flowchart illustrating a dynamic searchable encrypted cloud storage sharing method and system based on blockchain technology, according to the present invention. Detailed Implementation

[0023] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0024] like Figure 1 The proposed solution comprises a blockchain BC, a cloud storage service provider CSP, and multiple users (who can be categorized as data owners DOs and data requesters DUs based on their roles). In this solution, the BC acts as the key management center and key material storage center, responsible for distributing keys and key materials to users; the CSP stores encrypted data and provides query services to users; the DO is responsible for setting access permissions, performing symmetric encryption on stored data, and attribute-based encryption on key materials; if a DU's attribute set satisfies the policy, it can decrypt the key materials to obtain the key and further acquire plaintext data.

[0025] This invention proposes a dynamic searchable encrypted cloud storage sharing method and system based on blockchain technology, specifically including the following steps:

[0026] S1. System Initialization: Construct a dynamic, searchable, symmetric encrypted cloud storage sharing system based on blockchain. This system includes entities such as cloud storage service provider CSP, users (which can be divided into data owner DO and data user DU according to their roles), and blockchain BC. BC executes the initialization algorithm to generate the system public key PK parameter and master key MSK parameter. At the same time, CSP initializes the empty encrypted database EDB and user table USER.

[0027] S2. User Registration: The user sends a registration request to BC, and the two parties negotiate a key through the ECDH protocol to obtain a shared key K. enc BC generates an attribute-based decryption private key SK for the user, and also generates a unique identity identifier, an asymmetric encryption key pair, and a digital certificate for the user, through K. enc The encrypted data is returned to the user; the user generates a partial key based on the encrypted information returned by BC. and seed key S DOIt is transmitted to the CSP after being encrypted with the CSP public key;

[0028] S3. Data Storage: The user, as the data owner (DO), generates encrypted search tags (l), chained transformation nodes (TP), key material ciphertext (CT), and encrypted data ciphertext for all keywords corresponding to the data to be stored in the cloud. right After digitally signing and attaching its digital certificate, the DO is uploaded to the CSP. The CSP verifies the DO's digital certificate and digital signature before... The data is recorded in the encrypted database EDB; at the same time, DO digitally signs CT and uploads it to BC along with its digital certificate. After BC verifies DO's digital signature and digital certificate, it records CT on the blockchain.

[0029] S4. Data Access: As a data user, DU sends a request containing keywords, its digital signature, and digital certificate to BC; after verifying DU's digital signature and digital certificate, BC returns the corresponding key material ciphertext; DU uses its private key SK to decrypt and obtain the key material, and then initiates a search request to CSP containing the key, its digital signature, and digital certificate; after verifying DU's digital signature and digital certificate, CSP uses the key to traverse the chain structure and returns the matching encrypted data, which is then finally decrypted by DU.

[0030] like Figures 1-2 As shown in this embodiment, a dynamic searchable encrypted cloud storage sharing method and system based on blockchain technology includes the following steps:

[0031] S1. Construct a blockchain-based, dynamically searchable, symmetric encrypted cloud storage sharing system. This system includes a cloud storage service provider (CSP), users (who can be categorized as data owners (DO) and data users (DU) based on their roles), and a blockchain (BC). BC executes the attribute-based encryption (CP-ABE) initialization algorithm CP-ABE.Setup(λ), taking the security parameter λ as input and outputting the system public key PK and master key MSK. Simultaneously, BC generates its own asymmetric signature key pair (PK) for issuing digital certificates. BC SK BC And publicly PK. BC The CSP initializes an empty encrypted database EDB and an empty user identity table USER. Additionally, the CSP generates its own asymmetric encryption key pair (PK) for secure communication. CSP SK CSP And publicly PK. CSP .

[0032] The establishment of common system parameters has laid the foundation for the subsequent registration and interaction of various entities.

[0033] S2. User Registration: The user sends a registration request to BC, and the two parties negotiate a key through the ECDH protocol to obtain a shared key K. enc BC generates an attribute-based decryption private key SK for the user, and also generates a unique identity identifier, an asymmetric encryption key pair, and a digital certificate for the user, through K. enc The encrypted data is returned to the user; the user generates a partial key based on the encrypted information returned by BC. and seed key S DO It is transmitted to the CSP after being encrypted with the CSP public key;

[0034] S21. The user first initializes a secret seed key S. DO Subsequently, the user submits attribute set S to BC. user and username N user Then, a key exchange protocol based on ECDH is performed with BC to obtain the shared key K. enc This key is used to encrypt sensitive data returned by subsequent BC operations.

[0035] S22, BC uses the master key MSK to run CP-ABE.KeyGen(MSK,S user The algorithm generates a private key SK for attribute-based decryption for the user. Then, BC uses the username N. user Generate a unique identifier U for the user user Asymmetric key pairs ( user SK user ) and the digital certificate Cert signed by BC user BC will (U user ,(PK user SK user ),SK,Cert user Using session key K enc The encryption yields ciphertext C1. Simultaneously, BC permanently records the user's registration information on the blockchain.

[0036] S23. After receiving the response, the user uses the locally calculated session key K. enc Decrypting ciphertext C1 yields the identity identifier, key pair, attribute private key, and certificate. Next, the user generates a partial key. And use the CSP's public key PK CSP Encrypt it to obtain ciphertext C2. Finally, the user digitally signs ciphertext C2 and sends ciphertext C2, the digital signature, and the digital certificate to the CSP.

[0037] S24. After receiving the message, CSP first uses the user's public key to PK. user (Available from the certificate) Verify the signature, then use BC's public key to PK. BC Cert Certificate Verificationuser The authenticity of the information is verified. After all verifications are successful, the CSP uses its own private key SK. CSP Decrypt part of the key It is then stored in the user table USER along with the user's certificate.

[0038] Through this step, the user obtains a legitimate identity within the system and securely entrusts part of their key to the CSP, preparing for subsequent secure data management and gaining the ability to search and decrypt within their attribute permissions.

[0039] S3. Data Storage: The user, as the data owner (DO), generates encrypted search tags (l), chained transformation nodes (TP), key material ciphertext (CT), and encrypted data ciphertext for all keywords corresponding to the data to be stored in the cloud. right After digitally signing and attaching its digital certificate, the DO is uploaded to the CSP. The CSP verifies the DO's digital certificate and digital signature before... The data is recorded in the encrypted database EDB; at the same time, DO digitally signs CT and uploads it to BC along with its digital certificate. After BC verifies DO's digital signature and digital certificate, it records CT on the blockchain.

[0040] S31. For each keyword ω in the document to be operated on, DO uses its seed key S DO Using the keyword ω, an index parameter K1 and a document identifier derived key K2 are derived through a pseudo-random function F. That is: K1||K2=F(S DO (ω). Subsequently, this is combined with the partial keys previously distributed to the CSP. Calculate the final key for this keyword.

[0041] S32. When the data owner needs to add a searchable keyword ω to a new document (identified by id), perform the following detailed steps:

[0042] S321. DO generates a random number R. new Calculate the search label l = F(K) ω ,R new ), calculate the encryption key for the document identifier. And use this key to encrypt the document identifier id, obtaining ciphertext C. id .

[0043] S322. DO: Obtain the random number R of the current head of the chain under this keyword. head (If this is the first time this keyword has been added, then R) head Initialize to a specific random value R null And construct new chained transformation nodes. This operation links the new node to the old chain head, forming an immutable chain.

[0044] S323, DO will search for the necessary key materials (K1, K2, R) new Msg is treated as plaintext and an access policy T is set for it. DO runs the attribute-based encryption algorithm, using the system public key PK and policy T to generate the policy ciphertext T. That is: CT = CP - ABE.Encrypt(PK, Msg, T).

[0045] S324 and DO digitally sign CT and its associated keyword hash H(ω), then upload (H(ω),CT), the digital signature, and the digital certificate to the blockchain BC. After BC verifies the digital signature and digital certificate, it permanently stores the record.

[0046] S325, DO will set the tuple (l, (C) to... id ,TP new The tuple, digital signature, and digital certificate are then sent to the CSP. After verifying the digital signature and certificate, the CSP performs the following operation in the EDB (Encryption Database): updating the value corresponding to tag l to (C...). id ,TP new At the same time, DO updates the link head corresponding to the keyword ω to R locally. new .

[0047] S33. When the data owner needs to delete an existing document identifier id (assuming its corresponding random number is R) id When associating with the keyword ω, perform the following detailed steps:

[0048] S331. DO finds the node R to be deleted in the locally stored chain structure for the keyword ω. id and its predecessor node R prev and successor node R next In order to make R id To remove it from the chain, its predecessor node R needs to be removed. prev and successor node R next Connect directly. DO calculates a new transformation node. This new TP′ next It will replace the original pointer to R. id The transformation node allows traversal to bypass R. id .

[0049] S332 is the predecessor node R. prev Generate tags prev =F(K) ω ,Rprev Generate information about l. prev Update instruction: tuple is (l prev ,(⊥,TP′ next For node R to be deleted id The tag is generated by itself. id =F(K) ω ,R id Generate information about l. id Deletion command: tuple is (l id ,(⊥,⊥)).

[0050] S333 and DO will update the above two commands (l prev ,(⊥,TP′ next )) and (l id After digitally signing (⊥,⊥), the digital signature and digital certificate are sent together to the CSP. The CSP verifies the digital signature and digital certificate, and then processes the tag l. prev Update its value to (C) id-prev ,TP′ next (where C) id-prev (This is the ciphertext in the original value, remaining unchanged). For label l id This sets its value to null, thus logically deleting the entry.

[0051] Through this addition and deletion mechanism, the system achieves secure and efficient dynamic data management. In the addition operation, a unique random number R is generated for each update. new Furthermore, a chain-like transformation node is constructed to ensure that newly added document indexes are independent of historical search tokens, naturally achieving forward security from a cryptographic perspective and effectively preventing new data from leaking past search patterns. During deletion operations, logical deletion and chain-like structure repair ensure that the deleted document identifier is permanently removed from the search chain, achieving backward security and ensuring that deleted data cannot be recovered by subsequent searches. Simultaneously, the authorization records (policy ciphertext CT) for all update operations are anchored to an immutable blockchain, providing complete audit and traceability capabilities for data lifecycle management.

[0052] S4. Data Access: As a data user, DU sends a request containing keywords, its digital signature, and digital certificate to BC; after verifying DU's digital signature and digital certificate, BC returns the corresponding key material ciphertext; DU uses its private key SK to decrypt and obtain the key material, and then initiates a search request to CSP containing the key, its digital signature, and digital certificate; after verifying DU's digital signature and digital certificate, CSP uses the key to traverse the chain structure and returns the matching encrypted data, which is then finally decrypted by DU.

[0053] S41. DU constructs a search request, which includes the hash value H(ω) of the keyword ω and the identity U of the data owner to be obtained. user The request is digitally signed and sent to BC along with a digital certificate.

[0054] S42. After BC verifies DU's signature, it searches for U on the chain. user It has the policy ciphertext CT corresponding to the keyword H(ω) and returns it to DU.

[0055] S43, DU uses its own attribute private key SK to decrypt CT. If its attributes satisfy the policy, the key material (K1, K2, R) is successfully decrypted. head =CP-ABE.Decrypt(CT,SK). Here, R head This is the random number corresponding to the latest document under this keyword, and it is also the starting point for traversing the chain structure. DU pairs (K1, U user ,R head The digital certificate is signed and sent to the CSP.

[0056] After S44 and CSP verify the digital signature and digital certificate, according to U user Retrieve the partial key corresponding to DO from the user table USER. And calculate the keyword key

[0057] S45, CSP Order R curr =R head From R head Begin iteratively traversing the linked structure:

[0058] a. Calculate the search label of the current node. curr =F(K) ω ,R curr ).

[0059] b. Search for tags in EDB curr Obtain the corresponding ciphertext C id and conversion node TP curr .

[0060] c. (C) id ,R curr Add to the result set.

[0061] d. Calculate the random number of the previous node.

[0062] e. Let R curr =R prev Repeat step ad until the end of the chain (when a specific terminator R is encountered). null ).

[0063] S46, CSP returns the collected result set to DU.

[0064] S47, DU for each (C) in the result set id Using K2 and random number R), curr Derive the decryption key Decrypting C id Then, the plaintext document identifier id is obtained, and finally, the set of all document identifiers searched is obtained.

[0065] This step forms the core of the secure search and data acquisition in the entire solution. Its innovation lies in decoupling the search process into two authorization phases: First, the DU must obtain the "qualification" and key materials for the search from the blockchain through attribute-based decryption, achieving attribute-based, spoofable access control; second, the CSP, without knowing the plaintext of the search keywords, efficiently traverses the chain structure using the key to perform encrypted retrieval. This design not only ensures the privacy and accuracy of the search but also prevents malicious servers from associating multiple searches with the same keyword, providing a powerful ability to hide search patterns.

[0066] In summary, through the above specific embodiments, the present invention successfully constructs a secure, reliable, efficient data management solution with strong security attributes, effectively solving the various challenges raised in the background art.

[0067] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A method and system for dynamically searchable encrypted cloud storage and sharing based on blockchain technology, characterized in that, The method and system include system initialization, user registration, data storage, and data access processes, including the following steps: S1. System Initialization: Construct a dynamic, searchable, symmetric encrypted cloud storage sharing system based on blockchain. This system includes entities such as cloud storage service provider CSP, users (which can be divided into data owner DO and data user DU according to their roles), and blockchain BC. BC executes the initialization algorithm to generate the system public key PK parameter and master key MSK parameter. At the same time, CSP initializes the empty encrypted database EDB and user table USER. S2. User Registration: The user sends a registration request to BC, and the two parties negotiate a key through the ECDH protocol to obtain a shared key K. enc BC generates an attribute-based decryption private key SK for the user, and also generates a unique identity identifier, an asymmetric encryption key pair, and a digital certificate for the user, through K. enc The encrypted data is returned to the user; the user generates a partial key based on the encrypted information returned by BC. and seed key S DO It is transmitted to the CSP after being encrypted with the CSP public key; S3. Data Storage: The user, as the data owner (DO), generates encrypted search tags (l), chained transformation nodes (TP), key material ciphertext (CT), and encrypted data ciphertext for all keywords corresponding to the data to be stored in the cloud. right After digitally signing and attaching its digital certificate, the DO is uploaded to the CSP. The CSP verifies the DO's digital certificate and digital signature before... The data is recorded in the encrypted database EDB; at the same time, DO digitally signs CT and uploads it to BC along with its digital certificate. After BC verifies DO's digital signature and digital certificate, it records CT on the blockchain. S4. Data Access: As a data user, DU sends a request containing keywords, its digital signature, and digital certificate to BC; after verifying DU's digital signature and digital certificate, BC returns the corresponding key material ciphertext; DU uses its private key SK to decrypt and obtain the key material, and then initiates a search request to CSP containing the key, its digital signature, and digital certificate; after verifying DU's digital signature and digital certificate, CSP uses the key to traverse the chain structure and returns the matching encrypted data, which is then finally decrypted by DU.

2. The method and system for dynamically searchable encrypted cloud storage sharing based on blockchain technology according to claim 1, characterized in that, Step S1 specifically includes the following steps: S11. BC runs the CP-ABE algorithm for initialization, generating the system's public key and master key (PK, MSK), and generating an asymmetric encryption key pair (PK) for issuing certificates. BC SK BC And publicly PK. BC ; S12. CSP initializes the empty encrypted database EDB and user table USER; CSP generates its own asymmetric encryption key pair (PK). CSP SK CSP And publicly PK. CSP .

3. The method and system for dynamically searchable encrypted cloud storage sharing based on blockchain technology according to claim 1, characterized in that, Step S2 specifically includes the following steps: S21. The user sends user attribute set, username, and other information to BC to request registration, and executes a key exchange protocol based on ECDH with BC to derive a shared session key K. enc This is used to protect the security of registered communications; S22, BC uses the master key MSK and user attribute set to run the attribute-based key generation algorithm to generate a decryption private key SK for the user; BC generates a unique identifier U for the user. user Asymmetric encryption key pairs (PK) user SK user ) and the digital certificate Cert signed by BC user The registration information is then recorded on the blockchain, and BC uses the session key K. enc Encryption (U user ,(PK user SK user ),Cert user The encrypted text C1 is obtained and returned to the user; S23, User uses session key K enc After decrypting ciphertext C1, a partial key is generated. and seed key S DO Use CSP's public key PK CSP Encryption part key Obtain the ciphertext C2, along with its digital certificate Cert. user Together, they are digitally signed and sent to the CSP. After S24 and CSP verify the user's digital signature and digital certificate, they use the private key SK. CSP Decrypting C2 to obtain a partial key Will and Cert user It is stored in the USER table.

4. The method and system for dynamically searchable encrypted cloud storage and sharing based on blockchain technology according to claim 1, characterized in that, Step S3 specifically includes the following steps: S31, The user DO, as the data owner, uses the seed key S DO From the keyword ω, the index parameter K1 and the uploaded data derived key K2 are derived. DO combines a portion of the key. The keyword key K is derived from the index parameter K1. ω ; S32. For the add operation, DO generates a random number R. new R new Combining K ω Calculate the search tag l; R new Generate a symmetric key using K2 Encrypted data to obtain ciphertext And construct chained transformation nodes Where R head The result is a random number at the chain head; for deletion operations, the sum and transformation of node TP need to be performed. new Leave blank; S33, DO uses the CP-ABE algorithm to store the key material (K1, K2, R) new Encrypt the key material into ciphertext CT; digitally sign it and attach its digital certificate Cert. user The data is then uploaded to BC; after BC verifies the digital signature and digital certificate, it records the CT on the blockchain. S34, DO will Perform digital signing and attach its digital certificate Cert user Upload to CSP; after CSP verifies the digital signature and digital certificate, it will... Recorded in the encrypted database EDB.

5. The method and system for dynamically searchable encrypted cloud storage sharing based on blockchain technology according to claim 1, characterized in that, Step S4 specifically includes the following steps: S41. As a data user, DU sends a request to BC to obtain the keyword ω, along with its digital signature and digital certificate Cert. user ; S42. After verifying the digital signature and digital certificate of DU, BC returns the corresponding key material ciphertext CT to DU. S43, DU uses the private key SK and the ciphertext CT to decrypt using the CP-ABE algorithm. If the policy is satisfied, (K1, K2, R) can be obtained. head ), DU will (K1,U user ,R head Perform digital signing and attach its digital certificate Cert user Send to CSP; S44, CSP verifies the digital signature and digital certificate of the DU, and according to the U user Obtain partial key Calculate the keyword key K ω ; S45, CSP from R head Begin by iteratively traversing the linked structure, using the key K. ω Calculate the search tag l and retrieve the corresponding encrypted data from the EDB. Continue until the end of the chain, then return all results to DU. S46, DU uses K2 to derive the data decryption key. And decrypt the encrypted data The final result is a set of plaintext data.