WO2023010932A1 - 一种基于智能合约的云边协同多模式隐私数据流转方法 - Google Patents

一种基于智能合约的云边协同多模式隐私数据流转方法 Download PDF

Info

Publication number
WO2023010932A1
WO2023010932A1 PCT/CN2022/091909 CN2022091909W WO2023010932A1 WO 2023010932 A1 WO2023010932 A1 WO 2023010932A1 CN 2022091909 W CN2022091909 W CN 2022091909W WO 2023010932 A1 WO2023010932 A1 WO 2023010932A1
Authority
WO
WIPO (PCT)
Prior art keywords
key
data
smart contract
usk
policy
Prior art date
Application number
PCT/CN2022/091909
Other languages
English (en)
French (fr)
Inventor
高丰
白文媛
Original Assignee
之江实验室
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 之江实验室 filed Critical 之江实验室
Priority to US17/885,556 priority Critical patent/US11777745B2/en
Publication of WO2023010932A1 publication Critical patent/WO2023010932A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services

Definitions

  • the present invention relates to the fields of encryption technology, edge computing technology and blockchain technology, and in particular to a method for securely transferring private data based on edge-cloud collaboration.
  • a cloud-edge collaborative multi-mode privacy data transfer method based on smart contracts comprising the following steps:
  • S12 Build a user account for each user, including a user account ID, a corresponding public key ID pub-key and a private key ID pri-key ; the user account includes a data owner DO and a data user DU;
  • DO invokes the smart contract program to realize the encrypted certificate z' on the chain, DO publishes z' to the blockchain through the smart contract, and the smart contract is open to all user accounts;
  • DO has specified DU when it is released, and set the user account ID DU of DU through the access policy policy.
  • DU obtains the encryption key key for data access by executing the smart contract and CP_ABE key algorithm.
  • Metadata obtaining private data and decrypting to obtain plaintext, including the following steps:
  • S414, DU executes the smart contract, obtains USK', and decrypts and obtains USK through its private key DU pri-key ;
  • S416, DU obtains the address of the private data cloud storage through the metadata in z', downloads the private data and uses AES to decrypt the private data to obtain the original data, and the data transfer is completed;
  • the initialization algorithm is a randomization algorithm, which is executed on a trusted key distribution center, and the key algorithm is input with a security factor ⁇ and an attribute space U, and is executed to obtain the algorithm system public key PSK and the system master key MSK:
  • the elements in U constitute the access policy through operations such as "AND” and "OR".
  • S2 includes the following steps:
  • DO generates metadata based on the original data (including target file identification, storage address URL and hash, business type, etc.), generates a random number as the encryption key key of the original data, and the original data of DO passes the encryption key key Use AES encryption to form private data and store it in cloud storage space;
  • DO symmetrically encrypts and signs the original data as private data and saves it on the cloud side, and generates an encryption credential z' for cloud storage; in S4, DU obtains private data from the cloud side through metadata and Decrypt to get the plaintext.
  • the obtained USK is saved; in the S412, the DU account checks whether the user key USK of the CP-ABE key algorithm is saved, and if not, initiates a request to KaaS through the smart contract , apply to obtain USK; if it exists, skip to S415.
  • a supervision account SC is also constructed, including the supervision account ID SC , the public key SC pub-key and the private key SC pri-key of the SC.
  • the S4 implements the broadcast data transfer: when the DO releases the data certificate, it does not determine the DU, and when the DU retrieves the blockchain and browses the metadata, it judges that it is interested in a certain data, and announces it through the smart contract. Read the file request, after the DO executes the smart contract, if the authority review is passed, the data transfer will be completed, including the following steps:
  • S421 When the DU executes the consensus algorithm, it calls the smart contract, retrieves the blockchain and browses the metadata, and checks the data processing business. Based on the openness of the blockchain, the relevant nodes of the blockchain can verify the correctness of the metadata ;
  • S422 DU judges that a certain data is related to itself, and sends an access request to DO through the smart contract, and the access request includes the identification name and hash value of the target file, etc.;
  • S424 SC executes the smart contract, obtains the attribute set policy from the blockchain, and verifies its legitimacy. If the legitimacy is not passed, it informs DU and the process ends;
  • S427 DU executes the smart contract, obtains USK', and decrypts and obtains USK through its private key DU pri-key ;
  • S428 DU executes CP-ABE key algorithm, inputs system public key PSK, user key USK and data credential key', as long as the account of DU satisfies the characteristics enabled in the ciphertext access policy within the valid time limit, decrypt Obtain the encryption key key, DU obtains the address of the private data cloud storage through the metadata in z', downloads the file and decrypts it with AES through the key, obtains the original data, and completes the data transfer.
  • the S4 implements data supervision: due to all data transfer processes, the policy is enabled for the SC account, and the SC is based on the metadata of the block chain, and the transaction time, privacy data sharing initiator, privacy data receiver, The private data corresponding to the metadata is decrypted, and its authenticity and other contents are verified, including the following steps:
  • S433 The SC performs AES decryption on the private data obtained based on the key and the URL stored in the metadata to obtain the original data.
  • the key algorithm is a key algorithm based on attribute-based encryption CP-ABE.
  • the cloud-edge collaboration technology of the present invention is oriented to wide-area scenarios. Compared with the cloud side, the security of the edge side is lower than that of the cloud side, but the demand for data circulation is high; the encrypted data storage, key-policy, and supervision are constructed on the cloud side with high security. Cloud-native services such as committees cooperate with the edge side to complete the cloud-side data transfer mechanism; according to different situations of data transfer, different modes such as fast mode, broadcast mode, and supervision mode are proposed based on attribute-based encryption (CP-ABE), and complex scenarios are realized. Under the safe and efficient circulation.
  • CP-ABE attribute-based encryption
  • Fig. 1 is a flow chart of the method of the present invention.
  • Fig. 2 is a flow chart of the data owner publishing metadata in the present invention.
  • Fig. 3 is a flow chart of data user extracting data storage credential z' in the present invention.
  • the present invention uses the smart contract as an important means of data authorization access, the smart contract is a technology closely coupled with the block chain, due to the consistency of the state of the block chain, the smart contract will be executed on all consensus nodes, so the design of the present invention
  • a smart contract-based cloud-edge collaborative multi-mode privacy data transfer method is proposed to realize the supervised transfer between the data owner DO (Data Owner) and the data user DU (Data User), as shown in Figure 1, including the following step:
  • S12 Build a user account for each user, including user account ID, corresponding public key ID pub-key and private key ID pri-key ; build a supervision account (supervision committee, SC), and distribute SC's public key SC pub-key and private key SC pri-key ;
  • DO saves the data on the cloud side using symmetric encryption and signature, and generates the encrypted credential z' for cloud storage, z' contains metadata and key information for data encryption;
  • S221 DO generates metadata based on the original data (including target file identification, storage address URL and hash, business type, etc.), generates a random number as the file encryption key key, and the original data of DO adopts AES through the encryption key key Encrypted to form private files and stored in cloud storage space.
  • DO calls the smart contract program to realize the encrypted data credential z' on the chain, DO publishes z' to the chain through the smart contract, and the smart contract is open to all user accounts; the smart contract is shown in Figure 2;
  • S4 the system realizes data transfer in three modes including fast data transfer, broadcast mode, and supervision mode, including the following situations:
  • DO has specified the data user DU at the time of release, and the DU account ID DU can be set through the access strategy policy. side to obtain private files and decrypt them to obtain plaintext;
  • S411 DU's account executes the smart contract (the process is shown in Figure 3), and obtains z';
  • S412 The DU account checks whether the account private key USK of CP-ABE is saved, and if it does not exist, it initiates a request to KaaS through the smart contract to apply for USK; if it exists, skip to step S415;
  • S414 DU executes the smart contract, obtains USK', and decrypts and saves USK through its private key DU pri-key ;
  • S416 DU obtains the original data cloud storage address through the z' metadata, downloads the file and uses AES to decrypt the file to obtain the file content, and the data transfer is completed.
  • DO does not determine the data user when issuing data certificates.
  • DU retrieves the blockchain and browses the metadata, it judges that it is interested in a certain data, and publishes the file reading request through the smart contract.
  • the DO executes the smart contract, if the authority review passes the process of entering S42, the data transfer is completed;
  • S421 When the DU executes the consensus algorithm, it will call the smart contract, retrieve the blockchain and browse the metadata, and check the data processing business. Based on the openness of the blockchain, the relevant nodes of the blockchain can verify the correctness of the metadata sex;
  • S422 DU judges that a certain data is related to itself, and sends an access request to DO through the smart contract, and the access request includes the identification name and hash value of the target file, etc.;
  • S424 SC executes the smart contract to obtain the attribute set policy from the chain, and verifies its legitimacy. If the legitimacy is not passed, it informs DU and the process ends;
  • S427 DU executes the smart contract, obtains USK', and decrypts and obtains USK through its private key DU pri-key ;
  • the DU executes the CP-ABE decryption algorithm, and inputs the system public key PSK, the user key USK and the ciphertext key', as long as the account of the DU satisfies the characteristics enabled in the ciphertext access policy policy within the valid time limit, the decryption will be obtained Key key, decrypt metadata and obtain files related to master data;
  • SC can control transaction time, private data sharing initiators, private data receivers, and metadata based on the metadata of the blockchain. Decrypt private files and verify their authenticity and other content;
  • S433 The SC account downloads the private file based on the URL stored in the key and the private file in the metadata and performs AES decryption to obtain the plaintext information of the private file;

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Bioethics (AREA)
  • Databases & Information Systems (AREA)
  • Storage Device Security (AREA)

