1. 引言
Papamanthou等人2013年论文《Signatures of Correct Computation》,发表于TCC 2013。
要点:(基于pairing构建的多变量polynomial evaluation和多变量polynomial differentiation evaluation)
1)多变量多项式分解:
f
(
x
⃗
)
f(\vec{x})
f(x) 为多变量多项式in
Z
p
\mathbb{Z}_p
Zp,其中
x
⃗
=
[
x
1
,
x
2
,
⋯
,
x
n
]
\vec{x}=[x_1,x_2,\cdots,x_n]
x=[x1,x2,⋯,xn],对于
a
⃗
=
[
a
1
,
a
2
,
⋯
,
a
n
]
∈
Z
p
n
\vec{a}=[a_1,a_2,\cdots,a_n]\in\mathbb{Z}_p^n
a=[a1,a2,⋯,an]∈Zpn,多项式
f
(
x
⃗
)
−
f
(
a
⃗
)
f(\vec{x})-f(\vec{a})
f(x)−f(a)可表示为
f
(
x
⃗
)
−
f
(
a
⃗
)
=
∑
i
=
1
n
(
x
i
−
a
i
)
w
i
(
x
⃗
)
f(\vec{x})-f(\vec{a})=\sum_{i=1}^{n}(x_i-a_i)w_i(\vec{x})
f(x)−f(a)=∑i=1n(xi−ai)wi(x)。
2)多变量多项式随机分解:
若
f
(
x
⃗
)
=
f
(
x
1
,
x
2
,
⋯
,
x
n
)
f(\vec{x})=f(x_1,x_2,\cdots,x_n)
f(x)=f(x1,x2,⋯,xn) evaluates to
f
(
a
⃗
)
=
f
(
a
1
,
a
2
,
⋯
,
a
n
)
f(\vec{a})=f(a_1,a_2,\cdots,a_n)
f(a)=f(a1,a2,⋯,an),则取任意的随机数
r
1
∈
Z
p
r_1\in\mathbb{Z}_p
r1∈Zp,将
f
(
x
1
,
x
2
,
⋯
,
x
n
)
−
f
(
a
1
,
a
2
,
⋯
,
a
n
)
f(x_1,x_2,\cdots,x_n)-f(a_1,a_2,\cdots,a_n)
f(x1,x2,⋯,xn)−f(a1,a2,⋯,an)多项式除以
r
1
(
x
1
−
a
1
)
+
x
2
−
a
2
r_1(x_1-a_1)+x_2-a_2
r1(x1−a1)+x2−a2多项式,其余数
s
1
(
x
2
,
x
3
,
⋯
,
x
n
)
s_1(x_2,x_3,\cdots,x_n)
s1(x2,x3,⋯,xn)多项式与
x
1
x_1
x1无关,即:
f
(
x
1
,
x
2
,
⋯
,
x
n
)
=
[
r
1
(
x
1
−
a
1
)
+
x
2
−
a
2
]
⋅
q
1
(
x
1
,
x
2
,
⋯
,
x
n
)
+
s
1
(
x
2
,
x
3
,
⋯
,
x
n
)
f(x_1,x_2,\cdots,x_n)=[r_1(x_1-a_1)+x_2-a_2]\cdot q_1(x_1,x_2,\cdots,x_n)+s_1(x_2,x_3,\cdots,x_n)
f(x1,x2,⋯,xn)=[r1(x1−a1)+x2−a2]⋅q1(x1,x2,⋯,xn)+s1(x2,x3,⋯,xn)
进一步将
s
1
(
x
2
,
x
3
,
⋯
,
x
n
)
s_1(x_2,x_3,\cdots,x_n)
s1(x2,x3,⋯,xn) 多项式除以
r
2
(
x
2
−
a
2
)
+
x
3
−
a
3
r_2(x_2-a_2)+x_3-a_3
r2(x2−a2)+x3−a3多项式,其余数多项式为
s
2
(
x
3
,
x
4
,
⋯
,
x
n
)
s_2(x_3,x_4,\cdots,x_n)
s2(x3,x4,⋯,xn)与
x
2
x_2
x2无关。
以此类推,在最终将余数多项式
s
n
−
1
(
x
n
)
s_{n-1}(x_n)
sn−1(xn)除以
x
n
−
a
n
x_n-a_n
xn−an,相应的余数多项式
s
n
∈
Z
p
s_n\in\mathbb{Z}_p
sn∈Zp为constant term,与任何变量均无关。
最终
f
(
x
1
,
x
2
,
⋯
,
x
n
)
−
f
(
a
1
,
a
2
,
⋯
,
a
n
)
f(x_1,x_2,\cdots,x_n)-f(a_1,a_2,\cdots,a_n)
f(x1,x2,⋯,xn)−f(a1,a2,⋯,an)可表示为:
f
(
x
1
,
x
2
,
⋯
,
x
n
)
−
f
(
a
1
,
a
2
,
⋯
,
a
n
)
=
∑
i
∈
[
n
−
1
]
[
r
i
(
x
i
−
a
i
)
+
x
i
+
1
−
a
i
+
1
]
q
i
(
x
⃗
)
+
(
x
n
−
a
n
)
q
n
(
x
n
)
+
s
n
f(x_1,x_2,\cdots,x_n)-f(a_1,a_2,\cdots,a_n)=\sum_{i\in [n-1]}[r_i(x_i-a_i)+x_{i+1}-a_{i+1}]q_i(\vec{x})+(x_n-a_n)q_n(x_n)+s_n
f(x1,x2,⋯,xn)−f(a1,a2,⋯,an)=∑i∈[n−1][ri(xi−ai)+xi+1−ai+1]qi(x)+(xn−an)qn(xn)+sn
由于当
(
x
1
,
x
2
,
⋯
,
x
n
)
(x_1,x_2,\cdots,x_n)
(x1,x2,⋯,xn)取值为
(
a
1
,
a
2
,
⋯
,
a
n
)
(a_1,a_2,\cdots,a_n)
(a1,a2,⋯,an)时,
f
(
x
1
,
x
2
,
⋯
,
x
n
)
−
f
(
a
1
,
a
2
,
⋯
,
a
n
)
=
0
f(x_1,x_2,\cdots,x_n)-f(a_1,a_2,\cdots,a_n)=0
f(x1,x2,⋯,xn)−f(a1,a2,⋯,an)=0,因此
s
n
s_n
sn应为0值。
可引入随机值
r
1
,
⋯
,
r
n
−
1
r_1,\cdots,r_{n-1}
r1,⋯,rn−1,其中
r
1
r
2
⋯
r
n
−
1
≠
0
r_1r_2\cdots r_{n-1}\neq 0
r1r2⋯rn−1=0,相应的
f
(
x
⃗
)
−
f
(
a
⃗
)
f(\vec{x})-f(\vec{a})
f(x)−f(a)多项式随机分解可表示为 :
f
(
x
⃗
)
−
f
(
a
⃗
)
=
∑
i
∈
[
n
−
1
]
[
r
i
(
x
i
−
a
i
)
+
x
i
+
1
−
a
i
+
1
]
q
i
(
x
⃗
)
+
(
x
n
−
a
n
)
q
n
(
x
n
)
f(\vec{x})-f(\vec{a})=\sum_{i\in [n-1]}[r_i(x_i-a_i)+x_{i+1}-a_{i+1}]q_i(\vec{x})+(x_n-a_n)q_n(x_n)
f(x)−f(a)=∑i∈[n−1][ri(xi−ai)+xi+1−ai+1]qi(x)+(xn−an)qn(xn)
【对于单变量多项式,相当于有
f
(
x
)
−
f
(
a
)
=
(
x
−
a
)
q
(
x
)
f(x)-f(a)=(x-a)q(x)
f(x)−f(a)=(x−a)q(x)】
3)多变量多项式微分分解:(单变量求导)
整个
f
(
x
⃗
)
f(\vec{x})
f(x)可表示为:
f
(
x
⃗
)
=
∑
i
=
1
n
−
1
(
x
i
−
a
i
)
u
i
(
x
⃗
)
+
(
x
n
−
a
n
)
k
+
1
q
(
x
n
)
+
c
k
x
n
k
+
⋯
+
c
1
x
n
+
c
0
f(\vec{x})=\sum_{i=1}^{n-1}(x_i-a_i)u_i(\vec{x})+(x_n-a_n)^{k+1}q(x_n)+c_kx_n^k+\cdots + c_1x_n+c_0
f(x)=∑i=1n−1(xi−ai)ui(x)+(xn−an)k+1q(xn)+ckxnk+⋯+c1xn+c0
从而有,对
f
(
x
⃗
)
f(\vec{x})
f(x)的
x
n
x_n
xn求
k
k
k阶导 并 evaluate at
a
⃗
=
[
a
1
,
a
2
,
⋯
,
a
n
]
\vec{a}=[a_1,a_2,\cdots,a_n]
a=[a1,a2,⋯,an]的值为:【同理可推广至对任意变量
x
i
x_i
xi求
k
k
k阶导】
∂
k
f
(
x
⃗
)
∂
x
n
k
(
a
⃗
)
=
k
!
⋅
c
k
\frac{\partial^k f(\vec{x})}{\partial x_n^k}(\vec{a})=k!\cdot c_k
∂xnk∂kf(x)(a)=k!⋅ck
4)多变量多项式微分随机分解:(单变量求导)
整个
f
(
x
⃗
)
f(\vec{x})
f(x)可表示为:
f
(
x
⃗
)
=
∑
i
=
1
n
−
2
[
r
i
(
x
i
−
a
i
)
+
x
i
+
1
−
a
i
+
1
]
u
i
(
x
⃗
)
+
(
x
n
−
1
−
a
n
−
1
)
u
n
−
1
(
x
⃗
)
+
(
x
n
−
a
n
)
k
+
1
q
(
x
n
)
+
c
k
x
n
k
+
⋯
+
c
1
x
n
+
c
0
f(\vec{x})=\sum_{i=1}^{n-2}[r_i(x_i-a_i)+x_{i+1}-a_{i+1}]u_i(\vec{x})+(x_{n-1}-a_{n-1})u_{n-1}(\vec{x})+(x_n-a_n)^{k+1}q(x_n)+c_kx_n^k+\cdots + c_1x_n+c_0
f(x)=∑i=1n−2[ri(xi−ai)+xi+1−ai+1]ui(x)+(xn−1−an−1)un−1(x)+(xn−an)k+1q(xn)+ckxnk+⋯+c1xn+c0
从而有,对
f
(
x
⃗
)
f(\vec{x})
f(x)的
x
n
x_n
xn求
k
k
k阶导 并 evaluate at
a
⃗
=
[
a
1
,
a
2
,
⋯
,
a
n
]
\vec{a}=[a_1,a_2,\cdots,a_n]
a=[a1,a2,⋯,an]的值为:【同理可推广至对任意变量
x
i
x_i
xi求
k
k
k阶导】
∂
k
f
(
x
⃗
)
∂
x
n
k
(
a
⃗
)
=
k
!
⋅
c
k
\frac{\partial^k f(\vec{x})}{\partial x_n^k}(\vec{a})=k!\cdot c_k
∂xnk∂kf(x)(a)=k!⋅ck
介绍了Signatures of Correct Computation (SCC),用于verify dynamic computations in cloud settings。
在SCC 模式下,a trusted “source” outsources a function
f
f
f to an untrusted “server”,同时有a public key for that function (to be used during verification)。
server可产生a succinct signature
σ
\sigma
σ 用于证明 the correctness of the computation of
f
f
f,即 some result
v
v
v is indeed the correct outcome of the function
f
f
f evaluated on some point
a
a
a。
构建SCC应满足2个性能指标:
1)verify the signature的时间 应少于 直接evaluate the function
f
f
f的时间;
2)当function改变时,相应的public key应支持高效更新。
本文构建的SCC除满足以上2个性能指标要求外,还:
- 支持expressive manipulations over multivariate polynomials,如polynomial evaluation和polynomial differentiation。
- 具有adaptively secure in the random oracle model、
- 支持optimal updates,即,the function’s public key 可updated in time proportional to the number of updated coefficients,而不需要perform a linear-time computation (in the size of the polynomial)。
本文的signatures of correct computation(SCC)与同期很多研究中提到的 Publicly Verifiable Computation (PVC) 是相似的。
在SCC 模式下,任何的client 都可以verify the signature
σ
\sigma
σ 然后信服相应的计算结果;而在PVC模式下,只有only the client that issued a query (or anyone who trusts this client) can verify that ther server returned a valid signature (proof) for the answer to the query。
本文的SCC技术可调整成PVC schemes with adaptive security, efficient updates and without the random oracle model。
随着云计算的普及,越来越需要provide integrity guarantees in third-party data management settings。考虑如下场景:
某公司发明了某独特算法,如个性化医疗或者是股票趋势预测,为了避免内部自建昂贵的IT基础设施,该公司将该算法的执行外包给an external, untrusted cloud provider(如Amazon,Google等)。当用户只信任发明该算法的公司,而不信任云服务商时,用户该如何来verify the correctness of the computation of the algorithm呢?
以上场景需满足以下要求:
(1)efficiency:即client 运行verification算法的时间 应少于 在云端执行该算法的时间;
(2)public verifiability:即verification机制中应不绑定特定的verifier’s secret key,以支持任何用户都可verify the computation。
(3)efficiently handle updates:支持对the outsourced algorithm进行efficiently update,避免从头开始计算public parameters。
本文提出了signatures of correct computation (SCC) 以支持verify dynamic computation in the cloud:
- an untrusted worker可生成a signature 来证明 the correctness of some computation over some input;
- 需要由trusted source来生成a public key (produced by an one-time preprocessing);(该trusted source为who outsourced the function in the cloud)
- 任何用户都可使用该public key 来验证该signature。
本文的SCC概念与PVC概念非常接近,但是SCC stronger than PVC:
- given an SCC scheme,one can directly construct a PVC scheme;而反之并不成立。
- 在PVC中,a “proof of correct computation” is tied to a specific challenge (generated by an algorithm
ProbGen
in [31]),and can only be verified by the client who has generated that challenge (or anyone who trusts this client)。 - SCC is not tied to any challenge,and can be verified by anyone in the world,类似于传统的signature on a message。
1.1 本文主要贡献
本文重点关注了对specific functionalities 而不是 generic constructions的实现和优化,类似与 Parno等人2012年论文《How to Delegate and Verify in Public: Verifiable Computation from Attribute-Based Encryption》和 Canetti等人2011年论文《Two 1-round protocols for delegation of computation》中的观点一样。
-
支持多变量多项式操作——如多变量polynomial evaluation and 多变量polynomial differentiation。
基于多项式的操作可广泛用于很多应用场景,如:
– statistical analysis 统计分析;
– scientific computing 科学计算;
– machine learning 机器学习。
在Fiore and Gennaro 2012年论文《Publicly verifiable delegation of large polynomials and matrix computations》中列出了很多基于publicly verifiable computation on polynomials的应用,如:
– proof of retrievability 数据可恢复证明;
– verifiable keyword search 可验证关键词搜索;
– discrete Fourier transform 离散傅里叶变换;
– linear transformation 线性变换。 -
支持slightly modify our selectively secure scheme来实现adaptive security。具有adaptive security under the random oracle model。
-
under the weaker PVC model,可实现adaptive security under the standard model without random oracles。
-
本文的构建是基于bilinear groups实现的。同时本文证明了the adaptive security of our constructions under the random oracle model。
-
支持增量更新:本文支持a trusted source来make incremental updates in time proportional to the number of the updated polynomial coefficients,而不需要从头开始执行计算(that would take linear time in the size of the polynomial)。
-
本文的构建基于polynomial decomposition 多项式分解属性,详见Lemmas 1 and 3。
-
相比于[KZG10]中单变量polynomial evaluation,本文实现了更简单的adaptive security in the multivariate case。尽管多变量看起来似乎更难实现。
-
在多项式分解属性中实现了randomness植入,详见Lemmas 2 and 4。
1.2 相关研究
(1)SCC与authenticated data structure (ADS) 数据结构认证相关。在某种意义上,SCC和ADS 共享exactly the same security properties:
- 在SCC中,a trusted source outsources a function,and a client wishes to verify the outcome of the function at a given point。
- 在ADS中,a trusted source outsources the data or a data structure,and the client wishes to verify the correctness of the result of a data structure query,如,dictionaries字典[18,26]、graphs图像[20,25]、hash tables[29,34]。
大多数的ADS schemes都需要logarithmic或linear overheads for verification costs,with some exceptions being authenticated range queries [2,19] and set operations [30],其中verification takes time proportional to the size of the answer。
(2)Verifiable computation in the secret key setting (SVC):
- 现有的verifiable computation [1,10,14] 实现了efficient verification of general Boolean circuits,but in the secret key model。但是不像SCC那样支持publicly verifiable。
(3)对多项式的verifiable computation:
- Benabbas等人2011年论文《Verifiable Delegation of Computation over Large Datasets》中在SVC 模式下,使用algebraic one-way functions,实现了对多变量polynomial evaluation的高效verification算法,但是不支持对多项式系数的高效更新(为了更新一个系数,需要rerandomize所有现有的系数).
- Kate等人2010年论文 [KZG10] 中实现了对单变量多项式的publicly verifiable commitment scheme,其本质上就是an SCC scheme for 单变量polynomial evaluation。而且Kate的算法无法直接扩展至多变量多项式。
本文是第一个实现了支持efficient verification of differentiation queries——even in the SVC setting。
(4)与CS proofs和SNARGs的关系:
本文的SCC model 与 computationally-sound proofs (CS proofs) 和 succinct non-interactive arguments (SNARGs) 均相关。
CSS和SNARGs model之间的主要联系有:non-interactive和publicly verifiable (CS proofs也可实现non-interactive in the random oracle model)。
目前很多的SNARGs都是基于non-falsifiable assumption构建的,one-falsifiable assumption被认为是 a lot stronger than all common assumptions used in cryptography (如one-way functions, trapdoor permutations, DDH, RSA, LWE等等)。
而本文基于的assumption不属于以上范畴,尽管在verify multivariate polynomials,本文使用了the random oracle。但是与Micali [27] 论文不同,本文没有使用the PCP theorem,因此可实现更practical的schemes。
(5)其它同期独立研究成果:
-
Parno等人2012年论文《How to Delegate and Verify in Public: Verifiable Computation from Attribute-Based Encryption》中的PVC formulation,支持任意client verify that an untrusted server correctly computes a function f f f on a specific input a a a。需要an input preparation randomized algorithm
ProbGem
,来map user inputs a a a to server inputs σ a \sigma_a σa and prepare an object V K a VK_a VKa to be used for verification, specific for σ a \sigma_a σa。
与本文的SCC不同,only the client that issued a query for a a a (or anyone who trusts this client) can verify that the server returned a valid signature (proof) for f ( a ) f(a) f(a)。
此外,a client running theProbGen
算法存在与server 串通合谋伪造proof的可能。
在该论文中构建了generalized Boolean functions from attribute-based encryption (ABE),其proof size与answer size成比例。 -
Canetti等人2011年论文《Two 1-round protocols for delegation of computation》的PVC scheme,其client verification为polylogarithmic in the size of the evaluated circuit。实现了adaptive security under a slightly weaker model, in which the client needs to keep certain secret model。存在类似的问题:a client can verify only his queries unless extra assumptions are put into place。
-
Fiore and Gennaro 2012年论文《Publicly verifiable delegation of large polynomials and matrix computations》中 基于algebraic one-way functions实现了对多变量多项式的PVC scheme。同时也支持使用less complex assumptions (如RSA) 来实现。其使用的model更严格,其要求only the party ran the setup algorithm for a specific function can run the problem generation algorithm,即支持publicly verifiable,但是不支持publicly delegatable。因此不适应于以下场景:
药物公司outsource a 基因算法,每个用户都将自己的基因数据提交供计算。
同时,该算法也未考虑到对polynomial系数的高效更新。
但是,其算法具有more efficient verification and a delegation step of O ( n log d ) O(n\log d) O(nlogd) cost。
相关研究的性能对比详见下表:
1.3 亮点技术
本文涉及的亮点技术有:
(1)多变量polynomial evaluation:
[KZG10] 可用于构建an SCC scheme of 单变量polynomial evaluations。[KZG10]基于的思想是:(其中
f
(
x
)
f(x)
f(x)为单变量多项式 in
Z
p
\mathbb{Z}_p
Zp)
f
(
x
)
−
f
(
a
)
f(x)-f(a)
f(x)−f(a)可整除
x
−
a
x-a
x−a,也就是说,可找到a polynomial
w
(
x
)
w(x)
w(x),使得
f
(
x
)
−
f
(
a
)
=
(
x
−
a
)
w
(
x
)
f(x)-f(a)=(x-a)w(x)
f(x)−f(a)=(x−a)w(x)成立。
利用以上思想,Kate等人使用pairing operation in bilinear groups,construct a witness from the term
w
(
x
)
w(x)
w(x)。
以上模式无法直接扩展用于多变量场景。基于以下思想:
f
(
x
⃗
)
f(\vec{x})
f(x) 为多变量多项式in
Z
p
\mathbb{Z}_p
Zp,其中
x
⃗
=
[
x
1
,
x
2
,
⋯
,
x
n
]
\vec{x}=[x_1,x_2,\cdots,x_n]
x=[x1,x2,⋯,xn],对于
a
⃗
=
[
a
1
,
a
2
,
⋯
,
a
n
]
∈
Z
p
n
\vec{a}=[a_1,a_2,\cdots,a_n]\in\mathbb{Z}_p^n
a=[a1,a2,⋯,an]∈Zpn,多项式
f
(
x
⃗
)
−
f
(
a
⃗
)
f(\vec{x})-f(\vec{a})
f(x)−f(a)可表示为
f
(
x
⃗
)
−
f
(
a
⃗
)
=
∑
i
=
1
n
(
x
i
−
a
i
)
w
i
(
x
⃗
)
f(\vec{x})-f(\vec{a})=\sum_{i=1}^{n}(x_i-a_i)w_i(\vec{x})
f(x)−f(a)=∑i=1n(xi−ai)wi(x)。
其中多项式
w
i
(
x
⃗
)
w_i(\vec{x})
wi(x)可用于构建witnesses。特别地,本文将这些terms encode为exponents of bilinear group elements,相应的verification为a pairing product equation encoding the above test in the exponent。
(2)From Selective to Adaptive Security:
相对于单变量情况下的single term,支持the polynomial evaluation contains a sum of terms。从而支持the weaker notion of selective security。
通过在多项式分解过程中引入随机数,实现了adaptive security。
基于本文的adaptively secure SCC with random oracles,可直接实现an adaptively secure PVC scheme in the plain model。
(3)Derivative Evaluation微分evaluation
f
’
(
x
)
f’(x)
f’(x):
支持verifiable derivative evaluation的直观方法是:
source commit to
n
k
nk
nk 个polynomials during setup,分别对应一阶、二阶、……、
k
k
k阶微分中的每个possible variable。
这种直观方法result in increased setup and update overhead。
本文的verifiable derivative evaluation构建基本思想为:
- 对于单变量多项式 f ( x ) f(x) f(x), f ( x ) − f ’ ( a ) x ( x − a ) 2 \frac{f(x)-f’(a)x}{(x-a)^2} (x−a)2f(x)−f’(a)x的余数为a constant polynomial。即 f ( x ) − f ’ ( a ) x = ( x − a ) 2 q ( x ) + b f(x)-f’(a)x=(x-a)^2q(x)+b f(x)−f’(a)x=(x−a)2q(x)+b,其中 q ( x ) ∈ Z p [ x ] , b ∈ Z p q(x)\in\mathbb{Z}_p[x],b\in\mathbb{Z}_p q(x)∈Zp[x],b∈Zp。
- 高阶微分和多变量多项式具有类似的特点。
2. 相关定义
-
SCC scheme定义:
包含KeyGen
、Setup
、Compute
、Verify
、Update
5个算法。
其中的Update
算法允许the source to update the function f f f to a new function f ’ f’ f’。直观的实现Update的方式是从Setup
算法开始重新针对新的 f ’ f’ f’执行一遍,而本文实现了更高效的incremental updates。 -
correctness of an SCC scheme定义:
-
adaptive security of an SCC scheme定义:
2.1 多变量多项式相关约定
使用multiset over some universe U \mathcal{U} U,a generalized set 的元素来自于该universe U \mathcal{U} U,其中每个元素可出现多于1次,如 { 1 , 1 , 2 , 3 , 3 , 3 } \{1,1,2,3,3,3\} {1,1,2,3,3,3} 就是a multiset。
- multiset
S
:
U
→
Z
≥
0
S:\mathcal{U}\rightarrow \mathbb{Z}^{\geq 0}
S:U→Z≥0:为a function mapping each element in a universe
U
\mathcal{U}
U to its multiplicity(多样性,其实即是指元素个数)。对于任意的
x
∉
S
x\notin S
x∈/S,有
S
(
x
)
=
0
S(x)=0
S(x)=0。
如对multiset { a , a , b , c , c , c } \{a,a,b,c,c,c\} {a,a,b,c,c,c},有 S ( a ) = 2 , S ( b ) = 1 , S ( c ) = 3 S(a)=2,S(b)=1,S(c)=3 S(a)=2,S(b)=1,S(c)=3,而 S ( e ) = 0 S(e)=0 S(e)=0因为 e e e不在该multiset中。
设
S
,
T
S,T
S,T表示two multisets over universe
U
\mathcal{U}
U,其中
S
⊆
T
S\subseteq T
S⊆T,即
∀
a
∈
U
\forall a\in \mathcal{U}
∀a∈U,
S
(
a
)
≤
T
(
a
)
S(a)\leq T(a)
S(a)≤T(a)。
∣
S
∣
|S|
∣S∣:表示the size of
S
S
S over universe
U
\mathcal{U}
U,即
∣
S
∣
=
∑
a
∈
U
S
(
a
)
|S|=\sum_{a\in\mathcal{U}}S(a)
∣S∣=∑a∈US(a)。
S
d
,
n
\mathcal{S}_{d,n}
Sd,n:表示the set of multisets of size at most
d
d
d over universe
{
1
,
2
,
⋯
,
n
}
\{1,2,\cdots,n\}
{1,2,⋯,n}。
设
f
∈
Z
p
[
x
1
,
x
2
,
⋯
,
x
n
]
=
Z
p
[
x
⃗
]
f\in\mathbb{Z}_p[x_1,x_2,\cdots,x_n]=\mathbb{Z}_p[\vec{x}]
f∈Zp[x1,x2,⋯,xn]=Zp[x] 为 an
n
n
n-variate polynomial over
Z
p
\mathbb{Z}_p
Zp with maximum degree
d
d
d,具体可表示为:
f
(
x
⃗
)
=
f
(
x
1
,
x
2
,
⋯
,
x
n
)
=
∑
S
∈
S
d
,
n
c
S
⋅
∏
i
∈
S
x
i
S
(
i
)
f(\vec{x})=f(x_1,x_2,\cdots,x_n)=\sum_{S\in\mathcal{S}_{d,n}}c_S\cdot \prod_{i\in S}x_i^{S(i)}
f(x)=f(x1,x2,⋯,xn)=∑S∈Sd,ncS⋅∏i∈SxiS(i) …… (2.1)
如,multiset { 1 , 1 , 2 , 2 , 2 , 5 } \{1,1,2,2,2,5\} {1,1,2,2,2,5}对应的term为 x 1 2 x 2 3 x 5 x_1^2x_2^3x_5 x12x23x5。而empty multiset ∅ \varnothing ∅ 对应的polynomial中的constant term。
- 多变量多项式的degree:为the maximum total degree of any monomial contained in the polynomial。如 3 x 1 x 2 + x 3 3 x 4 x 5 3x_1x_2+x_3^3x_4x_5 3x1x2+x33x4x5的degree为5。
2.2 基于的安全假设
基于的安全假设为 Bilinear
l
l
l-strong Diffie-Hellman assumption:
3. 多变量polynomial evaluation under selective security model
selective security 弱于 adaptive security,selective security要求the adversary to commit ahead of time to the challenge point a a a,与Identity-Based Encryption (IBE)[7]、Attribute-Based Encryption (ABE)[21]、Functional Encryption (FE)[32] 和Predicate Encryption (PE)[8] 中常用到的selective security类似。
核心思想为:
f
(
x
⃗
)
f(\vec{x})
f(x) 为多变量多项式in
Z
p
\mathbb{Z}_p
Zp,其中
x
⃗
=
[
x
1
,
x
2
,
⋯
,
x
n
]
\vec{x}=[x_1,x_2,\cdots,x_n]
x=[x1,x2,⋯,xn],对于
a
⃗
=
[
a
1
,
a
2
,
⋯
,
a
n
]
∈
Z
p
n
\vec{a}=[a_1,a_2,\cdots,a_n]\in\mathbb{Z}_p^n
a=[a1,a2,⋯,an]∈Zpn,多项式
f
(
x
⃗
)
−
f
(
a
⃗
)
f(\vec{x})-f(\vec{a})
f(x)−f(a)可表示为
f
(
x
⃗
)
−
f
(
a
⃗
)
=
∑
i
=
1
n
(
x
i
−
a
i
)
w
i
(
x
⃗
)
f(\vec{x})-f(\vec{a})=\sum_{i=1}^{n}(x_i-a_i)w_i(\vec{x})
f(x)−f(a)=∑i=1n(xi−ai)wi(x)。
即对应Lemma 1为:
多变量polynomial evaluation under selective security model的详细构建思路为:
-
( P K , S K ) ← K e y G e n ( λ , F ) (PK,SK)\leftarrow KeyGen(\lambda,\mathcal{F}) (PK,SK)←KeyGen(λ,F)算法:
假设function family F ⊆ Z p [ x ⃗ ] \mathcal{F}\subseteq \mathbb{Z}_p[\vec{x}] F⊆Zp[x] 表示all polynomials over Z p \mathbb{Z}_p Zp with at most n n n variables and degree bounded by d d d。即family F \mathcal{F} F中的polynomials可以(2.1)方程式的方式,由multisets in set S n , d \mathcal{S}_{n,d} Sn,d来表示。
KeyGen
算法invoke the bilinear group generation algorithm to generate a bilinear group instance of prime order p p p (of λ \lambda λ bits), with a bilinear map function e : G × G → G T e: \mathbb{G}\times \mathbb{G}\rightarrow \mathbb{G}_T e:G×G→GT。
选择随机generator g ∈ G g\in\mathbb{G} g∈G和随机point t ⃗ = [ t 1 , t 2 , ⋯ , t n ] ∈ Z p n \vec{t}=[t_1,t_2,\cdots,t_n]\in\mathbb{Z}_p^n t=[t1,t2,⋯,tn]∈Zpn,然后生成相应的signature generation set W n , d \mathcal{W}_{n,d} Wn,d:
W n , d = { g ∏ i ∈ S t i S ( i ) : ∀ S ∈ S n , d } \mathcal{W}_{n,d}=\{g^{\prod_{i\in S}t_i^{S(i)}}: \forall S\in\mathcal{S}_{n,d}\} Wn,d={g∏i∈StiS(i):∀S∈Sn,d} …… (3.2)
如, W 2 , 2 \mathcal{W}_{2,2} W2,2中包含的元素有: g , g t 1 , g t 2 , g t 1 2 , g t 2 2 , g t 1 t 2 2 , g t 1 2 t 2 , g t 1 2 t 2 2 g,g^{t_1},g^{t_2},g^{t_1^2},g^{t_2^2},g^{t_1t_2^2},g^{t_1^2t_2},g^{t_1^2t_2^2} g,gt1,gt2,gt12,gt22,gt1t22,gt12t2,gt12t22。
KeyGen
算法的输出public key P K PK PK 中包含 g , W n , d g,\mathcal{W}_{n,d} g,Wn,d 和 the description of G , G T , e \mathbb{G},\mathbb{G}_T,e G,GT,e。
secret key S K SK SK中包含的是the commitment point t ⃗ \vec{t} t。
在本文的full version版本 的附录D中,提到了可减少 W n , d \mathcal{W}_{n,d} Wn,d中的group elements数量的优化方法:
-
F K ( f ) ← S e t u p ( S K , P K , f ) FK(f)\leftarrow Setup(SK,PK,f) FK(f)←Setup(SK,PK,f)算法:
f ( x ⃗ ) ∈ Z p [ x ⃗ ] f(\vec{x})\in\mathbb{Z}_p[\vec{x}] f(x)∈Zp[x] 为 an n n n-variate polynomial of maximum degree d d d over Z p \mathbb{Z}_p Zp,具有 k k k terms,可由:
multisets S 1 , S 2 , ⋯ , S k ∈ S n , d S_1,S_2,\cdots,S_k\in\mathcal{S}_{n,d} S1,S2,⋯,Sk∈Sn,d
和
相应的respective coefficients c 1 , c 2 , ⋯ , c k ∈ Z p c_1,c_2,\cdots,c_k\in\mathbb{Z}_p c1,c2,⋯,ck∈Zp
来表示。(如(2.1)方程式所示。)
Setup
算法利用 P K PK PK中包含的signature generation set W n , d \mathcal{W}_{n,d} Wn,d 来计算特定的polynomial public key,即:
F K ( f ) = g f ( t ⃗ ) = ( g ∏ i ∈ S 1 t i S 1 ( i ) ) c 1 × ( g ∏ i ∈ S 2 t i S 2 ( i ) ) c 2 × ⋯ × ( g ∏ i ∈ S k t i S k ( i ) ) c k FK(f)=g^{f(\vec{t})}=(g^{\prod_{i\in S_1}t_i^{S_1(i)}})^{c_1}\times (g^{\prod_{i\in S_2}t_i^{S_2(i)}})^{c_2}\times \cdots \times (g^{\prod_{i\in S_k}t_i^{S_k(i)}})^{c_k} FK(f)=gf(t)=(g∏i∈S1tiS1(i))c1×(g∏i∈S2tiS2(i))c2×⋯×(g∏i∈SktiSk(i))ck
Setup
算法的输出即为function public key F K ( f ) FK(f) FK(f)。 -
( v , w ⃗ ) ← C o m p u t e ( P K , f , a ⃗ ) (v,\vec{w})\leftarrow Compute(PK,f,\vec{a}) (v,w)←Compute(PK,f,a)算法:
1)首先计算 v = f ( a ⃗ ) v=f(\vec{a}) v=f(a);
2)然后找到相应的set of polynomials q 1 ( x ⃗ ) , q 2 ( x ⃗ ) , ⋯ , q n ( x ⃗ ) q_1(\vec{x}),q_2(\vec{x}),\cdots,q_n(\vec{x}) q1(x),q2(x),⋯,qn(x),满足 f ( x ⃗ ) − v = ∑ i = 1 n ( x i − a i ) q i ( x ⃗ ) f(\vec{x})-v=\sum_{i=1}^{n}(x_i-a_i)q_i(\vec{x}) f(x)−v=∑i=1n(xi−ai)qi(x);
3)signature w w w为a vector of n n n witnesses w 1 , w 2 , ⋯ , w n w_1,w_2,\cdots,w_n w1,w2,⋯,wn,其中 w i = g q i ( t ⃗ ) w_i=g^{q_i(\vec{t})} wi=gqi(t) for all i ∈ [ n ] i\in [n] i∈[n]。
注意 w i w_i wi很容易根据 P K PK PK中包含的signature generation set W n , d \mathcal{W}_{n,d} Wn,d来计算。
Compute
最终的输出为 pair ( v , w ⃗ ) (v,\vec{w}) (v,w),其中 v v v为多变量多项式evaluate at a ⃗ \vec{a} a的结果值, w ⃗ \vec{w} w为the signature of correctness。 -
V e r i f y ( P K , F K ( f ) , a ⃗ , v , w ⃗ ) Verify(PK,FK(f), \vec{a},v,\vec{w}) Verify(PK,FK(f),a,v,w)算法:
其中 w ⃗ = [ w 1 , w 2 , ⋯ , w n ] \vec{w}=[w_1,w_2,\cdots,w_n] w=[w1,w2,⋯,wn],为了证明 f ( a ⃗ ) = v f(\vec{a})=v f(a)=v,只需验证:
e ( F K ( f ) g − v , g ) = ∏ i = 1 n e ( g t i − a i , w i ) e(FK(f)g^{-v},g)=\prod_{i=1}^{n}e(g^{t_i-a_i}, w_i) e(FK(f)g−v,g)=∏i=1ne(gti−ai,wi)
若成立,则输出1,否则输出0。
其中,terms g t i g^{t_i} gti 已包含在 P K PK PK的 W n , d \mathcal{W}_{n,d} Wn,d中。 -
F K ( f ′ ) ← U p d a t e ( S K , P K , F K ( f ) , f ′ ) FK(f')\leftarrow Update(SK,PK,FK(f), f') FK(f′)←Update(SK,PK,FK(f),f′)算法:
f f f表示current polynomial, f ’ f’ f’表示需更新成为的new polynomial。
假设 f ′ f' f′和 f f f只有一个系数不同,用 S S S来表示the multiset corresponding to that coefficient,即the coefficient c S c_S cS corresponding to term ∏ i ∈ S x i S ( i ) \prod_{i\in S}x_i^{S(i)} ∏i∈SxiS(i) 更新为 c S ′ c_S' cS′ in f ’ f’ f’。
F K ( f ) FK(f) FK(f)表示current function public key,则:
F K ( f ′ ) = F K ( f ) ⋅ g ( c S ′ − c S ) ∏ i ∈ S t i S ( i ) FK(f')=FK(f)\cdot g^{(c_S'-c_S)\prod_{i\in S}t_i^{S(i)}} FK(f′)=FK(f)⋅g(cS′−cS)∏i∈StiS(i)
为new function public key。
以上 多变量polynomial evaluation under selective security model 算法,具有如下特性:
其中selective security of an SCC scheme的定义为:
4. 多变量polynomial evaluation under adaptive security model
本节将第3节中的selectively secure SCC scheme 转换为 adaptively security in the random oracle model,同时也可用于构建an adaptively secure PVC scheme under the formulation of Parno [31] without the random oracle model。
核心思想为:(与第3节中的polynomial decomposition多项式分解不同,此处多项式分解中引入了随机数)
若
f
(
x
⃗
)
=
f
(
x
1
,
x
2
,
⋯
,
x
n
)
f(\vec{x})=f(x_1,x_2,\cdots,x_n)
f(x)=f(x1,x2,⋯,xn) evaluates to
f
(
a
⃗
)
=
f
(
a
1
,
a
2
,
⋯
,
a
n
)
f(\vec{a})=f(a_1,a_2,\cdots,a_n)
f(a)=f(a1,a2,⋯,an),则取任意的随机数
r
1
∈
Z
p
r_1\in\mathbb{Z}_p
r1∈Zp,将
f
(
x
1
,
x
2
,
⋯
,
x
n
)
−
f
(
a
1
,
a
2
,
⋯
,
a
n
)
f(x_1,x_2,\cdots,x_n)-f(a_1,a_2,\cdots,a_n)
f(x1,x2,⋯,xn)−f(a1,a2,⋯,an)多项式除以
r
1
(
x
1
−
a
1
)
+
x
2
−
a
2
r_1(x_1-a_1)+x_2-a_2
r1(x1−a1)+x2−a2多项式,其余数
s
1
(
x
2
,
x
3
,
⋯
,
x
n
)
s_1(x_2,x_3,\cdots,x_n)
s1(x2,x3,⋯,xn)多项式与
x
1
x_1
x1无关,即:
f
(
x
1
,
x
2
,
⋯
,
x
n
)
=
[
r
1
(
x
1
−
a
1
)
+
x
2
−
a
2
]
⋅
q
1
(
x
1
,
x
2
,
⋯
,
x
n
)
+
s
1
(
x
2
,
x
3
,
⋯
,
x
n
)
f(x_1,x_2,\cdots,x_n)=[r_1(x_1-a_1)+x_2-a_2]\cdot q_1(x_1,x_2,\cdots,x_n)+s_1(x_2,x_3,\cdots,x_n)
f(x1,x2,⋯,xn)=[r1(x1−a1)+x2−a2]⋅q1(x1,x2,⋯,xn)+s1(x2,x3,⋯,xn)
进一步将
s
1
(
x
2
,
x
3
,
⋯
,
x
n
)
s_1(x_2,x_3,\cdots,x_n)
s1(x2,x3,⋯,xn) 多项式除以
r
2
(
x
2
−
a
2
)
+
x
3
−
a
3
r_2(x_2-a_2)+x_3-a_3
r2(x2−a2)+x3−a3多项式,其余数多项式为
s
2
(
x
3
,
x
4
,
⋯
,
x
n
)
s_2(x_3,x_4,\cdots,x_n)
s2(x3,x4,⋯,xn)与
x
2
x_2
x2无关。
以此类推,在最终将余数多项式
s
n
−
1
(
x
n
)
s_{n-1}(x_n)
sn−1(xn)除以
x
n
−
a
n
x_n-a_n
xn−an,相应的余数多项式
s
n
∈
Z
p
s_n\in\mathbb{Z}_p
sn∈Zp为constant term,与任何变量均无关。
最终
f
(
x
1
,
x
2
,
⋯
,
x
n
)
−
f
(
a
1
,
a
2
,
⋯
,
a
n
)
f(x_1,x_2,\cdots,x_n)-f(a_1,a_2,\cdots,a_n)
f(x1,x2,⋯,xn)−f(a1,a2,⋯,an)可表示为:
f
(
x
1
,
x
2
,
⋯
,
x
n
)
−
f
(
a
1
,
a
2
,
⋯
,
a
n
)
=
∑
i
∈
[
n
−
1
]
[
r
i
(
x
i
−
a
i
)
+
x
i
+
1
−
a
i
+
1
]
q
i
(
x
⃗
)
+
(
x
n
−
a
n
)
q
n
(
x
n
)
+
s
n
f(x_1,x_2,\cdots,x_n)-f(a_1,a_2,\cdots,a_n)=\sum_{i\in [n-1]}[r_i(x_i-a_i)+x_{i+1}-a_{i+1}]q_i(\vec{x})+(x_n-a_n)q_n(x_n)+s_n
f(x1,x2,⋯,xn)−f(a1,a2,⋯,an)=∑i∈[n−1][ri(xi−ai)+xi+1−ai+1]qi(x)+(xn−an)qn(xn)+sn
由于当
(
x
1
,
x
2
,
⋯
,
x
n
)
(x_1,x_2,\cdots,x_n)
(x1,x2,⋯,xn)取值为
(
a
1
,
a
2
,
⋯
,
a
n
)
(a_1,a_2,\cdots,a_n)
(a1,a2,⋯,an)时,
f
(
x
1
,
x
2
,
⋯
,
x
n
)
−
f
(
a
1
,
a
2
,
⋯
,
a
n
)
=
0
f(x_1,x_2,\cdots,x_n)-f(a_1,a_2,\cdots,a_n)=0
f(x1,x2,⋯,xn)−f(a1,a2,⋯,an)=0,因此
s
n
s_n
sn应为0值。
可引入随机值
r
1
,
⋯
,
r
n
−
1
r_1,\cdots,r_{n-1}
r1,⋯,rn−1,其中
r
1
r
2
⋯
r
n
−
1
≠
0
r_1r_2\cdots r_{n-1}\neq 0
r1r2⋯rn−1=0,相应的
f
(
x
⃗
)
−
f
(
a
⃗
)
f(\vec{x})-f(\vec{a})
f(x)−f(a)多项式随机分解可表示为 :
f
(
x
⃗
)
−
f
(
a
⃗
)
=
∑
i
∈
[
n
−
1
]
[
r
i
(
x
i
−
a
i
)
+
x
i
+
1
−
a
i
+
1
]
q
i
(
x
⃗
)
+
(
x
n
−
a
n
)
q
n
(
x
n
)
f(\vec{x})-f(\vec{a})=\sum_{i\in [n-1]}[r_i(x_i-a_i)+x_{i+1}-a_{i+1}]q_i(\vec{x})+(x_n-a_n)q_n(x_n)
f(x)−f(a)=∑i∈[n−1][ri(xi−ai)+xi+1−ai+1]qi(x)+(xn−an)qn(xn)
【对于单变量多项式,相当于有
f
(
x
)
−
f
(
a
)
=
(
x
−
a
)
q
(
x
)
f(x)-f(a)=(x-a)q(x)
f(x)−f(a)=(x−a)q(x)】
对应即为Lemma 2:(详细的证明可参见 本文的full version版本)
其中的 r 1 , r 2 , ⋯ , r n − 1 r_1,r_2,\cdots,r_{n-1} r1,r2,⋯,rn−1 随机值可 chosen “at random” by calling a hash function modeled as a random oracle(详见方程式(4.5))。
基于以上核心思想,adaptively secure SCC scheme的构建思路为:
-
( P K , S K ) ← K e y G e n ( λ , F ) (PK,SK)\leftarrow KeyGen(\lambda,\mathcal{F}) (PK,SK)←KeyGen(λ,F)算法:
与第3节的相同。 -
F K ( f ) ← S e t u p ( S K , P K , f ) FK(f)\leftarrow Setup(SK,PK,f) FK(f)←Setup(SK,PK,f)算法:
与第3节的相同。 -
( v , w ⃗ ) ← C o m p u t e ( P K , f , a ⃗ ) (v,\vec{w})\leftarrow Compute(PK,f,\vec{a}) (v,w)←Compute(PK,f,a)算法:
1)将 a ⃗ \vec{a} a解析为 [ a 1 , a 2 , ⋯ , a n ] [a_1,a_2,\cdots,a_n] [a1,a2,⋯,an],首先计算 v = f ( a ⃗ ) v=f(\vec{a}) v=f(a);
2)然后使用hash 函数 H : { 0 , 1 ∗ } → Z p H:\{0,1^*\}\rightarrow \mathbb{Z}_p H:{0,1∗}→Zp(后续会modeled as a random oracle)计算:
∀ 1 ≤ i ≤ n − 1 : r i = H ( a ⃗ ∣ ∣ i ) \forall 1\leq i\leq n-1: r_i=H(\vec{a}||i) ∀1≤i≤n−1:ri=H(a∣∣i) …… (4.5)
根据Lemma 2,找到相应的set of polynomials q 1 ( x ⃗ ) , q 2 ( x ⃗ ) , ⋯ , q n ( x n ) q_1(\vec{x}),q_2(\vec{x}),\cdots,q_n(x_n) q1(x),q2(x),⋯,qn(xn),满足 f ( x ⃗ ) − v = ∑ i ∈ [ n − 1 ] [ r i ( x i − a i ) + x i + 1 − a i + 1 ] q i ( x ⃗ ) + ( x n − a n ) q n ( x n ) f(\vec{x})-v=\sum_{i\in [n-1]}[r_i(x_i-a_i)+x_{i+1}-a_{i+1}]q_i(\vec{x})+(x_n-a_n)q_n(x_n) f(x)−v=∑i∈[n−1][ri(xi−ai)+xi+1−ai+1]qi(x)+(xn−an)qn(xn);
3)signature w w w为a vector of n n n witnesses w = [ w 1 , w 2 , ⋯ , w n − 1 , p o l y n o m i a l q n ( x n ) ] w=[w_1,w_2,\cdots,w_{n-1},polynomial\ q_n(x_n)] w=[w1,w2,⋯,wn−1,polynomial qn(xn)],其中 w i = g q i ( t ⃗ ) w_i=g^{q_i(\vec{t})} wi=gqi(t) for all i ∈ [ n − 1 ] i\in [n-1] i∈[n−1]。而the polynomial q n ( x n ) q_n(x_n) qn(xn) 为degree at most d d d的单变量多项式,其包含了the description of the polynomial,即 最多有 d d d个系数 β d , ⋯ , β 0 \beta_d,\cdots,\beta_0 βd,⋯,β0。
注意 w i w_i wi很容易根据 P K PK PK中包含的signature generation set W n , d \mathcal{W}_{n,d} Wn,d来计算。
Compute
最终的输出为 pair ( v , w ⃗ ) (v,\vec{w}) (v,w),其中 v v v为多变量多项式evaluate at a ⃗ \vec{a} a的结果值, w ⃗ \vec{w} w为the signature of correctness。 -
V e r i f y ( P K , F K ( f ) , a ⃗ , v , w ⃗ ) Verify(PK,FK(f), \vec{a},v,\vec{w}) Verify(PK,FK(f),a,v,w)算法:
1)将 a ⃗ \vec{a} a解析为 [ a 1 , a 2 , ⋯ , a n ] [a_1,a_2,\cdots,a_n] [a1,a2,⋯,an];
2)将 w ⃗ \vec{w} w解析为 [ w 1 , w 2 , ⋯ , w n − 1 , p o l y n o m i a l q n ( x n ) ] [w_1,w_2,\cdots,w_{n-1},polynomial\ q_n(x_n)] [w1,w2,⋯,wn−1,polynomial qn(xn)]
3)为了证明 f ( a ⃗ ) = v f(\vec{a})=v f(a)=v:
3.1)Verifier首先需要 P K PK PK中包含的signature generation set W n , d \mathcal{W}_{n,d} Wn,d来计算 g q n ( t n ) g^{q_n(t_n)} gqn(tn);
3.2)然后计算相应的random values r 1 , r 2 , ⋯ , r n − 1 r_1,r_2,\cdots,r_{n-1} r1,r2,⋯,rn−1:
∀ 1 ≤ i ≤ n − 1 : r i = H ( a ⃗ ∣ ∣ i ) \forall 1\leq i\leq n-1: r_i=H(\vec{a}||i) ∀1≤i≤n−1:ri=H(a∣∣i) …… (4.5)
3.3)最后验证:
e ( F K ( f ) g − v , g ) = ∏ i = 1 n − 1 e ( g r i ( t i − a i ) + t i + 1 − a i + 1 , w i ) e ( g t n − a n , g q n ( t n ) ) e(FK(f)g^{-v},g)=\prod_{i=1}^{n-1}e(g^{r_i(t_i-a_i)+t_{i+1}-a_{i+1}}, w_i)e(g^{t_n-a_n},g^{q_n(t_n)}) e(FK(f)g−v,g)=∏i=1n−1e(gri(ti−ai)+ti+1−ai+1,wi)e(gtn−an,gqn(tn)) …… (4.6)
若成立,则输出1,否则输出0。
其中,terms g t i g^{t_i} gti 已包含在 P K PK PK的 W n , d \mathcal{W}_{n,d} Wn,d中。 -
F K ( f ’ ) ← U p d a t e ( S K , P K , F K ( f ) , f ’ ) FK(f’)\leftarrow Update(SK,PK,FK(f), f’) FK(f’)←Update(SK,PK,FK(f),f’)算法:
与第3节的相同。
若基于以上adaptively secure SCC构建adaptively secure PVC,可将其中的随机值 r i r_i ri看成是challenge,不再通过hash function modeled as a random oracle输出,改为直接 directly chosen at random (as a challenge) by a client issuing a query to the untrusted server,从而实现了adaptively secure PVC without random oracles。
5. 将SCC scheme用于polynomial differentiation 多项式微分
已知多变量多项式 f ( x ⃗ ) f(\vec{x}) f(x),需构建SCC for k k k阶导数(对某个变量 x j x_j xj进行求导) ∂ k f ( x ⃗ ) / ∂ x j k ( a ⃗ ) \partial^k f(\vec{x})/{\partial x_j^k(\vec{a})} ∂kf(x)/∂xjk(a) evaluated at a chosen point a ⃗ \vec{a} a。
对于有
n
n
n个变量,maximum degree为
d
d
d的多项式
f
(
x
⃗
)
f(\vec{x})
f(x),其terms个数最多为
(
n
+
d
d
)
\binom{n+d}{d}
(dn+d),其每个term对所有变量(最多为
n
n
n个变量)的
k
k
k阶导数中最多包含
n
k
nk
nk个多项式——corresponding to all the possible derivatives (
k
k
k in total) of each possible variable。
最简单的支持verification of derivative computation的实现方式是:
对每个term中所有变量
k
k
k阶导数中所包含的
n
k
nk
nk个多项式进行commit。
此时,对
n
n
n个变量,maximum degree为
d
d
d的多项式,其Setup cost为
O
(
n
k
(
n
+
d
d
)
)
O(nk\binom{n+d}{d})
O(nk(dn+d))。且当需要做update操作时,需要update all
n
k
nk
nk polynomials。
而本文构建的支持polynomial differentiation的SCC scheme,其setup cost仅为 O ( ( n + d d ) ) O(\binom{n+d}{d}) O((dn+d)),且支持efficient incremental updates。
针对degree
d
d
d多项式的
k
k
k阶导,即要求
k
≤
d
k\leq d
k≤d,若
k
>
d
k>d
k>d则结果均为0值了。
核心思想为:(与evaluation 情况类似)
(1)微分分解
基本思路为:(与Lemma 1类似)
1)
f
(
x
⃗
)
/
(
x
1
−
a
1
)
f(\vec{x})/(x_1-a_1)
f(x)/(x1−a1),其商为
u
1
(
x
⃗
)
u_1(\vec{x})
u1(x),余数
s
1
(
x
⃗
)
s_1(\vec{x})
s1(x);
2)
s
1
(
x
⃗
)
/
(
x
2
−
a
2
)
s_1(\vec{x})/(x_2-a_2)
s1(x)/(x2−a2),其商为
u
2
(
x
⃗
)
u_2(\vec{x})
u2(x),余数
s
2
(
x
⃗
)
s_2(\vec{x})
s2(x);
3)……
4)
s
n
−
2
(
x
⃗
)
/
(
x
n
−
1
−
a
n
−
1
)
s_{n-2}(\vec{x})/(x_{n-1}-a_{n-1})
sn−2(x)/(xn−1−an−1),其商为
u
n
−
1
(
x
⃗
)
u_{n-1}(\vec{x})
un−1(x),余数
s
n
−
1
(
x
⃗
)
s_{n-1}(\vec{x})
sn−1(x),此时
s
n
−
1
(
x
⃗
)
s_{n-1}(\vec{x})
sn−1(x)中应只包含变量
x
n
x_n
xn,可将
s
n
−
1
(
x
⃗
)
s_{n-1}(\vec{x})
sn−1(x)表示为
s
(
x
n
)
s(x_n)
s(xn)。
5)
s
(
x
n
)
/
(
x
n
−
a
n
)
k
+
1
s(x_n)/(x_n-a_n)^{k+1}
s(xn)/(xn−an)k+1,其商为
q
(
x
n
)
q(x_n)
q(xn),余数可表示为
c
k
x
n
k
+
⋯
+
c
1
x
n
+
c
0
c_kx_n^k+\cdots + c_1x_n+c_0
ckxnk+⋯+c1xn+c0。
6)最终,整个
f
(
x
⃗
)
f(\vec{x})
f(x)可表示为:
f
(
x
⃗
)
=
∑
i
=
1
n
−
1
(
x
i
−
a
i
)
u
i
(
x
⃗
)
+
(
x
n
−
a
n
)
k
+
1
q
(
x
n
)
+
c
k
x
n
k
+
⋯
+
c
1
x
n
+
c
0
f(\vec{x})=\sum_{i=1}^{n-1}(x_i-a_i)u_i(\vec{x})+(x_n-a_n)^{k+1}q(x_n)+c_kx_n^k+\cdots + c_1x_n+c_0
f(x)=∑i=1n−1(xi−ai)ui(x)+(xn−an)k+1q(xn)+ckxnk+⋯+c1xn+c0
7)从而有,对
f
(
x
⃗
)
f(\vec{x})
f(x)的
x
n
x_n
xn求
k
k
k阶导 并 evaluate at
a
⃗
=
[
a
1
,
a
2
,
⋯
,
a
n
]
\vec{a}=[a_1,a_2,\cdots,a_n]
a=[a1,a2,⋯,an]的值为:【同理可推广至对任意变量
x
i
x_i
xi求
k
k
k阶导】
∂
k
f
(
x
⃗
)
∂
x
n
k
(
a
⃗
)
=
k
!
⋅
c
k
\frac{\partial^k f(\vec{x})}{\partial x_n^k}(\vec{a})=k!\cdot c_k
∂xnk∂kf(x)(a)=k!⋅ck
因为:
∂
k
(
x
i
−
a
i
)
u
i
(
x
⃗
)
∂
x
n
k
(
a
⃗
)
=
(
x
i
−
a
i
)
∂
k
u
i
(
x
⃗
)
∂
x
n
k
(
a
⃗
)
=
0
\frac{\partial^k (x_i-a_i)u_i(\vec{x})}{\partial x_n^k}(\vec{a})=(x_i-a_i)\frac{\partial^k u_i(\vec{x})}{\partial x_n^k}(\vec{a})=0
∂xnk∂k(xi−ai)ui(x)(a)=(xi−ai)∂xnk∂kui(x)(a)=0
∂
k
(
x
n
−
a
n
)
k
+
1
q
(
x
n
)
∂
x
n
k
(
a
n
)
=
0
\frac{\partial^k (x_n-a_n)^{k+1}q(x_n)}{\partial x_n^k}(a_n)=0
∂xnk∂k(xn−an)k+1q(xn)(an)=0
∂
k
(
c
k
x
n
k
+
⋯
+
c
1
x
n
+
c
0
)
∂
x
n
k
(
a
n
)
=
∂
k
(
c
k
x
n
k
)
∂
x
n
k
(
a
n
)
=
k
!
⋅
c
k
\frac{\partial^k (c_kx_n^k+\cdots + c_1x_n+c_0)}{\partial x_n^k}(a_n)= \frac{\partial^k (c_kx_n^k)}{\partial x_n^k}(a_n)=k!\cdot c_k
∂xnk∂k(ckxnk+⋯+c1xn+c0)(an)=∂xnk∂k(ckxnk)(an)=k!⋅ck
对应即为Lemma 3:(详细的证明可参见 本文的full version版本)
(2)随机微分分解
随机数
r
1
,
⋯
,
r
n
−
2
∈
Z
p
r_1,\cdots, r_{n-2}\in\mathbb{Z}_p
r1,⋯,rn−2∈Zp 且
r
1
r
2
⋯
r
n
−
2
≠
0
r_1r_2\cdots r_{n-2}\neq 0
r1r2⋯rn−2=0。
基本思路为:(与Lemma 2类似)
1)
f
(
x
⃗
)
/
(
r
1
(
x
1
−
a
1
)
+
x
2
−
a
2
)
f(\vec{x})/(r_1(x_1-a_1)+x_2-a_2)
f(x)/(r1(x1−a1)+x2−a2),其商为
u
1
(
x
⃗
)
u_1(\vec{x})
u1(x),余数
s
1
(
x
⃗
)
s_1(\vec{x})
s1(x);
2)
s
1
(
x
⃗
)
/
(
r
2
(
x
2
−
a
2
)
+
x
3
−
a
3
)
s_1(\vec{x})/(r_2(x_2-a_2)+x_3-a_3)
s1(x)/(r2(x2−a2)+x3−a3),其商为
u
2
(
x
⃗
)
u_2(\vec{x})
u2(x),余数
s
2
(
x
⃗
)
s_2(\vec{x})
s2(x);
3)……
4)
s
n
−
3
(
x
⃗
)
/
(
r
n
−
2
(
x
n
−
2
−
a
n
−
2
)
+
x
n
−
1
−
a
n
−
1
)
s_{n-3}(\vec{x})/(r_{n-2}(x_{n-2}-a_{n-2})+x_{n-1}-a_{n-1})
sn−3(x)/(rn−2(xn−2−an−2)+xn−1−an−1),其商为
u
n
−
2
(
x
⃗
)
u_{n-2}(\vec{x})
un−2(x),余数
s
n
−
2
(
x
⃗
)
s_{n-2}(\vec{x})
sn−2(x);
5)
s
n
−
2
(
x
⃗
)
/
(
x
n
−
1
−
a
n
−
1
)
s_{n-2}(\vec{x})/(x_{n-1}-a_{n-1})
sn−2(x)/(xn−1−an−1),其商为
u
n
−
1
(
x
⃗
)
u_{n-1}(\vec{x})
un−1(x),余数
s
n
−
1
(
x
⃗
)
s_{n-1}(\vec{x})
sn−1(x),
此时
s
n
−
1
(
x
⃗
)
s_{n-1}(\vec{x})
sn−1(x)中应只包含变量
x
n
x_n
xn,可将
s
n
−
1
(
x
⃗
)
s_{n-1}(\vec{x})
sn−1(x)表示为
s
(
x
n
)
s(x_n)
s(xn)。且
u
n
−
1
(
x
⃗
)
u_{n-1}(\vec{x})
un−1(x)中应只包含变量
x
n
1
x_{n_1}
xn1和变量
x
n
x_n
xn。
5)
s
(
x
n
)
/
(
x
n
−
a
n
)
k
+
1
s(x_n)/(x_n-a_n)^{k+1}
s(xn)/(xn−an)k+1,其商为
q
(
x
n
)
q(x_n)
q(xn),余数可表示为
c
k
x
n
k
+
⋯
+
c
1
x
n
+
c
0
c_kx_n^k+\cdots + c_1x_n+c_0
ckxnk+⋯+c1xn+c0。
6)最终,整个
f
(
x
⃗
)
f(\vec{x})
f(x)可表示为:
f
(
x
⃗
)
=
∑
i
=
1
n
−
2
[
r
i
(
x
i
−
a
i
)
+
x
i
+
1
−
a
i
+
1
]
u
i
(
x
⃗
)
+
(
x
n
−
1
−
a
n
−
1
)
u
n
−
1
(
x
⃗
)
+
(
x
n
−
a
n
)
k
+
1
q
(
x
n
)
+
c
k
x
n
k
+
⋯
+
c
1
x
n
+
c
0
f(\vec{x})=\sum_{i=1}^{n-2}[r_i(x_i-a_i)+x_{i+1}-a_{i+1}]u_i(\vec{x})+(x_{n-1}-a_{n-1})u_{n-1}(\vec{x})+(x_n-a_n)^{k+1}q(x_n)+c_kx_n^k+\cdots + c_1x_n+c_0
f(x)=∑i=1n−2[ri(xi−ai)+xi+1−ai+1]ui(x)+(xn−1−an−1)un−1(x)+(xn−an)k+1q(xn)+ckxnk+⋯+c1xn+c0
7)从而有,对
f
(
x
⃗
)
f(\vec{x})
f(x)的
x
n
x_n
xn求
k
k
k阶导 并 evaluate at
a
⃗
=
[
a
1
,
a
2
,
⋯
,
a
n
]
\vec{a}=[a_1,a_2,\cdots,a_n]
a=[a1,a2,⋯,an]的值为:【同理可推广至对任意变量
x
i
x_i
xi求
k
k
k阶导】
∂
k
f
(
x
⃗
)
∂
x
n
k
(
a
⃗
)
=
k
!
⋅
c
k
\frac{\partial^k f(\vec{x})}{\partial x_n^k}(\vec{a})=k!\cdot c_k
∂xnk∂kf(x)(a)=k!⋅ck
对应即为Lemma 4:(详细的证明可参见 本文的full version版本)
5.1 adaptively secure SCC scheme for polynomial differentiation
基于Lemma 4构建的思路为:
-
( P K , S K ) ← K e y G e n ( λ , F ) (PK,SK)\leftarrow KeyGen(\lambda,\mathcal{F}) (PK,SK)←KeyGen(λ,F)算法:
与第3节的相同。 -
F K ( f ) ← S e t u p ( S K , P K , f ) FK(f)\leftarrow Setup(SK,PK,f) FK(f)←Setup(SK,PK,f)算法:
与第3节的相同。 -
( v , w ⃗ ) ← C o m p u t e ( P K , f , a ⃗ , k , i n d ) (v,\vec{w})\leftarrow Compute(PK,f,\vec{a}, k, ind) (v,w)←Compute(PK,f,a,k,ind)算法:
额外增加了两个变量—— k k k和 i n d ind ind,表示对多项式的 x i n d x_{ind} xind变量求 k k k阶导,为了描述简单,以下都假设 i n d = n ind=n ind=n。即以下算法描述的是对多项式的 x n x_n xn变量求 k k k阶导 并 evaluate at point a ⃗ \vec{a} a。
1)将 a ⃗ \vec{a} a解析为 [ a 1 , a 2 , ⋯ , a n ] [a_1,a_2,\cdots,a_n] [a1,a2,⋯,an],首先计算 v = f ( a ⃗ ) v=f(\vec{a}) v=f(a);
2)然后使用hash 函数 H : { 0 , 1 ∗ } → Z p H:\{0,1^*\}\rightarrow \mathbb{Z}_p H:{0,1∗}→Zp(后续会modeled as a random oracle)计算:
∀ 1 ≤ i ≤ n − 2 : r i = H ( a ⃗ ∣ ∣ i n d ∣ ∣ k ∣ ∣ i ) \forall 1\leq i\leq n-2: r_i=H(\vec{a}||ind||k||i) ∀1≤i≤n−2:ri=H(a∣∣ind∣∣k∣∣i) …… (5.8)
根据Lemma 4,找到相应的set of polynomials u 1 ( x ⃗ ) , u 2 ( x ⃗ ) , ⋯ , u n − 1 ( x ⃗ ) , q ( x n ) u_1(\vec{x}),u_2(\vec{x}),\cdots,u_{n-1}(\vec{x}),q(x_n) u1(x),u2(x),⋯,un−1(x),q(xn)和系数 c 0 , c 1 , ⋯ , c k c_0,c_1,\cdots,c_k c0,c1,⋯,ck,满足 f ( x ⃗ ) = ∑ i = 1 n − 2 [ r i ( x i − a i ) + x i + 1 − a i + 1 ] u i ( x ⃗ ) + ( x n − 1 − a n − 1 ) u n − 1 ( x ⃗ ) + ( x n − a n ) k + 1 q ( x n ) + c k x n k + ⋯ + c 1 x n + c 0 f(\vec{x})=\sum_{i=1}^{n-2}[r_i(x_i-a_i)+x_{i+1}-a_{i+1}]u_i(\vec{x})+(x_{n-1}-a_{n-1})u_{n-1}(\vec{x})+(x_n-a_n)^{k+1}q(x_n)+c_kx_n^k+\cdots + c_1x_n+c_0 f(x)=∑i=1n−2[ri(xi−ai)+xi+1−ai+1]ui(x)+(xn−1−an−1)un−1(x)+(xn−an)k+1q(xn)+ckxnk+⋯+c1xn+c0;
3)signature w w w为a vector of n n n witnesses w = [ w 1 , w 2 , ⋯ , w n − 2 , g q ( t n ) , c k − 1 , ⋯ , c 1 , c 0 , p o l y n o m i a l u n − 1 ( x ⃗ ) ] w=[w_1,w_2,\cdots,w_{n-2},g^{q_(t_n)},c_{k-1},\cdots,c_1,c_0,polynomial\ u_{n-1}(\vec{x})] w=[w1,w2,⋯,wn−2,gq(tn),ck−1,⋯,c1,c0,polynomial un−1(x)],其中 w i = g q i ( t ⃗ ) w_i=g^{q_i(\vec{t})} wi=gqi(t) for all i ∈ [ n − 2 ] i\in [n-2] i∈[n−2]。而the polynomial u n − 1 ( x ⃗ ) u_{n-1}(\vec{x}) un−1(x) 为degree at most d d d的双变量( x n − 1 x_{n-1} xn−1和 x n x_n xn变量)多项式,最多有 d 2 d^2 d2个term,即 最多有 d 2 d^2 d2个系数 β d 2 − 1 , ⋯ , β 0 \beta_{d^2-1},\cdots,\beta_0 βd2−1,⋯,β0。同时,signature w w w中部包含 c k c_k ck term,因为 c k = v / k ! c_k=v/k! ck=v/k! 直接计算获得。
注意 w i w_i wi很容易根据 P K PK PK中包含的signature generation set W n , d \mathcal{W}_{n,d} Wn,d来计算。
Compute
最终的输出为 pair ( v , w ⃗ ) (v,\vec{w}) (v,w),其中 v v v为多变量多项式evaluate at a ⃗ \vec{a} a的结果值, w ⃗ \vec{w} w为the signature of correctness。 -
V e r i f y ( P K , F K ( f ) , a ⃗ , v , w ⃗ , k , i n d ) Verify(PK,FK(f), \vec{a},v,\vec{w},k,ind) Verify(PK,FK(f),a,v,w,k,ind)算法:
设置 c k = v k ! c_k=\frac{v}{k!} ck=k!v,为了验证 v v v 确实是the outcome of the k k k-th paritial derivative on variable x i n d ( i n d = n ) x_{ind}(ind=n) xind(ind=n) evaluated at point a ⃗ ∈ Z p n \vec{a}\in\mathbb{Z}_p^n a∈Zpn:
1)将 a ⃗ \vec{a} a解析为 [ a 1 , a 2 , ⋯ , a n ] [a_1,a_2,\cdots,a_n] [a1,a2,⋯,an];
2)将 w ⃗ \vec{w} w解析为 [ w 1 , w 2 , ⋯ , w n − 2 , w n , c k − 1 , ⋯ , c 1 , c 0 , p o l y n o m i a l u n − 1 ( x ⃗ ) ] [ w_1,w_2,\cdots,w_{n-2},w_n,c_{k-1},\cdots,c_1,c_0,polynomial\ u_{n-1}(\vec{x})] [w1,w2,⋯,wn−2,wn,ck−1,⋯,c1,c0,polynomial un−1(x)]
3)为了证明 f ( a ⃗ ) = v f(\vec{a})=v f(a)=v:
3.1)Verifier首先需要 P K PK PK中包含的signature generation set W n , d \mathcal{W}_{n,d} Wn,d来计算 g u n − 1 ( x ⃗ ) g^{u_{n-1}(\vec{x})} gun−1(x);
3.2)然后计算相应的random values r 1 , r 2 , ⋯ , r n − 2 r_1,r_2,\cdots,r_{n-2} r1,r2,⋯,rn−2:
∀ 1 ≤ i ≤ n − 2 : r i = H ( a ⃗ ∣ ∣ i n d ∣ ∣ k ∣ ∣ i ) \forall 1\leq i\leq n-2: r_i= H(\vec{a}||ind||k||i) ∀1≤i≤n−2:ri=H(a∣∣ind∣∣k∣∣i) …… (5.8)
3.3)最后验证:
e ( F K ( f ) , g ) = ∏ i = 1 n − 2 e ( g r i ( t i − a i ) + t i + 1 − a i + 1 , w i ) e ( g t n − 1 − a n − 1 , g u n − 1 ( t ⃗ ) ) ⋅ e ( g ( t n − a n ) k + 1 , w n ) ⋅ ∏ i = 0 k e ( g t n i , g ) c i e(FK(f),g)=\prod_{i=1}^{n-2}e(g^{r_i(t_i-a_i)+t_{i+1}-a_{i+1}}, w_i)e(g^{t_{n-1}-a_{n-1}},g^{u_{n-1}(\vec{t})})\cdot e(g^{(t_n-a_n)^{k+1}},w_n)\cdot \prod_{i=0}^{k}e(g^{t_n^i},g)^{c_i} e(FK(f),g)=∏i=1n−2e(gri(ti−ai)+ti+1−ai+1,wi)e(gtn−1−an−1,gun−1(t))⋅e(g(tn−an)k+1,wn)⋅∏i=0ke(gtni,g)ci …… (4.6)
若成立,则输出1,否则输出0。
其中,terms g t i g^{t_i} gti 已包含在 P K PK PK的 W n , d \mathcal{W}_{n,d} Wn,d中。
整个Verifier的计算复杂度为 O ( n + d 2 ) O(n+d^2) O(n+d2)次multi-exponentiation计算和 n + k + 2 n+k+2 n+k+2次pairing运算。 -
F K ( f ’ ) ← U p d a t e ( S K , P K , F K ( f ) , f ’ ) FK(f’)\leftarrow Update(SK,PK,FK(f), f’) FK(f’)←Update(SK,PK,FK(f),f’)算法:
与第3节的相同。
6. 算法开销分析
【Lemma 1中的多项式直接进行分解复杂度为 O ( n d ( n + d d ) ) O(nd \binom{n+d}{d}) O(nd(dn+d)),当 d > log n d>\log n d>logn时,可使用FFT来进行polynomial division,相应的复杂度可降为 O ( n log n ( n + d d ) ) O(n\log n \binom{n+d}{d}) O(nlogn(dn+d))】
7. 展望
7.1 I/O 隐私
本文,client的sensitive input 时明文的,untrusted server可直接读取。为了同时满足input privacy和 output privacy,在由untrusted server运行的Compute
算法中,可借助fully-homomorphic public-key encryption scheme [16] (即全同态加密)来实现——operate on encrypted points。
7.2 采用stronger assumption来替换random oracle
采用stronger assumption来替换adaptively secure SCC中的random oracle:
- 使用subexponential assumption:
- 限制the size of the domain of the inputs of our polynomials to be subexponential (now it is exponential):