Movatterモバイル変換


[0]ホーム

URL:


CN112671543B - A publicly verifiable outsourced attribute-based encryption method based on blockchain - Google Patents

A publicly verifiable outsourced attribute-based encryption method based on blockchain
Download PDF

Info

Publication number
CN112671543B
CN112671543BCN202011568809.6ACN202011568809ACN112671543BCN 112671543 BCN112671543 BCN 112671543BCN 202011568809 ACN202011568809 ACN 202011568809ACN 112671543 BCN112671543 BCN 112671543B
Authority
CN
China
Prior art keywords
user
key
ciphertext
trusted authority
attribute
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202011568809.6A
Other languages
Chinese (zh)
Other versions
CN112671543A (en
Inventor
胡积飞
谢满德
雷希燕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Gongshang University
Original Assignee
Zhejiang Gongshang University
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 Zhejiang Gongshang UniversityfiledCriticalZhejiang Gongshang University
Priority to CN202011568809.6ApriorityCriticalpatent/CN112671543B/en
Publication of CN112671543ApublicationCriticalpatent/CN112671543A/en
Application grantedgrantedCritical
Publication of CN112671543BpublicationCriticalpatent/CN112671543B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Landscapes

Abstract

The invention provides a block chain-based publicly verifiable outsourcing attribute-based encryption method, which not only tracks a secret key of a malicious user, but also cancels the malicious user, meanwhile, can update a ciphertext in time, can publicly verify outsourcing decryption, and provides forward security of a mechanism. The invention comprises the following steps: A. initializing a system; B. encrypting; C. generating a secret key; D. decrypting; E. outsourcing key generation; F. outsourcing conversion; G. outsourcing decryption; H. and tracing the identity of the user.

Description

Translated fromChinese
一种基于区块链的公开可验证外包属性基加密方法A publicly verifiable outsourced attribute-based encryption method based on blockchain

技术领域technical field

本发明涉及一种基于区块链的公开可验证外包属性基加密方法。The invention relates to a publicly verifiable outsourcing attribute base encryption method based on block chain.

背景技术Background technique

在过去的几十年中,随着物联网(IoT)的不断发展,传统物联网系统可能会面临着效率和系统安全性的挑战。首先,由于物联网设备与传统云服务器之间的传输的数据量很大,因此云服务器将遭受传输延迟和服务质量下降的困扰。其次,敏感数据在上传到云服务器之前必须对其进行加密,并且共享敏感数据时必须支持细粒度访问控制。最后,恶意云服务器可能会篡改敏感数据,从而使物联网设备无法正确地访问数据。As the Internet of Things (IoT) continues to evolve over the past few decades, traditional IoT systems may face challenges in efficiency and system security. First, due to the large amount of data transmitted between IoT devices and traditional cloud servers, cloud servers will suffer from transmission delays and service quality degradation. Second, sensitive data must be encrypted before being uploaded to the cloud server, and fine-grained access control must be supported when sharing sensitive data. Finally, a malicious cloud server may tamper with sensitive data so that IoT devices cannot properly access the data.

针对第一个问题,雾计算是一种可以较好地解决问题的合适技术。雾计算位于IoT设备和传统的集中式云基础架构之间,并且雾节点比云服务器更加接近IoT设备。因此,使用雾计算的IoT系统可确保在启用的实时网络应用程序和设备具有更少的延迟和足够的计算资源。For the first problem, fog computing is a suitable technology that can solve the problem well. Fog computing sits between IoT devices and traditional centralized cloud infrastructure, and fog nodes are closer to IoT devices than cloud servers. Therefore, IoT systems using fog computing ensure less latency and sufficient computing resources when enabling real-time network applications and devices.

此外,基于密文策略属性的加密(CP-ABE)作为一种有前途的加密原语可以有效地解决第二个问题,它通常用于在云中实现数据细粒度的密码访问控制。然而,由于物联网设备的存储和计算能力有限,因此具有外包解密功能的CP-ABE更加适用于物联网场景。大多数现有的具有外包解密的CP-ABE方案在验证解密结果时,只允许原始解密者检查第三方代理机构是否返回了正确的转换密文。在这种情况下,一旦对解密结果产生了争议,则必须向仲裁者泄露解密密钥。因此,具有外包解密功能的CP-ABE必须实现解密结果的公开可验证性。同样的,传统的CP-ABE仍然存在一个问题,即恶意的用户可能会将自己的解密密钥泄露给他人,并且该恶意用户不承担被追踪和撤销的风险。Furthermore, ciphertext-policy-attribute-based encryption (CP-ABE), as a promising cryptographic primitive, can effectively address the second problem, which is often used to implement fine-grained cryptographic access control of data in the cloud. However, due to the limited storage and computing power of IoT devices, CP-ABE with outsourced decryption is more suitable for IoT scenarios. Most existing CP-ABE schemes with outsourced decryption only allow the original decryptor to check whether the correct converted ciphertext is returned by the third-party agency when verifying the decryption result. In this case, once the decryption result is disputed, the decryption key must be disclosed to the arbitrator. Therefore, a CP-ABE with outsourced decryption must achieve public verifiability of decryption results. Similarly, the traditional CP-ABE still has a problem that a malicious user may leak his decryption key to others, and the malicious user does not bear the risk of being tracked and revoked.

综上所述,因此必须设计一个支持对恶意用户的追踪和撤销以及可公开验证外包解密的CP-ABE方案。To sum up, it is necessary to design a CP-ABE scheme that supports the tracking and revocation of malicious users as well as publicly verifiable outsourced decryption.

发明内容SUMMARY OF THE INVENTION

本发明的目的在于克服现有技术中存在的上述不足,而提供一种设计合理的基于区块链的公开可验证外包属性基加密方法,不仅追踪恶意用户的秘密密钥,而且还撤销恶意用户,同时,还可以及时更新密文,可公开验证外包解密,提供了机制的前向安全性。The purpose of the present invention is to overcome the above-mentioned deficiencies in the prior art, and to provide a publicly verifiable outsourced attribute-based encryption method based on blockchain with reasonable design, which not only tracks the secret key of malicious users, but also revokes malicious users. , at the same time, the ciphertext can be updated in time, and the outsourced decryption can be publicly verified, which provides the forward security of the mechanism.

本发明解决上述问题所采用的技术方案是:The technical scheme adopted by the present invention to solve the above problems is:

一种基于区块链的公开可验证外包属性基加密方法,其特征在于:包括如下步骤:A publicly verifiable outsourcing attribute base encryption method based on blockchain, characterized in that it comprises the following steps:

A、系统初始化:可信机构根据安全参数和全体属性集合生成全局公共密钥和主密钥,并公布全局公共密钥和不公布主密钥;A. System initialization: The trusted authority generates the global public key and the master key according to the security parameters and the overall attribute set, and publishes the global public key and does not publish the master key;

B、加密:数据拥有者根据全局公共密钥、访问结构以及覆盖列表,对消息进行加密并且产生密文;B. Encryption: The data owner encrypts the message and generates ciphertext according to the global public key, access structure and coverage list;

C、密钥生成:可信机构根据全局公共密钥、用户的身份信息以及用户属性集,生成解密密钥,并将解密密钥发送给数据用户;C. Key generation: The trusted authority generates a decryption key according to the global public key, the user's identity information and the user attribute set, and sends the decryption key to the data user;

D、解密:用户利用解密密钥将密文解密成消息;D. Decryption: The user uses the decryption key to decrypt the ciphertext into a message;

E、外包密钥生成:用户根据解密密钥将其转化为转换密钥以及检索密钥,并将转换密钥发送给雾节点并且自己保存检索密钥;E. Outsourced key generation: The user converts the decryption key into a conversion key and a retrieval key according to the decryption key, sends the conversion key to the fog node and saves the retrieval key by himself;

F、外包转换:雾节点根据全局公共密钥、密文以及转换密钥,将密文外包转换为转换密文,然后雾节点将转换密文发送给数据用户;F. Outsourced conversion: The fog node outsources the ciphertext to the converted ciphertext according to the global public key, the ciphertext and the conversion key, and then the fog node sends the converted ciphertext to the data user;

G、外包解密:用户根据检索密钥、密文以及转换密文,生成消息;G. Outsourced decryption: The user generates a message according to the retrieval key, the ciphertext and the converted ciphertext;

H、追溯用户身份:可信机构根据全局公共密钥、最小覆盖列表以及解密密钥,输出用户身份信息或者输出错误信息;H. Trace user identity: the trusted authority outputs user identity information or outputs error information according to the global public key, the minimum coverage list and the decryption key;

I、密文更新:可信机构根据全局公共密钥、密文以及最小覆盖列表,生成更新密文;可信机构将更新密文发送给雾节点。I. Ciphertext update: The trusted authority generates the updated ciphertext according to the global public key, the ciphertext and the minimum coverage list; the trusted authority sends the updated ciphertext to the fog nodes.

本发明步骤A具体包括如下步骤:Step A of the present invention specifically includes the following steps:

A1、首先可信机构接收一个全体属性集合U,并根据一个隐式的安全参数λ,选取阶为素数p、生成元为g的两个乘法循环群

Figure BDA0002861864080000021
Figure BDA0002861864080000022
和一个双线性映射
Figure BDA0002861864080000023
然后,可信机构初始化一个空的用户撤销列表L以及一个满二叉树
Figure BDA0002861864080000024
初始化完毕后,可信机构将用户的身份分配给满二叉树
Figure BDA0002861864080000025
的叶子节点上,该二叉树
Figure BDA0002861864080000026
按照广度优先搜索方法对每一个节点进行编号,其中根节点的编号为0,并且用d来表示二叉树
Figure BDA0002861864080000027
的深度,从而可知用户的最大数量为|Num|=2d,二叉树的节点数量为2|Num|-2,因此二叉树的最后一个叶子节点的编号为2|Num|-2;A1. First, the trusted authority receives a set of all attributes U, and according to an implicit security parameter λ, selects two multiplicative cyclic groups whose order is prime p and whose generator is g
Figure BDA0002861864080000021
and
Figure BDA0002861864080000022
and a bilinear map
Figure BDA0002861864080000023
Then, the trusted authority initializes an empty user revocation list L and a full binary tree
Figure BDA0002861864080000024
After initialization, the trusted authority assigns the user's identity to the full binary tree
Figure BDA0002861864080000025
on the leaf nodes of the binary tree
Figure BDA0002861864080000026
Each node is numbered according to the breadth-first search method, where the number of the root node is 0, and d is used to represent the binary tree
Figure BDA0002861864080000027
Therefore, the maximum number of users is |Num|=2d , and the number of nodes of the binary tree is 2|Num|-2, so the number of the last leaf node of the binary tree is 2|Num|-2;

A2、可信机构选择两个随机数α,

Figure BDA0002861864080000028
其中
Figure BDA0002861864080000029
是p阶整数环;随后,可信机构同样也选择五个随机数g,u,v,d,
Figure BDA00028618640800000210
A2. The trusted organization selects two random numbers α,
Figure BDA0002861864080000028
in
Figure BDA0002861864080000029
is a p-order integer ring; then, the trusted authority also selects five random numbers g, u, v, d,
Figure BDA00028618640800000210

A3、对于每个属性值i∈U,可信机构都选取随机数

Figure BDA00028618640800000211
其中
Figure BDA00028618640800000212
是p阶正整数环,并且计算与属性值相关联的属性公钥组件
Figure BDA0002861864080000031
A3. For each attribute value i∈U, the trusted authority selects a random number
Figure BDA00028618640800000211
in
Figure BDA00028618640800000212
is a ring of positive integers of order p and computes the attribute public key component associated with the attribute value
Figure BDA0002861864080000031

A4、可信机构随机选取一个抗碰撞哈希函数

Figure BDA0002861864080000032
该哈希函数能够将消息m或者随机消息m′映射成一个在
Figure BDA0002861864080000033
内的元素;A4. The trusted agency randomly selects an anti-collision hash function
Figure BDA0002861864080000032
The hash function can map a message m or a random message m' into a
Figure BDA0002861864080000033
elements within;

A5、对于二叉树

Figure BDA0002861864080000034
中的每一个节点,可信机构都随机选取一个随机数
Figure BDA0002861864080000035
然后生成主密钥组件
Figure BDA0002861864080000036
也同时生成与用户身份相关联的二叉树公钥组件
Figure BDA0002861864080000037
A5. For binary tree
Figure BDA0002861864080000034
For each node in , the trusted authority randomly selects a random number
Figure BDA0002861864080000035
Then generate the master key component
Figure BDA0002861864080000036
Also generate the public key component of the binary tree associated with the user identity
Figure BDA0002861864080000037

A6、可信机构选择一个概率加密方案(Enc,Dec),其中Enc是加密函数,Dec是解密函数;A6. The trusted agency selects a probabilistic encryption scheme (Enc, Dec), where Enc is the encryption function and Dec is the decryption function;

A7、可信机构公布公共密钥PK,以及不公布主密钥MSK。A7. The trusted authority publishes the public key PK, and does not publish the master key MSK.

本发明步骤B具体包括如下步骤:Step B of the present invention specifically includes the following steps:

B1、数据拥有者选择一个访问结构

Figure BDA00028618640800000316
其中M是一个l×n阶的访问矩阵,ρ是一个能够将Mi映射成一个属性的映射算法,其中Mi为访问矩阵M的第i行;然后,数据拥有者选择两个随机的秘密指数s,
Figure BDA0002861864080000038
并且设置两个随机列向量v=(s,v2,...,vn)和v′=(s′,v′2,...,v′n),其中
Figure BDA0002861864080000039
最后,对于每个Mi,数据拥有者都计算与秘密指数s和s′相关的有效份额λi=Mi×v和λ′i=Mi×v′;B1. The data owner chooses an access structure
Figure BDA00028618640800000316
where M is an access matrix of order l×n, ρ is a mapping algorithm capable of mapping Mi to an attribute, whereMi is theith row of access matrix M; then, the data owner chooses two random secrets index s,
Figure BDA0002861864080000038
and settwo random column vectors v=(s, v2,...,vn ) and v'=(s',v'2 ,...,v'n ), where
Figure BDA0002861864080000039
Finally, for each Mi , the data owner computes the effective shares λi =Mi ×v and λ′i =Mi ×v′ associated with the secret indices s and s′;