Abstract

本发明公开了一种基于智能合约的云边协同多模式隐私数据流转方法,包括如下步骤:S1,系统初始化;S2,DO将原始数据加密成隐私数据,产生存储的加密凭证z',z'中包含元数据metadata和数据凭证key';S3,DO调用智能合约程序实现加密凭证z'上链,DO将z'通过智能合约发布到区块链上,智能合约对所有用户账户开放;S4,实现快速数据流转:DO在发布时,已经明确DU,通过访问策略policy设定DU的用户账号ID DU,DU通过执行智能合约和密钥算法,得到数据访问的加密密钥key,通过元数据,获取隐私数据并解密获取明文;S5,数据流转的确认:DO提交数据流转的交易凭证,确认数据流转完成。

Description

一种基于智能合约的云边协同多模式隐私数据流转方法 技术领域
本发明涉及密码技术、边缘计算技术和区块链技术领域,尤其是涉及一种基于边云协同的隐私数据安全流转方法。
背景技术
随着经济数字化、政府数字化、企业数字化的建设,数据已经成为政府和企业重要的核心资产。但数据安全事件也在高频发生,数据“裸奔”给企业带来大量的资产和声誉的损失,公众深受隐私曝光与骚扰诈骗的困扰。《数据安全法》为数字化建设提供了法律保障更指明了发展方向,有关单位和个人收集、存储、使用、加工、传输、提供、公开数据资源,都应当依法建立健全数据安全管理制度,并采取相应技术措施保障数据安全。由于数据本身的易拷贝、易篡改等特性,现有的数据流转技术缺乏“可发现、可监管、可防护、可管理”的能力,造成数据应用场景中“数据孤岛”、“数据烟囱”等现象非常突出,严重阻碍了数据产生价值。根据《数据安全法》要求,急需构建面向广域场景的数据全生命周期安全防护体系,明确数据安全保护的责任主体,完善数据安全制度建设。
发明内容
为解决现有技术的不足,从数据安全流转的角度,基于云边协同技术和区块链智能合约技术,构建多种模式的数据流转方法,实现在保护隐私数据的条件下,数据所有者DO(Data Owner)和数据使用者DU(Data User)之间的可发现、可监管、可防护的数据流转,实现数据全生命周期的安全治理框架,本发明采用如下的技术方案:
一种基于智能合约的云边协同多模式隐私数据流转方法,包括如下步骤:
S1,系统初始化,包括如下步骤:
S11,通过构建密钥-策略管理云服务KaaS,完成CP_ABE密钥算法初始化,得到系统公钥PSK和系统主密钥MSK;
S12:为每个用户构建用户账户,包括用户账号ID,相应的公钥ID pub-key和私钥ID pri-key;所述用户账户包括数据拥有者DO和数据使用者DU;
S2,DO将原始数据对称加密和签名成隐私数据,产生存储的加密凭证z’,z’中包含元数据metadata和数据凭证key’;
S3,DO调用智能合约程序实现加密凭证z’上链,DO将z’通过智能合约发 布到区块链上,智能合约对所有用户账户开放;
S4,实现快速数据流转:DO在发布时,已经明确DU,通过访问策略policy设定DU的用户账号ID DU,DU通过执行智能合约和CP_ABE密钥算法,得到数据访问的加密密钥key,通过元数据,获取隐私数据并解密获取明文,包括如下步骤:
S411,DU的账户执行智能合约,获得z’;
S412,通过智能合约向KaaS发起请求,申请获得USK;
S413,KaaS执行CP-ABE密钥算法,输入系统公钥PSK、主密钥MSK和DU账号ID DU,生成用户密钥USK,并通过DU的公钥DU pub-key加密USK,即USK’=enc(USK,DU pub-key),并将USK’通过智能合约发布到区块链上,该智能合约仅对DU可访问;
S414,DU执行智能合约,获取USK’,并通过其私钥DU pri-key解密获取USK;
S415,DU通过USK进行解密z’中的数据凭证key’,获得key=dec_cpabe(key’,PSK,USK);
S416,DU通过z’中的元数据获取隐私数据云存储的地址,下载该隐私数据并通过key采用AES解密,得到原始数据,数据流转完成;
S5,数据流转的确认:DO提交数据流转的交易凭证,确认数据流转完成。
进一步地,所述S11中,初始化算法为随机化算法,在可信的密钥分发中心上执行,密钥算法输入安全系数γ和属性空间U,执行得到算法系统公钥PSK和系统主密钥MSK:
Setup(γ,policy)→(PSK,MSK)
其中U中的元素通过“与”、“或”等操作构成访问策略policy。
进一步地,所述S2包括如下步骤:
S21,DO向KaaS申请获得PSK;
S22,DO由PSK、加密密钥key得到数据凭证key’,即key’=enc_cpabe(key,PSK,policy),而z’=[metadata,key’],包括如下步骤:
S221:DO基于原始数据,生成元数据metadata(包括目标文件标识、存储地址URL和散列、业务类型等),产生随机数作为原始数据的加密密钥key,DO的原始数据通过加密密钥key采用AES加密形成隐私数据并存储于云存储空间;
S222:DO基于平台设定的用户账号ID生成访问策略policy,基于CP-ABE密钥算法生成key’=enc_cpabe(key,PSK,policy),而z’=[metadata,key’];密钥算法由DO执行,算法输入系统公钥PSK、待加密消息key和与访问策略相关联的访问策略policy,生成基于属性加密的数据凭证key’,只有拥有满足访问策略的请求者才能解密数据凭证key’。
进一步地,所述S2中,DO将原始数据对称加密和签名成隐私数据保存在云侧,产生云存储的加密凭证z’;所述S4中,DU通过元数据,从云侧获取隐私数据并解密获取明文。
进一步地,所述S414中,对获取的USK进行保存;所述S412中,DU账号检查是否保存有CP-ABE密钥算法的用户密钥USK,如果不存在,则通过智能合约向KaaS发起请求,申请获得USK;如果存在,则跳到S415。
进一步地,所述S12中,还构建监管账户SC,包括监管账号ID SC,SC的公钥SC pub-key和私钥SC pri-key
进一步地,所述policy=ID DU∪ID SC
进一步地,所述S4实现的是广播数据流转:DO在发布数据凭证时,并不确定DU,DU在检索区块链并浏览元数据时,判断自己对某项数据感兴趣,通过智能合约公布读文件请求,DO执行智能合约后,如果权限审查通过,则完成数据流转,包括如下步骤:
S421:DU在执行共识算法时,调用智能合约,检索区块链并浏览元数据,查看数据处理业务相关情况,基于区块链的公开性,区块链相关节点都能验证元数据的正确性;
S422:DU判断某项数据与自己相关,通过智能合约向DO发送访问请求,访问请求包括目标文件的标识名称和散列值等;
S423:DO通过智能合约,将其带有时间属性的策略policy=((t≥t start∩t≤t end∩ID DU)∪ID SC)提交区块链,t、t start和t end分别表示当前合约执行时间,流转周期开始时间、结束时间,ID DU表示DU账号,ID SC账号表示SC账号,智能合约访问权限仅对SC开放;
S424:SC执行智能合约,从区块链上获取属性集合policy,并验证其的合法性,如果合法性不通过,则告知DU并流程结束;
S425:DO执行CP-ABE密钥算法,输入系统公钥PSK、文件加密密钥key和访问策略policy,生成数据凭证key’=enc_cpabe(key,PSK,plicy),并对所有账户 开放;
S426:KaaS执行CP-ABE密钥算法,输入系统公钥PSK、主密钥MSK和访问策略policy,生成用户密钥USK;并通过DU的公钥DU pub-key加密USK,即USK’=enc(USK,DU pub-key),并将USK’通过智能合约发布到区块链上,该智能合约仅DU可访问;
S427:DU执行智能合约,获取USK’,并通过其私钥DU pri-key解密获取USK;
S428:DU执行CP-ABE密钥算法,输入系统公钥PSK、用户密钥USK和数据凭证key’,只要在有效时间限定内DU的账号满足密文访问策略policy中使能的特性,则解密获取加密密钥key,DU通过z’中的元数据获取隐私数据云存储的地址,下载该文件并通过key采用AES解密,获取原始数据,数据流转完成。
进一步地,所述policy=ID SC
进一步地,所述S4实现数据监管:由于所有的数据流转的过程,policy都对SC账号使能,SC基于区块链的元数据,对交易时间、隐私数据共享发起方、隐私数据接收方、元数据对应的隐私数据进行解密,对其真实性等内容进行验证,包括如下步骤:
S431:SC保存有系统公钥PSK、系统主密钥MSK,通过检索区块链获取z’=[metadata,key’];
S432:由于快速模式、广播模式中的policy已经设置为监管账户使能,因此基于SC的账号对应的USK,解密获得key=dec_cpabe(key’,PSK,USK);
S433:SC基于key和元数据中存储的URL获得的隐私数据,进行AES解密,获得原始数据。
所述密钥算法,是基于属性基加密CP-ABE的密钥算法。
本发明的优势和有益效果在于:
本发明面向广域场景的云边协同技术,边缘侧相对云侧安全性较低,对数据流转的需求却很高;在安全性较高的云侧构建加密数据存储、密钥-策略、监管委员会等云原生服务,协同边缘侧完成云边数据流转机制;根据数据流转的不同情况,基于属性基加密(CP-ABE)提出快速模式、广播模式、监管模式等不同的模式,实现了复杂场景下的安全、高效的流转。
附图说明
图1是本发明的方法流程图。
图2是本发明中数据所有者发布元数据的流程图。
图3是本发明中数据使用者提取数据存储凭证z’流程图。
具体实施方式
以下结合附图对本发明的具体实施方式进行详细说明。应当理解的是,此处所描述的具体实施方式仅用于说明和解释本发明,并不用于限制本发明。
本发明使用智能合约作为数据授权访问的重要手段,智能合约是与区块链紧密耦合的技术,由于区块链状态的一致性,智能合约会在所有的共识节点上得到执行,因此本发明设计了一种基于智能合约的云边协同多模式隐私数据流转方法,实现数据所有者DO(Data Owner)和数据使用者DU(Data User)之间的可监管流转,如图1所示,包括如下步骤:
S1,系统初始化;
S11:通过构建密钥-策略管理云服务KaaS(Key-Policy as a Service),完成CP_ABE算法初始化;初始化算法为随机化算法,在可信的密钥分发中心上执行,算法输入安全系数γ和属性空间U,U中的元素通过“与”、“或”等操作成为policy,执行得到算法系统公钥PSK和系统主密钥MSK:
Setup(γ,policy)→(PSK,MSK)
S12:为每个用户构建用户账户,包括用户账号ID,相应的公钥ID pub-key和私钥ID pri-key;构建监管账号(supervision committee,SC),分配SC的公钥SC pub-key和私钥SC pri-key
S2,DO将数据采用对称加密和签名保存在云侧,产生云存储的加密凭证z’,z’中包含元数据和数据加密的密钥信息;
S21,DO向KaaS申请获得PSK;
S22,DO由PSK、加密密钥key得到数据凭证key’,即key’=enc_cpabe(key,PSK,policy),而z’=[metadata,key’]。
S221:DO基于原始数据,生成元数据metadata(包括目标文件标识、存储地址URL和散列、业务类型等),产生随机数作为文件加密密钥key,DO的原始数据通过加密密钥key采用AES加密形成隐私文件并存储于云存储空间。
S222:DO基于平台设定的用户账号ID生成访问策略policy,而policy 是由属性空间U中的元素通过“与”、“或”等操作构成的,如果是快速模式,policy=ID DU∪ID SC;如果是广播模式,policy=ID SC。基于CP-ABE算法生成key’=enc_cpabe(key,PSK,policy),而z’=[metadata,key’];加密算法由DO执行,算法输入系统公钥PSK、待加密消息key和与访问策略相关联的访问策略policy,生成基于属性加密的密文key’,只有拥有满足访问策略的请求者才能解密密文key’;
S3,DO调用智能合约程序实现加密数据凭证z’上链,DO将z’通过智能合约发布到链上,智能合约对所有用户账户开放;智能合约如图2所示;
S4,系统实现快速数据流转、广播方式、监管方式等三种模式数据流转,包括以下情况:
S41,快速数据流转模式:DO在发布的时候已经明确数据使用者DU,可以通过访问策略policy设定DU账号ID DU,DU通过执行智能合约和CP_ABE解密算法得到数据访问对称密钥key,从云侧获取隐私文件并解密获取明文;
S411:DU的账户执行智能合约(流程如图3所示),获得z’;
S412:DU账号检查是否保存有CP-ABE的账号私钥USK,如果不存在则通过智能合约向KaaS发起请求,申请获得USK;如果存在则跳到步骤S415;
S413:KaaS执行CP-ABE密钥算法,输入系统公钥PSK、主密钥MSK和DU账号ID DU,生成用户密钥USK;并通过DU的公钥DU pub-key加密USK,即USK’=enc(USK,DU pub-key),并将USK’通过智能合约发布到区块链上,该智能合约仅对DU可访问。
S414:DU执行智能合约,获取USK’,并通过其私钥DU pri-key解密获取并保存USK;
S415:DU通过USK进行解密z’中的密文key’,获得key=dec_cpabe(key’,PSK,USK);
S416:DU通过z’元数据获取原始数据云存储的地址,下载该文件并通过key采用AES解密,获取文件内容,数据流转完成。
S42,广播数据流转模式:DO在发布数据凭证时并不确定数据使用者,DU在检索区块链并浏览元数据时,判断自己对某项数据感兴趣,通过智能 合约公布读文件请求。DO执行智能合约后,如果权限审查通过进入S42的流程,完成数据流转;
S421:DU在执行共识算法时,会调用智能合约,检索区块链并浏览元数据,查看数据处理业务相关情况,基于区块链的公开性,区块链相关节点都能验证元数据的正确性;
S422:DU判断某项数据与自己相关,通过智能合约向DO发送访问请求,访问请求包括目标文件的标识名称和散列值等;
S423:DO通过智能合约将其带有时间属性的策略policy=((t≥t start∩t≤t end∩ID DU)∪ID SC)提交在区块链,t、t start和t end分别表示当前合约执行时间,流转周期开始时间、结束时间,ID DU表示DU账号,ID SC账号表示SC账号,智能合约访问权限仅对SC开放;
S424:SC执行智能合约从链上获取属性集合policy,并验证其的合法性,如果合法性不通过,则告知DU且流程结束;
S425:DO执行CP-ABE加密算法,输入系统公钥PSK、文件加密密钥key和访问策略policy,生成密文key’=enc_cpabe(key,PSK,plicy),并对所有账户开放;
S426:KaaS执行CP-ABE密钥算法,输入系统公钥PSK、主密钥MSK和策略policy,生成用户密钥USK;并通过DU的公钥加密USK,即USK’=enc(USK,DU pub-key),并将USK′通过智能合约发布到区块链上,该智能合约仅对DU可访问。
S427:DU执行智能合约,获取USK’,并通过其私钥DU pri-key解密获取USK;
S428:DU执行CP-ABE解密算法,输入系统公钥PSK、用户密钥USK和密文key’,只要在有效时间限定内DU的账号满足密文访问策略policy中使能的特性,则解密获取密钥key,解密元数据并获取主数据相关的文件;
S43,数据监管模式:由于所有的数据流转的过程policy都对SC账号使能,SC可以基于区块链的元数据,对交易时间、隐私数据共享发起方、隐私数据接收方、元数据对应的隐私文件进行解密,对其真实性等内容进行验证;
S431:监管账号SC保存有系统公钥PSK、系统主密钥MSK和检索区块链获取z’=[metadata,key’];
S432:由于快速模式、广播模式中的policy已经设置为监管账户使能,因此基于SC的账号对应的USK能够解密获得key=dec_cpabe(key’,PSK,USK);
S433:SC账户基于key和元数据中的隐私文件存储的URL下载隐私文件并进行AES解密,获得隐私文件明文信息;
S5,隐私数据流转的确认:数据流转模式下,DO提交数据流转的交易凭证,确认数据流转完成;数据监管模式下,SC提交数据流转的交易凭证,确认数据流转完成。
以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明实施例技术方案的范围。

Claims (9)

  1. 一种基于智能合约的云边协同多模式隐私数据流转方法,其特征在于包括如下步骤:
    S1,系统初始化,包括如下步骤:
    S11,通过构建密钥-策略管理云服务KaaS,完成密钥算法初始化,得到系统公钥PSK和系统主密钥MSK;
    S12,为每个用户构建用户账户,包括用户账号ID,相应的公钥ID pub-key和私钥ID pri-key;所述用户账户包括数据拥有者DO和数据使用者DU;
    S2,DO将原始数据加密成隐私数据,产生存储的加密凭证z’,z’中包含元数据metadata和数据凭证key’,包括如下步骤:
    S21,DO向KaaS申请获得PSK;
    S22,DO由PSK、加密密钥key得到数据凭证key’,即key’=enc_cpabe(key,PSK,policy),而z’=[metadata,key’],包括如下步骤:
    S221,DO基于原始数据,生成元数据metadata,产生随机数作为原始数据的加密密钥key,DO的原始数据通过加密密钥key加密形成隐私数据并存储于;
    S222,DO基于用户账号ID生成访问策略policy,基于密钥算法生成key’=enc_cpabe(key,PSK,policy),而z’=[metadata,key’];密钥算法由DO执行,算法输入系统公钥PSK、待加密消息key和与访问策略相关联的访问策略policy,生成基于属性加密的数据凭证key’,只有拥有满足访问策略的请求者才能解密数据凭证key’;
    S3,DO调用智能合约程序实现加密凭证z’上链,DO将z’通过智能合约发布到区块链上,智能合约对所有用户账户开放;
    S4,实现快速数据流转:DO在发布时,已经明确DU,通过访问策略policy设定DU的用户账号ID DU,DU通过执行智能合约和密钥算法,得到数据访问的加密密钥key,通过元数据,获取隐私数据并解密获取明文,包括如下步骤:
    S411,DU的账户执行智能合约,获得z’;
    S412,通过智能合约向KaaS发起请求,申请获得USK;
    S413,KaaS执行密钥算法,输入系统公钥PSK、主密钥MSK和DU账号ID DU,生成用户密钥USK,并通过DU的公钥DU pub-key加密USK,即USK’=enc(USK,DU pub-key),并将USK’通过智能合约发布到区块链上,该智能合约仅对DU可访问;
    S414,DU执行智能合约,获取USK’,并通过其私钥DU pri-key解密获取USK;
    S415,DU通过USK进行解密z’中的数据凭证key’,获得key=dec_cpabe(key’,PSK,USK);
    S416,DU通过z’中的元数据获取隐私数据,并通过key解密,得到原始数据,数据流转完 成;
    S5,数据流转的确认:DO提交数据流转的交易凭证,确认数据流转完成。
  2. 根据权利要求1所述的一种基于智能合约的云边协同多模式隐私数据流转方法,其特征在于所述S11中,密钥算法输入安全系数γ和属性空间U,执行得到算法系统公钥PSK和系统主密钥MSK:
    Setup(γ,policy)→(PSK,MSK)
    其中U中的元素构成访问策略policy。
  3. 根据权利要求1所述的一种基于智能合约的云边协同多模式隐私数据流转方法,其特征在于所述S2中,DO将原始数据加密成隐私数据保存在云侧,产生云存储的加密凭证z’;所述S4中,DU通过元数据,从云侧获取隐私数据并解密获取明文。
  4. 根据权利要求1所述的一种基于智能合约的云边协同多模式隐私数据流转方法,其特征在于所述S414中,对获取的USK进行保存;所述S412中,DU账号检查是否保存有密钥算法的用户密钥USK,如果不存在,则通过智能合约向KaaS发起请求,申请获得USK;如果存在,则跳到S415。
  5. 根据权利要求1所述的一种基于智能合约的云边协同多模式隐私数据流转方法,其特征在于所述S12中,还构建监管账户SC,包括监管账号ID SC,SC的公钥SC pub-key和私钥SC pri-key
  6. 根据权利要求5所述的一种基于智能合约的云边协同多模式隐私数据流转方法,其特征在于所述policy=ID DU∪ID SC
  7. 根据权利要求5所述的一种基于智能合约的云边协同多模式隐私数据流转方法,其特征在于所述S4实现的是广播数据流转:DO在发布数据凭证时,并不确定DU,DU检索区块链并浏览元数据,通过智能合约公布读文件请求,DO执行智能合约后,如果权限审查通过,则完成数据流转,包括如下步骤:
    S421,DU调用智能合约,检索区块链并浏览元数据;
    S422,DU通过智能合约向DO发送访问请求;
    S423,DO通过智能合约,将其带有时间属性的策略policy=((t≥t start∩t≤t end∩ID DU)∪ID SC)提交区块链,t、t start和t end分别表示当前合约执行时间,流转周期开始时间、结束时间,ID DU表示DU账号,ID SC账号表示SC账号,智能合约访问权限仅对SC开放;
    S424,SC执行智能合约,从区块链上获取policy,并验证其的合法性,如果合法性不通过,则告知DU并流程结束;
    S425,DO执行密钥算法,输入系统公钥PSK、文件加密密钥key和访问策略policy,生成数 据凭证key’=enc_cpabe(key,PSK,plicy),并对所有账户开放;
    S426,KaaS执行密钥算法,输入系统公钥PSK、主密钥MSK和访问策略policy,生成用户密钥USK;并通过DU的公钥DU pub-key加密USK,即USK’=enc(USK,DU pub-key),并将USK’通过智能合约发布到区块链上,该智能合约仅DU可访问;
    S427,DU执行智能合约,获取USK’,并通过其私钥DU pri-key解密获取USK;
    S428,DU执行密钥算法,输入系统公钥PSK、用户密钥USK和数据凭证key’,只要在有效时间限定内DU的账号满足访问策略policy中使能的特性,则解密获取加密密钥key,DU通过z’中的元数据获取隐私数据,并通过key解密,获取原始数据,数据流转完成。
  8. 根据权利要求7所述的一种基于智能合约的云边协同多模式隐私数据流转方法,其特征在于所述policy=ID SC
  9. 根据权利要求6-8之一所述的一种基于智能合约的云边协同多模式隐私数据流转方法,其特征在于所述S4实现数据监管:由于所有的数据流转的过程,policy都对SC账号使能,SC基于区块链的元数据,对交易时间、隐私数据共享发起方、隐私数据接收方、元数据对应的隐私数据进行解密、验证,包括如下步骤:
    S431,SC保存有系统公钥PSK、系统主密钥MSK,通过检索区块链获取z’=[metadata,key’];
    S432,基于SC的账号对应的USK,解密获得key=dec_cpabe(key’,PSK,USK);
    S433,SC基于key和元数据获得的隐私数据,进行解密,获得原始数据。
PCT/CN2022/091909 2021-08-03 2022-05-10 一种基于智能合约的云边协同多模式隐私数据流转方法 WO2023010932A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/885,556 US11777745B2 (en) 2021-08-03 2022-08-11 Cloud-side collaborative multi-mode private data circulation method based on smart contract

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110886663.8A CN113326541B (zh) 2021-08-03 2021-08-03 一种基于智能合约的云边协同多模式隐私数据流转方法
CN202110886663.8 2021-08-03

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/885,556 Continuation US11777745B2 (en) 2021-08-03 2022-08-11 Cloud-side collaborative multi-mode private data circulation method based on smart contract

Publications (1)

Publication Number Publication Date
WO2023010932A1 true WO2023010932A1 (zh) 2023-02-09

Family

ID=77426947

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/091909 WO2023010932A1 (zh) 2021-08-03 2022-05-10 一种基于智能合约的云边协同多模式隐私数据流转方法

Country Status (2)

Country Link
CN (1) CN113326541B (zh)
WO (1) WO2023010932A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116938985A (zh) * 2023-09-18 2023-10-24 哈尔滨工程大学三亚南海创新发展基地 基于数字凭证的数据流转方法、装置、终端设备及介质
CN117270936A (zh) * 2023-10-10 2023-12-22 武汉碧涯科技有限公司 一种云平台运维方法及系统
CN117349884A (zh) * 2023-10-10 2024-01-05 耀维(深圳)科技有限公司 智能机器人应用管理系统
CN117439818A (zh) * 2023-12-20 2024-01-23 北京北科融智云计算科技有限公司 一种基于隐私计算的数据传输方法及系统

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113326541B (zh) * 2021-08-03 2021-11-16 之江实验室 一种基于智能合约的云边协同多模式隐私数据流转方法
CN114372281A (zh) * 2021-12-24 2022-04-19 浙江吉利控股集团有限公司 智能合约访问方法、装置、设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110933187A (zh) * 2019-12-25 2020-03-27 成都康胜思科技有限公司 基于区块链共识加密机制的物联网数据传输系统
CN111914269A (zh) * 2020-07-07 2020-11-10 华中科技大学 一种区块链和云存储环境下的数据安全共享方法和系统
CN111935080A (zh) * 2020-06-24 2020-11-13 布比(北京)网络技术有限公司 区块链的数据共享方法、装置、计算机设备和存储介质
CN112751673A (zh) * 2021-04-02 2021-05-04 之江实验室 一种基于端边云协同的可监管数据隐私共享方法
CN113326541A (zh) * 2021-08-03 2021-08-31 之江实验室 一种基于智能合约的云边协同多模式隐私数据流转方法

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108305665A (zh) * 2018-02-05 2018-07-20 上海旺云信息技术有限公司 一种基于区块链技术的处方信息存证系统及方法
CN108683669B (zh) * 2018-05-19 2021-09-17 深圳市图灵奇点智能科技有限公司 数据验证方法和安全多方计算系统
CN109831298B (zh) * 2019-01-31 2020-05-15 阿里巴巴集团控股有限公司 区块链中安全更新密钥的方法及节点、存储介质
JP2022522788A (ja) * 2019-03-01 2022-04-20 ゼットイーユー・テクノロジーズ・インコーポレイテッド ブロックチェーンベースのセキュアな電子メールシステム
CN112069903B (zh) * 2020-08-07 2023-12-22 之江实验室 基于深度强化学习实现人脸识别端边卸载计算方法及装置
CN112417512B (zh) * 2020-10-14 2024-03-26 安徽中科晶格技术有限公司 一种基于区块链的跨境贸易隐私数据管理系统及方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110933187A (zh) * 2019-12-25 2020-03-27 成都康胜思科技有限公司 基于区块链共识加密机制的物联网数据传输系统
CN111935080A (zh) * 2020-06-24 2020-11-13 布比(北京)网络技术有限公司 区块链的数据共享方法、装置、计算机设备和存储介质
CN111914269A (zh) * 2020-07-07 2020-11-10 华中科技大学 一种区块链和云存储环境下的数据安全共享方法和系统
CN112751673A (zh) * 2021-04-02 2021-05-04 之江实验室 一种基于端边云协同的可监管数据隐私共享方法
CN113326541A (zh) * 2021-08-03 2021-08-31 之江实验室 一种基于智能合约的云边协同多模式隐私数据流转方法

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116938985A (zh) * 2023-09-18 2023-10-24 哈尔滨工程大学三亚南海创新发展基地 基于数字凭证的数据流转方法、装置、终端设备及介质
CN116938985B (zh) * 2023-09-18 2023-12-19 哈尔滨工程大学三亚南海创新发展基地 基于数字凭证的数据流转方法、装置、终端设备及介质
CN117270936A (zh) * 2023-10-10 2023-12-22 武汉碧涯科技有限公司 一种云平台运维方法及系统
CN117349884A (zh) * 2023-10-10 2024-01-05 耀维(深圳)科技有限公司 智能机器人应用管理系统
CN117270936B (zh) * 2023-10-10 2024-03-19 武汉碧涯科技有限公司 一种云平台运维方法及系统
CN117349884B (zh) * 2023-10-10 2024-06-07 耀维(深圳)科技有限公司 智能机器人应用管理系统
CN117439818A (zh) * 2023-12-20 2024-01-23 北京北科融智云计算科技有限公司 一种基于隐私计算的数据传输方法及系统
CN117439818B (zh) * 2023-12-20 2024-02-20 北京北科融智云计算科技有限公司 一种基于隐私计算的数据传输方法及系统

