您当前的位置: 首页 > 

mutourend

暂无认证

  • 0浏览

    0关注

    661博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

Elligator——将椭圆曲线point映射为random string(1)——affine坐标下

mutourend 发布时间:2019-08-16 18:38:52 ,浏览量:0

ECC椭圆曲线加密,常用到point点(以string形式表示)来代表公钥或其它密文信息(有时为节约存储空间,会将point进行压缩),在实际传输过程中,由于具有module F q F_q Fq​有限域内运算特征,且曲线公式和有限域范围均对公众已知,很容易从大量网络传输信息中识别定位为ECC相关密文信息从而可能被利用攻击。

Elligator——可将以string形式表示的point映射为random string。从而使得与密文相关的信息不易被识别出来。

1. Elligator 1/2

在论文《Elligator: Elliptic-curve points indistinguishable from uniform random strings》中指出,有两种Elligator算法:

  • Elligator 1: 仅限于 q ≡ 3 ( m o d   4 ) q\equiv3(mod\ 4) q≡3(mod 4)的曲线。
  • Elligator 2: 可适于 q ≡ 1 ( m o d   4 ) q\equiv1(mod\ 4) q≡1(mod 4)的曲线。

对于Curve1174,其 q = 2 251 − 9 ≡ 3 ( m o d   4 ) q=2^{251}-9\equiv 3(mod\ 4) q=2251−9≡3(mod 4)。理论上来说,Curve1174的运算性能应能与Curve25519相当。

对于Curve25519,其 q = 2 255 − 19 ≡ 1 ( m o d   4 ) q=2^{255}-19\equiv 1(mod\ 4) q=2255−19≡1(mod 4),同时具有“-1-twisted Edwards form”【ristretto255 point压缩和解压缩算法(1)——affine坐标系下第1.1节指出, a x 2 + y 2 = 1 + d x 2 y 2 , a = − 1 ax^2+y^2=1+dx^2y^2,a=-1 ax2+y2=1+dx2y2,a=−1】,具有更高的速度性能。

2. Curve25519的Elligator算法细节

论文《Elligator: Elliptic-curve points indistinguishable from uniform random strings》中指出,需要使用2-torsion point的curve形式,且有如下定理: 在这里插入图片描述 在这里插入图片描述 论文《Elligator: Elliptic-curve points indistinguishable from uniform random strings》中采用curve形式为 C A , B : y ′ 2 = x ′ 3 + A x ′ 2 + B x ′ C_{A,B}:y'^2=x'^3+Ax'^2+Bx' CA,B​:y′2=x′3+Ax′2+Bx′,设 n n n为 F q F_q Fq​内的non-square, { r 0 ∈ F q : 1 + n r 0 2 ! = 0 , A 2 n r 0 2 ! = B ( 1 + n r 0 2 ) 2 } \{r_0\in F_q:1+nr_0^2!=0,A^2nr_0^2!=B(1+nr_0^2)^2\} {r0​∈Fq​:1+nr02​!=0,A2nr02​!=B(1+nr02​)2},假设 r = n r 0 2 r=nr_0^2 r=nr02​,对应的当 ϵ = 1 时 , x ′ = v = − A / ( 1 + r ) ; 当 ϵ = − 1 时 , x ′ = v n r 0 2 = v r = − A r / ( 1 + r ) \epsilon=1时,x'=v=-A/(1+r);当\epsilon=-1时,x'=vnr_0^2=vr=-Ar/(1+r) ϵ=1时,x′=v=−A/(1+r);当ϵ=−1时,x′=vnr02​=vr=−Ar/(1+r)。

ristretto255中, n n n的取值选为 n = i = + − 1 n=i=+\sqrt{-1} n=i=+−1 ​作为non-square值(quadratic nonresidue)。

论文《Decaf-Eliminating cofactors through point compression 2015-673》中提到,对于使用的是Jacobi quartic curve形式: J e , A = J a 2 , a − 2 d : t 2 = e s 4 + 2 A s 2 + 1 J_{e,A}=J_{a^2,a-2d}:t^2=es^4+2As^2+1 Je,A​=Ja2,a−2d​:t2=es4+2As2+1 同时,该曲线与 L : a y 2 = x ( x − 1 ) ( x − d / a ) L:ay^2=x(x-1)(x-d/a) L:ay2=x(x−1)(x−d/a)等价。两条曲线之间的映射关系为: ( x , y ) ↦ ( s , t ) : s = a x − d a 2 y , t = a x 2 − 2 d x + d a x ( x − 1 ) (x,y)\mapsto (s,t):s=\frac{ax-d}{a^2y},t=\frac{ax^2-2dx+d}{ax(x-1)} (x,y)↦(s,t):s=a2yax−d​,t=ax(x−1)ax2−2dx+d​

另外,曲线 L L L与 C 2 d / a − 1 , ( d 2 − a d ) / a 2 C_{2d/a-1,(d^2-ad)/a^2} C2d/a−1,(d2−ad)/a2​等价, A = 2 d / a − 1 A=2d/a-1 A=2d/a−1且映射关系如下: ( x ′ , y ′ ) ↦ ( x , y ) : x = x ′ + d / a , y = y ′ (x',y')\mapsto (x,y): x=x'+d/a,y=y' (x′,y′)↦(x,y):x=x′+d/a,y=y′

⇒ ( x ′ , y ′ ) ↦ ( s , t ) : s = a x − d a 2 y , t = a x 2 − 2 d x + d a x ( x − 1 ) , 其 中 x = x ′ + d / a \Rightarrow (x',y')\mapsto (s,t): s=\frac{ax-d}{a^2y},t=\frac{ax^2-2dx+d}{ax(x-1)},其中 x=x'+d/a ⇒(x′,y′)↦(s,t):s=a2yax−d​,t=ax(x−1)ax2−2dx+d​,其中x=x′+d/a。

因此若采用Jacobi quartic curve形式,对应的有: 在这里插入图片描述 进一步的公式简化可参见:https://ristretto.group/details/elligator.html#elligator-for-decaf

最终可表示为: 在这里插入图片描述

参考资料: [1] 论文《Elligator: Elliptic-curve points indistinguishable from uniform random strings》 [2] 论文《Decaf-Eliminating cofactors through point compression 2015-673》 [3] https://ristretto.group/details/elligator.html#elligator-for-decaf

关注
打赏
1664532908
查看更多评论
立即登录/注册

微信扫码登录

0.0499s