B2、数据拥有者选择要加密的信息m和随机选择的信息m′,并且计算与访问结构

Figure BDA00028618640800000310
相关联的密文组件
Figure BDA00028618640800000311
C1=m·e(g,g)αs,C′1=gs,C″1=gas
Figure BDA00028618640800000312
C2=m′·e(g,g)αs′,C′2=gs′,和C″2=gas′
Figure BDA00028618640800000313
B2. The data owner selects the information m to be encrypted and the randomly selected information m', and calculates and accesses the structure
Figure BDA00028618640800000310
associated ciphertext component
Figure BDA00028618640800000311
C1 =m·e(g, g)αs , C′1 = gs , C″1 = gas ,
Figure BDA00028618640800000312
C2 =m′·e(g,g)αs′ , C′2 =gs′ , and C″2 =gas′ ,
Figure BDA00028618640800000313

B3、数据拥有者一旦接收到由可信机构发送的最新覆盖列表cover(L),数据拥有者就会生成与该覆盖列表cover(L)相关联的密文组件

Figure BDA00028618640800000314
B3. Once the data owner receives the latest cover list cover(L) sent by the trusted authority, the data owner will generate a ciphertext component associated with the cover list cover(L)
Figure BDA00028618640800000314

B4、最后,生成的密文CT为:B4. Finally, the generated ciphertext CT is:

Figure BDA00028618640800000315
Figure BDA00028618640800000315