Also Published As

Publication number Publication date
CN113326541B (zh) 2021-11-16
CN113326541A (zh) 2021-08-31

Similar Documents

Publication Publication Date Title
WO2023010932A1 (zh) 一种基于智能合约的云边协同多模式隐私数据流转方法
CN112989415B (zh) 一种基于区块链的隐私数据存储与访问控制方法及系统
WO2022042301A1 (zh) 一种数据处理方法、装置、智能设备及存储介质
CN108418680B (zh) 一种基于安全多方计算技术的区块链密钥恢复方法、介质
CN109829326B (zh) 基于区块链的跨域认证与公平审计去重云存储系统
WO2019080933A1 (zh) 一种区块链交易隐私保护方法及系统
US20190295069A1 (en) Systems and methods for integrating cryptocurrency wallet identifiers with digital certificates
CN111046352A (zh) 一种基于区块链的身份信息安全授权系统与方法
US20130061035A1 (en) Method and system for sharing encrypted content
JP2012518329A (ja) 信頼済みクラウドコンピューティングおよびサービスに関するフレームワーク
JP2002514799A (ja) 認証された文書の電子的送信、格納および検索システムおよび方法
US11258601B1 (en) Systems and methods for distributed digital rights management with decentralized key management
CN115296838B (zh) 基于区块链的数据共享方法、系统及存储介质
CN112966022B (zh) 一种数据交易平台的信息查询方法、装置及系统
CN115203749B (zh) 一种基于区块链的数据交易方法和系统
CN112149077B (zh) 基于区块链技术的供应链票据方法、系统和计算机设备
Zhang et al. A data trading scheme with efficient data usage control for industrial IoT
CN113486122A (zh) 数据共享方法和电子设备
TW201902179A (zh) 具隱密性的kyc資料共享系統及其方法
CN113328854B (zh) 基于区块链的业务处理方法及系统
TWM596924U (zh) 身份管理與授權裝置
US11777745B2 (en) Cloud-side collaborative multi-mode private data circulation method based on smart contract
CN110839067A (zh) 信息提供方法及装置
CN103916237A (zh) 对用户加密密钥恢复进行管理的方法和系统
CN111585756B (zh) 一种适用于多副本-多云情形下的无证书云审计方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22851651

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE