Next Article in Journal
Light-Load Efficiency-Optimized Variable Duty Cycle Control Strategy for SP-Compensated Wireless Power Transfer Systems
Previous Article in Journal
Complex-Valued Unitary Superposition–Driven Multi-Qubit Encoding for Quantum Video Transmission
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Efficient and Secure Medical Data Sharing: An Improved CP-ABE Scheme with Outsourced Decryption

School of Information Engineering, Henan University of Science and Technology, Luoyang 471023, China
*
Author to whom correspondence should be addressed.
These authors contributed equally to this work.
Electronics 2026, 15(9), 1907; https://doi.org/10.3390/electronics15091907
Submission received: 1 April 2026 / Revised: 27 April 2026 / Accepted: 28 April 2026 / Published: 1 May 2026

Abstract

Addressing the challenges of privacy leakage, fragmented data silos, and high computational overhead in traditional ciphertext-policy attribute-based encryption (CP-ABE) for medical data sharing, this paper proposes an improved CP-ABE framework with outsourced decryption, integrated with consortium blockchain and the InterPlanetary File System (IPFS). The framework introduces a medical-scenario-adapted CP-ABE architecture based on a lightweight FAME design, optimizing attribute key generation and transformation key design to accommodate resource-constrained medical terminals. A hybrid encryption system is employed, combining symmetric encryption for high-efficiency processing of large medical data and CP-ABE for fine-grained access control of symmetric keys. To reduce user computational burden, a proxy-assisted secure decryption architecture is implemented, where the proxy server handles most decryption tasks while ensuring resistance to malicious proxy behavior. Furthermore, the framework provides rigorous formal security verification, achieving IND-CPA security and resilience against collusion and malicious proxy attacks. Comprehensive performance evaluations demonstrate significant improvements in key generation, encryption, and decryption efficiency, offering a better balance between security and efficiency for practical medical data sharing applications.

1. Introduction

The use of electronic medical systems has become a widespread practice in modern healthcare facilities due to the rapid development of electronic information and Internet of Things (IoT) technologies. The use of standardized electronic medical information has increasingly replaced paper records. The aggregation and comprehensive analysis of such data have significantly enhanced clinical diagnostic accuracy, improved the efficiency of healthcare service delivery, and facilitated research in precision medicine. However, most medical institutions set up closed information systems separately, and thus, medical data circulates within the institution but not across it. Sharp data silos have, therefore, cropped up, hindering the integrated development of the industry and the full utilization of high-value medical resources [1,2]. At the same time, sensitive data such as personal identity, medical history, physiological signs, and genetic data are a significant part of medical data. Unauthorized access, leakage, or misuse of such information may result in patient privacy violations, as well as security incidents like identity theft and medical fraud [3,4].
Ciphertext-policy attribute-based encryption (CP-ABE) is a possible cryptographic scheme of fine-grained access control and has been widely studied in the medical data sharing setting [5]. Nevertheless, existing CP-ABE-based solutions have significant limitations, including large computational overheads, slow decryption speeds on resource-constrained medical terminals, and a lack of protection against advanced attacks encountered in real medical settings. As a result, achieving safe, effective, and fine-grained sharing of medical data has become an urgent and critical research agenda.
Coined by Nakamoto [6], blockchain is a distributed ledger technology that has evolved to consortium forms that can be implemented in industry. Its properties of decentralization, tamper resistance, transparency, and traceability have resulted in extensive use in medical data sharing applications, similar to how blockchain is applied to ensure provenance and traceability in other fields such as cultural heritage donations [7,8,9]. This distributed architecture works well to address trust issues between multi-party medical institutions and eradicates bottlenecks of centralized management, thus creating a reliable technical basis of cross-institutional medical data interchange, which is also consistent with the core characteristics of blockchain decentralization as summarized in related studies [10]. Nevertheless, blockchain schemes do not provide fine-grained access control and direct encryption protection of sensitive medical data, only credibility of access records and storage logic. Current state-of-the-art schemes that combine blockchain with attribute-based encryption are limited by insufficient integration between encryption and blockchain systems or by an inability to balance fine-grained control and system efficiency in medical settings [11]. Thus, it is now urgent to combine high-efficiency and secure ciphertext-policy attribute-based encryption (CP-ABE) systems with blockchain to achieve overall security and feasibility in medical data sharing.
Attribute-based encryption (ABE) is a cryptographic primitive, which supports flexible one-to-many encryption and fine-grained access control [12]. ABE can be classified into key-policy ABE (KP-ABE) and ciphertext-policy ABE (CP-ABE) depending on the location of the access policy. In CP-ABE, Data Owners can add access policies to ciphertexts, and the decryption can only be successful if the attributes of the user match the policy. This feature is especially useful in medical data sharing situations in which permission management needs to be dynamic and differentiated [4,11]. However, the expensive bilinear pairing and exponentiation algorithms of traditional CP-ABE schemes create significant computational overheads that are inefficient for limited-resource devices such as medical terminals (e.g., mobile medical devices and portable tablets) in the medical field [5]. Outsourced decryption has become a popular optimization strategy to reduce user computational loads and increase practicability in medical settings, in which the vast majority of decryption tasks are offloaded to high-performance proxy servers.
In recent years, the integrated architecture of CP-ABE, outsourced decryption, blockchain, and IPFS has gradually become a typical technical route for medical data sharing, as it can effectively address the pain points of data silos, privacy leakage, and inefficient access control in medical scenarios [11]. Nevertheless, existing schemes based on this integrated architecture still have obvious limitations that hinder their practical deployment in real medical environments. First, many studies only combine these mature technologies without targeted optimization for the characteristics of medical data (e.g., large volume, high sensitivity) and resource-constrained medical terminals, leading to unclear core innovations, insufficient practical performance, and difficulty in meeting the actual needs of cross-institutional medical data sharing. Second, most schemes focus on reducing computation overhead through outsourced decryption but ignore potential security threats such as malicious proxy behavior and user collusion attacks, which may lead to sensitive medical data leakage or unauthorized access [5]. Third, few works provide rigorous formal security proofs under strong security models; most only offer heuristic security analysis, making it difficult to resist advanced attacks in complex medical environments. These critical gaps directly weaken the security, efficiency, and availability of existing systems in practical medical deployment, highlighting the necessity of our research. Specifically, unlike the existing mature but imperfect integrated architecture that merely splices CP-ABE, outsourced decryption, blockchain, and IPFS without targeted innovation, this paper conducts in-depth optimization and innovative design for the unique pain points of medical data sharing scenarios, focusing on solving the core defects of existing fusion schemes (i.e., poor medical adaptability, insufficient security, and lack of rigorous security proof) rather than simply combining these mature technologies.
To fill in the above research gaps and overcome significant barriers to medical data sharing, we propose a secure and efficient sharing model that is based on an improved CP-ABE with outsourced decryption, complemented with consortium blockchain and IPFS distributed storage. The main contributions are presented systematically as below:
  • Based on the lightweight FAME architecture, a CP-ABE architecture adapted to medical scenarios is outsourced [13]. Contrary to the traditional outsource models in the previous literature, the generation of attribute keys, as well as the design of transformation keys, is optimized to match resource-constrained medical user terminals.
  • A hybrid encryption system is used to balance efficiency and security. Symmetric encryption works with large medical data for high performance, and the symmetric key is also provided with CP-ABE protection to allow fine-grained access control. This design significantly improves system performance in terms of processing large-scale medical images and inspection data.
  • The proxy-assisted secure decryption architecture is developed to reduce the computational requirements of the users. The proxy server does most of the decryption work, and the users are left with minimal calculations. Also, malicious proxy resistance is added, which exceeds the security levels of traditional ABE frameworks.
  • Strict formal security verification shows that the framework achieves IND-CPA security and is not susceptible to collusion attacks and malicious proxy attacks. This work reinforces the security underpinnings of genuine medical applications, in contrast to most current strategies that provide merely heuristic security discourse.
  • Large-scale performance comparisons and experimental analyses confirm the fact that the suggested framework has significant benefits in terms of key generation, encryption, and decryption efficiency. Another trade-off between security and efficiency is better, which makes it more realistic to apply to real medical data sharing systems.
The following parts are organized in the following way. Section 2 reviews the literature on the related topics of medical data sharing, CP-ABE, and blockchain technology. In Section 3, the system model, security requirements, and formal definitions are provided. Section 4 outlines how the proposed framework is going to be constructed in detail. Section 5 provides proper and formal security analysis. Section 6 assesses performance by conducting experimental tests. This paper is brought to an end by Section 7.

2. Related Work

Medical data sharing is key to the improvement of clinical diagnosis efficiency, innovation in medical research, and the optimization of public health services. However, there are major challenges, such as privacy leaks, difficult fine-grained access control, and high computational costs to end users (e.g., medical staff using mobile devices), that remain. Ciphertext-policy attribute-based encryption (CP-ABE) and, more generally, attribute-based encryption (ABE) have become a fundamental technology to overcome these challenges thanks to their ability to attach access controls to ciphertexts and provide fine-grained access control. This chapter analyzes the current developments in research on medical data sharing and attribute encryption and outlines limitations of the current literature on the topic that the proposed scheme seeks to overcome.

2.1. Research Progress of Medical Data Sharing

Researchers have thoroughly studied secure medical data sharing frameworks over the last few years, and encryption technology with access control mechanisms has become the most popular research direction. The basis of traditional methods is identity-based encryption (IBE) or role-based access control (RBAC), but these have limitations in flexibility and fine-grained control, unlike some advanced blockchain-aided schemes that adopt signature mechanisms to enhance security in e-health services [14]. IBE relies on fixed user identities, which do not support the dynamic attribute assignment among medical personnel (e.g., job transfers, promotion), whereas RBAC only provides role-based access control, which is insufficient to support the refined permission management requirements of sensitive medical material (e.g., distinguishing access rights between junior and senior physicians within the same department).
CP-ABE has been widely used in medical data sharing scenarios to address these problems. Under the encryption of content, the Data Owners (patients) have the ability to set access policies based on the attributes of the user (e.g., department of the medical staff, professional title, degree of authorization), whereby the user must satisfy policy criteria to be able to decrypt and access the content. This fine-grained and flexible control mechanism closely aligns with permission management requirements in medical data sharing, rendering CP-ABE the preferred technology in existing related research.

2.2. Research Progress of CP-ABE in Medical Data Sharing

To support the features of sharing medical data (e.g., large content volume, limited computational capabilities of end users, and high security) with CP-ABE, a sequence of improvement studies has been carried out, with researchers mainly focusing on reducing computational overhead, enhancing security, and optimizing system architecture. In particular, the research development based on the literature on the topic is discussed below.
Xiang et al. [15] introduced a CP-ABE model with outsourced decryption to reduce the computational overheads for medical end users. Resolving important management issues in centralized systems, they implemented a flexible key management mechanism that overcomes problems, such as single points of failure, key escrow, and privacy leakage, and a fair incentive mechanism to motivate network node participation. Whereas the local computational costs are effectively minimized, the security issues of malicious proxy behavior during the outsourced decryption are not considered, which is a crucial issue in the real-world setting of medical data sharing.
Yin et al. [16] proposed a decentralized CP-ABE model that does not rely on a single, Trusted Authority, which is closer to the distributed nature of medical settings. Theoretical evidence showed that it was resistant to selected keyword and selected plaintext attacks, thus guaranteeing content confidentiality. Nonetheless, the overhead of communication, caused by the decentralized architecture, makes it inappropriate in large-scale situations.
Su et al. [17] introduced a hidden-policy ABE model of medical settings that implements fine-grained access control and obfuscates particular policy content to protect the privacy of owners and users. A decryption system was added as an auxiliary to minimize user computation costs, and smart contracts have been added to provide multi-keyword ranked search over encrypted content, which significantly enhances usability. However, there is no explicit collusion resistance verification, which is a drawback, as the possibility of collusion between malicious medical personnel to bypass the access control and steal sensitive data exists.
Xiang et al. [18] designed a searchable CP-ABE scheme that integrates access control and searchable encryption, supporting policy hiding and resisting chosen keyword attacks. This scheme effectively solves the problem of efficient retrieval of encrypted medical data, but it has the drawback of high encryption overhead, which makes it unsuitable for real-time encryption of large-scale medical data (e.g., medical imaging data).
Ghopur et al. [19] addressed the limitations of existing multi-authority CP-ABE systems caused by centralized authorities by proposing a decentralized multi-authority ABE scheme. In their design, each authority independently issues keys and supports multi-keyword search, while maintaining security against chosen keyword attacks. However, the scheme does not take into account the dynamic updating of user attributes, which is a common scenario in medical settings (e.g., medical staff changing departments or obtaining new authorization).
Roy et al. [20] proposed a hierarchical multi-authority ABE scheme that improves encryption efficiency by parallelizing encryption using a multi-level access tree. Their scheme also supports policy hiding and attribute revocation, but the revocation mechanism is relatively complex and incurs high computational overhead, which increases the burden on the entire system.
Xie et al. [21] introduced edge servers and fog nodes into the encryption and decryption process of medical data: edge servers are responsible for performing ABE encryption on patients’ electronic medical records, while fog nodes assist users with decryption using a proxy re-encryption mechanism. They used aggregated signatures to ensure data integrity, but the integration of edge and fog nodes increases the system complexity, and the scheme lacks effective audit mechanisms for third-party nodes.

2.3. Limitations of Existing Schemes

Although significant progress has been made in the application of CP-ABE to medical data sharing scenarios, related frameworks continue to have a number of critical limitations, as discussed below.
To start with, computational efficiency and security balance are still not achieved. The vast majority of frameworks either focus on reducing computational overheads while ignoring the security risks posed by malicious third parties (e.g., proxy servers) or focus on the security but at a high cost, not reflecting the real world in which end users have limited computational resources but have a high security need.
Second, the resistance to collusion attacks and malicious proxy conduct is not considered in detail. Hackers can also cooperate with malicious medical personnel or external agents to bypass access controls, and proxy servers (e.g., Cloud Servers) can be used to steal or otherwise modify content during auxiliary decryption. Current designs either do not provide explicit collusion resistance checking or do not attempt to create specific mechanisms to counter malicious proxy behavior.
Third, flexibility to changing medical settings is inadequate. The current frameworks can hardly accommodate dynamic updates of user attributes and real-time requirements of massive operations, which makes them inapplicable in intricate and changing medical settings.
To overcome these limitations, this paper introduces an effective and secure CP-ABE-based model to share medical data, achieving a high balance between computational efficiency and security; enhancing resistance to collusion attacks and malicious proxy behavior; and enhancing adaptability to dynamic medical conditions.

3. System Architecture and Definitions

3.1. Scheme Model

This scheme involves seven entities, as shown in Figure 1: the Trusted Authority (TA), the Cloud Server (CS), the Data Owner (DO), the Data Controller (DC), the Data User (DU), the blockchain (BC), and the InterPlanetary File System (IPFS). The definitions of each entity are as follows:
Trusted Authority (TA): The TA is in charge of system initialization and generates public parameters and master keys of attribute-based encryption. At registration stages, DUs’ attribute secret keys are created based on their attribute sets, as are public–private key pairs. DUs use these pairs to encrypt the attribute secret key and use it to generate the transformation key.
Cloud Server (CS): A CS is a computationally powerful server. When DUs send requests indicating pre-decryption, transformation keys are used to perform a partial decryption of ciphertexts, and partially decrypted data is sent back to requesting DUs.
Data Owner (DO): DOs are usually patients who obtain daily health data through mobile medical devices that need to be transmitted to medical facilities. Alternatively, the medical records generated during hospital visits need to be stored in medical systems. Such information is used by these institutions and might be delegated by DOs to other organizations. DOs establish access policies that regulate accessibility and only permit DUs with particular attributes. Information and access control policies are transmitted to DCs.
Data Controller (DC): DCs are medical facilities where DOs are treated and which are permitted to use DO medical data. The original medical content is symmetrically encrypted and uploaded as ciphertexts to IPFS. Then, symmetric keys are encrypted according to DO access policies, and the ciphertexts are uploaded to the blockchain infrastructure along with file hash addresses.
Data User (DU): DUs meet data policy requirements. After registration, DUs generate attribute transformation (pre-decryption) keys from their attribute secret keys and send them to the CS. In decryption processes, pre-decryption requests are initially sent to the CS. Once the CS has performed pre-decryption, DUs use the result to reassemble the original content.
Blockchain (BC): Access policies, encrypted symmetric keys, keywords, and file hash addresses uploaded by owners are stored on the blockchain infrastructure. It supports two smart contracts: Upload Contract and Search Contract. The Upload Contract records the contents uploaded by controllers in blockchain ledgers. The Search Contract allows DUs to search ledgers with provided keywords and returns results to querying DUs.
InterPlanetary File System (IPFS): Medical content is stored in the IPFS, which returns hash addresses indicating storage locations. At the request of DUs, files are retrieved using hash addresses and sent to requesting DUs.

3.2. Formal Definition of the Scheme

The proposed scheme consists of six polynomial-time algorithms that cover the entire workflow of attribute-based encryption, including system initialization, user registration, pre-decryption key generation, data encryption, pre-decryption, and final decryption. Formal definitions of each algorithm are below:
  • The TA executes the system initialization algorithm S e t u p ( 1 λ ) ( P P , m s k ) as follows: Input the system security parameter λ , output the system public parameters P P and the system master secret key m s k . This algorithm also completes the initialization of the consortium blockchain and the private IPFS system.
  • The TA executes the registration algorithm R e g i s t e r ( m s k , S ) ( u s k , u p k , a s k ) as follows: Input the system master key m s k and the user attribute set S, output the user secret key u s k , user public key u p k and attribute secret key a s k .
  • The DU executes the pre-decryption key generation algorithm G e n e r a t e p r e k e y ( u s k , u p k , a s k ) p r e s k as follows: Input the user secret key u s k , public key u p k and attribute secret key a s k , output the pre-decryption key p r e s k . The user then sends this key to the Cloud Server (CS) for decryption outsourcing.
  • The DC executes the data encryption algorithm E n c r y p t ( m , A , P P ) ( C T , c ) as follows: Input the original medical data m, access policy A and public parameters P P . First, use the AES algorithm to encrypt the data with the symmetric key e s k to obtain the ciphertext c, then use the CP-ABE algorithm to encrypt e s k to obtain the attribute ciphertext C T .
  • The CS executes the pre-decryption algorithm P r e D e c r y p t ( P P , C T , p r e s k ) C T 1 as follows: Input the public parameters P P , attribute ciphertext C T and user pre-decryption key p r e s k . After verifying that the attributes satisfy the access policy, the CS performs partial decryption operations, outputs intermediate result (pre-decrypted ciphertext) C T 1 and returns it to the user.
  • The DU executes the final decryption algorithm D e c r y p t ( u s k , C T 1 , c ) m as follows: Input the user secret key u s k , pre-decrypted ciphertext C T 1 and symmetric ciphertext c. The user first recovers the symmetric key e s k , then uses e s k to decrypt c to restore the original medical data m.