B5、一旦雾节点接收到数据拥有者的密文时,雾节点将会调用一个智能合约,生成此智能合约后,雾节点将该交易广播到其他雾节点以进行共识验证。B5. Once the fog node receives the ciphertext of the data owner, the fog node will call a smart contract. After the smart contract is generated, the fog node broadcasts the transaction to other fog nodes for consensus verification.

本发明步骤C具体包括如下步骤:Step C of the present invention specifically includes the following steps:

C1、可信机构随机选择一个随机数

Figure BDA0002861864080000041
并且用对称密钥为k的概率加密方案生成一个随机数f=Enck(lx),其中lx是与用户身份相关联的叶子节点;C1. The trusted institution randomly selects a random number
Figure BDA0002861864080000041
And generate a random number f=Enck (lx ) using a probabilistic encryption scheme with a symmetric key k, where lx is a leaf node associated with the user identity;

C2、可信机构首先生成与用户属性集S相关联的密钥组件:K1=f,

Figure BDA0002861864080000042
K3=gb以及K4=gab
Figure BDA0002861864080000043
C2. The trusted authority first generates a key component associated with the user attribute set S: K1 =f,
Figure BDA0002861864080000042
K3 =gb and K4 =gab ,
Figure BDA0002861864080000043

C3、可信机构选择一个随机数

Figure BDA0002861864080000044
并生成与用户身份uid相关联的密钥元素
Figure BDA0002861864080000045
以及
Figure BDA0002861864080000046
其中x∈path(uid)∩cover(L),并且path(uid)是二叉树从根节点到相关联用户uid的叶子节点之间的路径编号,然后可信机构生成与用户身份uid相关联的密钥组件:
Figure BDA0002861864080000047
K6=gw
Figure BDA0002861864080000048
C3. The trusted agency selects a random number
Figure BDA0002861864080000044
and generate the key element associated with the user identity uid
Figure BDA0002861864080000045
as well as
Figure BDA0002861864080000046
where x ∈ path(uid)∩cover(L), and path(uid) is the path number of the binary tree from the root node to the leaf node of the associated user uid, and then the trusted authority generates the password associated with the user identity uid key component:
Figure BDA0002861864080000047
K6 =gw ,
Figure BDA0002861864080000048

C4、可信机构生成密钥SK,并发送给数据用户,其中:C4. The trusted authority generates the key SK and sends it to the data user, where:

SK={K1,K2,K3,K4,Ki,K5,K6,K7,K8}。SK={K1 , K2 , K3 , K4 , Ki , K5 , K6 , K7 , K8 }.

本发明步骤D具体包括如下步骤:Step D of the present invention specifically includes the following steps:

D1、找到两个常数ci和c′i,能够使得两个等式

Figure BDA0002861864080000049
成立,其中属性映射集合I={i|ρ(i)∈S};D1. Find two constants ci and c′i , which can make the two equations
Figure BDA0002861864080000049
is established, where the attribute mapping set I={i|ρ(i)∈S};

D2、数据用户首先计算两个解密组件:D2. The data user first calculates two decryption components:

Figure BDA00028618640800000410
Figure BDA00028618640800000410

Figure BDA00028618640800000411
Figure BDA00028618640800000411

D3、数据用户接着计算两个明文组件m=C1/Y′1和m′=C2/Y′2,并且判断密文组件

Figure BDA00028618640800000412
与密文验证参数组件uH(m)vH(m′)d是否相等,若相等则返回消息m,若不相等则中断操作。D3. The data user then calculates two plaintext components m=C1 /Y′1 and m′=C2 /Y′2 , and determines the ciphertext components
Figure BDA00028618640800000412
Verifies whether the parameter component uH(m) vH(m') d is equal to the ciphertext, and returns the message m if it is equal, and interrupts the operation if it is not equal.

本发明步骤E具体包括如下步骤:Step E of the present invention specifically includes the following steps:

E1、用户选择一个随机数z,生成转换密钥组件K′1=K1

Figure BDA00028618640800000413
以及
Figure BDA00028618640800000414
K′7=K7,K′8=K8;E1. The user selects a random number z, and generates a conversion key component K′1 =K1 ,
Figure BDA00028618640800000413
as well as
Figure BDA00028618640800000414
K'7 =K7 , K'8 =K8 ;

E2、用户将生成的转换密钥TK发送给雾节点,并且用户自己保存检索密钥RK,其中:E2. The user sends the generated conversion key TK to the fog node, and the user saves the retrieval key RK, where:

TK={K′1,K′2,K′3,K′4,K′i,K′5,K′6,K′7,K′8},RK={z}。TK={K'1 , K'2 , K'3 , K'4 , K'i , K'5 , K'6 , K'7 , K'8 }, RK={z}.

本发明步骤F中,雾节点计算两个转换密文组件为:In step F of the present invention, the fog node calculates two converted ciphertext components as:

Figure BDA0002861864080000051
Figure BDA0002861864080000051

Figure BDA0002861864080000052
Figure BDA0002861864080000052

本发明步骤G具体包括如下步骤:Step G of the present invention specifically includes the following steps:

G1、用户首先验证下收到的信息,如果

Figure BDA0002861864080000053
或W1≠C1或W2≠C2,则操作中断,反之验证通过;G1. The user first verifies the received information, if
Figure BDA0002861864080000053
Or W1 ≠C1 or W2 ≠C2 , the operation is interrupted, otherwise the verification is passed;

G2、若验证通过,用户计算两个明文消息:G2. If the verification is passed, the user calculates two plaintext messages:

Figure BDA0002861864080000054
Figure BDA0002861864080000054

G3、用户计算两个验证明文组件V1=uH(m),V2=vH(m′),并且将V1和V2发送到雾节点,然后雾节点调用智能合约,智能合约验证

Figure BDA0002861864080000055
与明文验证参数组件V1V2d是否相等。G3. The user calculates two verification plaintext components V1 =uH(m) and V2 =vH(m') , and sends V1 and V2 to the fog node, and then the fog node calls the smart contract, and the smart contract verifies
Figure BDA0002861864080000055
Verifies whether the parameter components V1 V2 d are equal to the plaintext.

本发明步骤H具体包括如下步骤:Step H of the present invention specifically comprises the following steps:

H1、首先,可信机构先判断一下输入的公共密钥SK的格式是否正确,若错误则操作中断;H1. First of all, the trusted agency first judges whether the format of the input public key SK is correct, if it is wrong, the operation is interrupted;

H2、若公共密钥SK格式正确,则可信机构搜索lx是否在最小覆盖列表cover(L)中,若存在,则返回用户身份uid,反之,返回虚假的用户身份uid*;H2. If the format of the public key SK is correct, the trusted authority searches whether lx is in the minimum coverage list cover(L). If it exists, the user identity uid is returned, otherwise, the false user identity uid* is returned;

H3、可信机构更新最新的撤销列表L′=L∪{uid}。H3. The trusted authority updates the latest revocation list L'=L∪{uid}.

本发明步骤工具体包括如下步骤:The step tool body of the present invention comprises the following steps:

I1、可信机构选择一个随机数

Figure BDA0002861864080000056
并计算更新后的与用户身份相关联的二叉树公钥组件
Figure BDA0002861864080000057
I1. The trusted authority selects a random number
Figure BDA0002861864080000056
and compute the updated public key component of the binary tree associated with the user identity
Figure BDA0002861864080000057

I2、可信机构计算更新后的密文组件:I2. The trusted authority calculates the updated ciphertext component:

Figure BDA0002861864080000058
并计算更新后的与覆盖列表cover(L)相关联的两个密文组件
Figure BDA0002861864080000059
以及
Figure BDA00028618640800000510
然后生成更新后的密文:
Figure BDA0002861864080000058
and compute the updated two ciphertext components associated with the cover list cover(L)
Figure BDA0002861864080000059
as well as
Figure BDA00028618640800000510
Then generate the updated ciphertext:

Figure BDA00028618640800000511
Figure BDA00028618640800000511

I3、随后,可信机构将更新后的密文以及撤销列表L′发送给雾节点,雾节点重新调用智能合约以存储最新的密文哈希。I3. Subsequently, the trusted authority sends the updated ciphertext and the revocation list L' to the fog node, and the fog node recalls the smart contract to store the latest ciphertext hash.

本发明与现有技术相比,具有以下优点和效果:1、本发明将外包解密跟区块链相结合,在保证了雾节点得不到关于明文任何消息的情况前提下,实现了外包解密结果的公开可验证性,同时可有效地防止云服务器对密文的篡改以及用户恶意诬陷外包解密雾节点提供错误的解密服务;2、实现了对恶意用户的追踪,对恶意用户的撤销,及时更新密文的功能,将用户的身份信息分配给二叉树中的叶子结点,一旦追踪到恶意用户,就将恶意用户添加到撤销列表中,从而实现了对恶意用户的追踪和撤销;3、通过区块链技术将外包解密信息公开,实现了对外包解密属性基加密的公开可验证性;4、基于“物联网设备-雾节点-云服务器”的三层系统架构,解决了传统集中式云服务器架构的延迟问题;5、可以为用户提供更高的隐私保护需求,效率较高,便于带宽、资源受限的移动设备的使用。Compared with the prior art, the present invention has the following advantages and effects: 1. The present invention combines outsourced decryption with block chain, and realizes outsourced decryption under the premise that fog nodes cannot obtain any information about the plaintext. The public verifiability of the results can effectively prevent the cloud server from tampering with the ciphertext and users maliciously slandering outsourced decryption fog nodes to provide wrong decryption services; 2. It realizes the tracking of malicious users and the revocation of malicious users in a timely manner. The function of updating the ciphertext, assigning the user's identity information to the leaf nodes in the binary tree, once the malicious user is traced, the malicious user will be added to the revocation list, thus realizing the tracking and revocation of the malicious user; 3. Through Blockchain technology discloses outsourced decryption information and realizes the public verifiability of outsourced decryption attribute-based encryption; 4. Based on the three-tier system architecture of "Internet of Things device-fog node-cloud server", it solves the problem of traditional centralized cloud The delay problem of the server architecture; 5. It can provide users with higher privacy protection requirements, higher efficiency, and facilitate the use of mobile devices with limited bandwidth and resources.

附图说明Description of drawings

图1本发明实施例二叉树的概述示意图。FIG. 1 is a schematic overview of a binary tree according to an embodiment of the present invention.

具体实施方式Detailed ways

下面结合附图并通过实施例对本发明作进一步的详细说明,以下实施例是对本发明的解释而本发明并不局限于以下实施例。The present invention will be further described in detail below in conjunction with the accompanying drawings and through the examples. The following examples are to explain the present invention and the present invention is not limited to the following examples.

本实施例中的一种基于区块链的公开可验证外包属性基加密方法,具体包括如下步骤:A blockchain-based publicly verifiable outsourcing attribute base encryption method in this embodiment specifically includes the following steps:

A、系统初始化:可信机构根据隐式的安全参数λ和全体属性集合U生成全局公共密钥PK和主密钥MSK;具体包括如下步骤:A. System initialization: The trusted authority generates the global public key PK and the master key MSK according to the implicit security parameter λ and the overall attribute set U; it includes the following steps:

A1、首先可信机构接收一个全体属性集合U,并根据一个隐式的安全参数λ,选取阶为素数p、生成元为g的两个乘法循环群

Figure BDA0002861864080000061
Figure BDA0002861864080000062
和一个双线性映射
Figure BDA0002861864080000063
然后,可信机构初始化一个空的用户撤销列表L以及一个满二叉树
Figure BDA0002861864080000064
初始化完毕后,可信机构将用户的身份分配给满二叉树
Figure BDA0002861864080000065
的叶子节点上,该二叉树
Figure BDA0002861864080000066
按照广度优先搜索方法对每一个节点进行编号,其中根节点的编号为0,并且用d来表示二叉树
Figure BDA0002861864080000067
的深度,从而可知用户的最大数量为|Num|=2d,二叉树的节点数量为2|Num|-2,因此二叉树的最后一个叶子节点的编号为2|Num|-2;A1. First, the trusted authority receives a set of all attributes U, and according to an implicit security parameter λ, selects two multiplicative cyclic groups whose order is prime p and whose generator is g
Figure BDA0002861864080000061
and
Figure BDA0002861864080000062
and a bilinear map
Figure BDA0002861864080000063
Then, the trusted authority initializes an empty user revocation list L and a full binary tree
Figure BDA0002861864080000064
After initialization, the trusted authority assigns the user's identity to the full binary tree
Figure BDA0002861864080000065
on the leaf nodes of the binary tree
Figure BDA0002861864080000066
Each node is numbered according to the breadth-first search method, where the number of the root node is 0, and d is used to represent the binary tree
Figure BDA0002861864080000067
Therefore, the maximum number of users is |Num|=2d , and the number of nodes of the binary tree is 2|Num|-2, so the number of the last leaf node of the binary tree is 2|Num|-2;

A2、可信机构选择两个随机数α,

Figure BDA0002861864080000068
其中
Figure BDA0002861864080000069
是p阶整数环。随后,可信机构同样也选择五个随机数g,u,v,d,
Figure BDA0002861864080000071
A2. The trusted organization selects two random numbers α,
Figure BDA0002861864080000068
in
Figure BDA0002861864080000069
is a ring of integers of order p. Subsequently, the trusted agency also selects five random numbers g, u, v, d,
Figure BDA0002861864080000071

A3、对于每个属性值i∈U,可信机构都选取随机数

Figure BDA0002861864080000072
其中
Figure BDA0002861864080000073
是p阶正整数环,并且计算与属性值相关联的属性公钥组件
Figure BDA0002861864080000074
A3. For each attribute value i∈U, the trusted authority selects a random number
Figure BDA0002861864080000072
in
Figure BDA0002861864080000073
is a ring of positive integers of order p and computes the attribute public key component associated with the attribute value
Figure BDA0002861864080000074

A4、可信机构随机选取一个抗碰撞哈希函数

Figure BDA0002861864080000075
该哈希函数能够将消息m或者随机消息m′映射成一个在
Figure BDA0002861864080000076
内的元素;A4. The trusted agency randomly selects an anti-collision hash function
Figure BDA0002861864080000075
The hash function can map a message m or a random message m' into a
Figure BDA0002861864080000076
elements within;

A5、对于二叉树

Figure BDA0002861864080000077
中的每一个节点,可信机构都随机选取一个随机数
Figure BDA0002861864080000078
然后生成主密钥组件
Figure BDA0002861864080000079
也同时生成与用户身份相关联的二叉树公钥组件
Figure BDA00028618640800000710
A5. For binary tree
Figure BDA0002861864080000077
For each node in , the trusted authority randomly selects a random number
Figure BDA0002861864080000078
Then generate the master key component
Figure BDA0002861864080000079
Also generate the public key component of the binary tree associated with the user identity
Figure BDA00028618640800000710

A6、可信机构选择一个概率加密方案(Enc,Dec),其中Enc是加密函数,Dec是解密函数。该方案是对称加密方案,能够将用户身份uid映射成

Figure BDA00028618640800000711
中的元素,并且在每次使用对称密钥k加密时返回不同的结果;A6. The trusted authority selects a probabilistic encryption scheme (Enc, Dec), where Enc is an encryption function and Dec is a decryption function. This scheme is a symmetric encryption scheme that can map user identity uid to
Figure BDA00028618640800000711
, and returns a different result each time it is encrypted with a symmetric key k;

A7、可信机构公布公共密钥PK,以及不公布主密钥MSK:A7. The trusted authority publishes the public key PK, and does not publish the master key MSK:

Figure BDA00028618640800000712
Figure BDA00028618640800000712

Figure BDA00028618640800000713
Figure BDA00028618640800000713

B、加密:数据拥有者根据全局公共密钥PK,消息m,访问结构

Figure BDA00028618640800000714
以及覆盖列表cover(L),其中覆盖列表cover(L)是与用户撤销列表L关联的最小覆盖集的节点编号的集合,然后对消息m进行加密并且产生密文CT;具体包括如下步骤:B. Encryption: The data owner accesses the structure according to the global public key PK, message m, and
Figure BDA00028618640800000714
And the cover list cover(L), wherein the cover list cover(L) is the set of node numbers of the minimum cover set associated with the user revocation list L, and then encrypts the message m and generates the ciphertext CT; specifically including the following steps:

B1、数据拥有者选择一个访问结构

Figure BDA00028618640800000715
其中M是一个l×n阶的访问矩阵,ρ是一个能够将Mi映射成一个属性的映射算法,其中Mi为访问矩阵M的第i行;然后,数据拥有者选择两个随机的秘密指数s,
Figure BDA00028618640800000716
并且设置两个随机列向量v=(s,v2,...,vn)和v′=(s′,v′2,...,v′n),其中
Figure BDA00028618640800000717
以及
Figure BDA00028618640800000718
部是选取的随机数;最后,对于每个Mi,数据拥有者都计算与秘密指数s和s′相关的有效份额λi=Mi×v和λ′i=Mi×v′;B1. The data owner chooses an access structure
Figure BDA00028618640800000715
where M is an access matrix of order l×n, ρ is a mapping algorithm capable of mapping Mi to an attribute, whereMi is theith row of access matrix M; then, the data owner chooses two random secrets index s,
Figure BDA00028618640800000716
and settwo random column vectors v=(s, v2,...,vn ) and v'=(s',v'2 ,...,v'n ), where
Figure BDA00028618640800000717
as well as
Figure BDA00028618640800000718
The part is the chosen random number; finally, for each Mi , the data owner calculates the effective shares λi =Mi ×v and λ′i =Mi ×v′ related to the secret indices s and s′;

B2、数据拥有者选择要加密的信息m和随机选择的信息m′,并且计算与访问结构

Figure BDA00028618640800000719
相关联的密文组件
Figure BDA0002861864080000081
C1=m·e(g,g)αs,C′1=gs,C″1=gas
Figure BDA0002861864080000082
C2=m′·e(g,g)αs′,C′2=gs′,和
Figure BDA0002861864080000083
B2. The data owner selects the information m to be encrypted and the randomly selected information m', and calculates and accesses the structure
Figure BDA00028618640800000719
associated ciphertext component
Figure BDA0002861864080000081
C1 =m·e(g, g)αs , C′1 = gs , C″1 = gas ,
Figure BDA0002861864080000082
C2 =m'·e(g,g)αs' , C'2=gs' , and
Figure BDA0002861864080000083

B3、数据拥有者一旦接收到由可信机构发送的最新覆盖列表cover(L),数据拥有者就会生成与覆盖列表cover(L)相关联的密文组件

Figure BDA0002861864080000084
B3. Once the data owner receives the latest cover list cover(L) sent by the trusted authority, the data owner will generate a ciphertext component associated with the cover list cover(L)
Figure BDA0002861864080000084

B4、最后,生成的密文CT为:B4. Finally, the generated ciphertext CT is:

Figure BDA0002861864080000085
Figure BDA0002861864080000085

B5、一旦雾节点接收到数据拥有者的密文时,雾节点将会调用一个智能合约,生成此合约后,雾节点将该交易广播到其他雾节点以进行共识验证。B5. Once the fog node receives the ciphertext of the data owner, the fog node will call a smart contract. After the contract is generated, the fog node broadcasts the transaction to other fog nodes for consensus verification.

C、密钥生成:可信机构根据全局公共密钥PK,用户的身份信息uid以及用户属性集S,生成解密密钥SK;具体包括如下步骤:C. Key generation: the trusted authority generates the decryption key SK according to the global public key PK, the user's identity information uid and the user attribute set S; the specific steps are as follows:

C1、可信机构随机选择一个随机数

Figure BDA0002861864080000086
并且用对称密钥为k的概率加密方案生成一个随机数f=Enck(lx),其中lx是与用户身份相关联的叶子节点;C1. The trusted institution randomly selects a random number
Figure BDA0002861864080000086
And generate a random number f=Enck (lx ) using a probabilistic encryption scheme with a symmetric key k, where lx is a leaf node associated with the user identity;

C2、可信机构首先生成与属性集S相关联的密钥组件:K1=f,

Figure BDA0002861864080000087
K3=gb以及K4=gab
Figure BDA0002861864080000088
C2. The trusted authority first generates a key component associated with the attribute set S: K1 =f,
Figure BDA0002861864080000087
K3 =gb and K4 =gab ,
Figure BDA0002861864080000088

C3、可信机构选择一个随机数

Figure BDA0002861864080000089
并生成与用户身份uid相关联的密钥元素
Figure BDA00028618640800000810
以及
Figure BDA00028618640800000811
其中x∈path(uid)∩cover(L),并且path(uid)是二叉树从根节点到相关联用户uid的叶子节点之间的路径编号,然后可信机构生成与用户身份uid相关联的密钥组件:
Figure BDA00028618640800000812
K6=gw
Figure BDA00028618640800000813
C3. The trusted agency selects a random number
Figure BDA0002861864080000089
and generate the key element associated with the user identity uid
Figure BDA00028618640800000810
as well as
Figure BDA00028618640800000811
where x ∈ path(uid)∩cover(L), and path(uid) is the path number of the binary tree from the root node to the leaf node of the associated user uid, and then the trusted authority generates the password associated with the user identity uid key component:
Figure BDA00028618640800000812
K6 =gw ,
Figure BDA00028618640800000813

C4、可信机构生成密钥SK,并发送给数据用户:C4. The trusted authority generates the key SK and sends it to the data user:

SK={K1,K2,K3,K4,Ki,K5,K6,K7,K8}。SK={K1 , K2 , K3 , K4 , Ki , K5 , K6 , K7 , K8 }.

D、解密:用户利用解密密钥SK将密文CT解密成消息m;具体包括如下步骤:D. Decryption: the user uses the decryption key SK to decrypt the ciphertext CT into a message m; specifically, the following steps are included:

D1、找到两个常数ci和c′i,能够使得两个等式

Figure BDA00028618640800000814
成立,其中属性映射集合I={i|ρ(i)∈S};D1. Find two constants ci and c′i , which can make the two equations
Figure BDA00028618640800000814
is established, where the attribute mapping set I={i|ρ(i)∈S};

D2、数据用户首先计算两个解密组件:D2. The data user first calculates two decryption components:

Figure BDA0002861864080000091
Figure BDA0002861864080000091

Figure BDA0002861864080000092
Figure BDA0002861864080000092

D3、数据用户接着计算两个明文组件m=C1/Y′1和m′=C2/Y′2,并且判断密文组件

Figure BDA0002861864080000093
与密文验证参数组件uH(m)vH(m′)d是否相等,若相等则返回消息m,若不相等则中断操作。D3. The data user then calculates two plaintext components m=C1 /Y′1 and m′=C2 /Y′2 , and determines the ciphertext components
Figure BDA0002861864080000093
Verifies whether the parameter component uH(m) vH(m') d is equal to the ciphertext, and returns the message m if it is equal, and interrupts the operation if it is not equal.

E、外包密钥生成:用户根据解密密钥SK将其转化为转换密钥TK以及检索密钥RK;具体包括如下步骤:E. Outsourced key generation: the user converts the decryption key SK into a conversion key TK and a retrieval key RK according to the decryption key; the specific steps include the following:

E1、用户选择一个随机数z,生成转换密钥组件K′1=K1

Figure BDA0002861864080000094
以及
Figure BDA0002861864080000095
K′7=K7,K′8=K8;E1. The user selects a random number z, and generates a conversion key component K′1 =K1 ,
Figure BDA0002861864080000094
as well as
Figure BDA0002861864080000095
K'7 =K7 , K'8 =K8 ;

E2、用户将生成的转换密钥TK发送给雾节点并且用户自己保存检索密钥RK:E2. The user sends the generated conversion key TK to the fog node and the user saves the retrieval key RK:

TK={K′1,K′2,K′3,K′4,K′i,K′5,K′6,K′7,K′8},TK={K′1 , K′2 , K′3 , K′4 , K′i , K′5 , K′6 , K′7 , K′8 },

RK={z}。RK={z}.

F、外包转换:雾节点根据公共密钥PK,密文CT以及转换密钥TK,将密文CT外包转换为转换密文CT′,且

Figure BDA0002861864080000096
然后雾节点将转换密文CT′发送给数据用户。F. Outsourced conversion: The fog node outsources the ciphertext CT to the converted ciphertext CT' according to the public key PK, the ciphertext CT and the conversion key TK, and
Figure BDA0002861864080000096
Then the fog node sends the converted ciphertext CT' to the data user.

其中雾节点计算两个转换密文组件:The fog node computes two transformed ciphertext components:

Figure BDA0002861864080000097
Figure BDA0002861864080000097

Figure BDA0002861864080000098
Figure BDA0002861864080000098

G、外包解密:用户根据检索密钥RK,密文CT以及转换密文CT′,生成消息m;具体包括如下步骤:G. Outsourced decryption: The user generates a message m according to the retrieval key RK, the ciphertext CT and the converted ciphertext CT'; the specific steps are as follows:

G1、用户首先验证下收到的信息,如果

Figure BDA0002861864080000099
或W1≠C1或W2≠C2,则操作中断,反之验证通过;G1. The user first verifies the received information, if
Figure BDA0002861864080000099
Or W1 ≠C1 or W2 ≠C2 , the operation is interrupted, otherwise the verification is passed;

G2、若验证通过,用户计算两个明文消息:G2. If the verification is passed, the user calculates two plaintext messages:

Figure BDA00028618640800000910
Figure BDA00028618640800000910

Figure BDA0002861864080000101
Figure BDA0002861864080000101

G3、用户计算两个验证明文组件V1=uH(m),V2=vH(m′),并且将V1和V2发送到雾节点,然后雾节点调用智能合约,智能合约通过验证

Figure BDA0002861864080000102
与明文验证参数组件V1V2d是否相等来实现算法的公开可验证性。G3. The user calculates two verification plaintext components V1 =uH(m) and V2 =vH(m') , and sends V1 and V2 to the fog node, then the fog node calls the smart contract, and the smart contract passes the verify
Figure BDA0002861864080000102
The public verifiability of the algorithm is achieved by verifying whether the parameter components V1 V2 d are equal to the plaintext.

H、追溯用户身份:可信机构根据全局公共密钥PK,最小覆盖列表cover(L)以及解密密钥SK,输出用户身份信息uid或者输出错误信息;具体包括如下步骤:H. Trace back the user identity: the trusted authority outputs the user identity information uid or outputs the error information according to the global public key PK, the minimum coverage list cover(L) and the decryption key SK; the specific steps are as follows:

H1、首先,可信机构先判断一下输入的密钥SK的格式是否正确,若错误则操作中断;H1. First, the trusted authority first judges whether the format of the input key SK is correct, if it is wrong, the operation is interrupted;

H2、若SK格式正确,则可信机构搜索lx是否在最小覆盖列表cover(L)中,若存在,则返回用户身份uid,反之,返回虚假的用户身份uid*,其中该虚假用户身份uid*永远不会出现在系统中;H2. If the SK format is correct, the trusted agency searches whether lx is in the minimum coverage list cover(L). If it exists, the user identity uid is returned, otherwise, the false user identity uid* is returned, where the false user identity uid * never appear in the system;

H3、可信机构更新最新的撤销列表L′=L∪{uid}。H3. The trusted authority updates the latest revocation list L'=L∪{uid}.

I、密文更新:可信机构根据全局公共密钥PK,密文CT以及最小覆盖列表cover(L′),生成更新密文CT″;具体包括如下步骤:1, ciphertext update: the trusted organization generates and updates the ciphertext CT according to the global public key PK, ciphertext CT and the minimum coverage list cover(L'); specifically includes the following steps:

I1、可信机构选择一个随机数

Figure BDA0002861864080000103
并计算更新后的与用户身份相关联的二叉树公钥组件
Figure BDA0002861864080000104
I1. The trusted authority selects a random number
Figure BDA0002861864080000103
and compute the updated public key component of the binary tree associated with the user identity
Figure BDA0002861864080000104

I2、可信机构计算更新后的密文组件:I2. The trusted authority calculates the updated ciphertext component:

Figure BDA0002861864080000105
Figure BDA0002861864080000105

Figure BDA0002861864080000106
并计算更新后的与覆盖列表cover(L)相关联的两个密文组件
Figure BDA0002861864080000107
以及
Figure BDA0002861864080000108
然后生成更新后的密文:
Figure BDA0002861864080000106
and compute the updated two ciphertext components associated with the cover list cover(L)
Figure BDA0002861864080000107
as well as
Figure BDA0002861864080000108
Then generate the updated ciphertext:

Figure BDA0002861864080000109
Figure BDA0002861864080000109

I3、随后,可信机构将更新后的密文以及撤销列表L′发送给雾节点,雾节点重新调用智能合约以存储最新的密文哈希。I3. Subsequently, the trusted authority sends the updated ciphertext and the revocation list L' to the fog node, and the fog node recalls the smart contract to store the latest ciphertext hash.

本发明涉及到的实体,包括可信机构、数据拥有者、雾节点、云存储提供商、数据用户、区块链。The entities involved in the present invention include trusted institutions, data owners, fog nodes, cloud storage providers, data users, and blockchains.

可信机构,它被认为是完全可信的,用于为系统生成全局公共密钥PK和主密钥MSK,它还拥有用户的撤销列表L以及二叉树

Figure BDA0002861864080000111
与此同时,可信机构仅仅是将撤销列表L和最小覆盖列表cover(L′)分别发送到雾节点和数据所有者,而不是将整个二叉树公开,这样做有利于保护数据用户的隐私,此外,可信机构可以生成一个解密密钥SK并且将该密钥发送给数据用户,还可以在用户添加到撤销列表L后及时更新密文。A trusted authority, which is considered to be fully trusted, is used to generate the global public key PK and master key MSK for the system, it also has the user's revocation list L and a binary tree
Figure BDA0002861864080000111
At the same time, the trusted authority only sends the revocation list L and the minimum coverage list cover(L′) to the fog node and the data owner respectively, instead of publishing the entire binary tree, which is beneficial to protect the privacy of data users. In addition, , the trusted authority can generate a decryption key SK and send the key to the data user, and can also update the ciphertext in time after the user is added to the revocation list L.

数据用户,自己设置加密消息的访问结构,并使用系统对消息进行加密,然后,将加密后的密文上传到雾节点。Data users set the access structure of encrypted messages by themselves, use the system to encrypt messages, and then upload the encrypted ciphertext to the fog node.

雾节点,它被认为是半可信的,雾节点维护用户的撤销列表L,当数据用户请求访问数据时,数据用户会将该请求发送到雾节点,雾节点在接收到请求后,若数据用户不在撤销列表L中,并且属性集S与访问结构相匹配,则雾节点将该请求转发给可信机构,最后,雾节点还起着将一些关键信息打包发送到区块链的作用。The fog node is considered semi-trusted. The fog node maintains the user's revocation list L. When the data user requests to access the data, the data user will send the request to the fog node. After the fog node receives the request, if the data If the user is not in the revocation list L, and the attribute set S matches the access structure, the fog node forwards the request to the trusted authority. Finally, the fog node also plays the role of packaging some key information and sending it to the blockchain.

云存储提供商,它也被认为是半可信的,它负责存储来自雾节点的密文,然后还将该密文存储位置AdressCT返回给雾节点。The cloud storage provider, which is also considered semi-trusted, is responsible for storing the ciphertext from the fog node, and then also returning the ciphertext storage location AdressCT to the fog node.

数据用户,每一个数据用户都有一个身份标志uid,数据用户通过向雾节点发送数据描述信息来传达自己的数据请求和数据验证。Data users, each data user has an identity symbol uid, and data users convey their data requests and data verification by sending data description information to fog nodes.

区块链,雾节点通过智能合约将信息存储在区块链上,例如:密文的哈希,更新密文的哈希,公钥等。Blockchain, fog nodes store information on the blockchain through smart contracts, such as: ciphertext hash, update ciphertext hash, public key, etc.

此外,需要说明的是,本说明书中所描述的具体实施例,其零、部件的形状、所取名称等可以不同,本说明书中所描述的以上内容仅仅是对本发明结构所作的举例说明。凡依据本发明专利构思所述的构造、特征及原理所做的等效变化或者简单变化,均包括于本发明专利的保护范围内。本发明所属技术领域的技术人员可以对所描述的具体实施例做各种各样的修改或补充或采用类似的方式替代,只要不偏离本发明的结构或者超越本权利要求书所定义的范围,均应属于本发明的保护范围。In addition, it should be noted that the specific embodiments described in this specification may have different shapes and names of parts and components, and the above content described in this specification is only an illustration of the structure of the present invention. All equivalent changes or simple changes made according to the structure, features and principles described in the patent concept of the present invention are included in the protection scope of the patent of the present invention. Those skilled in the art to which the present invention pertains can make various modifications or additions to the described specific embodiments or substitute in similar manners, as long as they do not deviate from the structure of the present invention or go beyond the scope defined by the claims, All should belong to the protection scope of the present invention.

Claims (10)

1. A block chain-based publicly verifiable outsourcing attribute-based encryption method is characterized by comprising the following steps: the method comprises the following steps:
A. initializing a system: the trusted authority generates a global public key and a master key according to the security parameters and the whole attribute set, and publishes the global public key and the unfamiliar master key;
B. encryption: the data owner encrypts the message and generates a ciphertext according to the global public key, the access structure and the overlay list;
C. and (3) key generation: the trusted authority generates a decryption key according to the global public key, the identity information of the user and the user attribute set, and sends the decryption key to the data user;
D. and (3) decryption: the user decrypts the ciphertext into a message by using the decryption key;
E. and (3) outsourcing key generation: the user converts the decryption key into a conversion key and a retrieval key according to the decryption key, sends the conversion key to the fog node and stores the retrieval key by the user;
F. and (3) outsourcing conversion: the fog node outsourcing the ciphertext into a conversion ciphertext according to the global public key, the ciphertext and the conversion key, and then sending the conversion ciphertext to a data user;
G. and (3) outsourcing decryption: the user generates a message according to the retrieval key, the ciphertext and the conversion ciphertext;
H. tracing the identity of the user: the trusted authority outputs user identity information or error information according to the global public key, the minimum coverage list and the decryption key;
I. and (3) ciphertext updating: the trusted authority generates an updated ciphertext according to the global public key, the ciphertext and the minimum coverage list; and the trusted authority sends the updated ciphertext to the fog node.
2. The blockchain-based publicly verifiable outsourcing property-based encryption method of claim 1, wherein: the step A specifically comprises the following steps:
a1, firstly, the trusted authority receives a whole attribute set U, and selects two multiplication circulation groups with the order of prime number p and generation element g according to an implicit safety parameter lambda
Figure FDA0003589438970000014
And
Figure FDA0003589438970000015
and a bilinear map
Figure FDA0003589438970000016
The trusted authority then initializes an empty user revocation list L and a full binary tree
Figure FDA0003589438970000018
After initialization, the trusted authority assigns the user's identity to a full binary tree
Figure FDA0003589438970000019
On leaf nodes of the binary tree
Figure FDA00035894389700000110
Numbering each node according to a breadth-first search method, wherein the numbering of the root node is 0, and d is used to represent a binary tree
Figure FDA00035894389700000111
So that the maximum number of users is | Num | ═ 2dThe number of nodes of the binary tree is 2| Num | -2, so the number of the last leaf node of the binary tree is 2| Num | -2;
a2, the trusted authority selects two random numbers alpha,
Figure FDA0003589438970000011
wherein
Figure FDA0003589438970000012
Is a p-order integer ring; the trusted authority then likewise selects the five random numbers g, u, v, d,
Figure FDA0003589438970000013
a3, for each attribute value i epsilon U, the trusted authority selects a random number
Figure FDA0003589438970000021
Wherein
Figure FDA0003589438970000022
Is a positive integer ring of order p and computes an attribute public key component associated with the attribute value
Figure FDA0003589438970000023
A4, the trusted authority randomly selects an anti-collision hash function H:
Figure FDA0003589438970000024
the hash function can map a message m or a random message m' to one
Figure FDA0003589438970000025
An element of (a);
a5 for binary tree
Figure FDA00035894389700000219
In each node, the trusted authority randomly selects a random number
Figure FDA0003589438970000026
Then generating a master key component
Figure FDA0003589438970000027
Also concurrently generating a binary tree public key component associated with the user identity
Figure FDA0003589438970000028
A6, selecting a probability encryption scheme (Enc, Dec) by the trusted authority, wherein Enc is an encryption function, and Dec is a decryption function;
a7, the trusted authority publishes the public key PK, and does not publish the master key MSK.
3. The blockchain-based publicly verifiable outsourced attribute-based encryption method of claim 2, wherein: the step B specifically comprises the following steps:
b1 data owner selects an access structure
Figure FDA0003589438970000029
Where M is an access matrix of order l n, and p is an access matrix capable of converting M into MiMapping algorithm to an attribute, where MiIs the ith row of the access matrix M; the data owner then selects two random secret indices
Figure FDA00035894389700000221
And sets two random column vectors v ═ s, v2,...,vn) And v ═ s ', v'2,...,v′n) Wherein
Figure FDA00035894389700000220
Finally, for each MiThe data owner calculates the effective share λ associated with the secret exponents s and si=MiX v and λ'i=Mi×v′;
B2, data owner selects information m to be encrypted and randomly selected information m', and calculates and accesses structure
Figure FDA00035894389700000213
Associated ciphertext component
Figure FDA00035894389700000214
C1=m·e(g,g)αs,C′1=gs,C″1=gas
Figure FDA00035894389700000215
C2=m′·e(g,g)αs′,C′2=gs′And C ″)2=gas′
Figure FDA00035894389700000216
B3, upon receipt of the latest overlay list cover (L) sent by the trusted authority, the data owner generates the ciphertext component associated with the overlay list cover (L)
Figure FDA00035894389700000217
B4, and finally, the generated ciphertext CT is:
Figure FDA00035894389700000218
b5, once the fog node receives the data owner's ciphertext, the fog node will call an intelligent contract, and after generating the intelligent contract, the fog node broadcasts the transaction to other fog nodes for consensus verification.
4. The blockchain-based publicly verifiable outsourced attribute-based encryption method of claim 3, wherein: the step C specifically comprises the following steps:
c1, the trusted authority randomly selects a random number
Figure FDA0003589438970000031
And generating a random number f ═ Enc using a probabilistic encryption scheme with a symmetric key of kk(lx) Wherein l isxIs a leaf node associated with the user identity;
c2, the trusted authority first generates a key component associated with the user property set S: k1=f,
Figure FDA0003589438970000032
K3=gbAnd K4=gab
Figure FDA0003589438970000033
C3, selecting a random number by the trusted authority
Figure FDA0003589438970000034
And generating a key element associated with the user identity uid
Figure FDA0003589438970000035
And
Figure FDA0003589438970000036
where x ∈ path (uid) andgate (l), and path (uid) is the path number between the binary tree from the root node to the leaf node of the associated user uid, then the trusted authority generates the key component associated with the user identity uid:
Figure FDA0003589438970000037
K6=gw
Figure FDA0003589438970000038
c4, the trusted authority generates a key SK and sends the key SK to the data user, wherein:
SK={K1,K2,K3,K4,Ki,K5,K6,K7,K8}。
5. the blockchain-based publicly verifiable outsourced attribute-based encryption method of claim 4, wherein: the step D specifically comprises the following steps:
d1, find two constants ciAnd c'iCan make two equations
Figure FDA0003589438970000039
The method comprises the following steps that (1) the attribute mapping set I is { I | rho (I) ∈ s };
d2, the data consumer first calculates two decryption components:
Figure FDA00035894389700000310
Figure FDA00035894389700000311
d3, the data user then calculates two plaintext blocks m ═ C1/Y′1And m ═ C2/Y′2And determining the ciphertext component
Figure FDA00035894389700000312
And ciphertext verification parameter component uH(m)vH(m′)And d is equal or not, if equal, the message m is returned, and if not, the operation is interrupted.
6. The blockchain-based publicly verifiable outsourced attribute-based encryption method of claim 5, wherein: the step E specifically comprises the following steps:
e1, selecting a random number z by a user, and generating a conversion key component K'1=K1
Figure FDA0003589438970000041
And
Figure FDA0003589438970000042
K′7=K7,K′8=K8
e2, the user sends the generated transformation key TK to the cloud node, and the user saves the retrieval key RK, wherein:
TKK={K′1,K′2,K′3,K′4,K′i,K′5,K′6,K′7,K′8},RK={z}。
7. the blockchain-based publicly verifiable outsourced attribute-based encryption method of claim 6, wherein: in step F, the fog node calculates two transform ciphertext components as:
Figure FDA0003589438970000043
Figure FDA0003589438970000044
8. the blockchain-based publicly verifiable outsourced attribute-based encryption method of claim 7, wherein: the step G specifically comprises the following steps:
g1, the user first verifies the information received, if
Figure FDA0003589438970000045
Or W1≠C1Or W2≠C2If the verification is successful, the operation is interrupted, otherwise, the verification is passed;
g2, if the verification is passed, the user computes two plaintext messages:
Figure FDA0003589438970000046
g3, user calculating two verification plaintext components V1=uH(m),V2=vH(m′)And will V1And V2Sending to the fog node, then the fog node calls the intelligent contract, and the intelligent contract is verified
Figure FDA0003589438970000047
And plaintext verification parameter component V1V2d are equal.
9. The blockchain-based publicly verifiable outsourced attribute-based encryption method of claim 8, wherein: the step H specifically comprises the following steps:
h1, firstly, the trusted authority firstly judges whether the format of the inputted public key SK is correct, if so, the operation is interrupted;
h2, if the format of the public key SK is correct, the trusted authority searches for lxWhether the user identity uid exists in the minimal coverage list cover (L) or not is judged, if so, the user identity uid is returned, otherwise, a false user identity uid is returned;
h3, the trusted authority updates the latest revocation list L' ═ L utou { uid }.
10. The blockchain-based publicly verifiable outsourced attribute-based encryption method of claim 9, wherein: the step I specifically comprises the following steps:
i1, selecting a random number by the trusted authority
Figure FDA0003589438970000051
And computing an updated binary tree public key component associated with the user identity
Figure FDA0003589438970000052
I2, the trusted authority calculates the updated ciphertext component:
Figure FDA0003589438970000053
and computes two ciphertext components associated with the overlay list (L) after updating
Figure FDA0003589438970000054
And
Figure FDA0003589438970000055
then an updated ciphertext is generated:
Figure FDA0003589438970000056
i3, the trusted authority then sends the updated ciphertext and the revocation list L' to the fog node, which recalls the intelligent contract to store the latest ciphertext hash.
CN202011568809.6A2020-12-252020-12-25 A publicly verifiable outsourced attribute-based encryption method based on blockchainActiveCN112671543B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202011568809.6ACN112671543B (en)2020-12-252020-12-25 A publicly verifiable outsourced attribute-based encryption method based on blockchain

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202011568809.6ACN112671543B (en)2020-12-252020-12-25 A publicly verifiable outsourced attribute-based encryption method based on blockchain

Publications (2)

Publication NumberPublication Date
CN112671543A CN112671543A (en)2021-04-16
CN112671543Btrue CN112671543B (en)2022-06-28

Family

ID=75409705

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202011568809.6AActiveCN112671543B (en)2020-12-252020-12-25 A publicly verifiable outsourced attribute-based encryption method based on blockchain

Country Status (1)

CountryLink
CN (1)CN112671543B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN114143343B (en)*2021-11-252024-04-19中南财经政法大学Remote access control system, control method, terminal and medium in fog computing environment
CN117857033B (en)*2024-01-092024-09-17山东大学LKH-based method and system for flexibly revoking CP-ABE of user by outsourcing encryption and decryption

Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN110611571A (en)*2019-09-272019-12-24上海电力大学 A revocable access control method for fog-based smart grid system
CN110611662A (en)*2019-08-302019-12-24徐州工业职业技术学院Attribute-based encryption-based fog collaborative cloud data sharing method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US11050724B2 (en)*2018-03-222021-06-29Cisco Technology, Inc.IaaS-aided access control for information centric networking with Internet-of-Things

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN110611662A (en)*2019-08-302019-12-24徐州工业职业技术学院Attribute-based encryption-based fog collaborative cloud data sharing method
CN110611571A (en)*2019-09-272019-12-24上海电力大学 A revocable access control method for fog-based smart grid system

Also Published As

Publication numberPublication date
CN112671543A (en)2021-04-16

Similar Documents

PublicationPublication DateTitle
CN114039790B (en) A fine-grained cloud storage security access control method based on blockchain
CN108390876B (en) Support revocation of outsourcing, verifiable multi-authority center access control method, cloud server
Zhong et al.Multi-authority attribute-based encryption access control scheme with policy hidden for cloud storage
CN109040045B (en) A cloud storage access control method based on ciphertext policy attribute-based encryption
CN108810004B (en) Agent-based revocable multi-authorization center access control method and cloud storage system
CN113434875B (en) A lightweight access method and system based on blockchain
CN113162768B (en) A blockchain-based smart IoT device authentication method and system
Xue et al.Provable data transfer from provable data possession and deletion in cloud storage
CN104168108B (en)It is a kind of to reveal the traceable attribute base mixed encryption method of key
CN108833393A (en) A revocable data sharing method based on fog computing
CN106487506B (en)Multi-mechanism KP-ABE method supporting pre-encryption and outsourcing decryption
WO2014114080A1 (en)Method and system for data encryption protection
CN113360944B (en)Dynamic access control system and method for electric power Internet of things
CN114710370A (en)Fine-grained access control method and system based on mist block chain and attribute encryption
CN110933033A (en) Cross-domain access control method for multiple IoT domains in smart city environment
CN107465681A (en)Cloud computing big data method for secret protection
CN116450746B (en) A blockchain-based attribute searchable encryption system and method
Sammy et al.An Efficient Blockchain Based Data Access with Modified Hierarchical Attribute Access Structure with CP‐ABE Using ECC Scheme for Patient Health Record
CN114362958A (en)Intelligent home data security storage auditing method and system based on block chain
CN112671543B (en) A publicly verifiable outsourced attribute-based encryption method based on blockchain
CN117201132A (en) A fully decentralized multi-committee attribute-based encryption method and its applications
CN114039753A (en) An access control method, device, storage medium and electronic device
CN111585756B (en) A Certificateless Cloud Auditing Method Applicable to Multi-Replica-Multi-Cloud Scenario
CN115001673B (en) Key processing method, device and system based on unified multi-domain identification
Song et al.Rainbow: reliable personally identifiable information retrieval across multi-cloud

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp