收稿日期: 2025-03-23
网络出版日期: 2025-08-20
基金资助
国家自然科学基金(61972438);芜湖市重点研发与成果转化项目(2023yf117)
版权
Traceable and secure sharing scheme for pathological information based on smart contracts and CP-ABE
Received date: 2025-03-23
Online published: 2025-08-20
Supported by
National Natural Science Foundation of China (61972438) and Wuhu Science and Technology Plan Project (2023yf117)
Copyright
随着远程医疗的广泛应用,病理信息中包含的患者个人隐私面临严峻威胁。传统的安全共享算法往往侧重构建复杂的访问模型或加密算法,却在泄密者身份追踪方面存在明显缺陷,无法有效应对数据泄露问题。为解决这一难题,提出了一种基于白盒追踪和智能合约实现数据可溯共享的方案。该方案的核心在于为每位用户分配唯一的ID,并将ID与用户属性组进行编码生成密钥,确保只有符合特定访问结构的用户才能访问病理信息数据。每当用户进行访问操作时,智能合约会自动记录访问者的密钥,为后续的数据安全审计和泄密追踪提供了重要依据。一旦发生数据泄露事件,管理员可以通过访问者密钥进行反解密获取用户ID,从而定位泄密者的身份。理论分析和实验表明,该方案拥有较高的灵活性和安全性,并通过引入解密外包服务,减少了传统访问控制方案的加解密时间损耗。
童心悦 , 陈付龙 , 王涛春 , 谢冬 , 胡鹏 . 基于智能合约和CP-ABE的病理信息可追溯安全共享方案[J]. 网络空间安全科学学报, 2025 , 3(3) : 102 -116 . DOI: 10.20172/j.issn.2097-3136.250308
With the widespread adoption of telemedicine, the personal privacy of patients contained in pathology information is facing severe threats. Traditional secure sharing algorithms often focus on constructing complex access models or encryption algorithms, but exhibit significant deficiencies in tracking the identity of leakers, rendering them ineffective in addressing data breach issues. To tackle this problem, a traceable data sharing scheme based on white-box tracing and smart contracts was proposed. The core of this scheme was to assign a unique ID to each user and encode the ID together with the user's attribute set to generate a key, ensuring that only users meeting a specific access structure could access the pathology information. Whenever a user performed an access operation, the smart contract automatically would record the visitor’s key, which served as critical evidence for subsequent data security audits and leak tracing. In the event of a data breach, administrators could reverse-decrypt the visitor's key to obtain the user ID, thereby pinpointing the leaker's identity. Theoretical analysis and experimental results indicated that the proposed scheme offered high flexibility and security, and by incorporating decryption outsourcing services, it reduced the time overhead associated with encryption and decryption in traditional access control schemes.
| 算法1 初始化阶段(Setup) |
| 输入:安全参数 输出:公钥 1) 2) 3) 4) 5) 6)for ( 7) 8) |
表 1 ProVerif 代码Table 1 Codes of ProVerif |
| type message. type attribute. type ID. //定义消息类型 var Alice, Bob, Eve : agent. //定义代理 fun keygen(ID: ID, attributes: list(attribute)) : list(attribute). //密钥生成函数 fun enc(policy: list(attribute), m: message) : message. //加密函数 fun dec(keys: list(attribute), c: message) : message. //解密函数 var doctor, researcher : attribute. //属性定义 var ID_Alice, ID_Bob, ID_Eve : ID. //ID定义 let Alice_keys = keygen(ID_Alice, [doctor, researcher]). //根据属性和ID生成密钥 let Bob_keys = keygen(ID_Bob, [doctor]). // Bob 具有 doctor 属性 let Eve_keys = keygen(ID_Eve, [researcher]). // Eve 具有 researcher 属性 var m : message. let policy = [doctor, researcher]. //定义策略 let c = enc(policy, m). //明文加密 let decrypted_by_Bob = dec(Bob_keys, c). // Bob 尝试解密 let decrypted_by_Eve = dec(Eve_keys, c). //Eve 尝试解密 output(out1, m). input(in1, c). query attacker: knows(m). //查询攻击者是否可以知道明文消息 query attacker: knows(c). //查询攻击者是否可以知道密文 query attacker: knows(decrypted_by_Bob). //查询Bob 是否能够正确解密消息 query attacker: knows(decrypted_by_Eve). //查询Eve 是否能够正确解密消息 |
表 2 ProVerif测试结果Table 2 Test results of ProVerif |
| Verifcation summary: Query attacker: knows(m) is false. Query attacker: knows(c) is false. Query attacker: knows(decrypted_by_Bob) is false. Query attacker: knows(decrypted_by_Eve) is false. ProVerif: no attack found. |
表 3 主流访问控制方案的特点Table 3 Characteristics of mainstream access control schemes |
| 主流方案 | 策略隐藏 | 权限撤销 | 解密外包 | 区块链技术 | 可溯性 | 审问机制 | 多属性权威 |
| Li[23] | × | × | × | √ | √ | √ | × |
| Liu[24] | √ | × | √ | × | × | × | √ |
| Xu[25] | × | √ | × | √ | × | × | × |
| Xu[26] | × | √ | × | √ | × | × | √ |
| Sethi[27] | × | √ | √ | × | √ | × | × |
| Ours | √ | √ | √ | √ | √ | √ | √ |
注:√ 表明该方案满足所述特性;× 表明该方案不满足所述特性。 |
表 4 符号定义Table 4 Symbol definitions |
| 符号 | 描述 |
| |p| | 公共参数 |
| |SKID,P| | 用户解密密钥大小 |
| |CT| | 密文大小 |
| |U| | 通用属性集大小 |
| |A| | 用户属性集大小 |
| AID | 用户ID |
| m | 访问控制矩阵M的行数 |
| |G1| | 群G1中元素的位长度 |
| |G2| | 群G2中元素的位长度 |
| N | 系统中用户数 |
| t | 群元素运算参数 |
| nc | 与先前访问策略关联的属性数 |
表 5 存储成本比较Table 5 Comparison of storage cost |
| 主流方案 | |p| | |SKID,P| | |CT| |
| Liu[24] | |||
| Xu[25] | |||
| Xu[26] | |||
| Sethi[27] | |||
| Ours |
表 6 计算成本比较Table 6 Comparison of computational cost |
| 主流方案 | |||
| Liu[24] | |||
| Xu[25] | |||
| Xu[26] | |||
| Sethi[27] | |||
| Ours |
表 7 Solidity智能合约子进程代码Table 7 Subprocess code of Solidity smart contract |
| SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // 定义合约,用于记录数据访问日志 contract DataAccessLogger { struct AccessRecord { bytes32 dataHash; // 数据的哈希值,用于标识数据 address userKey; // 用户地址,标识进行访问的用户 string providerID; // 数据提供者的ID uint256 timestamp; // 记录访问时间的时间戳 } // 定义数据访问记录的结构体 AccessRecord[] public accessRecords; // 定义数组,用于存储所有的数据访问记录(公有变量,自动生成 getter 函数) event DataAccessed( bytes32 dataHash, address userKey, string providerID, uint256 timestamp ); // 定义事件,当数据被访问时会发出此事件通知 mapping(address => bool) public authorizedUsers; // 定义映射,记录被授权的用户,只有被授权的用户才能记录数据访问 mapping(address => string) public providerIDs; address public owner; constructor() { owner = msg.sender; } // 构造函数:合约部署时执行,设置部署者为合约所有者 function setProviderID(string memory providerID) public { require(msg.sender == owner, “Only the owner can set the provider ID”); providerIDs[msg.sender] = providerID; } // 设置数据提供者的ID,仅合约所有者可以调用此函数 function authorizeUser(address user) public { require(msg.sender == owner, “Only the owner can authorize users”); authorizedUsers[user] = true; } // 授权用户,只有合约所有者可以调用此函数,将用户地址添加到授权列表中 function recordDataAccess(bytes32 dataHash, address userKey) public { require(authorizedUsers[userKey], “User not authorized” ); string memory providerID = providerIDs[msg.sender]; require(bytes(providerID).length > 0,“Provider ID not set” ); AccessRecord memory newRecord = AccessRecord({ dataHash: dataHash, userKey: userKey, providerID: providerID, timestamp: block.timestamp }); // 创建一个新的数据访问记录结构体 accessRecords.push(newRecord); // 将新的记录添加到记录数组中 emit DataAccessed(dataHash, userKey, providerID, block.timestamp); // 触发事件,通知数据访问操作 } function getAccessRecord(uint256 index) public view returns (AccessRecord memory) { require(index < accessRecords.length, "Index out of bounds"); // 检查索引是否有效 return accessRecords[index]; } // 根据索引获取数据访问记录(只读函数) function getAccessRecordCount() public view returns (uint256) { return accessRecords.length; } // 获取总的数据访问记录数量(只读函数) } |
表 8 函数返回结果Table 8 Function return results |
| { "dataHash": "0xabc123...", "userKey": "0xdef456...", "providerID": "provider123", "timestamp": 1673961600 } |
| 1 |
SULISTIYANI E, IRAWAN I, WULAN T D, et al. Benefit realization measurement: Do electronic medical records improve the effectiveness of data management[C]//2023 International Seminar on Application for Technology of Information and Communication (iSemantic). IEEE, 2023: 158-163.
|
| 2 |
YU K, TAN L, LIN L, et al. Deep-learning-empowered breast cancer auxiliary diagnosis for 5GB remote E-health[J]. IEEE Wireless Communications, 2021, 28 (3): 54- 61.
|
| 3 |
MOQURRAB S A, AYUB U, ANJUM A, et al. An accurate deep learning model for clinical entity recognition from clinical notes[J]. IEEE Journal of Biomedical and Health Informatics, 2021, 25 (10): 3804- 3811.
|
| 4 |
UGWU A O, GAO X, UGWU J O, et al. Ethical implications of AI in healthcare data: A case study using healthcare data breaches from the US department of health and human services breach portal between 2009-2021[C]//2022 International Conference on Industrial IoT, Big Data and Supply Chain (IIoTBDSC). IEEE, 2022: 343-349.
|
| 5 |
HUANG Q, YAN G, YANG Y. Privacy-preserving traceable attribute-based keyword search in multi-authority medical cloud[J]. IEEE Transactions on Cloud Computing, 2021, 11 (1): 678- 691.
|
| 6 |
GE C, SUSILO W, LIU Z, et al. Attribute-based proxy re-encryption with direct revocation mechanism for data sharing in clouds[J]. IEEE Transactions on Dependable and Secure Computing, 2024, 21: 949-960.
|
| 7 |
LUO F, WANG H, LIN C, et al. Abaeks: Attribute-based authenticated encryption with keyword search over outsourced encrypted data[J]. IEEE Transactions on Information Forensics and Security, 2023, 18, 4970- 4983.
|
| 8 |
WANG R, LAI J, ZHANG Z, et al. Privacy-preserving federated learning for internet of medical things under edge computing[J]. IEEE Journal of Biomedical and Health Informatics, 2022, 27 (2): 854- 865.
|
| 9 |
SAI S, HASSIJA V, CHAMOLA V, et al. Federated learning and NFT-based privacy-preserving medical-data-sharing scheme for intelligent diagnosis in smart healthcare[J]. IEEE Internet of Things Journal, 2023, 11 (4): 5568- 5577.
|
| 10 |
ZHOU X, HUANG W, LIANG W, et al. Federated distillation and blockchain empowered secure knowledge sharing for internet of medical things[J]. Information Sciences, 2024, 662, 120217.
|
| 11 |
ZHANG M, LIN F, TIAN L, et al. Evolutionary medical data modeling and sharing via federated learning over sharded blockchain[J]. IEEE Internet of Things Journal, 2024, 11 (13): 24234- 24246.
|
| 12 |
SAMUEL O, OMOJO A B, ONUJA A M, et al. IoMT: A COVID-19 healthcare system driven by federated learning and blockchain[J]. IEEE Journal of Biomedical and Health Informatics, 2022, 27 (2): 823- 834.
|
| 13 |
SALIM M M, PARK J H. Federated learning-based secure electronic health record sharing scheme in medical informatics[J]. IEEE Journal of Biomedical and Health Informatics, 2022, 27 (2): 617- 624.
|
| 14 |
TAO Y, ZHU Y, GE C, et al. ORR-CP-ABE: A secure and efficient outsourced attribute-based encryption scheme with decryption results reuse[J]. Future Generation Computer Systems, 2024, 161, 559- 571.
|
| 15 |
YU F, SHEN H, YU Q, et al. Privacy protection of medical data based on multi-scroll memristive Hopfield neural network[J]. IEEE Transactions on Network Science and Engineering, 2022, 10 (2): 845- 858.
|
| 16 |
LI J, CAIRNS B J, LI J, et al. Generating synthetic mixed-type longitudinal electronic health records for artificial intelligent applications[J]. NPJ Digital Medicine, 2023, 6 (1): 98.
|
| 17 |
JIANG R, LIU R, ZHANG T, et al. An electronic medical record access control model based on intuitionistic fuzzy trust[J]. Information Sciences, 2024, 658, 120054.
|
| 18 |
BAO Z, HE D, WANG H, et al. A group signature scheme with selective linkability and traceability for blockchain-based data sharing systems in e-health services[J]. IEEE Internet of Things Journal, 2023, 10 (23): 21115- 21128.
|
| 19 |
LI H, HUANG Q, HUANG J, et al. Public-key authenticated encryption with keyword search supporting constant trapdoor generation and fast search[J]. IEEE Transactions on Information Forensics and Security, 2022, 18, 396- 410.
|
| 20 |
LAI C, ZHANG H, LU R, et al. Privacy-preserving medical data sharing scheme based on two-party cloud-assisted PSI[J]. IEEE Internet of Things Journal, 2024, 11 (9): 15855- 15868.
|
| 21 |
LI C, DONG M, XIN X, et al. Efficient privacy preserving in IoMT with blockchain and lightweight secret sharing[J]. IEEE Internet of Things Journal, 2023, 10 (24): 22051- 22064.
|
| 22 |
薛腾飞, 傅群超, 王枞, 等. 基于区块链的医疗数据共享模型研究[J]. 自动化学报, 2017, 43 (9): 1555- 1562.
XUE T F, FU Q C, WANG Z, et al. Research on medical data sharing model based on blockchain[J]. Acta Automatica Sinica, 2017, 43 (9): 1555- 1562.
|
| 23 |
LI Z, ZHANG J, ZHANG J, et al. Integrated edge computing and blockchain: A general medical data sharing framework[J]. IEEE Transactions on Emerging Topics in Computing, 2023, 12 (3): 924- 937.
|
| 24 |
LIU Z, JIANG Z L, WANG X, et al. Practical attribute-based encryption: Outsourcing decryption, attribute revocation and policy updating[J]. Journal of Network and Computer Applications, 2018, 108, 112- 123.
|
| 25 |
XU G, QI C, DONG W, et al. A privacy-preserving medical data sharing scheme based on blockchain[J]. IEEE Journal of Biomedical and Health Informatics, 2022, 27 (2): 698- 709.
|
| 26 |
XU S, NING J, LI Y, et al. A secure EMR sharing system with tamper resistance and expressive access control[J]. IEEE Transactions on Dependable and Secure Computing, 2021, 20 (1): 53- 67.
|
| 27 |
SETHI K, PRADHAN A, BERA P. Practical traceable multi-authority CP-ABE with outsourcing decryption and access policy updation[J]. Journal of Information Security and applications, 2020, 51, 102435.
|
| 28 |
YANG C N, LI P, CHENG H H, et al. A security model of multihospital FHIR database authorization based on secret sharing and blockchain[J]. IEEE Internet of Things Journal, 2023, 11 (6): 10325- 10335.
|
| 29 |
TAN M, WANG X, SHANG S, et al. Blockchain-based cross-domain access control mechanism[C]//2022 5th International Conference on Information Communication and Signal Processing (ICICSP). IEEE, 2022: 499-506.
|
| 30 |
SELVARAJAN S, MOURATIDIS H. A quantum trust and consultative transaction-based blockchain cybersecurity model for healthcare systems[J]. Scientific Reports, 2023, 13 (1): 7107.
|
| 31 |
LI Q, XIA B, HUANG H, et al. TRAC: Traceable and revocable access control scheme for mHealth in 5G-enabled IIoT[J]. IEEE Transactions on Industrial Informatics, 2021, 18 (5): 3437- 3448.
|
| 32 |
QU Z, KUMARI S, OBAIDAT M S, et al. Traceable attribute-based encryption with equality test for cloud enabled E-health system[J]. IEEE Journal of Biomedical and Health Informatics, 2023, 28 (9): 5033- 5042.
|
| 33 |
XU Z, HE D, VIJAYAKUMAR P, et al. Certificateless public auditing scheme with data privacy and dynamics in group user model of cloud-assisted medical WSNs[J]. IEEE Journal of Biomedical and Health Informatics, 2021, 27 (5): 2334- 2344.
|
| 34 |
LIU Z, CAO Z, WONG D S. White-box traceable ciphertext-policy attribute-based encryption supporting any monotone access structures[J]. IEEE Transactions on Information Forensics and Security, 2012, 8 (1): 76- 88.
|
/
| 〈 |
|
〉 |