Constant ciphertext length and policy hiding access control method based on block chain
By implementing an access control method with constant ciphertext length and policy hiding on the blockchain, single point of failure and privacy leakage in medical data access control is solved, reducing storage overhead and enhancing data security.
Patent Information
- Application Number
- CN202411115376.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-14
- Publication Date
- 2024-12-03
AI Technical Summary
The existing medical data access control scheme based on blockchain and CP-ABE has problems such as single point of failure, large overhead of ciphertext storage, and privacy leakage caused by open access policies.
Adopt the access control method based on the constant ciphertext length and policy hiding based on blockchain. By storing encrypted medical data in IPFS, only storing ciphertext hash addresses and embedded access control policies on the blockchain, realizing policy hiding , and design a multi-attribute authorization agency to allow patients to customize data access control.
It reduces the overhead of ciphertext storage and decryption computing, protects patient privacy, reduces the storage pressure of blockchain, and enhances data security and patient control.
Smart Images

Figure CN119066704A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an access control method, in particular to an access control method based on constant ciphertext length and policy hiding of blockchain. Background Art
[0002] With the rapid development of digitalization and information technology in the medical field, the application of electronic medical data in medical practice has become more and more common. These data contain sensitive information such as patients' personal information, medical records, diagnostic reports, treatment plans, etc. In order to effectively protect patients' privacy, access control of medical data is particularly important. Among them, the Ciphertext-policy attribute-based encryption (CP-ABE) scheme can achieve fine-grained access control of medical data. This encryption technology allows data owners to formulate access policies based on the attributes of visitors to ensure that only users who meet specific attributes can decrypt data. However, in the existing CP-ABE scheme, there is usually only a single attribute authorization agency. This centralized management method is prone to single point failure problems. In addition, the length of the ciphertext also increases with the complexity of the access control policy, which is easy to occupy a large amount of storage overhead. Moreover, the access control policy is open in plain text. Malicious users can infer the patient's sensitive information through the access policy, which is easy to cause the patient's privacy leakage. Blockchain technology has the characteristics of decentralization, data immutability, and traceability, providing a new solution for medical data sharing. Combined with blockchain technology, fine-grained access control can be performed on medical data sharing. Therefore, how to reduce the ciphertext storage overhead, build multi-attribute authorization agencies, and how to hide policies when sharing medical data are key issues in access control.
[0003] The existing solution combining blockchain technology with CP-ABE cannot solve the single authorization problem. Different attribute authorization agencies manage different user attributes, which can easily cause single point failure problems; patients are unaware of the use of their medical data, the storage overhead of medical data ciphertext is high, the decryption end has high computational overhead, and the access policy is open in the system, so attackers can easily infer sensitive information and cause user privacy leaks. Summary of the invention
[0004] In view of the problems that the storage overhead of the current traditional access control scheme is positively correlated with the number of attributes in medical data storage, the access policy is easy to leak, and the storage pressure on the blockchain is large, the present invention proposes an access control method with constant ciphertext length and hidden policy based on blockchain. The method realizes the constant ciphertext length, and implements mixed storage of medical data on the chain and off the chain. The encrypted medical data is stored in IPFS, which releases the storage space of the blockchain, and only the keyword index of the medical data is stored on the chain. The access control policy is embedded in the keyword index ciphertext on the chain, which realizes the policy hiding. By designing a multi-attribute authorization agency and allowing patients to customize their own medical data control rights, the privacy of patients is protected and the security of data is improved.
[0005] To achieve the above purpose, the present invention provides the following technical solutions including the following contents: A blockchain-based access control method with constant ciphertext length and policy hiding consists of the following parts:
[0006] Patient, medical data owner DO, medical data accessor DV, alliance blockchain CB, attribute authority AA, distributed file storage system IPFS;
[0007] The access control process is as follows:
[0008] Step 1: The attribute authority AA initializes the system, takes the security parameter λ and the attribute set S as input, and generates the system public parameters, system public key and master key;
[0009] Step 2: The patient formulates an access control strategy and submits it to the medical data owner DO for review. After the review is passed, the medical data owner DO runs the encryption algorithm, encrypts the medical data, selects keywords for the medical data file, sets the keyword index and encrypts it;
[0010] Step 3: The medical data owner DO stores the encrypted medical data ciphertext in the distributed file storage system IPFS. The distributed file storage system IPFS returns the hash address of the ciphertext. The medical data owner DO embeds the hash address of the ciphertext and the access control policy in the encrypted keyword index and then uploads it to the alliance blockchain CB.
[0011] Step 4: When the medical data accessor DV wants to join the system, the medical data accessor DV sends a registration request to the attribute authority AA. The attribute authority AA assigns an identity uid to the legitimate medical data accessor DV and generates a private key for it;
[0012] Step 5: When the medical data accessor DV wants to access medical data, the medical data accessor DV enters the keyword set he wants to search, uses the searchable encryption algorithm to generate a search token Token, and then the medical data accessor DV sends a query request to the blockchain node; after receiving the request, the node runs the matching algorithm to query whether there is a keyword set that can match the keyword index. If the search is successful, the corresponding data is returned to the medical data accessor DV, otherwise the query failure information is returned;
[0013] Step 6: If the attribute set of the medical data accessor DV satisfies the access control policy set by the patient, the medical data accessor DV retrieves the corresponding ciphertext according to the ciphertext hash address, and then decrypts it using its own private key.
[0014] Preferably, the access control work steps include seven stages: system initialization, key generation, data encryption, on-chain index generation, generation of search tokens, on-chain index ciphertext query, and data decryption.
[0015] Compared with the prior art, the present invention has the following beneficial effects:
[0016] 1. Constant ciphertext length off-chain: Medical data ciphertext uses a constant ciphertext length. In the present invention, the size of the ciphertext is independent of the number of attributes and will not increase with the increase in the number of attributes. This effectively reduces storage overhead and encryption and decryption overhead for data users.
[0017] 2. On-chain policy hiding: Policy hiding is achieved by embedding the access policy in the on-chain index ciphertext component, which is different from the traditional CP-ABE scheme, instead of making it public in the system, which effectively protects the privacy of patients.
[0018] 3. On-chain and off-chain hybrid storage: Encrypted medical data of constant ciphertext length is stored off-chain through a distributed file storage system, and only the medical data index ciphertext and embedded access control policies are stored on-chain, which effectively reduces the storage overhead of the blockchain and reduces the amount of computation on the chain.
[0019] 4. Multi-attribute agencies and customized access strategies: Based on the blockchain platform, multi-attribute authorization agencies are used to manage attributes, which solves the problems of single authorization and single point failure; patients can customize their own medical data access strategies and enhance control over personal data. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 ABE-BC-CSCHP system model diagram
[0021] Figure 2 Schematic diagram of the workflow of the present invention DETAILED DESCRIPTION
[0022] 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.
[0023] Model infrastructure
[0024] The ABE-BC-CSCHP system model of the present invention is as follows Figure 1 As shown in the figure, this model mainly includes the following parts: patients, medical data owners (Data Owners, DO), medical data visitors (Data Visitors, DV), Consortium Blockchain (Consortium Blockchain, CB), Attribute Authorizer (Attribute Authorizer, AA). Distributed file storage system (InterPlanetary File System, IPFS).
[0025] Patient: The subject of medical data, responsible for formulating corresponding access control policies for his or her own medical data. Visitors with different attributes have different permissions to access medical data.
[0026] Medical Data Owner (DO): This refers to each hospital institution center, which is responsible for establishing and collecting patients' medical data, protecting the privacy of the data, encrypting the original medical data and storing it in IPFS, and signing the encrypted medical data. At the same time, it builds an encrypted medical data index and access control strategy and uploads it to the blockchain.
[0027] Medical data accessor (DV): refers to a legitimate user who wants to view the patient's electronic medical record. If the DV's attribute set meets the access control policy set by the patient, then the DV can access the patient's medical data and access it within the specified time.
[0028] Consortium Blockchain (CB): A consortium chain composed of various medical institution centers is responsible for storing encrypted medical data ciphertext indexes. When the DV submits an authorized search token to the blockchain node, the node executes the on-chain matching algorithm and sends the matching results to the DV. All records generated during the access process are stored in the blockchain and can be used for later traceability and accountability.
[0029] Attribute Authorizer (AA): Responsible for generating system public parameters, system public keys and master keys, verifying and granting legal DV attribute information, and generating private keys for DV.
[0030] Distributed file storage system (InterPlanetary File System, IPFS): Mainly responsible for storing encrypted medical data files. And returns the stored medical data ciphertext hash address.
[0031] Access Control Process
[0032] The access control formalization steps of the present invention are as follows: Figure 2 shown.
[0033] Step 1: AA performs system initialization. The algorithm is executed by AA and is responsible for generating system public parameters and system public key and master key.
[0034] Step 2: The patient formulates an access control policy and submits it to the DO for review. After the review is passed, the DO runs the encryption algorithm, encrypts the medical data, selects keywords for the medical data file, and then sets the keyword index and encrypts it.
[0035] Step 3: DO stores the encrypted medical data ciphertext in IPFS. IPFS returns the hash address of the ciphertext. DO embeds the hash address of the ciphertext and the access control policy in the encrypted keyword index and then uploads it to the chain.
[0036] Step 4: When DV wants to join the system, DV sends a registration request to AA, and AA assigns an identity uid to the legitimate DV and generates a private key for it.
[0037] Step 5: When DV wants to access medical data, DV enters the keyword set to be searched, uses the searchable encryption algorithm to generate a search token, and then DV sends a query request to the blockchain node. After receiving the request, the node runs the matching algorithm to query whether there is a keyword set that can match the keyword index. If the search is successful, the corresponding data is returned to DV, otherwise the query failure information is returned.
[0038] Step 6: If the attribute set of DV satisfies the access control policy set by the patient, DV retrieves the corresponding ciphertext based on the ciphertext hash address and then decrypts it using its own private key.
[0039] The above is the access control process of the present invention. The model of the present invention is based on the blockchain platform. The key generation, attribute authorization, data access and other records that occur in this process are stored in the blockchain, and each record is bound to the identity of each operation. When accountability is required, the non-tamperability and traceability of the blockchain can ensure that it is not shirkable.
[0040] Explanation of symbols
[0041] Table 1 Symbol Description
[0042]
[0043] Access Structure
[0044] Let S = {attr1, attr2, ..., attr n}, to represent n attributes in the medical system, and each attribute has multiple values. Represents the attribute attr i A multi-valued set of n i =|attr_set i |, in this invention, we use the AND gate of multi-valued attributes Access structure. Given a data accessor’s attribute set L = {L1, L2, …, L u}(u∈[1,n]) and access control policy Subscript index set I A ={i|1≤i≤m,A i ≠*}, if L i =A i or A i =*, use Indicates that when L does not satisfy A, use Indicates that the attribute can take any value. *Indicates that the attribute can take any value.
[0045] Decision-making q-BDHE Assumption
[0046] Assume h is a group G T A random number on g,a,q =(g1, g2, ..., g q , g q+1 , …g 2q , g v ), Distinguish (g, y g,a,q , e(g q+1 , g v )) and (g, y g,a,q , h).
[0047] Definition: If the attacker cannot distinguish (g, y g,a,q , e(g q+1 , g v )) and (g, y g,a,q , h), then G and G T The q-BDHE problem on is difficult. ABE-BC-CSCCP model scheme construction
[0048] The stages of the model ABE-BC-CSCHP (Blockchain-based attribute encryption access control model with constant-size ciphertext and hidden policy) of the present invention mainly include the following parts:
[0049] (1) System initialization Setup(λ, S) → {PP, PK, MK}
[0050] AA executes the algorithm with security parameter λ and attribute set S as input, and then outputs system public parameter PP, system public key PK and master key MK.
[0051] (2) Key generation KeyGen(PP, MK, L) → {SK}
[0052] AA executes the algorithm with system public parameters PP, master key MK and DV's attribute list L as input, and then outputs DV's private key SK.
[0053] (3) Data encryption Encrypt(PP, PK, M, A) → {CT}
[0054] DO executes the algorithm with system public parameters PP, system public key PK, medical data plaintext M and access control policy A as input, and then outputs medical data ciphertext CT.
[0055] (4) Generate IndexGen (KW, A, HashC T )→{CT′}
[0056] DO executes the algorithm with the keyword set KW as input, and then outputs the chain index ciphertext CT′.
[0057] (5) Generate search token TokenGen(KW′) → {T}
[0058] DV executes the algorithm by inputting the keyword set KW′ that you want to query and then outputting the search TokenT.
[0059] (6) On-chain index ciphertext query IndexSearch(T)→{R}
[0060] The algorithm searches for TokenT with DV input and sends it to the blockchain node for query verification. If the query is successful, the transaction query list R is returned, and if the query fails, 0 is returned.
[0061] (7) Data decryption Decrypt(PP, CT, SK) → {M}
[0062] DV executes the algorithm with system public parameters PP, medical data ciphertext CT, and its own private key SK as input, and then outputs plaintext M.
[0063] System Initialization
[0064] Let attribute set S = {attr1, attr2, ..., attr i , ..., attr n}, to represent n attributes in the medical system, and each attribute has multiple values. Represents the attribute attr i A multi-valued set of , where 1≤i≤n, 1≤j≤ni.
[0065] AA chooses the security parameter λ to generate two bilinear groups G, G of prime order p. T , g is the random generator of G. e: G×G→G T For a bilinear map, construct two collusion-resistant hash functions: H: {0, 1}*→G, Then the system public parameters PP = (G, GT, e, H, H1, PK, p, g) are disclosed.
[0066] The number of attribute authorization agencies AA is u, and each AA has a unique global identity aid, Sai d Indicates the attribute set managed by the AA with the identity aid. aid (1≤n aid ≤n) means S aid In the solution of the present invention, the complete set of attributes S in the medical system is divided into partially intersecting attribute domains, and the attributes managed by different attribute authorization agencies have overlapping parts. This is to prevent the single point failure problem when the DV selects a certain attribute authorization agency to perform attribute verification during the decryption process. Therefore, the DV can select other attribute authorization agencies that manage the attribute for verification.
[0067] AA selects two random numbers We bind each property value to its corresponding property. Calculation:
[0068] α i,j =g -H(X||i||j) , β i,j =e(g, g) H(Y||i||j) #(1)
[0069] Where i represents the i-th attribute in S and j represents attr_set i The jth value in . So the system public key PK and master key MK are:
[0070] PK=<α i,j, β i,j >
[0071] MK=<X,Y>
[0072] Key Generation
[0073] DV registration: DV applies to AA, and AA issues a unique global identifier uid to the legal DV. AA generates a private key for DV based on the DV attribute set L and randomly selects a secret value For each attribute value in L, bind it to the attribute it belongs to. The private key calculation process is as follows:
[0074] σ i,j =g H(Y||i||j) H1(sk) H (X ||i||j )#(2)
[0075] || represents a connector. So the private key of DV is SK = {sk, σ i,j}.
[0076] Data encryption
[0077] The data owner DO (i.e., each medical institution center) determines the access control policy A formulated by the patient based on the medical data plaintext M to be encrypted, and then randomly selects The ciphertext is calculated as follows:
[0078] CT1=g r #(3)
[0079]
[0080] Finally, the ciphertext CT = {CT1, CT2, CT3} is output, and then DO uploads it to IPFS, and then IPFS returns the hash address Hash of the medical data ciphertext to DO CT .
[0081] On-chain index generation
[0082] Let keyword set KW = {kw1, kw2, ..., kw x}, DO encrypts each keyword: I y =H1(kw y ) r , 1≤y≤x, calculate I′=g r , keyword index I = {I y , I′}, we embed the access strategy in the ciphertext component, so the chain index ciphertext CT′={I,A,Hash CT}. Then DO uploads it to the blockchain.
[0083] Generate Search Token
[0084] Assume that the keyword set that DV wants to query is KW′={kw′1, kw′2, …, kw′ x′}, DV is randomly selected Then calculate T′=g γ , DV encrypts each keyword you want to query: T y =H1(kw′ y ) γ , 1≤y≤x′; then upload the search Token T to the blockchain:
[0085] T={T′,T″,T y , T i,j}#(6)
[0086] On-chain search
[0087] The blockchain node checks whether the relevant information of the DV matches the access policy and keyword index according to the following formula:
[0088]
[0089] in If the above formula is true, the query transaction order is returned to DV. If not, it means the query failed and 0 is returned.
[0090] Data Decryption
[0091] DV obtains the hash address of the ciphertext CT After that, data is retrieved according to the address. If the attribute set L of DV satisfies the access control policy defined by the patient, Then decrypt according to the following process:
[0092]
[0093] in
[0094] The above descriptions are only some specific implementation methods of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by any person familiar with the art within the technical scope disclosed in the present invention should be covered within the protection scope of the present invention.
Claims
1. A blockchain-based access control method with constant ciphertext length and policy hiding consists of the following parts: Patient, medical data owner DO, medical data accessor DV, alliance blockchain CB, attribute authority AA, distributed file storage system IPFS; The access control process is as follows: Step 1: The attribute authority AA initializes the system, takes the security parameter λ and the attribute set S as input, and generates the system public parameters, system public key and master key; Step 2: The patient formulates an access control strategy and submits it to the medical data owner DO for review. After the review is passed, the medical data owner DO runs the encryption algorithm, encrypts the medical data, selects keywords for the medical data file, sets the keyword index and encrypts it; Step 3: The medical data owner DO stores the encrypted medical data ciphertext in the distributed file storage system IPFS. The distributed file storage system IPFS returns the hash address of the ciphertext. The medical data owner DO embeds the hash address of the ciphertext and the access control policy in the encrypted keyword index and then uploads it to the alliance blockchain CB. Step 4: When the medical data accessor DV wants to join the system, the medical data accessor DV sends a registration request to the attribute authority AA. The attribute authority AA assigns an identity uid to the legitimate medical data accessor DV and generates a private key for it; Step 5: When the medical data accessor DV wants to access medical data, the medical data accessor DV enters the keyword set he wants to search, uses the searchable encryption algorithm to generate a search token Token, and then the medical data accessor DV sends a query request to the blockchain node; after receiving the request, the node runs the matching algorithm to query whether there is a keyword set that can match the keyword index. If the search is successful, the corresponding data is returned to the medical data accessor DV, otherwise the query failure information is returned; Step 6: If the attribute set of the medical data accessor DV satisfies the access control policy set by the patient, the medical data accessor DV retrieves the corresponding ciphertext according to the ciphertext hash address, and then decrypts it using its own private key.
2. According to claim 1, a blockchain-based access control method with constant ciphertext length and policy hiding is characterized by: The access control work steps include seven stages: system initialization, key generation, data encryption, on-chain index generation, generation of search tokens, on-chain index ciphertext query, and data decryption.
Citation Information
Cited By
Anonymous attribute multi-keyword searchable encryption method based on block chain
CN120217414A