3.3. Security Model

We define the indistinguishability under chosen-plaintext attack (IND-CPA) security for our hybrid encryption scheme. The security game is played between a probabilistic polynomial-time (PPT) adversary A and a challenger C . The game proceeds as follows.
Definition 1
(data confidentiality). The scheme achieves data confidentiality if for any PPT adversary A , the advantage in the following game is negligible in the security parameter λ.
Game IND-CPA:
  • Initialization. A submits a challenge access policy A to C . C runs the system setup algorithm Setup ( 1 λ ) to generate the public parameters P P and the master secret key m s k . C sends P P to A .
  • Phase 1 (key queries). A adaptively queries any attribute set S such that S does not satisfy A . For each such query, C does the following:
    • Generates a unique user secret key u s k and user public key u p k for the attribute set S by simulating the Register algorithm.
    • Computes the corresponding attribute secret key a s k and pre-decryption key p r e s k using the master secret key m s k and the user’s u s k .
    • Returns ( a s k , p r e s k ) to A .
    The challenger maintains a record of all issued keys to ensure consistency (i.e., the same attribute set always receives the same u s k ). No further restriction is imposed; the challenger answers all such queries honestly.
  • Challenge. A outputs two equal-length messages m 0 , m 1 (representing medical data). C randomly chooses b { 0 , 1 } and computes the challenge ciphertext ( C T , c ) by encrypting m b under the challenge policy A using Encrypt ( m b , A , P P ) . C sends ( C T , c ) to A .
  • Phase 2 (key queries). Same as Phase 1. A may continue to query attribute sets that do not satisfy A . The adversary is not allowed to query any attribute set that satisfies A , as such a query would trivially allow decryption of the challenge ciphertext.
  • Guess. A outputs a guess b { 0 , 1 } . If b = b , A wins.
The adversary’s advantage is defined as
Adv A IND - CPA ( λ ) = Pr [ b = b ] 1 2 .
The scheme is IND-CPA secure if for all PPT adversaries A , Adv A IND - CPA ( λ ) is negligible in λ .

4. Construction

This paper describes an outsourced decryption CP-ABE (FAME-WB) architecture based on the FAME architecture to achieve fine-grained access control of medical content on the blockchain infrastructure. In encryption stages, the encryption algorithms first encrypt medical contents, thus facilitating the easy processing of large volumes of information and increasing encryption efficiency. Then, the symmetric keys are encrypted by the CP-ABE framework based on access policies. This enables fine-grained access permission control of the content. A proxy server is implemented to reduce computational loads on users and assist in the decryption process. In particular, users create transformation keys based on their attribute secret keys and send them to the proxy servers. In the decryption process, proxy servers are used to perform transformation operations on the ciphertexts; thus, decryption computations are offloaded and user overhead is significantly lowered. Finally, medical content is recovered by users employing decrypted symmetric keys.
Security verification proves that the proposed framework is resilient to chosen-plaintext attacks and guarantees content confidentiality. The experimental section provides comprehensive performance analysis and comparisons with other approaches, proving that the proposed framework is superior in computational efficiency. Moreover, the performance test of the blockchain and IPFS confirms the viability of the proposed solution.

4.1. FAME-WB Scheme

This scheme consists of four steps: system initialization, registration, data encryption, and data decryption. The detailed algorithm descriptions are as follows.

4.1.1. System Initialization

The TA executes S e t u p ( 1 λ ) ( P P , m s k ) . Based on the input security parameter λ , the TA generates ( p , G 1 , G 2 , G T , e , g 1 , g 2 ) , G 1 , G 2 , where G 1 , G 2 are multiplicative cyclic groups of prime order p, g 1 is a generator of G 1 , and g 2 is a generator of G 2 . The pairing e : G 1 × G 2 G T is a bilinear map. A hash function H 1 : 0 , 1 G 1 is chosen. Random values a 1 , a 2 Z p R and d 1 , d 2 , d 3 Z p R are selected. Compute L 1 = g 2 a 1 , L 2 = g 2 a 2 and D 1 = e ( g 1 , g 2 ) d 1 a 1 + d 3 , D 2 = e ( g 1 , g 2 ) d 2 a 2 + d 3 . Output the public parameters P P = ( g 1 , g 2 , L 1 , L 2 , D 1 , D 2 , H 1 ) . Then, randomly choose b 1 , b 2 Z p R and retain the master secret key as m s k = ( g 1 , g 2 , a 1 , a 2 , b 1 , b 2 , g 1 d 1 , g 1 d 2 , g 1 d 3 ) . Finally, initialize the consortium blockchain and the private IPFS system. Participating medical institutions join the consortium blockchain.

4.1.2. Registration

Attribute Key Generation
The Data User (DU) requests registration from the Trusted Authority (TA) by sending an attribute set S. The TA then executes the registration algorithm with the master secret key m s k and the attribute set S as inputs: R e g i s t e r ( m s k , S ) ( u s k , u p k , a s k ) .
The TA randomly selects u s k , r 1 , r 2 R Z p and uses the master key components a 1 , a 2 , b 1 , b 2 to compute s k 0 = ( s k 0 , 1 , s k 0 , 2 , s k 0 , 3 ) = ( g 2 b 1 r 1 , g 2 b 2 r 2 , g 2 r 1 + r 2 ) .
The user’s public key is calculated as u p k = ( u p k 1 , u p k 2 ) = ( g 1 u s k a 1 , g 1 u s k a 2 ) .
Then, for each attribute y S and for z = 1 , 2 , the TA randomly selects σ y R Z p and computes
s k y , z = H 1 ( y 1 z ) b 1 r 1 a z · H 1 ( y 2 z ) b 2 r 2 a z · H 1 ( y 3 z ) r 1 + r 2 a z · g 1 σ y a z .
Define s k y = ( s k y , 1 , s k y , 2 , g 1 σ y ) .
Then, for z = 1 , 2 , the TA randomly selects σ R Z p and computes
s k z = g 1 d z · H 1 ( 011 z ) b 1 r 1 a z · H 1 ( 012 z ) b 2 r 2 a z · H 1 ( 013 z ) r 1 + r 2 a z · g 1 σ a z .
Then compute s k 3 = g 1 d 3 · g 1 σ .
Define s k = ( s k 1 , s k 2 , s k 3 ) and the attribute secret key as a s k = ( S , s k 0 , s k y S , s k ) .
Finally, output the tuple ( a s k , u s k , u p k ) and return it to the DU.
Pre-Decryption Key Generation
After receiving the public/private key and the attribute secret key, the DU executes the algorithm G e n e r a t e p r e k e y ( u s k , u p k , a s k ) p r e s k to generate the pre-decryption key. The DU randomly selects α 1 , α 2 R Z p . For each attribute y S and for z = 1 , 2 , compute
p r e s k y , z = s k y , z · u p k z α 1 .
We then compute the third component as
p r e s k y , 3 = s k y , 3 · g 1 u s k · α 1 .
Define p r e s k y = ( p r e s k y , 1 , p r e s k y , 2 , p r e s k y , 3 ) .
For z = 1 , 2 , compute
p r e s k z = s k z · u p k z α 2 .
Then randomly select β 1 R Z p , and compute
s k b = g 1 β 1 , p r e s k 3 = s k 3 · g 1 u s k · α 2 · s k b u s k .
Define p r e s k = ( p r e s k 1 , p r e s k 2 , p r e s k 3 ) .
Finally, output the pre-decryption key as p r e s k = ( S , s k 0 , p r e s k y , p r e s k , s k b ) and send it to the Cloud Server (CS).

4.1.3. Data Decryption

