Efficient Attribute Based Searchable Encryption on the Cloud Storage | Data

本文授权自 MagicBoy

Efficient Attribute Based Searchable Encryption on the Cloud Storage | Data


分析一下这篇论文提出的算法:

Guo W F, Dong X L, Cao Z F, et al. Efficient attribute-based searchable encryption on cloud storage[C]//Journal of physics: Conference series. IOP Publishing, 2018, 1087(5): 052001.

3.3 Constructions

In our scheme, we use inverted index structure as introduced above and implement searchable encryption with AND gate as access control. The scheme consists of 5 main algorithms. We introduce them in detail as below:

Init

We suppose all the attributes are included in set U = { a t t r 1 , a t t r 2 , ⋅ ⋅ ⋅ , a t t r n } U=\lbrace attr_1,attr_2,···,attr_n \rbrace U={attr1,attr2,⋅⋅⋅,attrn}, where n is the size of U U U. For each attribute a t t r i ( 1 ≤ i ≤ n ) attr_i(1 \le i \le n) attri(1in), there has 2 values v i v_i vi and ¬ v i \neg v_i ¬vi. If the attributes set A t t r Attr Attr of one data user include attribute a t t r i ( 1 ≤ i ≤ n ) attr_i(1 \le i \le n) attri(1in), the value of a t t r i attr_i attri is v i v_i vi and the value of a t t r i attr_i attri is ¬ v i \neg v_i ¬vi if a t t r i attr_i attri is not in A t t r Attr Attr. To formalize the description of attributes, we adopt the value of attribute to represent whether user’s set contains this attribute.

分析:

该段用于初始化用户属性集合,将用户总体属性集合 U = { a t t r 1 , a t t r 2 , ⋅ ⋅ ⋅ , a t t r n } U=\lbrace attr_1, attr_2, ··· , attr_n \rbrace U={attr1,attr2,⋅⋅⋅,attrn}中存在的属性置为 v i v_i vi,而不存在的属性置为 ¬ v i \neg v_i ¬vi,举个例子就是用户 A A A的属性集合为 U = { v 1 , ¬ v 2 , ⋅ ⋅ ⋅ , v n } U=\lbrace v_1, \neg v_2, ··· , v_n \rbrace U={v1,¬v2,⋅⋅⋅,vn}


Setup

Given a bilinear group e : G × G → G T e : G \times G \to G_T e:G×GGT , p p p as prime order of G G G and G T G_T GT , and H : { 0 , 1 } ∗ → Z p H : {\lbrace 0, 1 \rbrace}^* \to Z_p H:{0,1}Zp as an one-way hash function, randomly select three numbers a , b , c ← Z p a, b, c \gets Z_p a,b,cZp, a set { r 1 , r 2 , ⋅ ⋅ ⋅ , r 2 n } ← Z p \lbrace r_1, r_2, · · · , r_{2n}\rbrace \gets Z_p {r1,r2,⋅⋅⋅,r2n}Zp and a set { x 1 , x 2 , ⋅ ⋅ ⋅ , x 2 n } ← G \lbrace x_1, x_2, · · · , x_{2n} \rbrace \gets G {x1,x2,⋅⋅⋅,x2n}G. Set u i = g − r i u_i = g ^ {-r_i} ui=gri and y i = e ( x i , g ) y_i = e(x_i, g) yi=e(xi,g), where 1 ≤ i ≤ 2 n 1 \le i \le 2n 1i2n. Then, output the public key p k = ( g , g a , g b , g c , ( u i , y i ) ∣ 1 ≤ i ≤ 2 n ) pk = (g, g^a, g^b, g^c, (u_i, y_i)|1 \le i \le 2n) pk=(g,ga,gb,gc,(ui,yi)∣1i2n) and the master key m s k = ( a , b , c , ( r i , x i ) ∣ 1 ≤ i ≤ 2 n ) msk = (a, b, c, (r_i, x_i)|1 \le i \le 2n) msk=(a,b,c,(ri,xi)∣1i2n).

分析:

这一步是初始化公钥 p k pk pk和主密钥 m s k msk msk。双线性映射定义了两个素数p阶群乘法循环群 G G G G T G_T GT,循环群的意思是,群 G G G中的每一个元素都是 G G G中某一个固定元素q的乘方。 e : G × G → G T e : G \times G \to G_T e:G×GGT表示分别从循环群 G G G中提取元素,并进行某种运算可以得到 G T G_T GT中的元素,这里的e就是映射算法。 H : { 0 , 1 } ∗ → Z p H : {\lbrace 0, 1 \rbrace}^* \to Z_p H:{0,1}Zp,即一个散列函数,它将有限长度的二进制字符串作为输入,并输出素数p阶循环群的一个元素。从 Z p Z_p Zp 群和 G G G 群中随机挑选三个元素 a , b , c a,b,c a,b,c和两个集合 { r 1 , r 2 , ⋅ ⋅ ⋅ , r 2 n } , { x 1 , x 2 , ⋅ ⋅ ⋅ , x 2 n } \lbrace r_1, r_2, · · · , r_{2n}\rbrace, \lbrace x_1, x_2, · · · , x_{2n} \rbrace {r1,r2,⋅⋅⋅,r2n},{x1,x2,⋅⋅⋅,x2n},集合 u i = g − r i u_i = g ^ {-r_i} ui=gri,集合 y i = e ( x i , g ) y_i = e(x_i, g) yi=e(xi,g),其中, g g g G G G群中的随机元素,综上构成公钥 p k = ( g , g a , g b , g c , ( u i , y i ) ∣ 1 ≤ i ≤ 2 n ) pk = (g, g^a, g^b, g^c, (u_i, y_i)|1 \le i \le 2n) pk=(g,ga,gb,gc,(ui,yi)∣1i2n) 和主密钥 m s k = ( a , b , c , ( r i , x i ) ∣ 1 ≤ i ≤ 2 n ) msk = (a, b, c, (r_i, x_i)|1 \le i \le 2n) msk=(a,b,c,(ri,xi)∣1i2n)


Enc

Choose random t 1 , t 2 ∈ Z p t_1, t_2 \in Z_p t1,t2Zp. Suppose the access policy structure $S = \bigwedge_{v_i \in U} v’i $, where v i ′ = v i v'_i = v_i vi=vi or ¬ v i \neg v_i ¬vi. Set $u_i’ = u_i $ if v i ′ = v i v_i' = v_i vi=vi, u i ′ = u i + n u_i' = u_{i+n} ui=ui+n otherwise. Compute $u{gate} = g^{t_2} \prod_{i=1}^n{u’_i} $. For each keyword w ∈ W D w \in WD wWD, then set $W’ = g^{ct_1} $, $W = g{a(t_1+t_2)}g{bH(w)t_1} $, and encrypt files F F F which associate with the keyword w w w with some symmetric encryption algorithm into c p h F cphF cphF . Obviously, c p h W = ( W ′ , W , u g a t e ) cphW = (W', W, u_{gate}) cphW=(W,W,ugate). Then, the whole c p h = ( c p h W , c p h F ) cph = (cphW, cphF) cph=(cphW,cphF) as the result of encryption.

分析:

这一步是加密索引。从 Z p Z_p Zp群中选取两个随机数 t 1 , t 2 t_1,t_2 t1,t2。设置访问策略 S S S,设置集合 u i ′ u'_i ui的值(如果 v i ′ = v i v'_i=v_i vi=vi,那么 u i ′ = u i u'_i = u_i ui=ui,否则 u i ′ = u i + n u'_i = u_{i+n} ui=ui+n),根据 u g a t e = g t 2 ∏ i = 1 n u i ′ u_{gate} = g^{t_2} \prod_{i=1}^n{u'_i} ugate=gt2i=1nui 来计算 u g a t e u_{gate} ugate,根据索引 w , t 1 , t 2 , g , a , b w,t_1,t_2,g,a,b w,t1,t2,g,a,b 来计算 $W’ = g^{ct_1} $ 和 W = g a ( t 1 + t 2 ) g b H ( w ) t 1 W = g^{a(t_1+t_2)}g^{bH(w)t_1} W=ga(t1+t2)gbH(w)t1。与索引对应的文件通过对称密码进行加密,密文为 c p h F cphF cphF,所以整体密文为 c p h W = ( c p h W , c p h F ) = ( ( W ′ , W , u g a t e ) , c p h F ) cphW = (cphW, cphF) = ((W', W, u_{gate}),cphF) cphW=(cphW,cphF)=((W,W,ugate),cphF)


KeyGen

At First, we set v = g a c v = g^{ac} v=gac. For each attribute v i ∗ v_i^* vi in data user’s attribute collection, set y i ∗ = y i y_i^* = y_i yi=yi if v i ∗ = v i v_i^* = v_i vi=vi, y i ∗ = y i + n y_i^* = y_{i+n} yi=yi+n otherwise. Similarly, compute σ i ∗ = x i v r i \sigma_i^* = x_i v^{r_i} σi=xivri if v i ∗ = v i v_i^* = v_i vi=vi, σ i ∗ = x i + n v r i + n \sigma_i^* = x_{i+n} v^{r_{i+n}} σi=xi+nvri+n otherwise. Set σ u s e r = ∏ i = 1 n σ i ∗ \sigma_{user} = \prod^n_{i=1} \sigma_i^* σuser=i=1nσi Then, the secret key s k = ( y u s e r = ∏ i = 1 n y i ∗ , < v , σ u s e r > ) sk = (y_{user} = \prod^n_{i=1} y_i^*, < v, \sigma_{user} >) sk=(yuser=i=1nyi,<v,σuser>).

分析:

这一步是关于文件搜索者生成自身私钥的步骤。自定义 v = g a c v = g^{ac} v=gac。对于文件搜索者自身拥有的属性,如果 v i ∗ = v i v_i^* = v_i vi=vi,那么 y i ∗ = y i y_i^* = y_i yi=yi σ i ∗ = x i v r i \sigma_i^* = x_i v^{r_i} σi=xivri,否则就 y i ∗ = y i + n y_i^* = y_{i+n} yi=yi+n σ i ∗ = x i + n v r i + n \sigma_i^* = x_{i+n} v^{r_{i+n}} σi=xi+nvri+n。根据 σ u s e r = ∏ i = 1 n σ i ∗ \sigma_{user} = \prod^n_{i=1} \sigma_i^* σuser=i=1nσi来计算 σ u s e r \sigma_{user} σuser,最后得出文件搜索者的私钥 s k = ( y u s e r = ∏ i = 1 n y i ∗ , < v , σ u s e r > ) sk = (y_{user} = \prod^n_{i=1} y_i^*, < v, \sigma_{user} >) sk=(yuser=i=1nyi,<v,σuser>)


TokenGen

Select s ← Z p s \gets Zp sZp. To generate the search token for keyword w w w, compute t o k 1 = ( g a g b H ( w ) ) s tok1 = (g^ag^{bH(w)})^s tok1=(gagbH(w))s t o k 2 = g c s tok2 = g^{cs} tok2=gcs. Therefore, the search token t o k = ( y u s e r s , < v s , σ u s e r s > , t o k 1 , t o k 2 ) tok = (y^s_{user}, < v^s, \sigma^s_{user} >, tok1, tok2) tok=(yusers,<vs,σusers>,tok1,tok2).

分析:

这一步是为关键词创建 t o k e n token token 。从 Z p Z_p Zp 群中选取一个元素 s s s ,计算 t o k 1 = ( g a g b H ( w ) ) s tok1=(g^ag^{bH(w)})^s tok1=(gagbH(w))s , t o k 2 = g c s tok2 = g^{cs} tok2=gcs,生成最终的 t o k e n token token,即 t o k = ( y u s e r s , < v s , σ u s e r s > , t o k 1 , t o k 2 ) tok = (y^s_{user}, < v^s, \sigma^s_{user} >, tok1, tok2) tok=(yusers,<vs,σusers>,tok1,tok2)


Search

At first, compute $E = \frac{e(u_{gate},vs)e(\sigmas_{user},g)}{y^s_{user}} $. If user’s attributes satisfy the access policy according to the ciphertext, E = e ( g , g ) a c s t 2 E = e(g, g)^{acst2} E=e(g,g)acst2 and e ( W ′ , t o k 1 ) E = e ( W , t o k 2 ) e(W', tok1)E = e(W, tok2) e(W,tok1)E=e(W,tok2) holds.

分析:

执行搜索操作。先计算 $E = \frac{e(u_{gate},vs)e(\sigmas_{user},g)}{y^s_{user}} ,如果用户属性满足访问策略,则 ,如果用户属性满足访问策略,则 ,如果用户属性满足访问策略,则E = e(g, g)^{acst_2}$ 和 e ( W ′ , t o k 1 ) E = e ( W , t o k 2 ) e(W', tok1)E = e(W, tok2) e(W,tok1)E=e(W,tok2)成立。


According to the above, the search token t o k tok tok can match with the c p h W cphW cphW in the ciphertext c p h cph cph, if the attributes of data user can satisfy the access policy used for encrypting the keyword. The c p h F cphF cphF in cph should be downloaded afterwards and returned to the data user.


ps: Hexo中编写数学公式时,对符号 的支持不好,会导致转化为html中的公式无法解析,进而导致页面混乱。

如有侵权,请联系作者删除

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

小饅頭

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值