《计算机应用》唯一官方网站 ›› 2026, Vol. 46 ›› Issue (4): 1171-1181.DOI: 10.11772/j.issn.1001-9081.2025040462
• 网络空间安全 • 上一篇
王诗雨1,2, 贾林鹏1, 金键3(
), 李忠诚1,2(
), 周继华4, 孙毅1,2
收稿日期:2025-04-28
修回日期:2025-08-21
接受日期:2025-08-22
发布日期:2025-09-09
出版日期:2026-04-10
通讯作者:
金键,李忠诚
作者简介:王诗雨(1999—),女,安徽六安人,硕士,主要研究方向:区块链、分布式数字身份基金资助:
Shiyu WANG1,2, Linpeng JIA1, Jian JIN3(
), Zhongcheng LI1,2(
), Jihua ZHOU4, Yi SUN1,2
Received:2025-04-28
Revised:2025-08-21
Accepted:2025-08-22
Online:2025-09-09
Published:2026-04-10
Contact:
Jian JIN, Zhongcheng LI
About author:WANG Shiyu, born in 1999, M. S. Her research interests include blockchain, distributed identity.Supported by:摘要:
针对现有分布式数字身份(DID)认证方案中,可验证声明(VC)在链下客户端明文存储导致的用户与客户端强耦合和隐私安全易受威胁的问题,提出一种按需披露的区块链数字身份认证机制DCIdentity。首先,基于万维网联盟去中心化标识标准(W3C DID),将用户身份的VC在链上加密存储,降低用户对客户端的依赖,实现认证过程与客户端的松耦合;然后,设计VC分层加密机制支持用户信息的按需披露,提升多主体认证效率并降低相关开销。实验结果表明,与链下存储方案相比,所提机制有效降低了客户端与用户身份认证过程的耦合程度,同时实现了用户身份信息的按需披露;与密文策略属性基加密(CP-ABE)方案相比,所提机制的加密处理时延与链上存储开销分别降低了91.5%和84.1%。可见,所提机制为多领域、多应用场景下的身份统一认证提供了高效解决方案,在保障用户信息隐私的同时,显著提高了认证效率,可有力支撑DID在实际场景中的落地应用。
中图分类号:
王诗雨, 贾林鹏, 金键, 李忠诚, 周继华, 孙毅. 按需披露的区块链数字身份认证机制DCIdentity[J]. 计算机应用, 2026, 46(4): 1171-1181.
Shiyu WANG, Linpeng JIA, Jian JIN, Zhongcheng LI, Jihua ZHOU, Yi SUN. DCIdentity: on-demand disclosure blockchain digital identity authentication mechanism[J]. Journal of Computer Applications, 2026, 46(4): 1171-1181.
| 操作 | 普通用户 | 授权机构 | 委员会成员 | 管理员 |
|---|---|---|---|---|
| 增删改管理员 | 否 | 否 | 否 | 是 |
| 增删改委员会成员 | 否 | 否 | 否 | 是 |
| 增删改授权机构 | 否 | 否 | 是 | 是 |
| 发行授权VC模板 | 否 | 是 | 是 | 是 |
表1 角色权限
Tab. 1 Role permissions
| 操作 | 普通用户 | 授权机构 | 委员会成员 | 管理员 |
|---|---|---|---|---|
| 增删改管理员 | 否 | 否 | 否 | 是 |
| 增删改委员会成员 | 否 | 否 | 否 | 是 |
| 增删改授权机构 | 否 | 否 | 是 | 是 |
| 发行授权VC模板 | 否 | 是 | 是 | 是 |
| 字段 | 类型 | 描述 |
|---|---|---|
| did | String | 遵循W3C DID规范,使用固定字符“did” |
| DCid | String | DID规范中的example字段,使用固定 字符“DCid” |
| chainID | String | 链ID,用于路由到不同的链网络 |
| specificString | String | DID特殊方法标识符,需要确保唯一性 |
表2 DID标识的数据结构
Tab. 2 DID identifier data structure
| 字段 | 类型 | 描述 |
|---|---|---|
| did | String | 遵循W3C DID规范,使用固定字符“did” |
| DCid | String | DID规范中的example字段,使用固定 字符“DCid” |
| chainID | String | 链ID,用于路由到不同的链网络 |
| specificString | String | DID特殊方法标识符,需要确保唯一性 |
| 字段 | 类型 | 描述 |
|---|---|---|
| context | String | 用于描述DCIdentity结构等信息 |
| cptId | Integer | 模板ID |
| issuer | String | 发证方的DCIdentity DID |
| issuanceDate | Long | 创建日期 |
| expirationDate | Long | 到期日期 |
| claim | Map〈String,Object〉 | 凭证数据 |
| proof | Map〈String,Object〉 | 签名数据结构体 |
表3 可验证声明的数据结构
Tab. 3 Verifiable credential data structure
| 字段 | 类型 | 描述 |
|---|---|---|
| context | String | 用于描述DCIdentity结构等信息 |
| cptId | Integer | 模板ID |
| issuer | String | 发证方的DCIdentity DID |
| issuanceDate | Long | 创建日期 |
| expirationDate | Long | 到期日期 |
| claim | Map〈String,Object〉 | 凭证数据 |
| proof | Map〈String,Object〉 | 签名数据结构体 |
| 变量符号 | 含义 | 备注 |
|---|---|---|
DID标识,由did:DCid:当前 账户链上地址组成 | 字符串 | |
| 创建时间 | 矢量 | |
| 验证者集合 | 字符串数组 | |
| 服务端点结合 | 字符串数组 | |
DID元数据,由创建时间、更新 时间、是否废除和版本号组成 | 结构体 | |
| DID归属方 | 账户地址 | |
| DID标识数组 | 字符串数组 |
表4 CreateDID算法的参数定义
Tab. 4 CreateDID algorithm parameter definition
| 变量符号 | 含义 | 备注 |
|---|---|---|
DID标识,由did:DCid:当前 账户链上地址组成 | 字符串 | |
| 创建时间 | 矢量 | |
| 验证者集合 | 字符串数组 | |
| 服务端点结合 | 字符串数组 | |
DID元数据,由创建时间、更新 时间、是否废除和版本号组成 | 结构体 | |
| DID归属方 | 账户地址 | |
| DID标识数组 | 字符串数组 |
| 环境字段 | 说明 |
|---|---|
| 运行环境和操作系统 | Linux绝大部分发行版和CentOS 7.9 |
| 内存 | 256 GB |
| CPU | 80核,Intel Xeon Gold 6230 CPU @ 2.10 GHz |
| 网络带宽 | 10 Mbit/s |
| 编译器 | Solidity 0.6.0、JDK8 |
| 依赖库及框架 | Jpbc、fisco.bcos.sdk、spring-boot等 |
| 开发工具 | IntelliJ IDEA、Remix、Maven、Postman |
表5 系统开发环境
Tab. 5 System development environment
| 环境字段 | 说明 |
|---|---|
| 运行环境和操作系统 | Linux绝大部分发行版和CentOS 7.9 |
| 内存 | 256 GB |
| CPU | 80核,Intel Xeon Gold 6230 CPU @ 2.10 GHz |
| 网络带宽 | 10 Mbit/s |
| 编译器 | Solidity 0.6.0、JDK8 |
| 依赖库及框架 | Jpbc、fisco.bcos.sdk、spring-boot等 |
| 开发工具 | IntelliJ IDEA、Remix、Maven、Postman |
| 方案 | Gas消耗 |
|---|---|
| DCIdentity方案 | 4 917 091 |
| CP-ABE方案 | 36 729 000 |
| 链下存储方案 | 0 |
表6 可验证声明加密处理的Gas消耗
Tab. 6 Gas consumption of verifiable credential encryption processing
| 方案 | Gas消耗 |
|---|---|
| DCIdentity方案 | 4 917 091 |
| CP-ABE方案 | 36 729 000 |
| 链下存储方案 | 0 |
| 方案 | MK链上存储字节数 | VC链上存储字节数 |
|---|---|---|
| DCIdentity方案 | 2 521 | 2 782 |
| CP-ABE方案 | 0 | 33 384 |
| 链下存储方案 | 0 | 0 |
表7 可验证声明链上存储开销
Tab. 7 On-chain storage data sizes of verifiable credentials
| 方案 | MK链上存储字节数 | VC链上存储字节数 |
|---|---|---|
| DCIdentity方案 | 2 521 | 2 782 |
| CP-ABE方案 | 0 | 33 384 |
| 链下存储方案 | 0 | 0 |
| [1] | 云安全联盟大中华区. 用户自治数字身份安全白皮书[R/OL]. [2024-05-30].. |
| Cloud Security Alliance Greater China Region. User autonomous digital identity security white paper[R/OL]. [2024-05-30].. | |
| [2] | 火链科技研究院. 区块链数字身份:数字经济时代基础设施——火链科技研究院产业应用系列报告之五[EB/OL]. [2024-04-16].. |
| Research Huochain. Blockchain digital identity: infrastructure in the era of digital economy — Huochain Technology Research Institute industrial application series report no.5[EB/OL]. [2024-04-16].. | |
| [3] | CHEN X, NGUYEN K, SEKIYA H. An experimental study on performance of private blockchain in IoT applications[J]. Peer-to-Peer Networking and Applications, 2021, 14(5): 3075-3091. |
| [4] | 分布式数字身份产业联盟. DIDA白皮书[R/OL]. [2024-04-16].. |
| DID-Alliance. DIDA white paper[R/OL]. [2024-04-16].. | |
| [5] | World Wide Web Consortium. Decentralized IDentifiers (DIDs) v1.0[EB/OL]. [2024-05-16].. |
| [6] | World Wide Web Consortium. DID document[EB/OL]. [2024-05-16].. |
| [7] | World Wide Web Consortium. Verification methods[EB/OL]. [2024-05-16].. |
| [8] | 宋智明,余益民,王贵文,等. 基于区块链智能合约的数字身份可验证凭证零知识认证和管理架构[J]. 信息安全学报, 2023, 8(1): 55-77. |
| SONG Z M, YU Y M, WANG G W, et al. Zero-knowledge authentication and management architecture of verifiable certificate of digital identity based on smart contracts of blockchain[J]. Journal of Cyber Security, 2023, 8(1): 55-77. | |
| [9] | WANG W, HU N, LIU X. BlockCAM: a blockchain-based cross-domain authentication model[C]// Proceedings of the IEEE 3rd International Conference on Data Science in Cyberspace. Piscataway: IEEE, 2018: 896-901. |
| [10] | LUNDKVIST C, HECK R, TORSTENSSON J, et al. uPORT: a platform for self-sovereign identity[R/OL]. [2024-05-25].. |
| [11] | 微众银行. WeIdentity文档[EB/OL]. [2024-05-25].[EB/OL]. [2024-05-25].) |
| [12] | ZHOU T, LI X, ZHAO H. EverSSDI: blockchain-based framework for verification, authorisation and recovery of self-sovereign identity using smart contracts[J]. International Journal of Computer Applications in Technology, 2019, 60(3): 281-295. |
| [13] | GOYAL V, PANDEY O, SAHAI A, et al. Attribute-based encryption for fine-grained access control of encrypted data[C]// Proceedings of the 13th ACM Conference on Computer and Communications Security. New York: ACM, 2006: 89-98. |
| [14] | 李强,罗庆斌,吕轶,等. SM4密码算法S盒的量子电路优化[J]. 密码学报, 2024, 11(2): 455-465. |
| LI Q, LUO Q B, LYU Y, et al. Quantum circuit optimization for SM4 cryptographic algorithm S-Box[J]. Journal of Cryptologic Research, 2024, 11(2): 455-465. | |
| [15] | NAKAMOTO S. Bitcoin: a peer-to-peer electronic cash system[EB/OL]. [2024-05-24].. |
| [16] | 李铭堃,马利民,王佳慧,等. 基于区块链和 PKI 的身份认证技术研究[J]. 信息安全研究, 2024, 10(2): 148-155. |
| LI M K, MA L M, WANG J H, et al. Research on identity authentication technology based on block chain and PKI[J]. Journal of Information Security Research, 2024, 10(2): 148-155. | |
| [17] | CHANDRA S, BHATTACHARYYA S, PAIRA S, et al. A study and analysis on symmetric cryptography[C]// Proceedings of the 2014 International Conference on Science Engineering and Management Research. Piscataway: IEEE, 2014: 1-8. |
| [18] | DAEMEN J, RIJMEN V. AES proposal: Rijndael[EB/OL]. [2024-04-26].. |
| [19] | ASJAD S. RSA algorithm[EB/OL]. [2024-04-23].. |
| [20] | SAHAI A, WATERS B. Fuzzy identity-based encryption[C]// Proceedings of the 2005 Annual International Conference on the Theory and Applications of Cryptographic Techniques, LNCS 3494. Berlin: Springer, 2005: 457-473. |
| [21] | BETHENCOURT J, SAHAI A, WATERS B. Ciphertext-policy attribute-based encryption[C]// Proceedings of the 2007 IEEE Symposium on Security and Privacy. Piscataway: IEEE, 2007: 321-334. |
| [22] | 汪玉江,曹成堂,游林. 基于区块链和属性基加密的个人隐私数据保护方案[J]. 密码学报, 2021, 8(1): 14-27. |
| WANG Y J, CAO C T, YOU L. A novel personal privacy data protection scheme based on blockchain and attribute-based encryption[J]. Journal of Cryptologic Research, 2021, 8(1): 14-27. | |
| [23] | 黄穗,陈丽炜,范冰冰. 基于CP-ABE和区块链的数据安全共享方法[J]. 计算机系统应用, 2019, 28(11): 79-86. |
| HUANG S, CHEN L W, FAN B B. Data Security sharing method based on CP-ABE and blockchain[J]. Journal of Computer Systems and Applications, 2019, 28(11): 79-86. | |
| [24] | 中国科学院计算技术研究所. 具有隐私保护和访问控制的分布式数字身份认证方法及系统: 202310854749.1[P]. 2025-01-14. |
| Institute of Computing Technology, Chinese Academy of Sciences. Distributed digital identity authentication method and system with privacy protection and access control: 202310854749.1[P]. 2025-01-14. | |
| [25] | 王喆. 基于区块链的数字身份管理系统设计与实现[D]. 南京:东南大学, 2020: 4-6. |
| WANG Z. Design and implementation of digital identity management system based on blockchain[D]. Nanjing: Southeast University, 2020: 4-6. | |
| [26] | 苏金树,曹丹,王小峰,等. 属性基加密机制[J]. 软件学报, 2011, 22(6): 1299-1315. |
| SU J S, CAO D, WANG X F, et al. Attribute-based encryption schemes[J]. Journal of Software, 2011, 22(6): 1299-1315. | |
| [27] | LEWKO A, WATERS B. Decentralizing attribute-based encryption[C]// Proceedings of the 2011 Annual International Conference on the Theory and Applications of Cryptographic Techniques, LNCS 6632. Berlin: Springer, 2011: 568-588. |
| [1] | 王睿, 潘恒, 刘坤, 斯雪明, 张博伟, 李坤阳. 基于区块链的电子政务跨部门协作身份认证方案[J]. 《计算机应用》唯一官方网站, 2025, 45(11): 3477-3485. |
| [2] | 刘德渊, 张金全, 张鑫, 万武南, 张仕斌, 秦智. 基于无证书签密的跨链身份认证方案[J]. 《计算机应用》唯一官方网站, 2024, 44(12): 3731-3740. |
| [3] | 张鑫, 张金全, 刘德渊, 万武南, 张仕斌, 秦智. 基于身份代理重加密的跨链身份管理方案[J]. 《计算机应用》唯一官方网站, 2024, 44(12): 3723-3730. |
| [4] | 田洪亮, 王佳玥, 李晨曦. 基于混合算法区块链和节点身份认证的数据存储方案[J]. 《计算机应用》唯一官方网站, 2022, 42(8): 2481-2486. |
| [5] | 杜心雨, 王化群. LTE-A网络中基于动态组的有效的身份认证和密钥协商方案[J]. 计算机应用, 2021, 41(6): 1715-1722. |
| [6] | 陈家豪, 殷新春. 基于云雾计算的可追踪可撤销密文策略属性基加密方案[J]. 计算机应用, 2021, 41(6): 1611-1620. |
| [7] | 张兴兰, 赵怡静. 基于单光子的量子双向同步身份认证协议[J]. 计算机应用, 2020, 40(9): 2634-2638. |
| [8] | 江泽涛, 徐娟娟. 云环境下基于签密的异构跨域身份认证方案[J]. 计算机应用, 2020, 40(3): 740-746. |
| [9] | 刘荣, 潘洪志, 刘波, 祖婷, 方群, 何昕, 王杨. 基于密文策略属性基加密算法的云存储数据更新方法[J]. 计算机应用, 2018, 38(2): 348-351. |
| [10] | 李琦, 熊金波, 黄利智, 王煊, 毛启铭, 姚岚午. 智慧健康中基于属性的访问控制方案[J]. 计算机应用, 2018, 38(12): 3471-3475. |
| [11] | 刘威, 汪阳, 郑建彬, 詹恩奇. 基于加速度传感器的中文签名身份认证[J]. 计算机应用, 2017, 37(4): 1004-1007. |
| [12] | 陈建, 沈潇军, 姚一杨, 邢雅菲, 琚小明. 基于密文策略属性基加密系统访问机制的缓存替换策略[J]. 计算机应用, 2017, 37(10): 2964-2967. |
| [13] | 胡振宇, 李志华, 陈超群. 基于用户社会关系的移动终端认证方案[J]. 计算机应用, 2016, 36(6): 1552-1557. |
| [14] | 王康, 李清宝. 结合容量伪装和双文件系统的文件隐藏方法[J]. 计算机应用, 2016, 36(4): 979-984. |
| [15] | 庞永春, 孙子文, 王尧. 基于手机触摸屏传感器多点触摸身份认证算法[J]. 计算机应用, 2015, 35(6): 1780-1784. |
| 阅读次数 | ||||||
|
全文 |
|
|||||
|
摘要 |
|
|||||