Pre-Decryption
When the Data User (DU) requests data, it invokes a smart contract to obtain the ciphertext C T and then sends C T to the Cloud Server (CS) for pre-decryption. The CS first checks whether the attribute set S in the pre-decryption key p r e s k satisfies the access structure embedded in the ciphertext A = ( M , π ) . If not, decryption is aborted. Otherwise, the proxy server proceeds with the following operations: P r e D e c r y p t ( P P , C T , p r e s k ) C T 1 .
Define the set I { 1 , 2 , , n 1 } as I = { j : π ( j ) S } . Then compute the linear combination i I θ i · M i = ( 1 , 0 , , 0 ) to obtain the coefficients { θ i } i I . The proxy server computes the numerator and denominator of the intermediate decryption result:
n u m = c t · e i I c t i , 1 θ i , s k 0 , 1 · e i I c t i , 2 θ i , s k 0 , 2 · e i I c t i , 3 θ i , s k 0 , 3 ,
d e n = e p r e s k 1 · i I p r e s k π ( i ) , 1 θ i , c t 0 , 1 · e p r e s k 2 · i I p r e s k π ( i ) , 2 θ i , c t 0 , 2 · e p r e s k 3 · i I p r e s k π ( i ) , 3 θ i , c t 0 , 3 .
Then compute the intermediate result p r e c t = n u m d e n and output the pre-decrypted ciphertext C T 1 = ( p r e c t , c t 0 , 3 ) . Finally, the CS sends C T 1 to the DU.
Final Decryption
Upon receiving C T 1 , the DU executes the decryption algorithm D e c r y p t ( u s k , s k b , C T 1 ) e s k to recover the symmetric key e s k , computed as
e s k = p r e c t · e s k b u s k , c t 0 , 3 .
Then, using the hash address of the file, the DU downloads the encrypted data c t from IPFS and performs A E S . D e c ( e s k , c t ) to recover the original medical data m.

4.2. Correctness Verification

This subsection provides the correctness proof of the proposed scheme. In the outsourced decryption process, the partially decrypted ciphertext is expressed as p r e c t = n u m / d e n . We derive the expressions for n u m , d e n , and p r e c t , respectively, and clarify each key derivation step to ensure readability.
First, we derive the expression of n u m . The computation begins with the evaluation of i I c t i , k θ i for k = 1 , 2 , 3 , which is the core aggregation operation of the ciphertext components. By using the critical linear reconstruction condition i I θ i M i = ( 1 , 0 , , 0 ) , we expand and rearrange the product terms step by step, and the detailed derivation for a general k is shown as follows:
i I c t i , k θ i = i I H 1 ( π ( i ) k 1 ) θ i s 1 · H 1 ( π ( i ) k 2 ) θ i s 2 · j = 1 n 2 H 1 ( 0 j k 1 ) s 1 · H 1 ( 0 j k 2 ) s 2 θ i M i , j = j = 1 n 2 H 1 ( 0 j k 1 ) s 1 · H 1 ( 0 j k 2 ) s 2 i I θ i M i , j · i I H 1 ( π ( i ) k 1 ) θ i s 1 · H 1 ( π ( i ) k 2 ) θ i s 2 = j = 1 n 2 H 1 ( 0 j k 1 ) s 1 · H 1 ( 0 j k 2 ) s 2 δ j 1 · i I H 1 ( π ( i ) k 1 ) θ i s 1 · H 1 ( π ( i ) k 2 ) θ i s 2 = H 1 ( 01 k 1 ) s 1 · H 1 ( 01 k 2 ) s 2 · i I H 1 ( π ( i ) k 1 ) θ i s 1 · H 1 ( π ( i ) k 2 ) θ i s 2 .
Next, we compute the bilinear mapping value n u m / c t based on the above result. This step combines the hash functions, random parameters, and bilinear pairing properties. We expand the formula for t { 1 , 2 } and split the combined terms to get the explicit expression:
n u m c t = t { 1 , 2 } [ e ( H 1 ( 011 t ) , g 2 ) b 1 r 1 s t · e ( H 1 ( 012 t ) , g 2 ) b 2 r 2 s t · e ( H 1 ( 013 t ) , g 2 ) ( r 1 + r 2 ) s t · i I ( e ( H 1 ( π ( i ) 1 t ) , g 2 ) b 1 r 1 θ i s t · e ( H 1 ( π ( i ) 2 t ) , g 2 ) b 2 r 2 θ i s t · e ( H 1 ( π ( i ) 3 t ) , g 2 ) ( r 1 + r 2 ) θ i s t ) ] = e ( H 1 ( 0111 ) , g 2 ) b 1 r 1 s 1 · e ( H 1 ( 0121 ) , g 2 ) b 2 r 2 s 1 · e ( H 1 ( 0131 ) , g 2 ) ( r 1 + r 2 ) s 1 · e ( H 1 ( 0112 ) , g 2 ) b 1 r 1 s 2 · e ( H 1 ( 0122 ) , g 2 ) b 2 r 2 s 2 · e ( H 1 ( 0132 ) , g 2 ) ( r 1 + r 2 ) s 2 · i I ( e ( H 1 ( π ( i ) 11 ) , g 2 ) b 1 r 1 θ i s 1 · e ( H 1 ( π ( i ) 21 ) , g 2 ) b 2 r 2 θ i s 1 · e ( H 1 ( π ( i ) 31 ) , g 2 ) ( r 1 + r 2 ) θ i s 1 ) · i I ( e ( H 1 ( π ( i ) 12 ) , g 2 ) b 1 r 1 θ i s 2 · e ( H 1 ( π ( i ) 22 ) , g 2 ) b 2 r 2 θ i s 2 · e ( H 1 ( π ( i ) 32 ) , g 2 ) ( r 1 + r 2 ) θ i s 2 ) .
Next, we simplify the denominator d e n . It can be observed that d e n is the product of three independent bilinear pairings, corresponding to three groups of partial secret keys and ciphertext components. We compute these three bilinear pairing terms separately to show the internal structure clearly.
First term: This term is constructed by the first partial secret key and ciphertext c t 0 , 1 . By substituting the definitions of p r e s k 1 , p r e s k π ( i ) , 1 and c t 0 , 1 , and using the bilinearity of the pairing function, we expand the formula as:
e p r e s k 1 · i I p r e s k π ( i ) , 1 θ i , c t 0 , 1 = e ( g 1 d 1 · H 1 ( 0111 ) b 1 r 1 a 1 · H 1 ( 0121 ) b 2 r 2 a 1 · H 1 ( 0131 ) r 1 + r 2 a 1 · g 1 σ a 1 · u p k 1 α 2 · i I H 1 ( π ( i ) 11 ) b 1 r 1 θ i a 1 · H 1 ( π ( i ) 21 ) b 2 r 2 θ i a 1 · H 1 ( π ( i ) 31 ) ( r 1 + r 2 ) θ i a 1 · g 1 σ y a 1 · u p k 1 α 1 , g 2 a 1 s 1 ) = e ( g 1 , g 2 ) d 1 a 1 s 1 · e ( H 1 ( 0111 ) , g 2 ) b 1 r 1 s 1 · e ( H 1 ( 0121 ) , g 2 ) b 2 r 2 s 1 · e ( H 1 ( 0131 ) , g 2 ) ( r 1 + r 2 ) s 1 · e ( g 1 , g 2 ) σ s 1 · e ( g 1 , g 2 ) u s k α 2 s 1 · i I [ e ( H 1 ( π ( i ) 11 ) , g 2 ) b 1 r 1 θ i s 1 · e ( H 1 ( π ( i ) 21 ) , g 2 ) b 2 r 2 θ i s 1 · e ( H 1 ( π ( i ) 31 ) , g 2 ) ( r 1 + r 2 ) θ i s 1 · e ( g 1 , g 2 ) σ y θ i s 1 · e ( g 1 , g 2 ) u s k α 1 θ i s 1 ] .
Second term: This term corresponds to the second partial secret key and ciphertext c t 0 , 2 . Following the same expansion rule as the first term, we obtain the following result:
e p r e s k 2 · i I p r e s k π ( i ) , 2 θ i , c t 0 , 2 = e ( g 1 d 2 · H 1 ( 0112 ) b 1 r 1 a 2 · H 1 ( 0122 ) b 2 r 2 a 2 · H 1 ( 0132 ) r 1 + r 2 a 2 · g 1 σ a 2 · u p k 2 α 2 · i I H 1 ( π ( i ) 12 ) b 1 r 1 θ i a 2 · H 1 ( π ( i ) 22 ) b 2 r 2 θ i a 2 · H 1 ( π ( i ) 32 ) ( r 1 + r 2 ) θ i a 2 · g 1 σ y a 2 · u p k 2 α 1 , g 2 a 2 s 2 ) = e ( g 1 , g 2 ) d 2 a 2 s 2 · e ( H 1 ( 0112 ) , g 2 ) b 1 r 1 s 2 · e ( H 1 ( 0122 ) , g 2 ) b 2 r 2 s 2 · e ( H 1 ( 0132 ) , g 2 ) ( r 1 + r 2 ) s 2 · e ( g 1 , g 2 ) σ s 2 · e ( g 1 , g 2 ) u s k α 2 s 2 · i I [ e ( H 1 ( π ( i ) 12 ) , g 2 ) b 1 r 1 θ i s 2 · e ( H 1 ( π ( i ) 22 ) , g 2 ) b 2 r 2 θ i s 2 · e ( H 1 ( π ( i ) 32 ) , g 2 ) ( r 1 + r 2 ) θ i s 2 · e ( g 1 , g 2 ) σ y θ i s 2 · e ( g 1 , g 2 ) u s k α 1 θ i s 2 ] .
Third term: This term is derived from the third partial secret key and ciphertext c t 0 , 3 . After substitution and bilinear pairing expansion, the expression is simplified as:
e p r e s k 3 · i I p r e s k π ( i ) , 3 θ i , c t 0 , 3 = e g 1 d 3 · g 1 σ · g 1 u s k α 2 · s k b u s k · i I g 1 σ y θ i · g 1 u s k α 1 θ i , g 2 s 1 + s 2 = e ( g 1 , g 2 ) d 3 ( s 1 + s 2 ) · e ( g 1 , g 2 ) σ ( s 1 + s 2 ) · e ( g 1 , g 2 ) u s k α 2 ( s 1 + s 2 ) · e ( g 1 , g 2 ) u s k β 1 ( s 1 + s 2 ) · i I e ( g 1 , g 2 ) σ y θ i ( s 1 + s 2 ) · e ( g 1 , g 2 ) u s k α 1 θ i ( s 1 + s 2 ) .
Multiplying these three terms together, all the redundant security parameters including u s k , α 1 , α 2 , σ , and σ y are completely canceled out, which is the key property of our outsourced decryption design. Subsequently, we calculate the final partially decrypted ciphertext p r e c t = n u m / d e n :
p r e c t = n u m d e n = e s k · e ( g 1 , g 2 ) d 1 a 1 s 1 + d 2 a 2 s 2 + d 3 ( s 1 + s 2 ) e ( g 1 , g 2 ) d 1 a 1 s 1 + d 2 a 2 s 2 + d 3 ( s 1 + s 2 ) · e ( g 1 , g 2 ) u s k β 1 ( s 1 + s 2 ) = e s k e ( g 1 , g 2 ) u s k β 1 ( s 1 + s 2 ) .
During the ciphertext recovery phase, the Data User only needs to perform a simple computation to recover the symmetric key e s k :
e s k = p r e c t · e s k b u s k , c t 0 , 3 .
To verify the correctness, we substitute the expression of p r e c t into the recovery formula. By using the definition of secret keys and bilinear pairing properties, the intermediate terms cancel each other out, and we can directly obtain the symmetric key:
p r e c t · e s k b u s k , c t 0 , 3 = e s k e ( g 1 , g 2 ) u s k β 1 ( s 1 + s 2 ) · e ( g 1 u s k β 1 , g 2 s 1 + s 2 ) = e s k .
Finally, the user decrypts the symmetric ciphertext c using e s k to recover the original medical data m = A E S . D e c ( e s k , c ) .

5. Security Proof and Analysis

Based on the security model presented by the proposed framework and appropriate cryptographic assumptions, the IND-CPA security is presented in this section with detailed security verification conducted from two fundamental viewpoints: explicit collusion resistance and malicious proxy behavior resistance, integrated with realistic medical data sharing scenarios and attribute-based encryption (ABE) properties. It is emphasized that the proposed framework is medical-data-sharing-specific, and its access control system based on ABE is one of the most suitable approaches to address permission management requirements. The access policies are built based on the features of medical entities (e.g., department of medical staff, professional title, authorization level) and content types (e.g., patient diagnosis records, genetic information, imaging reports), which ensures that only the appropriate authorities have access to the relevant sensitive information. Every security demonstration and verification hereafter is closely incorporated with this practical setting and fully demonstrates that the framework is secure and can be applied in real medical data sharing and ABE application scenarios.

5.1. Security Proof

Theorem 1.
If the Computational Bilinear Diffie–Hellman (CBDH) problem is hard and the FAME scheme is IND-CPA secure [13] and AES is secure [22], then the proposed scheme is also IND-CPA secure.
Proof. 
Assume there exists a probabilistic polynomial-time (PPT) adversary A that can break the IND-CPA security of our scheme. The challenger C constructs an algorithm B that uses A to solve the hard CBDH problem and break the security of the FAME scheme and AES, which contradicts the hardness assumption of the CBDH problem and the security of FAME and AES, thus proving the IND-CPA security of the proposed scheme. □
Initialization: A selects a challenge access policy A (specifically designed for medical data access, e.g., “only cardiologists with 5+ years of clinical experience can access patients’ cardiac interventional therapy records”) and sends it to C . C inputs the security parameter λ and runs the system setup S e t u p ( 1 λ ) ( P P , m s k ) . C randomly chooses a 1 , a 2 R Z p (where Z p denotes the multiplicative group of integers modulo a prime p) and d 1 , d 2 , d 3 R Z p , and computes parameters L 1 = g 2 a 1 , L 2 = g 2 a 2 , D 1 = e ( g 1 , g 2 ) d 1 a 1 + d 3 , and D 2 = e ( g 1 , g 2 ) d 2 a 2 + d 3 . Here, G 1 , G 2 , and G T are multiplicative cyclic groups of prime order p, g 1 is a generator of G 1 , g 2 is a generator of G 2 , and e : G 1 × G 2 G T is a bilinear pairing (all are standard definitions in cryptographic assumptions). The public parameters are P P = ( g 1 , g 2 , L 1 , L 2 , D 1 , D 2 , H 1 ) (where H 1 is a cryptographic hash function) and the master secret key is m s k = ( g 1 , g 2 , a 1 , a 2 , b 1 , b 2 , g 1 d 1 , g 1 d 2 , g 1 d 3 ) . Then, C randomly selects u s k , v , s 1 , s 2 R Z p and sets w = s 1 + s 2 . Let ( g 1 u s k , g 1 v , g 2 w ) G 1 2 × G 2 be a CBDH challenge tuple, where the CBDH problem is defined as follows: given ( g 1 a , g 1 b , g 2 c ) G 1 2 × G 2 with a , b , c R Z p , compute e ( g 1 , g 2 ) a b c G T . An empty list is set to record attribute sets and pre-decryption keys. Then, P P and the tuple ( g 1 u s k , g 1 v , g 2 w ) are sent to B , who forwards P P to A .
Query Phase 1: A queries B for an attribute private key and pre-decryption key for an attribute set S 1 (e.g., “general practitioners in the general internal medicine department”, which does not satisfy A ). B checks if S 1 satisfies the access policy A . If it does, B aborts and returns failure. Otherwise, B queries C for the attribute private key for S 1 . C runs R e g i s t e r ( m s k , S 1 ) ( u s k , u p k , a s k ) . C checks whether g 1 u s k equals g 1 u or g 1 v ; if so, it aborts the game. Otherwise, C uses the private key u s k and public key u p k to run G e n e r a t e p r e k e y ( u s k , u p k , a s k ) p r e s k to generate the pre-decryption private key p r e s k . C returns u s k , u p k , a s k , and p r e s k to B , who forwards them to adversary A .
Query Phase 2: The adversary A queries B for a pre-decryption private key for an attribute set S (e.g., “cardiologists with 5+ years of clinical experience”, which satisfies A ). B checks if S satisfies the access policy A . If yes, B queries C for the pre-decryption key for S ; otherwise, B aborts and returns failure.
Firstly, C generates attribute keys by randomly selecting r 1 , r 2 R Z p , then computes s k 0 = ( s k 0 , 1 , s k 0 , 2 , s k 0 , 3 ) = ( g 2 b 1 r 1 , g 2 b 2 r 2 , g 2 r 1 + r 2 ) using u s k and the master secret key components a 1 , a 2 , b 1 , b 2 (where b 1 , b 2 are random parameters generated in the system setup phase). The public key is u p k = ( u p k 1 , u p k 2 ) = ( g 1 u s k a 1 , g 1 u s k a 2 ) . Then, for each attribute y S (e.g., “cardiology department”, “5+ years of clinical experience”) and z = 1 , 2 , randomly select σ y R Z p and compute
s k y , z = H 1 ( y 1 z ) b 1 r 1 a z · H 1 ( y 2 z ) b 2 r 2 a z · H 1 ( y 3 z ) r 1 + r 2 a z · g 1 σ y a z
Set s k y = ( s k y , 1 , s k y , 2 , g 1 σ y ) . For z = 1 , 2 , randomly select σ R Z p and compute
s k z = g 1 d z H 1 ( 011 z ) b 1 r 1 a z · H 1 ( 012 z ) b 2 r 2 a z · H 1 ( 013 z ) r 1 + r 2 a z · g 1 σ a z
Calculate s k 3 = g 1 d 3 · g 1 σ , and set s k = ( s k 1 , s k 2 , s k 3 ) . The attribute private key is a s k 1 = ( S , s k 0 , s k y S , s k ) . Output ( a s k 1 , u p k ) . Then, C generates the pre-decryption private key by running G e n e r a t e p r e k e y ( u s k , u p k , a s k 1 ) p r e s k 1 . C returns p r e s k 1 to B , who forwards it to A .
Challenge: A chooses two messages ( m 0 , m 1 ) of equal length (corresponding to sensitive medical data, e.g., m 0 : “Patient X’s cardiac interventional therapy: successful stenting, no complications”, m 1 : “Patient Y’s cardiac interventional therapy: stent implantation failed, need reoperation”) and sends them to B , who forwards them to C . C randomly selects b { 0 , 1 } , generates a symmetric encryption key e s k , then computes c t = A E S . E n c ( e s k , m b ) as the symmetric ciphertext (used to encrypt core medical data). Next, C encrypts e s k under the access policy A to produce the attribute ciphertext, computing c t 0 = ( c t 0 , 1 , c t 0 , 2 , c t 0 , 3 ) = ( L 1 s 1 , L 2 s 2 , g 2 w ) . Suppose A = ( M , π ) (where M is a matrix corresponding to the access policy, and π is a mapping that maps each row of M to an attribute, following the standard linear secret sharing scheme (LSSS) definition) with M of dimension n 1 × n 2 , indexed by i , j . For k = 1 , 2 , 3 and i = 1 , , n 1 (corresponding to different medical data access constraints), the Data Owner computes
c t i , k = H 1 ( π ( i ) k 1 ) s 1 · H 1 ( π ( i ) k 2 ) s 2 · j = 1 n 2 [ H 1 ( 0 j k 1 ) s 1 · H 1 ( 0 j k 2 ) s 2 ] M i , j
Set c t i = ( c t i , 1 , c t i , 2 , c t i , 3 ) . Also, compute c t = D 1 s 1 · D 2 s 2 · e s k . The attribute ciphertext is C T = ( A , c t 0 , c t 1 , , c t n 1 , c t ) . The symmetric ciphertext c t and attribute ciphertext C T are returned to B , who forwards them to A .
Query Phase 3: Repeat Query Phase 1 with a different attribute set S 2 (e.g., “neurologists in the neurology department”) for attribute private key and pre-decryption key queries.
Guess: A outputs a guess b for b. B forwards b to C . If b = b , C outputs 1; otherwise, 0.
Analysis: If A can break the IND-CPA security of the scheme, it means the symmetric key e s k can be recovered correctly, and b can be guessed with non-negligible advantage (where a negligible function negl ( λ ) denotes a function that vanishes faster than the inverse of any polynomial in λ ). Then B can break the security of the FAME scheme and AES. Using C T and the pre-decryption key p r e s k 1 , B runs P r e D e c r y p t ( P P , C T , p r e a s k 1 ) to obtain the pre-decryption ciphertext C T 1 = ( p r e c t , c t 0 , 3 ) . From the correctness analysis, we have p r e c t = e s k / e ( g 1 , g 2 ) w . Then, C T 1 and a s k 1 are given to the adversary A to guess b . Therefore, if there exists an adversary A that can break the IND-CPA security of the scheme, it can be used to solve the CBDH problem and break the security of the FAME scheme and AES. In the medical data sharing scenario, this proof ensures that unauthorized entities (e.g., malicious external attackers, medical staff without corresponding attributes) cannot crack the encrypted medical data, which is the core security guarantee of the ABE-based medical data sharing scheme.

5.2. Security Analysis

This subsection conducts in-depth security analysis from two key aspects (collusion resistance and malicious proxy behavior resistance) closely combined with the medical data sharing scenario and ABE characteristics to comprehensively verify the security of the scheme in practical application.

5.2.1. Collusion Resistance Analysis

Collusion attack refers to multiple adversaries with different attribute sets colluding with each other, combining their attribute private keys and pre-decryption keys to decrypt ciphertexts that none of them can decrypt individually. In the medical data sharing scenario, collusion attacks are particularly dangerous—they may occur between malicious medical staff (e.g., a general nurse and a non-authorized physician colluding to access patient surgical records) or external attackers colluding with internal staff, which poses a serious threat to patient privacy. As an ABE-based scheme, collusion resistance is a core security requirement to ensure that the attribute-based access control mechanism is not bypassed.
The proposed scheme achieves collusion resistance through the following explicit mechanisms, which are closely combined with the medical data sharing scenario and ABE characteristics:
  • User-Specific randomization in key generation. For each Data User (medical staff), the Trusted Authority (TA) independently samples random exponents σ y , σ , α 1 , α 2 during the registration and pre-decryption key generation phases. These random values are embedded into the attribute secret key a s k and the pre-decryption key p r e s k . Because the randomness is statistically independent across users, keys from different users cannot be combined to produce a valid key for any attribute set that is not already satisfied by a single user’s attributes.
  • LSSS reconstruction constraint with blinding factors. The access policy A = ( M , π ) is realized via a linear secret sharing scheme (LSSS). Decryption requires finding coefficients { θ i } i I such that i I θ i M i = ( 1 , 0 , , 0 ) , where I corresponds to the set of rows whose labels π ( i ) belong to the user’s attribute set. Even if the union of attribute sets from multiple colluding users satisfies the access policy (e.g., S j meets A ), the decryption algorithm PreDecrypt operates on a single user’s pre-decryption key p r e s k at a time. The LSSS reconstruction must use the shares derived from one user’s key because the ciphertext components are paired with that user’s specific blinding factors (e.g., r 1 , r 2 , α 1 , α 2 ). When two different users’ keys are mixed, the mismatched random exponents prevent cancellation in the pairing operations, making it impossible to reconstruct the secret.
  • Binding to user secret key. Each user’s pre-decryption key is blinded with their own user secret key u s k via terms like u p k z α 1 and g 1 u s k · α 1 , where u p k z = g 1 u s k / a z . Different users have distinct u s k values randomly chosen by the TA. Any attempt to combine p r e s k from two users results in mismatched exponents that do not cancel during the final decryption step e s k = p r e c t · e ( s k b u s k , c t 0 , 3 ) . Hence, even if colluding users pool their keys, they cannot recover the symmetric key e s k or the original medical data.
Formal argument: Assume a set of colluding users with attribute sets S 1 , , S k and corresponding pre-decryption keys p r e s k ( 1 ) , , p r e s k ( k ) . Suppose, for contradiction, that they can jointly decrypt a ciphertext encrypted under policy A that no individual S j satisfies. To succeed, they must be able to compute the intermediate value p r e c t as defined in Equations (7) and (8). However, the computation of n u m and d e n requires pairing ciphertext components with a single user’s p r e s k (specifically, the terms i I p r e s k π ( i ) , 1 θ i all come from the same p r e s k ). The LSSS coefficients θ i are computed based on the rows whose attributes are present in that user’s key. If the user’s key does not contain all necessary attributes, the set I is insufficient. Because the adversary cannot merge attributes from different users into one p r e s k (the random blinding factors are user-specific), the combined effort does not yield a valid reconstruction. Therefore, the scheme is collusion-resistant.
This analysis holds under the standard assumption that the TA is trusted and does not collude with adversaries. In the medical data sharing scenario, the proposed scheme effectively prevents malicious medical staff or external attackers from bypassing the ABE-based access control through collusion.

5.2.2. Malicious Proxy Behavior Analysis

In the proposed ABE-based medical data sharing scheme, the Cloud Server (CS) acts as a proxy to perform partial decryption, which reduces the computational burden on Data Users (medical staff) who often use mobile devices (such as tablet computers) with limited computing resources to access medical data. However, the proxy (Cloud Server) may be malicious and attempt to obtain sensitive medical data (such as patient HIV diagnosis records) or tamper with the pre-decrypted ciphertext (such as modifying the patient’s blood pressure data) during the pre-decryption process. Therefore, analyzing the resistance of the scheme to malicious proxy behavior is crucial to ensure the security of medical data in the ABE-based sharing process.
The proposed scheme resists malicious proxy behavior through the following targeted designs, which are tailored to the medical data sharing scenario:
  • Pre-decryption key limitation: The pre-decryption key p r e s k sent by the medical staff (Data User) to the proxy only contains partial decryption information and does not include the user’s secret key u s k or the symmetric key e s k . The proxy can only perform partial decryption to generate the intermediate ciphertext C T 1 = ( p r e c t , c t 0 , 3 ) , but cannot recover the symmetric key e s k or the original medical data m alone. For example, the Cloud Server cannot obtain the patient’s HIV diagnosis result by only holding the pre-decryption key, which ensures that the proxy cannot directly access sensitive medical data, fundamentally preventing the proxy from stealing core medical information.
  • Final decryption by Data User: The final decryption process must be completed by the medical staff (Data User) using their own secret key u s k . The proxy only provides the intermediate result p r e c t , and the medical staff needs to compute e s k = p r e c t · e ( s k b u s k , c t 0 , 3 ) to recover the symmetric key (where s k b is a component of the user’s attribute private key), then decrypt the symmetric ciphertext c t to obtain the original medical data. Even if the proxy tampers with p r e c t (e.g., modifying the intermediate result of blood pressure data), the medical staff can detect the tampering by verifying the correctness of the decrypted data (e.g., through hash checks or medical data validity verification, such as checking whether the blood pressure value is within a reasonable range), which is particularly important for medical data that requires high accuracy. This two-step decryption mechanism ensures that the proxy cannot tamper with medical data without being detected.
  • Blockchain-based audit: The ciphertext hash address, access policy, and pre-decryption records (such as which medical staff accessed which medical data, when, and the proxy’s pre-decryption operations) are stored on the blockchain, which is immutable and transparent. If the proxy performs malicious behavior (such as tampering with the pre-decrypted ciphertext or leaking the pre-decryption key), the behavior can be traced and audited through the blockchain ledger, and the proxy can be held accountable. This audit mechanism further constrains the proxy’s behavior and ensures the integrity of the ABE-based medical data sharing process, providing a traceable security guarantee.
In the medical data sharing scenario, the malicious proxy behavior analysis ensures that the Cloud Server, as a third-party entity, cannot obtain or tamper with sensitive medical data, thus maintaining the confidentiality and integrity of medical data during the pre-decryption process. This enables medical staff to safely use Cloud Servers to reduce their computational burden without concerns about medical data leakage or tampering. It serves as an important supplement to the ABE-based security mechanism.
Summary: The proposed scheme achieves IND-CPA security, with explicit collusion resistance and resistance to malicious proxy behavior. All security proofs and analyses are closely combined with the medical data sharing scenario and attribute-based encryption characteristics. This clearly proves that the scheme is secure and reliable in practical medical data sharing and ABE application scenarios, effectively protecting the confidentiality, integrity, and availability of sensitive medical data.

6. Simulation Experiments

This section evaluates the proposed scheme through both theoretical and experimental analysis. The experiments aim to verify that the proposed scheme addresses the key challenges in medical data sharing and attribute-based encryption, including insufficient fine-grained access control, heavy user-side decryption overhead, and inefficient access control. The evaluation adopts time consumption as the core metric to quantify the efficiency of each algorithm phase. Meanwhile, the deployment based on blockchain and IPFS ensures system scalability for distributed medical data sharing. Finally, we present the deployment of the blockchain and IPFS platforms as well as the results of the performance tests.

6.1. Theoretical Analysis

Table 1 compares the proposed scheme with other existing schemes in terms of functional features, including distributed storage, data confidentiality, fine-grained access control, and outsourced decryption. Jayabalan’s scheme [23] and Azbeg’s scheme [24] both achieve distributed storage of shared medical data based on blockchain and IPFS. In terms of access control, Jayabalan’s scheme employs symmetric and asymmetric encryption (RSA), combined with smart contracts, to manage data access. Azbeg’s scheme uses proxy re-encryption and dynamic smart contract authorization to implement access control. However, both schemes provide coarse-grained access control. Although the scheme proposed in [25] supports fine-grained access control, it does not support outsourced decryption. As shown in Table 1, the proposed scheme outperforms the others by supporting outsourced decryption, thereby reducing users’ computational overhead.
We now analyze the computational overhead of the proposed scheme. Let T denote the number of attributes, n 1 and n 2 denote the number of rows and columns of the access structure matrix, respectively, and I denote the number of attributes used during decryption.
  • Key generation: The Trusted Authority (TA) performs 8 T + 11 exponentiation operations, 6 T + 9 multiplication operations, and 6 T + 6 hash operations in the group G 1 . Additionally, 3 exponentiation operations are performed in the group G 2 .
  • Pre-decryption key generation: The Data User (DU) performs 2 T + 6 exponentiation operations and 2 T + 4 multiplication operations in G 1 .
  • Encryption: The Data Controller (DC) performs one symmetric encryption operation, 12 n 1 n 2 + 6 n 1 exponentiations, 6 n 1 multiplications, and 6 n 1 + 6 n 2 hash operations in G 1 , and 3 exponentiations in G 2 .
  • Pre-decryption: The Cloud Server (CS) performs 6 I exponentiations and 3 multiplications in G 1 , along with 6 multiplications and 6 bilinear pairing operations in G T .
  • Final decryption: The Data User (DU) performs 1 exponentiation in G 1 , 1 multiplication and 1 bilinear pairing in G T , followed by one symmetric decryption operation.
Based on this analysis, the computational overhead for the Data User (DU) remains within a reasonable range.
In summary, compared to other schemes, the proposed scheme offers better security and functionality. It preserves data confidentiality, achieves fine-grained access control, and demonstrates practical feasibility. The combination of blockchain and IPFS also provides good scalability for medical data sharing scenarios.

6.2. Experimental Analysis

This section presents the experimental simulation of the proposed scheme. All experiments are conducted under the same environment and repeated to obtain average results. The operating system used was Ubuntu 20.04.6 (Canonical Ltd., London, UK). The Python programming language (version 3.8.10, Python Software Foundation, Wilmington, DE, USA) was employed for algorithm implementation. Hyperledger Fabric v2.2.1 (Linux Foundation, San Francisco, CA, USA) was utilized as the blockchain platform. The InterPlanetary File System (IPFS) v0.10.0 (Protocol Labs, San Francisco, CA, USA) was adopted for distributed storage. The cryptographic algorithms were implemented using the Charm-Crypto library (Johns Hopkins University, Baltimore, MD, USA). The evaluation metrics include key generation time, encryption time, decryption time, pre-decryption key generation time, and outsourced decryption time, which are standard metrics to verify the efficiency of the proposed scheme in solving the challenges of medical data sharing. The components of the development environment used the implementation are listed in Table 2.
The hardware components used in the development of the experimental platform included an Intel i5-12490F processor and 32 GB of RAM, which were installed on the Ubuntu 20.04.6 operating system. The algorithm was written in Python 3.8.10 using the Charm-Crypto cryptographic library. The simulation covered five phases: key generation, content encryption, pre-decryption key generation, outsourced decryption, and content decryption. Averaging the results of multiple experimental runs ensures reliability.
Figure 2 shows key comparisons of key generation times in the proposed framework with different numbers of attributes against those of the Chase, Chen, and Han frameworks. The experimental results indicate that the key generation time increases for all methods with an increase in the number of attributes, which is expected. Among these, the Han strategy consistently achieves the best performance across all attribute scales. The Chen strategy has the highest overhead, and this overhead increases particularly steeply with the number of attributes. The performance of the proposed framework is based on a general adaptation of the Chase approach; it is slightly lower in some cases but significantly better than that of the Chen strategy, so the proposed framework’s performance is generally in the upper-middle range. It is important to note that key generation is usually a one-time process during system initialization and thus has little impact on the overall system performance. Although the proposed framework cannot be considered the best in this metric, it offers greater advantages in decryption efficiency and security. Moreover, with the introduction of an outsourcing mechanism, the computational load on the user side can be reduced, ensuring that key generation overheads do not significantly affect realistic system behavior.
Figure 3 shows a comparison of the time consumption during the encryption phase among the proposed scheme and the schemes of Chen [26], Chase [13], and Han [27]. When the number of attributes exceeds 100, the proposed scheme outperforms the Chase scheme in terms of time efficiency. At 10 attributes, the time consumption of the proposed scheme is nearly identical to that of the Chase scheme. However, as the number of attributes increases, the proposed scheme demonstrates better performance than the Waters scheme. When the number of attributes grows from 10 to 100, the proposed scheme is nearly twice as fast as the Chen scheme. The Han scheme, on the other hand, consumes more time than the proposed scheme.
Figure 4 shows a comparison of the time consumption during the decryption phase among the proposed scheme and the schemes of Chen, Chase, and Han. As illustrated in the figure, the decryption time of the proposed scheme remains unaffected by the number of attributes, which is consistent with the theoretical time complexity analysis. The decryption time of both the Chen and Chase schemes is approximately five times that of the proposed scheme. In the case of the Han scheme, decryption time increases with the number of attributes, whereas the proposed scheme performs better in comparison.
Figure 5 illustrates the variation in time consumption for generating the pre-decryption key as the number of attributes increases in the proposed scheme. As shown in the figure, the time required for generating the pre-decryption key increases linearly with the number of attributes. Since the generation of the pre-decryption key can be performed offline and only needs to be done once, it has minimal impact on the overall execution of the scheme.
Figure 6 shows the variation in time consumption for outsourced decryption in the proposed scheme as the number of attributes increases, with the number of attributes as the independent variable and the results averaged over 100 runs. It can be observed that the time consumption for outsourced decryption remains nearly constant. This is because the number of pairing operations—which dominate the overall cost—stays fixed. Although the number of exponentiation operations increases linearly in the scheme, their impact is not significant, as exponentiation is much less time-consuming compared to pairing operations.

7. Conclusions

This paper proposes a secure and efficient medical data sharing scheme to address key challenges in medical data sharing. By integrating multiple technologies, the scheme effectively reduces the computational burden of users, achieves fine-grained access control, ensures data confidentiality, and verifies the feasibility of practical deployment. Compared with traditional schemes, it has obvious advantages in efficiency and security, making notable progress in solving medical data sharing problems and providing a more practical solution.
The scheme still has limitations. It fails to address dynamic changes of user attributes and lacks effective privacy protection for user attribute information, with certain overhead in communication and storage. Future research will focus on improving the adaptability of the scheme, introducing relevant privacy protection technologies, and optimizing the integration of related technologies to enhance the scheme’s applicability in practical scenarios.

Author Contributions

Conceptualization, Q.L.; methodology, Q.L.; software, Q.L.; validation, L.W.; formal analysis, Q.L.; investigation, L.W.; resources, L.W.; data curation, Q.L.; writing—original draft preparation, Q.L.; writing—review and editing, L.W. and M.Z.; supervision, M.Z.; project administration, M.Z.; funding acquisition, M.Z. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by Henan Science and Technology Department, grant number 242102211024. The APC was funded by the authors.

Data Availability Statement

The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Alruwaill, M.; Mohanty, S.; Kougianos, E. hChain: Blockchain Based Large Scale EHR Data Sharing with Enhanced Security and Privacy. arXiv 2025, arXiv:2505.12610. [Google Scholar] [CrossRef]
  2. Huang, L.; Lee, H.H. A medical data privacy protection scheme based on blockchain and cloud computing. Wirel. Commun. Mob. Comput. 2020, 2020, 8859961. [Google Scholar] [CrossRef]
  3. Zhang, R.; Xue, R.; Liu, L. Security and privacy for healthcare blockchains. IEEE Trans. Serv. Comput. 2021, 15, 3668–3686. [Google Scholar] [CrossRef]
  4. Duan, P.; Gao, H.; Shen, Y.; Guo, Z.; Ma, Z.; Tian, T.; Zhang, Y. Secure collaborative EHR Sharing using multi-authority attribute-based proxy re-encryption in Web 3.0. Comput. Netw. 2024, 255, 110851. [Google Scholar] [CrossRef]
  5. Yin, H.; Li, J.; Zhu, Y.; Zhang, L.; Qiao, B. A Traceable CP-ABE Scheme Supporting Dynamic Revocation and Efficient Decryption for Medical Data Sharing. IEEE Internet Things J. 2025, 12, 53610–53622. [Google Scholar] [CrossRef]
  6. Nakamoto, S. Bitcoin: A Peer-to-Peer Electronic Cash System. Preprint (Self-Published). 2008. Available online: https://assets.pubpub.org/d8wct41f/31611263538139.pdf (accessed on 27 April 2026).
  7. Hao, S.; Dong, X.; Wen, Z.; Nie, T. Enhancing Medical Data Sharing with an Attribute-Based Dynamic Verifiable Searchable Encryption Scheme Using Blockchain. In Proceedings of the International Conference on Web Information Systems and Applications, Yinchuan, China, 2–4 August 2024; pp. 403–414. [Google Scholar]
  8. Ahmad, A.; Saad, M.; Bassiouni, M.; Mohaisen, A. Towards Blockchain-Driven, Secure and Transparent Audit Logs. In Proceedings of the 15th EAI International Conference on Mobile and Ubiquitous Systems: Computing, Networking and Services, New York City, NY, USA, 5–7 November 2018; pp. 443–448. [Google Scholar]
  9. Migliorini, S.; Gambini, M.; Belussi, A. A blockchain-based platform for ensuring provenance and traceability of donations for cultural heritage. Blockchain Res. Appl. 2025, 6, 100278. [Google Scholar] [CrossRef]
  10. Zhang, L.; Ma, X.; Liu, Y. SoK: Blockchain Decentralization. arXiv 2022, arXiv:2205.04256. [Google Scholar]
  11. Zhao, L.; Dong, G.; Yuan, H. A blockchain-based verifiable CP-ABE scheme for medical data privacy protection. Sci. Rep. 2025, 15, 27325. [Google Scholar] [CrossRef] [PubMed]
  12. Sahai, A.; Waters, B. Fuzzy identity-based encryption. In Advances in Cryptology–EUROCRYPT 2005, Proceedings of the 24th Annual International Conference on the Theory and Applications of Cryptographic Techniques, Aarhus, Denmark, 22–26 May 2005; Proceedings 24; Springer: Berlin/Heidelberg, Germany, 2005; pp. 457–473. [Google Scholar]
  13. Agrawal, S.; Chase, M. FAME: Fast attribute-based message encryption. In Proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security, Dallas, TX, USA, 30 October–3 November 2017; pp. 665–682. [Google Scholar]
  14. Bao, Z.; He, D.; Wang, H.; Luo, M.; Peng, C. A group signature scheme with selective linkability and traceability for blockchain-based data sharing systems in e-health services. IEEE Internet Things J. 2023, 10, 21115–21128. [Google Scholar] [CrossRef]
  15. Xiang, A.; Gao, H.; Tian, Y.; Wang, L.; Xiong, J. Attribute-based key management for patient-centric and trusted data access in blockchain-enabled IoMT. Comput. Netw. 2024, 246, 110425. [Google Scholar] [CrossRef]
  16. Yin, H.; Zhao, Y.; Zhang, L.; Qiao, B.; Chen, W.; Wang, H. Attribute-based searchable encryption with decentralized key management for healthcare data sharing. J. Syst. Archit. 2024, 148, 103081. [Google Scholar] [CrossRef]
  17. Su, J.; Zhang, L.; Mu, Y. BA-RMKABSE: Blockchain-aided ranked multi-keyword attribute-based searchable encryption with hiding policy for smart health system. Future Gener. Comput. Syst. 2022, 132, 299–309. [Google Scholar] [CrossRef]
  18. Xiang, X.; Zhao, X. Blockchain-assisted searchable attribute-based encryption for e-health systems. J. Syst. Archit. 2022, 124, 102417. [Google Scholar] [CrossRef]
  19. Ghopur, D.; Ma, J.; Ma, X.; He, F.; Liu, K.; Jiang, T.; Wang, X. Decentralized Multi-Authority Attribute-Based Searchable Encryption for E-Health Cloud. IEEE Internet Things J. 2025, 12, 15723–15735. [Google Scholar] [CrossRef]
  20. Roy, S.; Agrawal, J.; Kumar, A.; Rao, U.P. Mh-abe: Multi-authority and hierarchical attribute based encryption scheme for secure electronic health record sharing. Clust. Comput. 2024, 27, 6013–6038. [Google Scholar] [CrossRef]
  21. Xie, C.; Shi, R.-h.; Zhang, X.; Wang, P.; Guo, W. Verifiable outsourcing EMRs scheme with attribute-based encryption in cloud-edge environments. J. Inf. Secur. Appl. 2023, 76, 103526. [Google Scholar] [CrossRef]
  22. Al Hasib, A.; Haque, A.A.M.M. A comparative study of the performance and security issues of AES and RSA cryptography. In Proceedings of the 2008 Third International Conference on Convergence and Hybrid Information Technology; IEEE: Piscataway, NJ, USA, 2008; Volume 2, pp. 505–510. [Google Scholar]
  23. Jayabalan, J.; Jeyanthi, N. Scalable blockchain model using off-chain IPFS storage for healthcare data security and privacy. J. Parallel Distrib. Comput. 2022, 164, 152–167. [Google Scholar] [CrossRef]
  24. Azbeg, K.; Ouchetto, O.; Andaloussi, S.J. BlockMedCare: A healthcare system based on IoT, Blockchain and IPFS for data management security. Egypt. Inform. J. 2022, 23, 329–343. [Google Scholar] [CrossRef]
  25. Shree, S.; Zhou, C.; Barati, M. Data protection in internet of medical things using blockchain and secret sharing method. J. Supercomput. 2024, 80, 5108–5135. [Google Scholar] [CrossRef]
  26. Chen, J.; Gay, R.; Wee, H. Improved dual system ABE in prime-order groups via predicate encodings. In Proceedings of the Annual International Conference on the Theory and Applications of Cryptographic Techniques; Springer: Berlin/Heidelberg, Germany, 2015; pp. 595–624. [Google Scholar]
  27. Han, D.; Pan, N.; Li, K.C. A traceable and revocable ciphertext-policy attribute-based encryption scheme based on privacy protection. IEEE Trans. Dependable Secur. Comput. 2020, 19, 316–327. [Google Scholar] [CrossRef]
Figure 1. System model.
Figure 1. System model.
Electronics 15 01907 g001
Figure 2. Key generation time.
Figure 2. Key generation time.
Electronics 15 01907 g002
Figure 3. Encryption time.
Figure 3. Encryption time.
Electronics 15 01907 g003
Figure 4. Decryption time.
Figure 4. Decryption time.
Electronics 15 01907 g004
Figure 5. Pre-decryption private key generation time.
Figure 5. Pre-decryption private key generation time.
Electronics 15 01907 g005
Figure 6. Outsourced decryption time.
Figure 6. Outsourced decryption time.
Electronics 15 01907 g006
Table 1. Contrast of functional features, ✓: Supported, ×: Not supported.
Table 1. Contrast of functional features, ✓: Supported, ×: Not supported.
SchemeScheme [23]Scheme [24]Scheme [25]Ours
Distributed Storage
Data Confidentiality
Fine-grained Access Control××
Outsourced Decryption×××
Table 2. Development environment.
Table 2. Development environment.
ComponentVersion
Operating SystemUbuntu 20.04.6
Programming LanguagePython 3.8.10
Blockchain PlatformHyperledger Fabric v2.2.1
IPFSv0.10.0
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Li, Q.; Wang, L.; Zhang, M. Efficient and Secure Medical Data Sharing: An Improved CP-ABE Scheme with Outsourced Decryption. Electronics 2026, 15, 1907. https://doi.org/10.3390/electronics15091907

AMA Style

Li Q, Wang L, Zhang M. Efficient and Secure Medical Data Sharing: An Improved CP-ABE Scheme with Outsourced Decryption. Electronics. 2026; 15(9):1907. https://doi.org/10.3390/electronics15091907

Chicago/Turabian Style

Li, Qingqing, Lin Wang, and Moli Zhang. 2026. "Efficient and Secure Medical Data Sharing: An Improved CP-ABE Scheme with Outsourced Decryption" Electronics 15, no. 9: 1907. https://doi.org/10.3390/electronics15091907

APA Style

Li, Q., Wang, L., & Zhang, M. (2026). Efficient and Secure Medical Data Sharing: An Improved CP-ABE Scheme with Outsourced Decryption. Electronics, 15(9), 1907. https://doi.org/10.3390/electronics15091907

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop