Data access control method and device based on block chain and improved CP-ABE

By introducing blockchain technology and hidden access strategy in the CP-ABE solution, the complex problems of sensitive information leakage and decryption operations in the traditional CP-ABE solution are solved, and the secure and efficient storage and sharing of data is achieved, which improves the Data sharing efficiency and security.

CN119494105APending Publication Date: 2025-02-21QILU UNIVERSITY OF TECHNOLOGY (SHANDONG ACADEMY OF SCIENCES) +2
View PDF 0 Cites 6 Cited by

Patent Information

Application Number
CN202411455257.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-18
Publication Date
2025-02-21

AI Technical Summary

Technical Problem

The traditional CP-ABE solution has problems such as leakage of sensitive information, complex decryption operations, and difficulty in updating user attributes in data access control, which is difficult to meet the data security storage and sharing needs in big data environments.

Method used

By introducing blockchain technology and improved CP-ABE solutions, hiding access policies, utilizing the anti-tampering characteristics of blockchain, combining cloud outsourcing servers for efficient decryption calculations, designing attribute-based encryption solutions that support user tracking and flexible revocation.

Benefits of technology

Effectively avoid plaintext transmission of sensitive information in the access policy, reduce the risk of user privacy leakage, ensure data integrity and credibility, realize flexible data access control and efficient decryption calculation, improve data sharing efficiency and Security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119494105A_ABST
    Figure CN119494105A_ABST
Patent Text Reader

Abstract

The invention provides a data access control method and device based on a block chain and improved CP-ABE, and belongs to the technical field of block chains. The method comprises the following steps: an authority generates key parameters including a system public key and a master key, and uploads the master key to a block chain; the user sends an attribute set and an identity label of the user to an authority, the identity label of the user is hidden, an attribute private key, a search private key, a conversion key and a recovery key are generated for the user, the conversion key is sent to the cloud server, and the attribute private key, the search private key and the recovery key are sent to the user, and the user comprises a data owner and a data visitor; the data owner carries out offline encryption, online encryption and index encryption on the file in sequence, and index information is linked; the data accessor performs data access; and the data accessor decrypts the data. According to the method, the problems in data storage and access control are effectively solved, the integrity of user data is protected, and the calculation burden of a data access user is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a data access control method and device based on blockchain and improved CP-ABE, belonging to the technical field of blockchain. Background Art

[0002] With the rapid development of Internet technology, the advent of the big data era has brought the speed of data generation and dissemination to an unprecedented level. This change has not only greatly enriched the sources and types of information, but also put forward more stringent requirements for data storage and management. Traditional local storage methods are difficult to meet the needs of the current big data environment due to their limitations in capacity, management costs and data sharing. Therefore, cloud storage technology came into being, and with its massive storage space, convenient management methods and efficient data sharing capabilities, it quickly became the mainstream choice for big data storage.

[0003] However, while cloud storage services provide convenience, they also expose some security risks. Since cloud storage platforms usually only focus on providing storage services and lack investment in data security protection, user data in the cloud environment faces the risk of illegal access, tampering or leakage. In order to meet this challenge, researchers have begun to explore how to achieve secure storage and sharing of data in cloud storage environments.

[0004] As an innovative encryption method, Attribute-Based Encryption (ABE) provides a new solution for secure data storage and sharing with its fine-grained data encryption method and flexible data sharing mechanism. In particular, Ciphertext Policy Attribute-Based Encryption (CP-ABE) achieves precise access control to data by embedding access policies into ciphertext. This technology not only improves the flexibility of data storage, but also ensures the security of data during sharing. Therefore, it has broad application prospects in the field of big data storage and security management.

[0005] However, the traditional CP-ABE scheme also has some shortcomings. For example, access policies are usually sent in plain text, which may lead to the leakage of sensitive information, thus threatening the privacy and security of users. In addition, with the increase in the number of users and the diversification of attributes, the decryption operation in the CP-ABE scheme becomes more and more complicated. For users with limited resources, the decryption process becomes a huge challenge. At the same time, the flexibility and variability of user attributes also requires the allocation of additional computing resources in the protocol for the update calculation after revocation, and the forward and backward security of the updated protocol is also difficult to guarantee.

[0006] In response to these problems, researchers began to explore ways to improve and optimize the CP-ABE scheme. One feasible approach is to introduce policy hiding technology into the CP-ABE scheme to protect the privacy of access policies. In addition, blockchain technology and distributed storage systems (such as the Interstellar File System IPFS) can be used to build a distributed data storage mechanism that combines on-chain and off-chain to protect the integrity of user data. At the same time, by introducing outsourced computing technology, most of the decryption calculations can be outsourced to third-party cloud servers, thereby reducing the computing burden of data access users. On this basis, an attribute-based encryption scheme that supports user tracking and flexible revocation can also be designed to further improve data security and availability.

[0007] In summary, a data storage access control method based on blockchain and improved attribute-based encryption is needed to solve the challenges faced by data security storage and sharing in a big data environment. Summary of the invention

[0008] The purpose of the present invention is to provide a data access control method and device based on blockchain and improved CP-ABE, so as to realize the safe and efficient storage and sharing of data.

[0009] In order to achieve the above object, the present invention is implemented through the following technical solutions: A blockchain-based and improved The data access control method includes: The authority generates key parameters, including the system public key and the master key, and uploads the master key to the blockchain for other users to access; The user sends his attribute set and identity to the authority, which hides the user's identity and generates an attribute private key, a search private key, a conversion key and a recovery key for the user, sends the conversion key to the cloud server, and sends the attribute private key, the search private key and the recovery key to the user, including the data owner and the data accessor; The data owner encrypts the file offline, online, and index in sequence, and uploads the index information to the chain; The data accessor performs data access; obtains the file ID of the required file from the blockchain, uses the search private key to generate a keyword index, and sends it and the file ID to the cloud server. The cloud server verifies and performs a semi-decryption operation and sends the intermediate ciphertext to the data accessor; The data accessor decrypts the data; the data accessor decrypts the intermediate ciphertext, obtains the key and the search token, obtains the file storage address from the token, obtains the ciphertext, uses the key to decrypt the ciphertext, and obtains the file.

[0010] Preferably, the authoritative center generates the attribute private key and searches for the private key in the following specific manner: The data accessor sets the attributes and identity Send to the authority center.

[0011] Authoritative Center Selection A random number is generated, and the number of secret sharing shares and the threshold value are set; The authoritative center converts the identity code into a large number that can be used for numerical calculations, and selects a large prime number and positive integers, and then randomly select an integer and calculate Share : , , in, positive integer satisfy , that is, strictly increasing, , that is, they are mutually prime. ,Right now Minimum The product of is strictly greater than The largest The product of The authoritative center saves the secret fragments and randomly selects several secret fragments to connect them into a string through the string connection symbol ; Authoritative Center for Strings Encrypt and randomly select a Perform blinding processing and then calculate the user attribute private key; The authority selects a random number , calculate the search private key, and Add to the parameter table; Authoritative Center Selection To recover the key , the conversion key is calculated based on the recovery key.

[0012] Preferably, offline encryption is as follows: The data owner generates a random symmetric key locally , the data owner symmetrically encrypts the data file to be shared and obtains the ciphertext , upload the ciphertext to the Interstellar File System and return the file storage address ; Store the file address Use the same symmetric key as the encrypted file to encrypt and get the encrypted address ; Random Selection ,calculate , That is, the blinded file storage address, and the hash value of the data file is obtained ,get , which is the hash value of the data file, and generates a file identifier for the data file ; Will Store in the blockchain, get the block ID and transaction ID, and combine them to create a search token ,in is the block ID, is the transaction ID; Preferably, the specific method of online encryption is as follows: The data owner pre-processes the encrypted search token and the symmetric key, selects parameters, and blinds the symmetric key and the search token for the first time. The blinded plaintext is sent to the authority. The authority takes out the partial revocation parameters of all users from the parameter table generated in the initialization phase to calculate the remaining theorem parameters; Sign the remaining theorem parameters and save the signature value and remaining theorem parameters to the blockchain; The authority returns the symmetric key and search token to the data owner, who completes the deblinding calculation and obtains the symmetric key and search token to be encrypted. ; The system public key, the symmetric key to be encrypted and the search token and access policy input is encrypted in an online encryption algorithm; The symmetric key to be encrypted is combined with the search token Embedded in the access policy, randomly selected parameters, and generated ciphertext for sharing random secret values.

[0013] Preferably, the specific method of index encryption is as follows: Select the keyword set of the data file and build a keyword index , the formula is as follows: , in, is a random number, Indicates keyword information. Included in the public key, Included in the public key; The file identification, ciphertext, file data summary, and keyword index of the data file are added by adding an index smart contract , save it to the blockchain; and upload the data file identifier and related file description information such as file name to the blockchain.

[0014] Preferably, the specific method for data access by the data accessor is as follows: The data accessor obtains the file identifier of the required file from the blockchain, selects the keyword set to be searched, selects a random number, and generates a keyword index using the search private key; The file identifier and the generated keyword index are sent to the cloud server. After receiving the request, the cloud server calls the smart contract based on the file identifier to obtain the keyword index. The cloud server compares the keyword set of the file that the data visitor wants to access A collection of keywords stored in the blockchain Use consistent and Perform bilinear operations: , Represents a bilinear pairing. If the equation holds, the keyword is matched correctly. If not, the match is unsuccessful. If the user's attribute set satisfies the access policy, and the attribute name mapped by each row of the access matrix belongs to the attribute set , and find the set of constants in polynomial time ,have to , Indicates that the secret value Divided into Quantity, Indicates the number of users, the cloud server runs the ciphertext conversion algorithm , perform semi-decryption operation to generate intermediate ciphertext; The cloud server sends the generated intermediate ciphertext and the ciphertext information encrypted by the data owner using the search token and the symmetric key to the user data user.

[0015] Preferably, the data accessor decrypts the data to obtain the symmetric key and the search token in the following specific manner: The data accessor decrypts to obtain the symmetric key and search token to be encrypted : Data accessors use the remaining theorem parameters returned by the authority And your own private key In Calculate the plaintext key using the following formula: , , Decrypt the symmetric key With search token , based on the random number in the search token And the hash address calculate and on-chain value To compare, Use the decrypted key Perform encryption operation to obtain , and the on-chain value Compare, if the two comparisons are the same, then according to the file storage address from Download the ciphertext data, the data accessor uses the hash function to calculate the hash value of the decrypted data file and compares it with the hash summary of the data file returned by the blockchain Compare and if the hash values ​​are consistent, it indicates that the data has not been tampered with during transmission, and use the symmetric key to decrypt the ciphertext data.

[0016] Preferably, the method further includes user tracking, specifically as follows: Through the tracking algorithm, when a user has improper behavior, the user's ; Check the legitimacy of the user's private key, and the authority runs the tracking algorithm , enter common parameters , user attribute private key , output the tracked malicious user or ; The details are as follows: Determine the private key Is it satisfied? in the form of and meets the following conditions: , , , If the key is satisfied Pass the key integrity check; otherwise the key is not intact and not worth tracing, the algorithm will output ; If the key integrity check passes, the authority performs the following operations to extract the identity information contained in the key; , , in, ; The obtained fragments are divided into Algorithm to construct a system of congruence equations; According to the congruence equations Decryption, in the decoding operation, get the user ; in, , It means that the system of equations is The only solution within .

[0017] Preferably, the method further includes attribute revocation, which is as follows: Revocation The data access permissions of the user are determined based on the , the authority according to the user In the parameter table Find the parameters corresponding to the user in as well as , generate new revocation parameters ; , In the formula, is the original cancellation parameter, Delete the specified user Partial revocation parameters; use Compute new remainder theorem parameters : , in, is the variable obtained by blinding the new cancellation parameter and XORing it with the original cancellation parameter, The calculation of is the basic calculation process of the Chinese remainder theorem, and the new remainder theorem parameters are obtained. ; New Remainder Theorem Parameters After confirmation, the authority calculates the partial update ciphertext : , use Replace the Chinese Remainder Theorem parameters stored in the blockchain and Sign and get , a new transaction is uploaded to the blockchain to replace the previous parameters, and the updated ciphertext result is: in, is the ciphertext after update; New ciphertext Replace the old ciphertext stored in the blockchain; insert the new ciphertext into the blockchain as a new record; the authority Key-value pairs From the parameter table Delete it.

[0018] A blockchain-based and improved The data access control device comprises a processor and a memory storing program instructions, wherein the processor is configured to execute the blockchain-based and improved Data access control method.

[0019] The advantages of the present invention are: By introducing the CP-ABE scheme of hidden access policy, the plaintext transmission of sensitive information in the access policy is effectively avoided, thereby greatly reducing the risk of user privacy leakage. At the same time, the tamper-proof characteristics of blockchain are used to ensure the integrity and credibility of stored data.

[0020] Attribute-based encryption technology makes data access control more sophisticated and flexible, and can dynamically adjust access rights based on the attribute sets of different users to meet complex and changing business needs.

[0021] This method not only supports one-to-many secure sharing of data, but also realizes efficient decryption computing services by introducing cloud outsourcing servers, reduces the computing burden of data access users, and improves the efficiency of data sharing.

[0022] Through encryption algorithms, this method can track malicious users and detect and handle improper behavior in a timely manner. At the same time, the Chinese remainder theorem is used to dynamically update the key, which enables flexible revocation of user permissions and ensures the security and stability of the system.

[0023] By introducing blockchain technology and Interstellar File System, a distributed data storage mechanism combining on-chain and off-chain has been built, which further improves the security and reliability of data and reduces the risk of data loss or damage.

[0024] In summary, this method proposes an innovative data storage access control scheme, which effectively solves many problems in data storage and access control in the big data era, and provides strong technical support for convenient data storage, secure management and efficient sharing. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.

[0026] Figure 1 It is a schematic diagram of the process of the present invention.

[0027] Figure 2 This is an interactive behavior diagram of the present invention. DETAILED DESCRIPTION

[0028] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0029] like Figure 1 As shown, a method based on blockchain and improved The data access control method includes: S1: The authority generates key parameters, including the system public key and the master key, and uploads the master key to the blockchain for other users to access.

[0030] S2: The user sends his attribute set and identity to the authority. The authority hides the user identity and generates an attribute private key, a search private key, a conversion key and a recovery key for the user. The conversion key is sent to the cloud server, and the attribute private key, the search private key and the recovery key are sent to the users, including data owners and data accessors.

[0031] S3: The data owner performs offline encryption, online encryption, and index encryption on the file in sequence, and uploads the index information to the chain.

[0032] S4: The data accessor accesses the data; obtains the file ID of the required file from the blockchain, uses the search private key to generate a keyword index, and sends it and the file ID to the cloud server. The cloud server verifies the semi-decryption operation and sends the intermediate ciphertext to the data accessor.

[0033] S5: The data accessor decrypts the data; the data accessor decrypts the intermediate ciphertext, obtains the key and search token, obtains the file storage address from the token, obtains the ciphertext, uses the key to decrypt the ciphertext, and obtains the file.

[0034] As a refinement of the above embodiment, the authoritative center runs Initialization algorithm Given a security parameter λ and a set of system attributes U, output the system public parameters and system master key. , select parameters , Composition parameter table , and Stored in the authority center (TA), Indicates the number of all users.

[0035] The key parameters generated by the authority are as follows: The system public key is as follows: ; The master key is as follows: ; in, , is a prime number, the group , is a multiplicative cyclic group, It is a bilinear pairing ; and are two collision-resistant hash functions, , is a safety parameter, It means it is a prime number The set of all numbers that are mutually prime; , , , , ; , Indicates the attribute number, The value belongs to the range of positive integers, for The sum of all possible values; , Indicates the maximum range of attribute numbers; ,in and are different prime numbers of equal length, and , .

[0036] As a refinement of the above embodiment, the data accessor sets its own attribute and identity Sent to the authoritative center for execution Key generation algorithm . Input user attribute set and , generate attribute private key and search private key, and identify pass Algorithms and Algorithms are combined to hide.

[0037] The specific method for the authoritative center to generate attribute private keys and search private keys is as follows: S2-1-1: Data accessor sets the attributes , and identity Send to the authoritative center; in, Represents a collection of attribute names Represents a set of attribute values; S2-1-2: Selection of authoritative centers Random numbers , and set the number of secret sharing shares ,Threshold ; S2-1-3: Identify Encoding is converted into a large number that can be used for numerical calculations , choose a large prime number and positive integer , randomly select an integer ,calculate Share , the formula is as follows: , , in, positive integer satisfy , that is, strictly increasing, , that is, they are mutually prime. ,Right now Minimum The product of is strictly greater than The largest The product of S2-1-4: Preserving Secret Fragments , and randomly select The secret fragments are connected by string concatenation symbol ; S2-1-5: Yes pass The key is encrypted and a random , blinded, calculated , and calculate the user attribute private key: in, , Included in the system public key, Indicates attribute value, i.e. user information, Indicates the number of attribute names; S2-1-6: Select a random number , calculate the search private key ,Will Add to parameter table; S2-1-7: The authoritative center converts the user attribute private key into a key conversion algorithm , generate the conversion key With recovery key .

[0038] The specific method for the authoritative center to generate the conversion key and recovery key is as follows: S2-2-1: Selection , for the recovery key ,in, It is a model The non-negative minimal complete residue system of ; S2-2-2: Calculate the conversion key , as follows: , in, The value is [1, ].

[0039] As a refinement of the above embodiment, data encryption is divided into three parts. The first part is the offline encryption algorithm. , the second part is the online encryption algorithm The third part is to build a ciphertext search index .

[0040] Offline encryption is as follows: S3-1-1: The data owner generates a random symmetric key locally , the data owner symmetrically encrypts the data file to be shared and obtains the ciphertext , upload the ciphertext to the Interstellar File System and return the file storage address ; S3-1-2: Store the file address Use the same symmetric key as the encrypted file to encrypt and get the encrypted address ; S3-1-3: Random Selection ,calculate , That is, the blinded file storage address, and the hash value of the data file is obtained ,get , which is the hash value of the data file, and generates a file identifier for the data file ; S3-1-4: Store in the blockchain, get the block ID and transaction ID, and combine them to create a search token ,in is the block ID, is the transaction ID; The specific method of online encryption is as follows: S3-2-1: Preprocess the encrypted search token and symmetric key, and the data owner selects the parameters , the symmetric key With search token Perform the first plain text blinding, the formula is as follows: , S3-2-2: Blinded plaintext Sent to the authority, the authority generates the parameter table from the initialization phase Extract all users' partial revocation parameters Computing the remainder theorem parameters , the specific formula is as follows: , , , , , Will and Stored in variables Add to the parameter list T and calculate the value ; is the revocation parameter, i.e., the cumulative sum of all users’ partial revocation parameters; , , , S3-2-3: After the authority completes the revocation algorithm, the remaining theorem parameters Run the signature algorithm and Sign and get the signature value : ; S3-2-4: and Save to blockchain, associate the symmetric key with the search token Return to the data owner, who uses the parameters Complete the unblinding calculation and get ; , S3-2-5: Run online encryption algorithm , the system public key , data to be encrypted and access policies Enter the online encryption algorithm, for The access matrix, is the attribute mapping function; Assume that the string of the access control tree is such as ((Participant Name 1: Shandong Chaohua Information Technology Co., Ltd., Participant Credit Code 1: 9137010*********1F, 2), (Participant Name 2: Shandong Credit Jinqiao Small and Medium Enterprise Development Service Co., Ltd., Participant Credit Code 2: 9137010********0R, 2), (Participant Name 3: Heze Civil Air Defense Office, Participant Credit Code 3: 9137010********5W, 2), (Participant Name 4: Bank of China Heze South Branch, Participant Credit Code 4: 9137010********34, 2), 1) Access Policy is the LSSS implementation of the access control string, thereby hiding the attribute value. Users who meet the above access policy can obtain the data file. The data owner formulates the above access control string according to the data access requirements and converts it into OK Column access matrix , is the attribute mapping function, which transforms the matrix A row of the system is mapped to a specific system property .

[0041] S3-2-6: The symmetric key With search token , embedded into the access policy, randomly selected , generate ciphertext ; , , , in, is a random secret value for sharing, A random number used to hide a secret value , subscript n is the access matrix The number of columns, Indicates that the secret value Divided into Quantity, Represents the access matrix Each line of Maps to an attribute name , represents randomly selected data, Represents the access matrix The i-th row of The specific method of index encryption is as follows: S3-3-1: Select data file Keyword collection , build keyword index , the formula is as follows: , in, is a random number, Indicates keyword information. Included in the public key, Included in the public key; S3-3-2: File identification of data files 、Ciphertext , File Data Summary , keyword index , by adding an index smart contract , save to the blockchain; and identify the data file , and related file description information such as file name, uploaded to the blockchain. Smart Contract As shown in Table 1 below: Table 1 Smart Contract As a refinement of the above embodiment, the specific manner in which a data accessor performs data access is as follows: S4-1: Data accessor obtains the file identifier of the required file from the blockchain , for the set of keywords to be searched Select random number , use the search private key to generate a keyword index ,in, ; S4-1: Identify the file ,index Send to the cloud server, after receiving the request, the cloud server will identify the file Call Smart contract, get keyword index ; Smart Contract As shown in Table 2 below: Table 2 Smart Contract S4-2: Cloud server calculates Verify the keyword index by checking whether the attribute set of the user satisfies the access policy and Belongs to the attribute collection , and find the constant set in polynomial time ,have to ; then the cloud server runs the ciphertext conversion algorithm , perform semi-decryption operation to generate intermediate ciphertext ,in: S4-3: Sent to user data users, Indicates the ciphertext information encrypted by the data owner using the search token and symmetric key.

[0042] As a refinement of the above embodiment, the data accessor decrypts the data to obtain the symmetric key and the search token in the following specific manner: S5-1: The data accessor decrypts to obtain the symmetric key and search token to be encrypted : S5-2: Data accessor uses the remaining theorem parameters returned by the authority And your own private key In Calculate the plaintext key using the following formula: , , S5-3: Decrypt the symmetric key With search token , based on the random number in the search token And the hash address calculate and on-chain value To compare, Use the decrypted key Perform encryption operation to obtain , and the on-chain value Compare, if the two comparisons are the same, then according to the file storage address from Download the ciphertext data, the data accessor uses the hash function to calculate the hash value of the decrypted data file and compares it with the hash summary of the data file returned by the blockchain Compare and if the hash values ​​are consistent, it indicates that the data has not been tampered with during transmission, and use the symmetric key to decrypt the ciphertext data.

[0043] As a refinement of the above embodiment, the method further includes user tracking, which is as follows: Through the tracking algorithm, when a user has improper behavior, the user's ; Check the legitimacy of the user's private key, and the authority runs the tracking algorithm , enter common parameters , user attribute private key , output the tracked malicious user or ; The details are as follows: Determine the private key Is it satisfied? in the form of and meets the following conditions: , , , If the key is satisfied Pass the key integrity check; otherwise the key is not intact and not worth tracing, the algorithm will output ; If the key integrity check passes, the authority performs the following operations to extract the identity information contained in the key; , , in, ; The obtained fragments are divided into Algorithm to construct a system of congruence equations; According to the congruence equations Decryption, in the decoding operation, get the user ; in, , It means that the system of equations is The only solution within .

[0044] As a refinement of the above embodiment, the method further includes attribute revocation, which is as follows: Revocation The data access permissions of the user are determined based on the , the authority based on the user In the parameter table Find the parameters corresponding to the user in as well as , generate new revocation parameters ; , In the formula, is the original cancellation parameter, Delete the specified user Partial revocation parameters; use Compute new remainder theorem parameters : , in, is the variable obtained by blinding the new cancellation parameter and XORing it with the original cancellation parameter, The calculation of is the basic calculation process of the Chinese remainder theorem, and the new remainder theorem parameters are obtained. ; New Remainder Theorem Parameters After confirmation, the authority calculates the partial update ciphertext : , use Replace the Chinese Remainder Theorem parameters stored in the blockchain and Sign and get , a new transaction is uploaded to the blockchain to replace the previous parameters, and the updated ciphertext result is: in, is the ciphertext after update; New ciphertext Replace the old ciphertext stored in the blockchain; insert the new ciphertext into the blockchain as a new record; the authority Key-value pairs From the parameter table Delete it.

[0045] The disclosed embodiment also provides a method based on blockchain and improved The data access control device includes a processor and a memory. Optionally, the device may also include a communication interface and a bus. The processor, the communication interface, and the memory may communicate with each other through the bus. The communication interface may be used for information transmission. The processor may call the logic instructions in the memory to execute the above-mentioned embodiment based on blockchain and improved Data access control method.

[0046] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product.

[0047] The memory, as a computer-readable storage medium, can be used to store software programs and computer executable programs, such as program instructions / modules corresponding to the method in the embodiment of the present disclosure. The processor executes the function application and data processing by running the program instructions / modules stored in the memory, that is, implementing the recommendation method of the charging station recommendation system in the above embodiment.

[0048] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory may include a high-speed random access memory and may also include a non-volatile memory.

[0049] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A blockchain-based and improved The data access control method is characterized in that: include: The authority generates key parameters, including the system public key and the master key, and uploads the master key to the blockchain for other users to access; The user sends his attribute set and identity to the authority, which hides the user's identity and generates an attribute private key, a search private key, a conversion key and a recovery key for the user, sends the conversion key to the cloud server, and sends the attribute private key, the search private key and the recovery key to the user, including the data owner and the data accessor; The data owner encrypts the file offline, online, and index in sequence, and uploads the index information to the chain; The data accessor performs data access; obtains the file ID of the required file from the blockchain, uses the search private key to generate a keyword index, and sends it and the file ID to the cloud server. The cloud server verifies and performs a semi-decryption operation and sends the intermediate ciphertext to the data accessor; The data accessor decrypts the data; the data accessor decrypts the intermediate ciphertext, obtains the key and the search token, obtains the file storage address from the token, obtains the ciphertext, uses the key to decrypt the ciphertext, and obtains the file.

2. The blockchain-based and improved The data access control method is characterized in that: The specific method for the authoritative center to generate attribute private keys and search private keys is as follows: The data accessor sets the attributes and identity Send to the authoritative center; Authoritative Center Selection A random number is generated, and the number of secret sharing shares and the threshold value are set; The authoritative center converts the identity code into a large number that can be used for numerical calculations, and selects a large prime number and positive integers, and then randomly select an integer and calculate Share : , , in, positive integer satisfy , that is, strictly increasing, , that is, they are mutually prime. ,Right now Minimum The product of is strictly greater than The largest The product of The authoritative center saves the secret fragments and randomly selects several secret fragments to connect them into a string through the string connection symbol ; Authoritative Center for Strings Encrypt and randomly select a Perform blinding processing and then calculate the user attribute private key; The authority selects a random number , calculate the search private key, and Add to the parameter table; Authoritative Center Selection To recover the key , the conversion key is calculated based on the recovery key.

3. The blockchain-based and improved The data access control method is characterized in that: Offline encryption is as follows: The data owner generates a random symmetric key locally , the data owner symmetrically encrypts the data file to be shared and obtains the ciphertext , upload the ciphertext to the Interstellar File System and return the file storage address ; Store the file address Use the same symmetric key as the encrypted file to encrypt and get the encrypted address ; Random Selection ,calculate , That is, the blinded file storage address, and the hash value of the data file is obtained ,get , which is the hash value of the data file, and generates a file identifier for the data file ; Will Store in the blockchain, get the block ID and transaction ID, and combine them to create a search token ,in is the block ID, Transaction ID.

4. The blockchain-based and improved The data access control method is characterized in that: The specific method of online encryption is as follows: The data owner pre-processes the encrypted search token and the symmetric key, selects parameters, and blinds the symmetric key and the search token for the first time. The blinded plaintext is sent to the authority. The authority takes out the partial revocation parameters of all users from the parameter table generated in the initialization phase to calculate the remaining theorem parameters; Sign the remaining theorem parameters and save the signature value and remaining theorem parameters to the blockchain; The authority returns the symmetric key and search token to the data owner, who completes the deblinding calculation and obtains the symmetric key and search token to be encrypted. ; The system public key, the symmetric key to be encrypted and the search token and access policy input is encrypted in an online encryption algorithm; The symmetric key to be encrypted is combined with the search token Embedded in the access policy, randomly selected parameters, and generated ciphertext for sharing random secret values.

5. The blockchain-based and improved The data access control method is characterized in that: The specific method of index encryption is as follows: Select the keyword set of the data file and build a keyword index , the formula is as follows: , in, is a random number, Indicates keyword information. Included in the public key, Included in the public key; The file identification, ciphertext, file data summary, and keyword index of the data file are added by adding an index smart contract , save it to the blockchain; and upload the data file identifier and related file description information such as file name to the blockchain.

6. The blockchain-based and improved The data access control method is characterized in that: The specific methods for data access by data accessors are as follows: The data accessor obtains the file identifier of the required file from the blockchain, selects the keyword set to be searched, selects a random number, and generates a keyword index using the search private key; The file identifier and the generated keyword index are sent to the cloud server. After receiving the request, the cloud server calls the smart contract based on the file identifier to obtain the keyword index. The cloud server compares the keyword set of the file that the data visitor wants to access A collection of keywords stored in the blockchain Use consistent and Perform bilinear operations: , Represents a bilinear pairing. If the equation holds, the keyword is matched correctly. If not, the match is unsuccessful. If the user's attribute set satisfies the access policy, and the attribute name mapped by each row of the access matrix belongs to the attribute set , and find the constant set in polynomial time ,have to , Indicates that the secret value Divided into Quantity, Indicates the number of users, the cloud server runs the ciphertext conversion algorithm , perform semi-decryption operation to generate intermediate ciphertext; The cloud server sends the generated intermediate ciphertext and the ciphertext information encrypted by the data owner using the search token and the symmetric key to the user data user.

7. The blockchain-based and improved The data access control method is characterized in that: The data accessor decrypts the data and obtains the symmetric key and search token in the following way: The data accessor decrypts to obtain the symmetric key and search token to be encrypted : Data accessors use the remaining theorem parameters returned by the authority And your own private key In Calculate the plaintext key using the following formula: , , Decrypt the symmetric key With search token , based on the random number in the search token And the hash address calculate and on-chain value To compare, Use the decrypted key Perform encryption operation to obtain , and the on-chain value Compare, if the two comparisons are the same, then according to the file storage address from Download the ciphertext data, the data accessor uses the hash function to calculate the hash value of the decrypted data file and compares it with the hash summary of the data file returned by the blockchain Compare and if the hash values ​​are consistent, it indicates that the data has not been tampered with during transmission, and use the symmetric key to decrypt the ciphertext data.

8. The blockchain-based and improved The data access control method is characterized in that: The method also includes user tracking, as follows: Through the tracking algorithm, when a user has improper behavior, the user's ; Check the legitimacy of the user's private key, and the authority runs the tracking algorithm , enter common parameters , user attribute private key , output the tracked malicious user or ; The details are as follows: Determine the private key Is it satisfied? in the form of and meets the following conditions: , , , If the key is satisfied Pass the key integrity check; otherwise the key is not intact and not worth tracing, the algorithm will output ; If the key integrity check passes, the authority performs the following operations to extract the identity information contained in the key; , , in, ; The obtained fragments are divided into Algorithm to construct a system of congruence equations; According to the congruence equations Decryption, in the decoding operation, get the user ; in, , It means that the system of equations is The only solution within .

9. The blockchain-based and improved The data access control method is characterized in that: The method also includes attribute revocation, as follows: Revocation The data access rights of the user are determined based on the , the authority according to the user In the parameter table Find the parameters corresponding to the user in as well as , generate new revocation parameters ; , In the formula, is the original cancellation parameter, Delete the specified user Partial revocation parameters; use Compute new remainder theorem parameters : , in, is the variable obtained by blinding the new cancellation parameter and XORing it with the original cancellation parameter, The calculation of is the basic calculation process of the Chinese remainder theorem, and the new remainder theorem parameters are obtained. ; New Remainder Theorem Parameters After confirmation, the authority calculates the partial update ciphertext : , use Replace the Chinese Remainder Theorem parameters stored in the blockchain and Sign and get , a new transaction is uploaded to the blockchain to replace the previous parameters, and the updated ciphertext result is: in, is the updated ciphertext; New ciphertext Replace the old ciphertext stored in the blockchain; insert the new ciphertext into the blockchain as a new record; the authority Key-value pairs From the parameter table Delete it.

10. A blockchain-based and improved A data access control device comprising a processor and a memory storing program instructions, characterized in that: The processor is configured to execute the blockchain-based and improved Data access control method.

Citation Information

Cited By

  • Business and financial integrated intelligent control and analysis management system

    CN120632921A

  • Ciphertext searchable strategy hidden attribute-based encryption method

    CN120750655A

  • A ciphertext searchable strategy-hiding attribute-based encryption method

    CN120750655B

  • Web3.0 access authentication method based on block chain and spatial information network system

    CN121531363A

  • Block chain evidence storage-based accountability attribute-based encrypted data sharing method and system

    CN121887504A