Fine-grained policy hiding and traceable decentration access control method
Through fine-grained policy hiding and traceable decentralized access control methods, combined with smart contracts and efficient consensus algorithms, it solves the problems of privacy leakage and low efficiency of encryption algorithms in blockchain access control, and achieves safe sharing and encryption of data. Key traceability improves system performance and security.
Patent Information
- Application Number
- CN202410797085.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-20
- Publication Date
- 2024-10-15
AI Technical Summary
Existing access control methods based on blockchain and attribute encryption have problems such as privacy leakage, low encryption algorithm efficiency, and key abuse, especially when the open and transparent nature of blockchain and the high computational cost caused by complex encryption operations make System scalability and real-time performance are limited.
A decentralized access control method with fine-grained policy hiding and traceability is designed. Through the user management module, data sharing module, access control module and blockchain module, combined with smart contracts and efficient consensus algorithms, the secure sharing of data is achieved. and key traceability, using regulatory agencies and attribute authorities to jointly manage users and data to ensure the privacy and security of access policies.
It effectively hides user attribute information, realizes fine-grained security control of data and traceability of keys, reduces computing costs, improves the scalability and real-time performance of the system, and ensures data security and privacy.
Smart Images

Figure CN118784278A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of attribute cryptography technology, and specifically relates to an access control method based on blockchain and policy-hiding attribute encryption, namely, a fine-grained policy hiding and traceable decentralized access control method. Background Art
[0002] The growing development of cutting-edge technologies such as the Internet of Things, artificial intelligence, and cloud computing has led to increasingly frequent interactions between multiple entities such as users and enterprises, and massive amounts of data are spreading rapidly in cyberspace. These data contain a large amount of sensitive information involving personal privacy. If there is a lack of effective management and strict access control, it may pose a serious threat to personal property security and privacy rights. In order to reduce maintenance costs and improve management efficiency, many organizations and institutions choose to store large amounts of data on third-party servers. However, this practice means that the ownership of the data is completely in the hands of the third party, and therefore a high degree of trust must be maintained in it. But the reality is that third-party servers have potential risks such as data privacy leakage and tampering, and may also face trust issues such as single point failures.
[0003] Blockchain technology, with its unique characteristics of distribution, tamper-proof, openness and transparency, has shown significant advantages in building decentralized databases. It breaks the limitations of traditional third-party server centralization and realizes decentralized storage and verification of data through the collaborative work of multiple nodes in a distributed network. This architecture not only improves the reliability and availability of data, but also reduces the risk of single point failure. The distributed characteristics of blockchain, combined with its chain data structure and consensus mechanism, effectively realize data tamper-proof and ensure the integrity and authenticity of data. Any illegal tampering of data will be immediately detected and rejected by other nodes in the network, thereby ensuring the security of data. In addition, the openness and transparency of blockchain technology also promotes the establishment of a trust mechanism and reduces the risks caused by information asymmetry. However, although its open and transparent characteristics have advantages, it also exposes private data to the risk of leakage. In order to ensure data security and privacy, other technical means must be used to strengthen protection.
[0004] To solve this problem, many researchers have introduced the Ciphertext-PolicyAttribute-Based Encryption (CP-ABE) scheme. In the CP-ABE scheme, data owners use encryption algorithms to protect data and formulate access policies, and accurately define user access rights to data through attributes. Data users apply for private keys based on their own attributes. Only when their attribute sets meet the access policies can they successfully decrypt the data and achieve secure sharing and use of data. This mechanism provides flexible and fine-grained control for data access, allowing data owners to set complex access policies as needed to ensure data security and privacy. Combining blockchain technology with the CP-ABE scheme, a decentralized, fine-grained, secure and controllable access control method can be constructed, providing strong support for the development of data storage and sharing platforms.
[0005] However, when combining blockchain technology with the CP-ABE scheme to achieve fine-grained encrypted data sharing, there are some challenges that need to be solved. First, due to the open and transparent nature of blockchain, the direct storage of user attribute information is very likely to expose sensitive information, which not only threatens personal privacy, but may also be used by malicious entities to carry out targeted attacks. Therefore, it is necessary to study the attribute information and access policy hiding protection mechanism in depth to ensure the safe storage and access of relevant privacy information. Secondly, the one-to-many encryption mechanism of the CP-ABE scheme makes its key contain only the attribute information of the data user, but not the information related to the identity of a specific user. Once the key is leaked, it is difficult to accurately track the abuser, which not only increases the risk of data leakage, but also may lead to the break of the trust chain. Therefore, a more robust key management and responsibility tracking system needs to be built. Finally, the complex encryption operation of the CP-ABE scheme leads to high computational cost, which is particularly prominent in the blockchain environment and may seriously restrict the scalability and real-time performance of the system. Therefore, it is necessary to study encryption algorithm optimization or outsourcing technology in depth to reduce the computational burden and improve the actual application effect of the CP-ABE scheme in the blockchain.
[0006] In summary, the present invention is committed to designing and implementing a new access control method, which aims to solve the problems of privacy leakage, low encryption algorithm efficiency and key abuse in the current access control method based on blockchain and attribute encryption. Summary of the invention
[0007] The purpose of the present invention is to provide a fine-grained policy hiding and traceable decentralized access control method.
[0008] The fine-grained policy hiding and traceable decentralized access control method proposed in the present invention is implemented by a fine-grained policy hiding and traceable decentralized access control system, which is composed of users, attribute authority, data storage center, regulatory agency and decentralized application; specifically as follows:
[0009] User is the basic unit of the control system, including data owner, data user or attribute authority member; users have different functions according to different roles, and attribute authority members can cooperate with other users to build attribute authority and participate in the attribute management process; among them: Data Owner (DO) refers to the user who owns part of the data and uploads it to the control system; they set attribute encryption access policies to ensure that only specific users can decrypt and access data; Data User (DU) refers to users who currently have authorization for certain attributes and want to access data in the control system. They can only decrypt and access data if the attribute set they own meets the specific access policy;
[0010] The Attribute Authority (AA) is a decentralized organization built by users, responsible for managing attributes and their keys and participating in the definition and verification of access policies. Only when more than a specified threshold of Attribute Authority members agree can the organization be created and the Attribute Certificate (AC) of its attribute set be distributed to DUs.
[0011] As the core infrastructure of data storage, the Data Storage Center (DSC) is responsible for building, managing and maintaining data storage services. Although the Interplanetary File System (IPFS) provides a new way for data encryption storage, in actual use, IPFS still faces challenges such as node stability, data persistence and system integration. In view of this, the present invention prefers to adopt a mature and stable database storage solution to ensure the reliability and stability of data storage.
[0012] The regulator (RA) plays an honest and fair role in the control system. Its responsibilities include verifying user identity, generating attribute private keys, and tracking and responding to illegal behaviors of malicious users.
[0013] Decentralized Application (DAPP) refers to an application built on blockchain technology, which is used to support the synthesis and calculation of system intermediate parameters, communication between institutions and users, etc. It ensures the reliability of key traceability and the security of access control.
[0014] The control method includes a user management module, a data sharing module, an access control module and a blockchain module; the specific steps are as follows:
[0015] The user management module is mainly responsible for maintaining user-related information. User information is divided into two parts: one is information related to the user's identity, including the globally unique identifier $GID$, signature and its associated attributes and attribute authority information; the other is information related to data, such as the user's history of uploading and downloading related data;
[0016] The main function of the data sharing module is to realize the safe and controllable sharing of data. For the data owner, first of all, it is necessary to set the corresponding access policy in the control system and set tags for the relevant data so that the data user can conduct conditional search; the data sharing module will encrypt the data according to the corresponding access policy and upload it to the data storage center; the data user will query the data he needs according to the relevant tags and try to decrypt and download the required data;
[0017] The access control module is mainly responsible for managing the user's identity and corresponding attribute permissions. After the system is initialized, multiple users can form an attribute authority. When a certain number of members agree, the authority has the authority to grant other users the associated attributes. However, each attribute grant requires the regulator to verify the user's identity and record the corresponding grant for future traceability;
[0018] The blockchain module is based on blockchain technology and smart contract mechanism. Multiple institutions jointly maintain the security and integrity of data by forming a consortium chain. In order to improve transaction speed, the control system adopts the PBFT efficient consensus algorithm, which effectively avoids the problems caused by the power-consuming and time-consuming PoW consensus algorithm in the traditional Bitcoin network. The public parameters of the control system and the data summary after attribute encryption are stored on the blockchain; user registration, attribute authorization and other operations are performed by deploying smart contracts (such as DABE); in actual applications, the blockchain should be jointly managed by the government or several large institutions to ensure the stability and security of the system operation.
[0019] In the present invention, the data sharing module is divided into an initialization phase, a user management phase, an attribute management phase, a data management phase and a key tracing phase; the details are as follows:
[0020] (1) The initialization phase is mainly responsible for initializing the elliptic curve and its parameters, generating some attributes and keys, and setting security parameters. In this phase, data structures related to attribute cryptography need to be established, including elliptic curves, access structures, and access policies.
[0021] (2) The user management stage covers operations such as user registration, login, and password reset. The logical process of user registration is as follows:
[0022] (2.1) The user fills in the user name, password and other information through the front-end interface, and then sends the filled information to the back-end server for processing;
[0023] (2.2) After receiving the user information, the backend server verifies and processes it, including checking whether the username already exists and whether the password complexity meets the requirements. It then encapsulates the verified user information into a request object and calls the registration interface of the smart contract.
[0024] (2.3) After receiving the registration request, the smart contract will execute the corresponding logic, write the user's identity information into the blockchain, and complete the registration process;
[0025] (3) The responsibility of the attribute management stage is to handle various operations related to the generation and authorization of user and organization attributes, including attribute authority and organization attribute generation, attribute authorization, and attribute revocation;
[0026] (3.1) Attribute authority and institution attribute generation
[0027] The generation process of attribute authority and institution attributes follows a series of rigorous steps, including initiating institution creation request, user consent and sharing of secrets, generating some institution public keys, uploading some institution public keys to the chain, and integrating public keys for smart contract execution. The specific logical process of authority creation is as follows:
[0028] (3.1.1) The user first initiates a request to create an organization through the system interface. During this process, the user needs to provide a series of necessary information, including but not limited to the organization name, organization description, authorization threshold t, and total number of organization members n;
[0029] (3.1.2) After receiving the creation request, the system will show the request details to the user and ask the user to decide whether to agree to participate in the creation of the organization based on their own situation; if the user agrees to participate, he / she needs to share part of his / her own secrets. ij to other members; after successfully collecting the required number of partial secrets, the system will use these secrets to generate a partial organization public key opk i ;
[0030] (3.1.3) The request to create an organization can only be approved after obtaining the consent of enough users; specifically, the request to create an organization will be considered valid only when at least t users agree and participate in sharing the secret; then, the smart contract will receive the partial organization public keys on the chain from all members and perform the public key integration operation;
[0031] (3.1.4) After the smart contract completes the public key integration operation, the complete public key of the organization will be recorded on the blockchain; the decentralized nature and immutability of the blockchain ensure the persistence and security of the public key; at this point, the creation process of the organization is completed, and the organization officially becomes a valid entity in the system;
[0032] (3.2) Attribute authorization
[0033] The attribute authorization process covers all aspects of attribute application and attribute key generation. The specific logic is as follows:
[0034] (3.2.1) The user first initiates an attribute application through the system interface and needs to fill in necessary information such as attribute name, organization name, etc.; this information is the basis for applying for attribute authorization and provides necessary background information for subsequent processes;
[0035] (3.2.2) After receiving the application, the organization members will decide whether to support the attribute application based on their personal judgment and organization policy; if the member agrees with the application, the partial attribute credential auth will be calculated. This credential is the key basis for the user to obtain attribute authorization and is used to prove that the user has been recognized by the organization members;
[0036] (3.2.3) After collecting the consent of a sufficient number of institutional members, the user will use these attribute credentials auth to calculate his own signature σ; then, the user will send the signature σ together with the attribute credentials auth to the regulatory agency for identity authentication and authorization application;
[0037] (3.2.4) After receiving the user's application, the regulatory agency will first verify the validity of the signature σ; this verification process ensures the authenticity and integrity of the application and prevents malicious attacks and tampering; if the verification is successful, the regulatory agency will distribute the attribute key K to the user to ensure that he can safely and legally access and use the relevant attributes;
[0038] Through the above process, attribute authorization can be achieved safely and efficiently, which not only protects the interests of institutional members, but also ensures that users can legally obtain and use the required attributes;
[0039] (3.3) Attribute revocation
[0040] The present invention realizes the global revocation function of a specific attribute by setting a global revocation flag in the smart contract; when a certain attribute needs to be revoked, the smart contract sets the corresponding revocation flag to true; when the ciphertext is published, the smart contract checks whether the attribute used by the ciphertext has been revoked, and if so, refuses to publish the ciphertext; this mechanism ensures that the system can effectively handle the revocation operation of the attribute and prevent operations related to the revoked attribute when necessary;
[0041] (4) The data management stage undertakes the core tasks in the entire system, mainly responsible for data encryption and decryption operations to ensure data security and integrity; this stage covers data uploading, data querying, and data downloading;
[0042] (4.1) Data upload
[0043] The data upload process includes steps such as data symmetric encryption, user signature, and symmetric key encryption. The specific logical process is as follows:
[0044] (4.1.1) Users upload data through the system interface and initiate an upload application at the same time. During this process, users need to fill in a series of necessary information, such as access policy expressions and data tags, which are crucial for subsequent data management and access control.
[0045] (4.1.2) The smart contract symmetrically encrypts the data, generates ciphertext and calculates the hash value, and then returns the hash value to the user. At this time, the smart contract needs to attribute encrypt the symmetric encryption key to ensure that only users who meet the access policy have access to the data. After the attribute encryption is completed, the ciphertext is uploaded to the chain.
[0046] (4.1.3) The user uses his private key $USK$ to digitally sign the hash value of the ciphertext. This signing process is to prove the user's ownership and integrity of the data and prevent the data from being tampered with or forged.
[0047] (4.1.4) The smart contract uploads the encrypted ciphertext, hash value and signature related information to the server. In this way, when data users obtain data, they can verify the integrity of the data by verifying the hash value and signature information to ensure the authenticity and reliability of the data.
[0048] (4.2) Data query
[0049] The data query phase aims to provide users with an efficient and convenient way to quickly filter the required data to meet their specific needs by entering the uploader information or related tags. The entire query process starts with the user entering the filter criteria, and the smart contract then processes this information and queries the matching data, and finally displays the query results to the user, ensuring that the user can easily obtain the required data.
[0050] (4.3) Data download
[0051] The data download process includes steps such as symmetric key decryption, user verification of data integrity, and data symmetric decryption. The specific logical process is as follows:
[0052] (4.3.1) After the user browses and finds the required data on the interface, he / she expresses his / her willingness to download by clicking the download button.
[0053] (4.3.2) After receiving the download request from the user, the smart contract will perform a decryption test based on the attribute set possessed by the user. Only when the user's attributes meet the preset decryption requirements will the smart contract start the decryption process and send the symmetric key to the user after the decryption is completed.
[0054] (4.3.3) The DSC then responds and sends the stored data, ciphertext hash value, digital signature and other information to the user.
[0055] (4.3.4) After receiving the symmetric decryption key, data ciphertext, hash value and digital signature, the user will first perform a series of security verification operations. The user will compare the received hash value with the original hash value and verify the validity of the digital signature.
[0056] (4.3.5) Once the digital signature is verified and the hash value matches, the user can confirm that the downloaded data is intact and the source is credible. At this point, the user can use the decrypted symmetric key to symmetric decrypt the data and finally obtain the data in plain text.
[0057] (5) The key tracing stage is mainly responsible for tracking and confirming the identity of the malicious user who illegally leaked the key. The specific logical process is as follows:
[0058] (5.1) The regulatory agency personnel enter the key of the suspected malicious user on the front-end interface and click the "Trace Now" button to express the intention to trace.
[0059] (5.2) The front end sends the input key to the back end server. After receiving the key, the back end server first performs a preliminary format verification to ensure that the input key meets the specified format requirements.
[0060] (5.3) If the key format verification passes, the backend server will call the smart contract for further traceability. After the smart contract receives the key passed by the backend, it will perform strict format verification again to ensure the accuracy and security of the data.
[0061] (5.4) After the format verification is passed, the smart contract will use the signature-identity mapping table of the regulatory agency to search. By comparing the signature information in the database with the specific signature in the leaked key, it attempts to determine the true identity of the malicious user.
[0062] (5.5) If a signature record matching the key is successfully found, the identity of the malicious user is determined, and the smart contract will record the tracing result on the blockchain and return the result to the backend server. If no matching record is found, the smart contract will record the tracing failure information and return it.
[0063] (5.6) After receiving the traceability results returned by the smart contract, the backend server processes the results and returns them to the frontend interface. The frontend interface will display the traceability results to the regulatory agency personnel, including the identity of the malicious user or a prompt of traceability failure.
[0064] (5.7) Regulatory agency personnel may take appropriate measures based on the traceability results, such as further investigation and punishment of malicious users.
[0065] In the present invention, the attribute authority AA is a completely decentralized organization, which is jointly built and maintained by multiple institutional members, and jointly maintains the security and fairness of the system with the trusted regulatory agency RA; the data storage center DSC will perform its tasks according to the predetermined rules and protocols, but the data storage center may be interested in the content of the processed data and try to extract additional information; at the same time, there is also the threat of malicious users in the control system. These users attempt to obtain the specific content of the encrypted data through collusion, and even try to reveal the specific attribute values of the hidden access policy;
[0066] In the present invention, the data sharing module includes the initialization phase, the user management phase, the attribute management phase, the data management phase and the key tracing phase; the initialization module, the attribute authorization module, the encryption module, the decryption module and the tracing module are used, and the specific operation steps are as follows:
[0067] (1) Initialization module:
[0068] The initialization modules used in the initialization phase include control system initialization, regulatory agency initialization, user initialization, attribute authority initialization, and attribute authority attribute initialization.
[0069] (1.1). Control system initialization
[0070] Formal representation: PP←GlobalSetup(1 λ )
[0071] Algorithm description: The GlobalSetup algorithm is responsible for system initialization and publicly uploads the generated public parameters PP to the chain. First, enter the security parameter λ and run the group generator. Get (N,p1,p2,p3,p4,G,G T ,e), where Z N is the size of the system attribute set. Randomly select g, Then determine two cryptographically secure hash functions f0:{0,1} * →f1:{0,1} * →Z N .
[0072] The final system public parameter is PP=<N,g,g1,f0,f1>
[0073] (1.2) Regulatory agency initialization
[0074] Formal representation: RPK,RSK←RASetup(PP)
[0075] Algorithm description: RASetup algorithm is responsible for the relevant logic of regulator initialization and publicly uploads the generated regulator public key RPK to the chain. The algorithm first inputs the system public parameter PP, and then randomly selects a∈Z N , Then calculate H = hZ. At this time, the public key RPK of the regulatory agency = <g a ,X4,H> and private key RSK=<a,X3,h> .
[0076] In addition, RA needs to initialize an empty identity mapping table IT, which mainly maintains the one-to-one correspondence between the user signature σ and the unique identity identifier GID.
[0077] (1.3). User initialization
[0078] Formal representation: UPK, USK←UserSetup(PP, baseinfo)
[0079] Algorithm description: The UserSetup algorithm assumes the core responsibility of the user initialization process. Similarly, the algorithm first inputs the system public parameter PP and some basic information of the user baseinfo. Then randomly selects x I ∈Z N , then calculate Where user public key UPK = P I , user signature private key USK = x I . Then use UPK to calculate the unique identity GID = f1(baseinfo||P I ). Finally, UPK and GID are publicly uploaded to the chain through smart contracts.
[0080] (1.4). Initialization of attribute authority
[0081] Formal representation: OPK←AASetup(PP,n,t)
[0082] Algorithm description: The AASetup algorithm is responsible for initializing the attribute authority. This logic is executed through smart contracts and mainly includes two stages: agency initialization and agency public key generation. It is worth noting that the attribute authority is a unique identity identifier GID i n organization members User i (i∈[1,n]). In addition, the threshold t of the threshold secret sharing algorithm has also been preset before initialization.
[0083] (1.4.1) Organization initialization phase
[0084] Agree to generate each member of the organization User i (i∈[1,n]) selects a random number α i ∈Z N As part of the secret of the organization. The final attribute authority private key OSK is the sum of the partial secrets of each member, that is
[0085] Then, each member User i (i∈[1,n]) randomly select f i (0) = a0 = α i The t-1 order polynomial f i (x) = a0 + a1x + a2x 2 +…+a t-1 x t-1 . And the unique identity of other members GID j Substitute the polynomial to calculate the secret sharing value share ij =f i (GID j ). Share it with the corresponding member User j (j∈[1,n],j≠i), keep the share for yourself ii .
[0086] When a member User i After receiving the secret sharing value sent by other n-1 members, the partial private key of the calculation organization and the institution's partial public key At the same time, opk i Publicly uploaded to the chain through smart contracts.
[0087] (1.4.2) Institutional public key generation phase
[0088] This phase of work is mainly completed by smart contracts. The smart contract first receives the public key opk from the institution. i Randomly select t from the list and use the secret sharing scheme to generate the public key of the attribute authority
[0089]
[0090]
[0091] And put it on the chain publicly through smart contracts.
[0092] (1.5).Attribute authority attribute initialization
[0093] Formal representation: APK←AttrGen(PP,attrname,n,t)
[0094] Algorithm description: The AttrGen algorithm is responsible for the main logic of attribute authority attribute initialization. This stage is similar to agency initialization, including two processes: attribute initialization and attribute public key generation.
[0095] (1.5.1) Attribute initialization phase
[0096] Each member User who agrees to generate the organization attribute attrname i (i∈[1,n]) selects a random number β i ∈Z N As the partial secret of the organization attribute, the final private key of the organization attribute is the sum of the partial organization attribute secrets of each member, that is,
[0097] Then, each member User i (i∈[1,n]) randomly select f i (0) = a0 = β i The t-1 order polynomial f i (x)=a0+a1x+···+a t-1 x t-1 . And the unique identity of other members GID j Substitute the polynomial to calculate the secret sharing value share ij =f i (GID j )(j∈[1,n],j≠i). Share its secret sharing value with the corresponding user User through the smart contract j (j∈[1,n],j≠i), keep the share for yourself ii .
[0098] When User i After receiving another n-1 secret sharing values, calculate the partial private key of the organization attribute and the partial public key of the organization attributes At the same time, apk i Public on-chain via smart contracts
[0099] (1.5.2) Attribute public key generation phase
[0100] At this stage, the work is mainly done by smart contracts. i After the calculation is completed, the smart contract randomly selects t attributes from the attribute authority using the secret sharing scheme to generate the attribute public key
[0101]
[0102] And put it on the chain publicly through smart contracts.
[0103] (2) Attribute Authorization Module
[0104] In this stage, it is assumed that DU has the attribute set in and DU wants to obtain its attribute set The authorization needs to be divided into two steps: first, you need to apply to AA for its attribute set The relevant credentials AC of the attributes in the cipher need to be calculated; secondly, its signature σ needs to be calculated and submitted to RA for identity authentication. After verification, RA will distribute the attribute set Attribute key set The details are as follows:
[0105] (2.1) Application for attribute certificate
[0106] Formal representation: AC←UACertGen(PP,GID,S)
[0107] Algorithm description: The UACertGen algorithm is mainly responsible for the main logic of AA distributing attribute credentials AC to DU. This process requires the consent of at least t institutional members in AA. For i∈[1,t], each member User i Calculate partial attribute credentials Sent to DU. DU receives t auth i Post-calculation attribute credentials
[0108]
[0109] (2.2). Attribute key generation
[0110] Formal representation: SK {GID,S} ←KeyGen(PP,GID,AC,{USK,RSK,APK},S)
[0111] Algorithm description: The KeyGen algorithm is mainly responsible for the main logic of the attribute key generation process. This stage is performed by RA and includes two stages: identity authentication and key generation. The specific implementation is as follows:
[0112] (2.2.1) Identity verification phase
[0113] At this stage, the user first uses his private key USK and attribute certificate AC to calculate the identity signature It is then submitted together with the attribute certificate AC to the RA for identity verification.
[0114] RA determines whether the user's identity signature is valid by checking whether the following formula is true, that is, e(σ,g)? =e(f0(AC,P I ),P I ). If the verification is successful, the attribute key will be distributed to the user; otherwise, the user's application will be rejected.
[0115] (2.2.2) Key generation phase
[0116] After verification, any RA randomly selects R,R′, and t∈Z N , and then calculate u=f0(GID) and in And record σ and the corresponding GID in IT.
[0117] (3) Encryption module
[0118] Formal representation: CT A ←Encrypt(PP,M,{RPK,UPK,APK},A)
[0119] Algorithm description: The Encrypt algorithm is responsible for the main logic of data encryption. Before encrypting data, DO first needs to clearly define an access policy. To determine the authorized scope of the data, where A is an l×k matrix and ρ is a matrix from each row of A x to property names and The algorithm takes a symmetric key as plaintext M∈G T Encryption is performed and the symmetrically encrypted ciphertext data is outsourced to DSC. In order to achieve efficient computing, this stage is divided into two processes: offline and online.
[0120] (3.1) Offline encryption stage
[0121] First, DO randomly selects two secret values s,s′∈Z N To generate a random vector v = (s, v2, ..., v n ) and v′=(s′,v′2,…,v′ n ). Then randomly select calculate
[0122] C base =e(g,g1) αs ,C′1=g s ,C2=e(g,g1) αs′ ,C′2=g s′ Z′ 2,x .
[0123] Assume that the matrix in the LSSS access control structure has at most Q rows. Randomly select Z 1,x ,Z′ 1x ,Z 2,x ∈ calculate
[0124] The final intermediate ciphertext is CT M =(C base ,C′1,C2,C′2,{D 1,x ,C 2,x} x∈[1,Q] ).
[0125] (3.2) Online encryption stage
[0126] When the plaintext data M to be encrypted is known, DO performs linear secret sharing on the secret values s, s′ according to the specified access policy. Calculate the shared matrix λ x =A x v,λ′ x =A x ·v′. Then use the intermediate ciphertext CT M and the shared matrix λ x ,λ′ x calculate Finally, the final ciphertext is generated as CT A =((A,ρ),C1,C′1,C2,C′2,{C 1,x ,D 1,x ,C 2,x ,C′ 2,x} x∈[1,l] ).
[0127] (4) Decryption module
[0128] Formal representation: M or⊥←Decrypt(SK {GID,s} ,PP,CT A )
[0129] Algorithm description: The Decrypt algorithm is responsible for the main logic of data decryption. This solution adopts a partial strategy hidden attribute encryption algorithm, so DU cannot directly determine whether its attribute set S satisfies the access policy A. Therefore, this stage is divided into two processes: matching and decryption.
[0130] (4.1) Matching stage
[0131] DU first calculates the minimum subset that satisfies (A,ρ) Check again if it exists satisfy and equation
[0132]
[0133] in satisfy
[0134] If there is such Then DU uses and Execute the Decrypt algorithm; otherwise, it means the attribute set of DU If A is not satisfied, the algorithm returns ⊥.
[0135] (4.2) Decryption stage
[0136] In this phase, DU first calculates Then, the plaintext data M=C1 / B is calculated.
[0137] (5) Traceability module
[0138] Formal representation:
[0139] Algorithm description: The Trace algorithm is responsible for the main logic of identity tracking and is executed by the regulatory agency. The algorithm is mainly divided into two stages: checking and mapping.
[0140] (5.1) Inspection phase
[0141] If a malicious user leaks his key RA first checks for compromised keys Is the format correct? A document is considered well-formed if it passes the following three checks.
[0142] 1)σ,K,K′,K i ∈G;
[0143] 2) e(g,K)=e(g,g1) αu ·e(g a ,K′)≠1;
[0144] 3)
[0145] \textbf
[0146] (5.2) Mapping stage
[0147] RA based on the leaked key Look for σ in the IT table and finally determine the real identity of the malicious user.
[0148] The beneficial effects of the present invention are as follows: the method of the present invention expands the functional characteristics of the existing policy-hidden attribute encryption algorithm, does not need to pre-set the number of authoritative institutions and their attributes, and allows users to increase or decrease them in a flexible manner. At the same time, a regulatory agency is introduced to strengthen the supervision of the user and attribute authorization process, and effectively track the true identity of malicious users who provide keys to unauthorized parties. The improved policy-hidden attribute encryption algorithm is applied to the access control scenario based on blockchain. Through the identity attribute authorization and authentication between users and institutions, a trust chain is successfully constructed, realizing the transmission of trust and the transfer of costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0149] Figure 1 It is a diagram of the overall model of the present invention.
[0150] Figure 2 A diagram of the blockchain environment.
[0151] Figure 3 The overall architecture of the control system is shown in Figure 2.
[0152] Figure 4 It is a flow chart of the control method.
[0153] Figure 5 This is a timing diagram of the control system. DETAILED DESCRIPTION
[0154] The present invention is further described below by way of embodiments in conjunction with the accompanying drawings.
[0155] Example 1: The overall model of fine-grained policy hiding and traceable decentralized access control system is as follows Figure 1 As shown, it can be seen that the present invention consists of 6 general entities: attribute authority, data storage center, data owner, data user, regulator and decentralized application. The specific roles are as follows:
[0156] 1. User is the basic unit of the system, which can be a data owner, a data user or a member of an attribute authority. Users have different functions according to different roles. As a member of an attribute authority, they can cooperate with other users to build an attribute authority and participate in the attribute management process.
[0157] 2. Data Owner (DO) is a specific role of the user, which refers to the user who owns part of the data and uploads it to the system. They ensure that only specific users can decrypt and access the data by setting attribute encryption access policies.
[0158] 3. Data User (DU) is a specific role of a user, which refers to a user who currently has authorization for certain attributes and wants to access data in the system. They can only decrypt and access data if the attribute set they possess satisfies a specific access policy.
[0159] 4. The regulator (RA) plays an honest and fair role in the system. Its responsibilities include verifying user identity, generating attribute private keys, and tracking and responding to illegal behavior of malicious users.
[0160] 5. The Attribute Authority (AA) is a decentralized organization built by users, responsible for managing attributes and their keys and participating in the definition and verification of access policies. Only when more than a specified threshold of attribute authority members agree can the organization be created and the attribute certificate (AC) of its attribute set distributed to DUs.
[0161] 6. Decentralized Application (DAPP) refers to an application built on blockchain technology, which is used to support the synthesis and calculation of system intermediate parameters, communication between institutions and users, etc. It ensures the reliability of key traceability and the security of access control.
[0162] 7. Data Storage Center (DSC) is the core infrastructure for data storage and is responsible for building, managing and maintaining data storage services. Although the Interplanetary File System (IPFS) provides a new way for data encryption storage, in actual use, IPFS still faces challenges such as node stability, data persistence and system integration. In view of this, the present invention prefers to adopt a mature and stable database storage solution to ensure the reliability and stability of data storage.
[0163] In terms of hardware, the present invention is deployed on a 4-core 8GB Ubuntu 18.04.02TLS virtual machine, and the host machine is configured with an i9-12900H processor and 32GB memory. The front end uses pnpm to manage JavaScript dependencies, and combines Vue2 and React.js to build the interface. The back end uses the Spring Boot framework and the Hyperledger Java SDK to achieve seamless docking with the blockchain platform. The blockchain network uses Hyperledger Fabric, including Orderer nodes, Kafka and Zookeeper, CA nodes and Peer nodes, etc., and uses Docker containerization technology and Docker Swarm management to achieve rapid deployment, expansion and collaborative work, such as Figure 2 shown.
[0164] The overall system architecture is as follows Figure 3 As shown in the figure, the core hierarchical structure of the data sharing system is presented, including the data layer, contract layer, service layer and application layer. Each layer works together to ensure the secure sharing and efficient use of data.
[0165] In the data sharing system, the data layer and the service layer provide support for the present invention. The data layer is responsible for storing and managing the data in the blockchain system, including the data structure, storage method, and data read and write operations of the blockchain. The service layer provides the interface and functions of the blockchain system, including user identity authentication, data query, transaction processing, etc., providing users and applications with convenient access and usage methods.
[0166] The contract layer mainly implements two smart contracts: Distributed Attribute Cryptography (DABE) smart contract and Data Sharing Exchange (PHRS) smart contract. The DABE smart contract is responsible for processing the logic between attribute cryptography and users, including key generation, encryption, decryption and other operations. Through the DABE smart contract, the system can accurately encrypt and decrypt data according to the user's attributes and permissions, ensuring that only users with corresponding attribute permissions can access and decrypt data. The PHRS smart contract is the core component of the business platform and is responsible for the business logic of the data sharing access control system. It provides a series of functions, including data upload, download, query, update, and deletion of user and institution information. The PHRS smart contract implements user identity authentication and data endorsement and authorization through the blockchain's own identity authorization endorsement mechanism, ensuring the credibility of the data chain and the integrity of the data. In the design of the contract layer, user input needs to be carefully verified and filtered to ensure its legality and security.
[0167] In terms of the application layer, the present invention adopts the React.js and Spring Boot development frameworks, which mainly include two key modules: the contract interaction module and the logic extension module. The contract interaction module is responsible for communicating with the smart contract on the blockchain and executing the logic defined in the contract. At the same time, the module implements key functions such as automatic signing, managing data access rights, and data sharing to ensure the security and reliability of the system. The logic extension module is expanded on the basis of the logic provided by the smart contract to provide users with a convenient operation interface and functions. The module includes functions such as user registration, authorization management, institutional information management, encrypted sharing, and decrypted downloading, aiming to meet the needs of users. The present invention designs and implements the legitimacy verification of user input, and designs a detection and prevention mechanism for possible malicious attacks to ensure the security and stability of the system.
[0168] From the perspective of system requirements, it can be mainly divided into user management module, data sharing module, access control module and blockchain module. Figure 4 As shown, the specific requirements of each module are as follows:
[0169] 1. User management module: This module is mainly responsible for maintaining user-related information. User information is mainly divided into two parts: one is information related to user identity, including the globally unique identifier $GID$, signature and its associated attributes and related information of attribute authorities; the other part is information related to data, such as the user's historical records of uploading and downloading related data.
[0170] 2. Data Sharing Module: The main function of this module is to achieve safe and controllable sharing of data. For data owners, they first need to set up corresponding access policies in the system and set tags for relevant data so that data users can conduct conditional searches. The data sharing module will encrypt the data according to the corresponding access policies and upload it to the data storage center. Data users can query the data they need according to the relevant tags and try to decrypt and download the required data.
[0171] 3. Access control module: This module is mainly responsible for managing the user's identity and corresponding attribute permissions. After the system is initialized, multiple users can form an attribute authority. When a certain number of members agree, the authority has the authority to grant other users the associated attributes. However, each attribute grant requires the regulator to verify the user's identity and record the corresponding grant for future traceability.
[0172] 4. Blockchain module: This module is based on blockchain technology and smart contract mechanism. Multiple institutions jointly maintain the security and integrity of data by forming a consortium chain. In order to improve transaction speed, the system adopts the PBFT efficient consensus algorithm, which effectively avoids the problems caused by the power-consuming and time-consuming PoW consensus algorithm in the traditional Bitcoin network. The system's public parameters and attribute-encrypted data summaries are stored on the blockchain. User registration, attribute authorization and other operations are performed by deploying smart contracts (such as DABE). In practical applications, the blockchain should be jointly managed by the government or several large institutions to ensure the stability and security of the system operation.
[0173] like Figure 5 As shown in the figure, the data sharing system based on blockchain and decentralized traceable PH-CP-ABE can be divided into five main functional stages: initialization, user management, attribute management, data management and key traceability.
[0174] 1. The initialization phase of the system is mainly responsible for the initialization of the elliptic curve and its parameters, the generation of some attributes and keys, and the setting of security parameters. In this phase, it is necessary to establish data structures related to attribute cryptography, including elliptic curves, access structures, and access policies.
[0175] 2. The user management stage covers operations such as user registration, login, and password reset. Taking user registration as an example, the logical process is as follows:
[0176] (1) The user fills in the user name, password and other information on the front-end interface, and then sends the filled information to the back-end server for processing.
[0177] (2) After receiving the user information, the backend server verifies and processes it, including checking whether the username already exists and whether the password complexity meets the requirements. The verified user information is then encapsulated into a request object and the registration interface of the smart contract is called.
[0178] (3) After receiving the registration request, the smart contract will execute the corresponding logic, write the user's identity information into the blockchain, and complete the registration process.
[0179] 3. The responsibility of the attribute management stage is to handle various operations related to the generation and authorization of user and organization attributes, including organization initialization, organization attribute initialization, attribute authorization and attribute revocation.
[0180] Attribute authority and institution attribute generation
[0181] The generation process of authority and institution attributes follows a series of rigorous steps, including initiating institution creation request, user consent and sharing of secrets, generating some institution public keys, uploading some institution public keys to the chain, and integrating public keys executed by smart contracts. Taking the creation of an authority as an example, the specific logical process is as follows:
[0182] (1) The user first initiates a request to create an organization through the system interface. During this process, the user needs to provide a series of necessary information, including but not limited to the organization name, organization description, authorization threshold t, and the total number of organization members n.
[0183] (2) After receiving the creation request, the system will show the request details to the user and ask the user to decide whether to agree to participate in the creation of the organization based on their own situation. If the user agrees to participate, he / she needs to share part of his / her secret share. ij After successfully collecting the required number of partial secrets, the system will use these secrets to generate a partial organization public key opk i .
[0184] (3) The request to create an organization can only be approved after obtaining the consent of enough users. Specifically, the request to create an organization will be considered valid only when at least t users agree and participate in sharing the secret. Subsequently, the smart contract will receive the partial organization public keys on the chain from all members and perform the public key integration operation.
[0185] (4) After the smart contract completes the public key integration operation, it will record the complete public key of the organization on the blockchain. The decentralized nature and immutability of the blockchain ensure the persistence and security of the public key. At this point, the creation process of the organization is completed, and the organization officially becomes a valid entity in the system.
[0186] Attribute authorization
[0187] The attribute authorization process covers all aspects of attribute application and attribute key generation. The specific logic is as follows:
[0188] (1) The user first initiates an attribute application through the system interface and needs to fill in necessary information such as attribute name, organization name, etc. This information is the basis for applying for attribute authorization and provides necessary background information for subsequent processes.
[0189] (2) After receiving the application, the organization members will decide whether to support the attribute application based on their personal judgment and organization policy. If the member approves the application, the partial attribute credential auth will be calculated. This credential is the key basis for the user to obtain attribute authorization and is used to prove that the user has been recognized by the organization members.
[0190] (3) After collecting the consent of a sufficient number of institutional members, the user will use these attribute credentials auth to calculate his own signature σ. Subsequently, the user sends the signature σ together with the attribute credentials auth to the regulatory agency for identity authentication and authorization application.
[0191] (4) After receiving the user's application, the regulator will first verify the validity of the signature σ. This verification process ensures the authenticity and integrity of the application and prevents malicious attacks and tampering. If the verification is successful, the regulator will distribute the attribute key K to the user to ensure that he can safely and legally access and use the relevant attributes.
[0192] Through the above process, attribute authorization can be achieved safely and efficiently, which not only protects the interests of institutional members but also ensures that users can legally obtain and use the required attributes.
[0193] Attribute revocation
[0194] The present invention implements the global revocation function of a specific attribute by setting a global revocation flag in the smart contract. When a certain attribute needs to be revoked, the smart contract sets the corresponding revocation flag to true. When the ciphertext is published, the smart contract will check whether the attribute used by the ciphertext has been revoked. If so, it will refuse to publish the ciphertext. This mechanism ensures that the system can effectively handle the revocation operation of the attribute and prevent operations related to the revoked attribute when necessary.
[0195] 4. The data management stage undertakes the core tasks in the entire system, and is mainly responsible for data encryption and decryption operations to ensure the security and integrity of the data. This stage covers key steps such as data encryption, symmetric key encryption, symmetric key decryption, data decryption, and data query.
[0196] Data upload
[0197] The data upload process includes steps such as data symmetric encryption, user signature, and symmetric key encryption. The specific logical process is as follows:
[0198] (1) Users upload data through the system interface and initiate an upload application at the same time. During this process, users need to fill in a series of necessary information, such as access policy expressions and data tags, which are crucial for subsequent data management and access control.
[0199] (2) The smart contract symmetrically encrypts the data, generates ciphertext and calculates the hash value, and then returns the hash value to the user. At this time, the smart contract needs to attribute-encrypt the symmetric encryption key to ensure that only users who meet the access policy have access to the data. After the attribute encryption is completed, the ciphertext is uploaded to the chain.
[0200] (3) The user uses his / her private key $USK$ to digitally sign the hash value of the ciphertext. This signing process is to prove the user's ownership and integrity of the data and prevent the data from being tampered with or forged.
[0201] (4) The smart contract uploads the encrypted ciphertext, hash value, and signature-related information to the server. In this way, when data users obtain data, they can verify the integrity of the data by verifying the hash value and signature information to ensure the authenticity and reliability of the data.
[0202] Data Query
[0203] The data query phase aims to provide users with an efficient and convenient way to quickly filter the required data to meet their specific needs by entering the uploader information or related tags. The entire query process starts with the user entering the filter criteria, and the smart contract then processes this information and queries the matching data, and finally displays the query results to the user, ensuring that the user can easily obtain the required data.
[0204] Data Download
[0205] The data download process includes steps such as symmetric key decryption, user verification of data integrity, and data symmetric decryption. The specific logical process is as follows:
[0206] (1) After the user browses and finds the required data on the interface, he / she expresses his / her willingness to download by clicking the download button.
[0207] (2) After receiving the download request from the user, the smart contract will perform a decryption test based on the attribute set possessed by the user. Only when the user's attributes meet the preset decryption requirements will the smart contract start the decryption process and send the symmetric key to the user after the decryption is completed.
[0208] (3) The DSC then responds and sends the stored data, ciphertext hash value, digital signature and other information to the user.
[0209] (4) After receiving the symmetric decryption key, data ciphertext, hash value and digital signature, the user will first perform a series of security verification operations. The user will compare the received hash value with the original hash value and verify the validity of the digital signature.
[0210] (5) Once the digital signature is verified and the hash value matches, the user can confirm that the downloaded data is intact and the source is credible. At this point, the user can use the decrypted symmetric key to symmetric decrypt the data and finally obtain the data in plain text.
[0211] 5. The key tracing stage is mainly responsible for tracking and confirming the identity of the malicious user who illegally leaked the key. The specific logical process is as follows:
[0212] (1) The regulatory agency personnel enter the key of the suspected malicious user on the front-end interface and click the "Trace Now" button to express their willingness to trace.
[0213] (2) The front end sends the input key to the back end server. After receiving the key, the back end server first performs a preliminary format verification to ensure that the input key meets the specified format requirements.
[0214] (3) If the key format verification passes, the backend server will call the smart contract for further traceability processing. After the smart contract receives the key passed by the backend, it will perform strict format verification again to ensure the accuracy and security of the data.
[0215] (4) After the format verification is passed, the smart contract will use the regulator’s signature-identity mapping table to search. By comparing the signature information in the database with the specific signature in the leaked key, it attempts to determine the true identity of the malicious user.
[0216] (5) If a signature record matching the key is successfully found, the identity of the malicious user is determined, and the smart contract records the tracing result on the blockchain and returns the result to the backend server. If no matching record is found, the smart contract records the tracing failure information and returns it.
[0217] (6) After receiving the tracing results returned by the smart contract, the backend server processes the results and returns them to the frontend interface. The frontend interface will display the tracing results to the regulatory agency personnel, including the identity of the malicious user or a prompt indicating the tracing failure.
[0218] (7) Regulatory agency personnel may take appropriate measures based on the tracing results, such as further investigation and punishment of malicious users.
[0219] Method evaluation
[0220] In order to comprehensively evaluate the performance of the access control method proposed in the present invention, the present invention conducted an experimental simulation. The experimental environment was set as a computer equipped with an Ubuntu 20.04TLS operating system, an i9-12900H processor, and 32GB of memory. The simulation was performed based on the Java Pairing Based cryptography library and in the Hyperledger Fabric v1.4.4 network environment. In the experiment, A1 type pairing was used. These pairings are on the curve y 2 =x 3 +x, which is defined in field F N In the experiment, each operation was repeated 30 times, and the average value was taken as the final data. The following table lists the time complexity of each operation as a benchmark for subsequent analysis.
[0221] Specific operations E <![CDATA[E T ]]> P <![CDATA[E N ]]> Time Cost 12.754 0.653 17.782 0.153
[0222] The following table lists the time data of each stage in the process of initializing the organization attributes. It can be seen from the table that the members have less overhead when calculating the share. This is because in the programming implementation, the exponential operation is replaced by efficient multiplication and addition operations, which reduces the calculation complexity. At the same time, apk i The computational cost of is stable, involving only one exponential operation on the group G, which ensures the efficiency and stability of the computational process.
[0223] Number of institution members n Calculate share <![CDATA[Calculate apk i > Calculate APK 5 0.0658 12.638 66.347 10 0.231 12.727 136.153 20 0.862 12.714 266.512 50 5.551 12.703 678.604 70 11.206 12.854 931.533 100 23.482 12.761 1443.348
[0224] The following table shows the time consumption of key generation, encryption, matching and decryption under different numbers of attributes. The experiment simulates the most complex AND logic connection. The data shows that the time consumption of each stage is positively correlated with the number of attributes. When processing 90 attributes, the time consumption is also controlled within 4 seconds, which proves the efficiency of this solution in processing large-scale attribute sets and meets the actual application needs.
[0225] Number of attributes Key Generation encryption match Decryption 10 166.436 252.762 426.473 386.254 20 169.614 509.073 817.651 757.184 30 299.314 762.802 1194.720 1128.613 40 426.931 1016.289 1588.928 1484.558 50 553.552 1285.871 1986.835 1860.302 60 689.021 1531.305 2391.174 2203.285 70 954.054 1802.517 2734.725 2595.341 80 1066.733 2010.890 3134.172 2905.786 90 1196.973 2356.497 3521.581 3266.472
Claims
1. A fine-grained policy hiding and traceable decentralized access control method, characterized by: The control method is implemented through a fine-grained policy hiding and traceable decentralized access control system, which is composed of users, attribute authorities, data storage centers, regulatory agencies, and decentralized applications; specifically as follows: Users are the basic units of the control system, including data owners, data users or members of attribute authorities. Users have different functions according to different roles. Members of attribute authorities can cooperate with other users to build attribute authorities and participate in the attribute management process. Among them: Data owners (DO) refer to users who own part of the data and upload it to the control system. They set access policies for attribute encryption to ensure that only specific users can decrypt and access data. Data users (DU) refer to users who currently have authorization for certain attributes and want to access data in the control system. They can only decrypt and access data if the attribute set they own meets the specific access policy. The Attribute Authority (AA) is a decentralized organization built by users in cooperation, responsible for managing attributes and their keys and participating in the definition and verification of access policies; only when more than a specified threshold of attribute authority members agree can the organization be created and attribute credentials (AC) of its attribute set be distributed to DUs; The Data Storage Center (DSC) is the core infrastructure for data storage and is responsible for building, managing and maintaining data storage services; The regulatory authority (RA) plays an honest and impartial role in the control system. Its responsibilities include verifying user identities, generating attribute private keys, and tracking and responding to illegal behaviors of malicious users. Decentralized applications (DAPP) refer to applications built on blockchain technology, which are used to support the synthesis and calculation of system intermediate parameters, communication between institutions and users, etc. It ensures the reliability of key traceability and the security of access control. The control method includes a user management module, a data sharing module, an access control module and a blockchain module; the specific steps are as follows: The user management module is mainly responsible for maintaining user-related information. User information is divided into two parts: one is information related to the user's identity, including the globally unique identifier $GID$, signature and its associated attributes and attribute authority information; the other is information related to data, such as the user's history of uploading and downloading related data; The main function of the data sharing module is to realize the safe and controllable sharing of data. For the data owner, first of all, it is necessary to set the corresponding access policy in the control system and set tags for the relevant data so that the data user can conduct conditional search; the data sharing module will encrypt the data according to the corresponding access policy and upload it to the data storage center; the data user will query the data he needs according to the relevant tags and try to decrypt and download the required data; The access control module is mainly responsible for managing the user's identity and corresponding attribute permissions. After the system is initialized, multiple users can form an attribute authority. When a certain number of members agree, the authority has the authority to grant other users the associated attributes. However, each attribute grant requires the regulatory agency to verify the user's identity and record the corresponding grant for future traceability. The blockchain module is based on blockchain technology and smart contract mechanism. Multiple institutions jointly maintain the security and integrity of data by forming a consortium chain. In order to increase transaction speed, the control system adopts the PBFT efficient consensus algorithm, which effectively avoids the problems caused by the power-consuming and time-consuming PoW consensus algorithm in the traditional Bitcoin network. The public parameters of the control system and the data summary after attribute encryption are stored on the blockchain; user registration and attribute authorization operations are performed by deploying smart contracts; in actual applications, the blockchain should be jointly managed by the government or several large institutions to ensure the stability and security of the system operation.
2. The control method according to claim 1, characterized in that: The data sharing module is divided into the initialization phase, user management phase, attribute management phase, data management phase and key tracing phase; the details are as follows: (1) The initialization phase is mainly responsible for the initialization of the elliptic curve and its parameters, the generation of some attributes and keys, and the setting of security parameters. In this phase, data structures related to attribute cryptography need to be established, including elliptic curves, access structures, and access policies. (2) The user management stage covers operations such as user registration, login, and password reset. The logical process of user registration is as follows: (2.1) The user fills in the user name, password and other information through the front-end interface, and then sends the filled information to the back-end server for processing; (2.2) After receiving the user information, the backend server verifies and processes it, including checking whether the username already exists and whether the password complexity meets the requirements; then it encapsulates the verified user information into a request object and calls the registration interface of the smart contract; (2.3) After receiving the registration request, the smart contract will execute the corresponding logic, write the user's identity information into the blockchain, and complete the registration process; (3) The responsibility of the attribute management stage is to handle various operations related to the generation and authorization of user and organization attributes, including attribute authority and organization attribute generation, attribute authorization, and attribute revocation; (3.1) Attribute authority and institution attribute generation The generation process of attribute authority and institution attributes follows a series of rigorous steps, including initiating institution creation request, user consent and sharing of secrets, generating partial institution public keys, partial institution public keys on-chain, and smart contract execution public key integration; the creation of authority, the specific logical process is as follows: (3.1.1) The user first initiates a request to create an organization through the system interface. During this process, the user needs to provide a series of necessary information, including the organization name, organization description, authorization threshold t, and the total number of organization members n; (3.1.2) After receiving the creation request, the system will show the request details to the user and ask the user to decide whether to agree to participate in the creation of the organization based on their own situation; if the user agrees to participate, he / she needs to share part of his / her own secrets. ij to other members; after successfully collecting the required number of partial secrets, the system will use these secrets to generate a partial organization public key opk i ; (3.1.3) The request to create an organization can only be approved after obtaining the consent of enough users; specifically, the request to create an organization will be considered valid only when at least t users agree and participate in sharing the secret; then, the smart contract will receive the partial organization public keys on the chain from all members and perform the public key integration operation; (3.1.4) After the smart contract completes the public key integration operation, the complete public key of the organization will be recorded on the blockchain; the decentralized nature and immutability of the blockchain ensure the persistence and security of the public key; at this point, the creation process of the organization is completed, and the organization officially becomes a valid entity in the system; (3.2) Attribute authorization The attribute authorization process covers all aspects of attribute application and attribute key generation. The specific logic is as follows: (3.2.1) The user first initiates an attribute application through the system interface and needs to fill in the necessary information in detail; this information is the basis for applying for attribute authorization and provides necessary background information for subsequent processes; (3.2.2) After receiving the application, the organization members will decide whether to support the attribute application based on their personal judgment and organization policy; if the member agrees with the application, the partial attribute credential auth will be calculated. This credential is the key basis for the user to obtain attribute authorization and is used to prove that the user has been recognized by the organization members; (3.2.3) After collecting the consent of a sufficient number of institutional members, the user will use these attribute credentials auth to calculate his own signature σ; then, the user will send the signature σ together with the attribute credentials auth to the regulatory agency for identity authentication and authorization application; (3.2.4) After receiving the user's application, the regulatory agency will first verify the validity of the signature σ; this verification process ensures the authenticity and integrity of the application and prevents malicious attacks and tampering; if the verification is successful, the regulatory agency will distribute the attribute key K to the user to ensure that he can safely and legally access and use the relevant attributes; (3.3) Attribute revocation By setting a global revocation flag in the smart contract, the global revocation function of a specific attribute is realized; when a certain attribute needs to be revoked, the smart contract sets the corresponding revocation flag to true; when the ciphertext is published, the smart contract will check whether the attribute used by the ciphertext has been revoked, and if so, it will refuse to publish the ciphertext; this mechanism ensures that the system can effectively handle the revocation of attributes and block operations related to revoked attributes when necessary; (4) The data management stage undertakes the core tasks in the entire system, mainly responsible for data encryption and decryption operations to ensure data security and integrity; this stage covers data uploading, data querying, and data downloading; (4.1) Data upload The data upload process includes steps such as data symmetric encryption, user signature, and symmetric key encryption. The specific logical process is as follows: (4.1.1) Users upload data through the system interface and initiate an upload application at the same time; during this process, users need to fill in a series of necessary information, which is crucial for subsequent data management and access control; (4.1.2) The smart contract symmetrically encrypts the data, generates ciphertext and calculates the hash value, and then returns the hash value to the user; At this time, the smart contract needs to perform attribute encryption on the symmetric encryption key to ensure that only users who meet the access policy have access to the data. After the attribute encryption is completed, the ciphertext is uploaded to the chain; (4.1.3) The user uses his private key $USK$ to digitally sign the hash value of the ciphertext; (4.1.4) The smart contract uploads the encrypted ciphertext, hash value and signature related information to the server; when obtaining data, the data user verifies the hash value and signature information to verify the integrity of the data and ensure the authenticity and reliability of the data; (4.2) Data query The query process starts with the user inputting the filter criteria, and the smart contract then processes this information and queries the matching data, and finally displays the query results to the user, thus ensuring that the user can easily obtain the required data; (4.3) Data download The specific logical process of data download is as follows: (4.3.1) After the user browses and finds the required data on the interface, he / she expresses his / her willingness to download by clicking the download button; (4.3.2) After receiving the download request from the user, the smart contract will perform a decryption test based on the attribute set possessed by the user; only when the user's attributes meet the preset decryption requirements will the smart contract start the decryption process and send the symmetric key to the user after the decryption is completed; (4.3.3) The DSC then responds and sends the data stored thereon, the ciphertext hash value, and the digital signature information to the user; (4.3.4) After receiving the symmetric decryption key, data ciphertext, hash value and digital signature information, the user will first perform a series of security verification operations; the user will compare the received hash value with the original hash value and verify the validity of the digital signature; (4.3.5) Once the digital signature is verified and the hash value matches, the user can confirm that the downloaded data is intact and the source is credible; at this point, the user can use the decrypted symmetric key to symmetric decrypt the data and finally obtain the data in plain text; (5) The key tracing stage is mainly responsible for tracking and confirming the identity of the malicious user who illegally leaked the key. The specific logical process is as follows: (5.1) The regulatory agency personnel enter the key of the suspected malicious user on the front-end interface and click the "Trace Now" button to express their willingness to trace; (5.2) The front end sends the input key to the back end server; after receiving the key, the back end server first performs a preliminary format verification to ensure that the input key meets the specified format requirements; (5.3) If the key format verification passes, the backend server will call the smart contract for further traceability processing; after the smart contract receives the key passed by the backend, it will perform strict format verification again to ensure the accuracy and security of the data; (5.4) After the format verification is passed, the smart contract will use the signature-identity mapping table of the regulatory agency to search; by comparing the signature information in the database with the specific signature in the leaked key, try to determine the true identity of the malicious user; (5.5) If a signature record matching the key is successfully found, the identity of the malicious user is determined, and the smart contract will record the tracing result on the blockchain and return the result to the backend server; if no matching record is found, the smart contract will record the tracing failure information and return it; (5.6) After receiving the tracing results returned by the smart contract, the backend server processes the results and returns them to the frontend interface; the frontend interface will display the tracing results to the regulatory agency personnel, including the identity of the malicious user or a prompt of tracing failure; (5.7) Regulatory agency personnel may take appropriate measures based on the traceability results.
3. The control method according to claim 1, characterized in that The data sharing module includes the initialization phase, user management phase, attribute management phase, data management phase and key tracing phase; the initialization module, attribute authorization module, encryption module, decryption module and tracing module are used. The specific operation steps are as follows: (1) Initialization module: The initialization modules used in the initialization phase include control system initialization, regulatory agency initialization, user initialization, attribute authority initialization, and attribute authority attribute initialization. (1.1). Control system initialization Formal representation: PP←GlobalSetup(1 λ ) Algorithm description: The GlobalSetup algorithm is responsible for system initialization and publicly uploads the generated public parameter PP to the chain; first input the security parameter λ and run the group generator Get (N,p1,p2,p3,p4,G,G T ,e), where Z N is the size of the system attribute set; randomly selected Then determine two cryptographically secure hash functions f0:{0,1} * →f1:{0,1} * →Z N ; The final system public parameter is PP=<N,g,g1,f0,f1> (1.2) Regulatory agency initialization Formal representation: RPK,RSK←RASetup(PP) Algorithm description: RASetup algorithm is responsible for the relevant logic of regulator initialization and publicly uploads the generated regulator public key RPK to the chain; the algorithm first inputs the system public parameter PP, and then randomly selects a∈Z N , Z, Then calculate H = hZ; at this time, the public key RPK of the regulatory agency = <g a ,X4,H> and private key RSK=<a,X3,h> ; In addition, RA needs to initialize an empty identity mapping table IT, which mainly maintains the one-to-one correspondence between the user signature σ and the unique identity identifier GID; (1.3). User initialization Formal representation: UPK, USK←UserSetup(PP, baseinfo) Algorithm description: The UserSetup algorithm assumes the core responsibility of the user initialization process; similarly, the algorithm first inputs the system public parameter PP and some basic information of the user baseinfo; then randomly selects x I ∈Z N , then calculate Where user public key UPK = P I , user signature private key USK = x I ; Then use UPK to calculate the unique identity GID = f1(baseinfo||P I ); Finally, UPK and GID are publicly uploaded to the chain through smart contracts; (1.4). Initialization of attribute authority Formal representation: OPK←AASetup(PP,n,t) Algorithm description: The AASetup algorithm is responsible for initializing the attribute authority. This logic is executed through smart contracts and mainly includes two stages: agency initialization and agency public key generation. It is worth noting that the attribute authority is a unique identity identifier GID i n organization members User i (i∈[1,n]); In addition, the threshold t of the threshold secret sharing algorithm has been preset before initialization; (1.4.1) Organization initialization phase Agree to generate each member of the organization User i (i∈[1,n]) selects a random number α i ∈Z N As the partial secret of the organization; the final attribute authority private key OSK is the sum of the partial secrets of each member, that is Then, each member User i (i∈[1,n]) randomly select f i (0) = a0 = α i The t-1 order polynomial f i (x) = a0 + a1x + a2x 2 +…+a t-1 x t-1 ; and the unique identity of other members GID j Substitute the polynomial to calculate the secret sharing value share ij =f i (GID j ); share it with the corresponding member User j (j∈[1,n],j≠i), keep the share for yourself ii ; When a member User i After receiving the secret sharing value sent by other n-1 members, the partial private key of the calculation organization and the institution's partial public key At the same time, opk i Publicly upload to the blockchain through smart contracts; (1.4.2) Institutional public key generation phase The work at this stage is mainly completed by smart contracts; the smart contract first receives the public key opk of the institution i Randomly select t from the list and use the secret sharing scheme to generate the public key of the attribute authority And publicly upload it to the blockchain through smart contracts; (1.5).Attribute authority attribute initialization Formal representation: APK←AttrGen(PP,attrname,n,t) Algorithm description: The AttrGen algorithm is responsible for the main logic of attribute authority attribute initialization. This stage is similar to agency initialization, including two processes: attribute initialization and attribute public key generation. (1.5.1) Attribute initialization phase Each member User who agrees to generate the organization attribute attrname i (i∈[1,n]) selects a random number β i ∈Z N As the partial secret of the organization attribute, the final private key of the organization attribute is the sum of the partial organization attribute secrets of each member, that is, Then, each member User i (i∈[1,n]) randomly select f i (0) = a0 = β i The t-1 order polynomial f i (x)=a0+a1x+···+a t-1 x t-1 ; and the unique identity of other members GID j Substitute the polynomial to calculate the secret sharing value share ij =f i (GID j )(j∈[1,n],j≠i); share its secret sharing value to the corresponding user User through the smart contract j (j∈[1,n],j≠i), keep the share for yourself ii ; When User i After receiving another n-1 secret sharing values, calculate the partial private key of the organization attribute and the partial public key of the organization attributes At the same time, apk i Public on-chain via smart contracts (1.5.2) Attribute public key generation phase At this stage, the work is mainly done by smart contracts; when all members' apk i After the calculation is completed, the smart contract randomly selects t attributes from the attribute authority using the secret sharing scheme to generate the attribute public key And publicly upload it to the blockchain through smart contracts; (2) Attribute Authorization Module In this stage, it is assumed that DU has the attribute set in and DU wants to obtain its attribute set The authorization needs to be divided into two steps: first, you need to apply to AA for its attribute set Related credentials AC of the attributes; Secondly, you need to calculate its signature σ and submit it to RA for identity authentication; after verification, RA will distribute the attribute set Attribute key set The details are as follows: (2.1) Application for attribute certificate Formal representation: AC←UACertGen(PP,GID,S) Algorithm description: The UACertGen algorithm is mainly responsible for the main logic of AA distributing attribute credentials AC to DU. This process requires the consent of at least t institutional members in AA; For i∈[1,t], each member User i Calculate partial attribute credentials Sent to DU; DU receives t auth i Post-calculation attribute credentials (2.2). Attribute key generation Formal representation: SK {GID,s} ←KeyGen(PP,GID,AC,{USK,RSK,APK},S) Algorithm description: The KeyGen algorithm is mainly responsible for the main logic of the attribute key generation process. This stage is performed by RA and includes two stages: identity authentication and key generation. The specific implementation is as follows: (2.2.1) Identity verification phase At this stage, the user first uses his private key USK and attribute certificate AC to calculate the identity signature Then it is submitted together with the attribute credential AC to RA for identity verification; RA determines whether the user's identity signature is valid by checking whether the following formula is true, that is, e(σ,g)? =e(f0(AC,P I ),P I ); if the verification is successful, the attribute key is distributed to the user; otherwise, the user's application is rejected; (2.2.2) Key generation phase After verification, any RA randomly selects R,R ′ , and t∈Z N , and then calculate u=f0(GID) and in K ′ =g t R ′ , And record σ and the corresponding GID in IT; (3) Encryption module Formal representation: CT A ←Encrypt(PP,M,{RPK,UPK,APK},A) Algorithm description: The Encrypt algorithm is responsible for the main logic of data encryption. Before encrypting data, DO first needs to clearly define an access policy. To determine the authorized scope of the data, where A is an l×k matrix and ρ is a matrix from each row of A x to property names and The algorithm takes a symmetric key as plaintext M∈G T Encryption is performed and the symmetrically encrypted ciphertext data is outsourced to DSC. In order to achieve efficient computing, this stage is divided into two processes: offline and online. (3.1) Offline encryption stage First, DO randomly selects two secret values s, s ′ ∈Z N To generate a random vector v = (s, v2, ..., v n ) and v ′ =(s ′ ,v2 ′ ,…,v n ′ *; then randomly select calculate C base =e(g,g1) αs ,C′1=g s ,C2=e(g,g1) αs′ ,C′2=g s′ Z′ 2,x . Assume that the matrix in the LSSS access control structure has at most Q rows. Random Selection calculate The final generated intermediate ciphertext is CTM = (Cbase, C1′, C2, C2′, {D1, x, C2, x} x∈[1, Q]*; (3.2) Online encryption stage When the plaintext data M to be encrypted is known, DO accesses the secret values s,s according to the specified access policy. ′ Perform linear secret sharing; Calculate the shared matrix λ x =A x v,λ ′ x =A x ·v ′ ; Then use the intermediate ciphertext CT M and the shared matrix λx,λ′x Finally, the final ciphertext is generated as CTA = ((A,ρ), C1, C′1, C2, C′2, {C1, x, D1, x, C2, x, C′2, x} x∈[1, l]); (4) Decryption module Formal representation: M or⊥←Decrypt(SK {GID,S} ,PP,CT A ) Algorithm description: The Decrypt algorithm is responsible for the main logic of data decryption. This solution uses a partial strategy to hide the attribute encryption algorithm, so DU cannot directly determine its attribute set Whether access policy A is satisfied; therefore, this stage is divided into two processes: matching and decryption; (4.1) Matching stage DU first calculates the minimum subset that satisfies (A,ρ) Check again if it exists satisfy and equation in satisfy If there is such Then DU uses and Execute the Decrypt algorithm; otherwise, it means the attribute set of DU If A is not satisfied, the algorithm returns ⊥; (4.2) Decryption stage In this phase, DU first calculates Then, the plaintext data M=C1 / B is calculated; (5) Traceability module Formal representation: Algorithm description: The Trace algorithm is responsible for the main logic of identity tracking and is executed by the regulatory agency. The algorithm is mainly divided into two stages: checking and mapping; (5.1) Inspection phase If a malicious user leaks his key RA first checks for compromised keys Is the format correct? A document is considered well-formed if it passes the following three checks: 1)s,K,K ′ ,K i ∈G; 2)e(g,K)e(g,g1) αu ·e(g a ,K ′ )≠1 3) \textbf (5.2) Mapping stage RA based on the leaked key Look for σ in the IT table and finally determine the real identity of the malicious user.
Citation Information
Cited By
Block chain-based distributed data sharing method, system and device and server
CN119760766A
