24
Pairing の計算法とその実装 筑波大学 岡本栄司 謝辞 松田誠一、金山直樹、Jean-Luc Beuchat 白勢政明、高木 剛、土井 洋、側高幸治

Pairing の計算法とその実装 - Institute of Electronics ...isec/event/isec070913/isec...= t− L 1 0 3 r r r r i = ± ( , , ) , 0, 1 とすると、−Pの計算の容易性を使える。直線式の代わりに

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Pairing の計算法とその実装 - Institute of Electronics ...isec/event/isec070913/isec...= t− L 1 0 3 r r r r i = ± ( , , ) , 0, 1 とすると、−Pの計算の容易性を使える。直線式の代わりに

Pairing の計算法とその実装

筑波大学 岡本栄司

謝辞 松田誠一、金山直樹、Jean-Luc Beuchat白勢政明、高木 剛、土井 洋、側高幸治

Page 2: Pairing の計算法とその実装 - Institute of Electronics ...isec/event/isec070913/isec...= t− L 1 0 3 r r r r i = ± ( , , ) , 0, 1 とすると、−Pの計算の容易性を使える。直線式の代わりに

発表内容

Pairingとは

Pairing計算法

・曲線について→2.

ソフトウェア実装

ハードウェア実装

応用→3., 4.

Page 3: Pairing の計算法とその実装 - Institute of Electronics ...isec/event/isec070913/isec...= t− L 1 0 3 r r r r i = ± ( , , ) , 0, 1 とすると、−Pの計算の容易性を使える。直線式の代わりに

Pairing

双線形性

非縮退性

),(),(),(),(),(),(

2121

2121

QPeQPeQQPeQPeQPeQPPe

⋅=+

321: GGGe →×群:,, 321 GGG

⋅=+

Ο=⇒=∀Ο=⇒=∀

PQPeQQQPeP

1),(,1),(,

Page 4: Pairing の計算法とその実装 - Institute of Electronics ...isec/event/isec070913/isec...= t− L 1 0 3 r r r r i = ± ( , , ) , 0, 1 とすると、−Pの計算の容易性を使える。直線式の代わりに

暗号におけるPairingの位置づけ

有限体

RSA暗号

ElGamal暗号

楕円ElGamal暗号

ECDSA

Identity Based Encryption

楕円曲線

べき乗剰余演算べき乗剰余演算

スカラー倍演算スカラー倍演算

ペアリング演算ペアリング演算

Short Signature

Page 5: Pairing の計算法とその実装 - Institute of Electronics ...isec/event/isec070913/isec...= t− L 1 0 3 r r r r i = ± ( , , ) , 0, 1 とすると、−Pの計算の容易性を使える。直線式の代わりに

楕円曲線

}{}:),{()( 322 ObaxxyFyxFE qq ∪++=∈=

43421 La

PPaP ++=

⎪⎩

⎪⎨⎧

=

±≠=

−−=−−=

=+==

+

−−

QPif

QPif

yxxyxxx

yxQPyxQyxP

yax

xxyy

1

21

12

12

23

1313

212

3

33

2211

)(

),(),(,),(

λ

λλ

POPOPP =+=−+ ,)(

Page 6: Pairing の計算法とその実装 - Institute of Electronics ...isec/event/isec070913/isec...= t− L 1 0 3 r r r r i = ± ( , , ) , 0, 1 とすると、−Pの計算の容易性を使える。直線式の代わりに

Pairing (Tate)楕円曲線

Ordinary curve素数 : を満たす

埋め込み次数 : を満足する最小の整数

Tate Pairing

双線形性、非縮退性

Tate PairingTate Tate PairingPairingReducedReduced

Page 7: Pairing の計算法とその実装 - Institute of Electronics ...isec/event/isec070913/isec...= t− L 1 0 3 r r r r i = ± ( , , ) , 0, 1 とすると、−Pの計算の容易性を使える。直線式の代わりに

Tate Pairing 計算のフロー

)(],)[(:INPUT kqq FEQrFEP ∈∈

Miller’s Algorithm

Final Powering

k

k

qr

q

Pr FQf ∈−1

, ))((:OUTPUT φ

Point Addition

Computing line l

Distortion map: φ

Page 8: Pairing の計算法とその実装 - Institute of Electronics ...isec/event/isec070913/isec...= t− L 1 0 3 r r r r i = ± ( , , ) , 0, 1 とすると、−Pの計算の容易性を使える。直線式の代わりに

Divisor

)( ))(()( :Divisor Principal EDivAfordfdivEA

A ∈= ∑∈

EAaDsum

ZaD

EAAaD

iii

ii

ii

ii

∈=

∈=

∈=

)(

)deg(

,)(

=)( ford A Multiplicity of f at A over E

DfdivDsumEDiv =⇔Ο= ∃ )()()(0 において、補題 

Page 9: Pairing の計算法とその実装 - Institute of Electronics ...isec/event/isec070913/isec...= t− L 1 0 3 r r r r i = ± ( , , ) , 0, 1 とすると、−Pの計算の容易性を使える。直線式の代わりに

Principal Divisorの例

を通る垂線ととは 

を通る直線とと とは 

][

])([ )(2)()()(

)(3))(()()()(

,

,

Ο−

Ο+−

−−+=

−+−++=

PPv

SRSRlOPPvdiv

OSRSRldiv

P

SR

P

SR

Page 10: Pairing の計算法とその実装 - Institute of Electronics ...isec/event/isec070913/isec...= t− L 1 0 3 r r r r i = ± ( , , ) , 0, 1 とすると、−Pの計算の容易性を使える。直線式の代わりに

fr,Pの定義

r

def

Pr

j

ff

jjPPjsumjjPPj

jjPPjfdiv

=

Ο=Ο−−−=Ο−−−

Ο−−−=

,

)))(1()()(( 0)))(1()()(deg(

))(1()()()(

Page 11: Pairing の計算法とその実装 - Institute of Electronics ...isec/event/isec070913/isec...= t− L 1 0 3 r r r r i = ± ( , , ) , 0, 1 とすると、−Pの計算の容易性を使える。直線式の代わりに

Pairingの計算法

再帰的公式

Pji

jPiPjiji v

lfff

)(

,

++ =

⎟⎟⎠

⎞⎜⎜⎝

⎛=

−=−+−++−−+−++=

−+−+=−−−−−−−−−+−+−+=

−−

+

+

+

Pji

jPiP

PjijPiP

jiji

vl

div

vdivldivOPjiPjiOPjijPiP

OPjijPiPOjjPPjOiiPPiOjiPjiPji

fdivfdivfdiv

)(

,

)(, )()()}(2))(()){(()}(3))(()(){(

)())(()()()})(1()()({)})(1()()({)})(1())(())({(

)()()()Q

Page 12: Pairing の計算法とその実装 - Institute of Electronics ...isec/event/isec070913/isec...= t− L 1 0 3 r r r r i = ± ( , , ) , 0, 1 とすると、−Pの計算の容易性を使える。直線式の代わりに

Millerのアルゴリズム

rq

PV

PVi

V

VV

t

k

f

PVVQvQl

ffr

VVQvQl

ff

tiPVfrrr

1

,

2

,2

201

return

for end

and )()(

then 1 if

2 and )()(

do 0 to1for ,1,),,(

+

+===

==

−==== L

の計算),( QPe

Page 13: Pairing の計算法とその実装 - Institute of Electronics ...isec/event/isec070913/isec...= t− L 1 0 3 r r r r i = ± ( , , ) , 0, 1 とすると、−Pの計算の容易性を使える。直線式の代わりに

Twisted Ate ペアリング

Ate ペアリング

アルゴリズムの研究動向

計算速度

適用可能な曲線の種類

Duursma et.al

ペアリングon Supersingular

curve

低速 高速

Miller’s Algorithm

Kwon et.al

ペアリング

ループ長短縮ループ長短縮

Barreto et al

OrdinaryOrdinarycurve curve へ拡張へ拡張

Hess et al

BKLS BKLS AlgorithmAlgorithm

SimplifiedSimplified

Page 14: Pairing の計算法とその実装 - Institute of Electronics ...isec/event/isec070913/isec...= t− L 1 0 3 r r r r i = ± ( , , ) , 0, 1 とすると、−Pの計算の容易性を使える。直線式の代わりに

Pairing-friendly Curve

Ordinary CurveOrdinary Curve

Supersingular Curve1. Distortion map2. 固定の埋め込み次数(k=2,3,4,6)

Pairing-friendly Curve1. 任意の埋め込み次数

(k=1,2,3,4,・・・,24・・・)

一般的な曲線の埋め込み次数は数十~百ビット

DuursmaDuursma and Lee (2003)and Lee (2003)EtaEta ペアリングペアリング(2004)(2004)

Twisted Ate Twisted Ate ペアリングペアリング(2006)(2006)Ate Ate ペアリングペアリング(2006)(2006)

埋め込み次数

Page 15: Pairing の計算法とその実装 - Institute of Electronics ...isec/event/isec070913/isec...= t− L 1 0 3 r r r r i = ± ( , , ) , 0, 1 とすると、−Pの計算の容易性を使える。直線式の代わりに

Pairing-friendly Curve

Supersingular Curve

MNT Curve→2.Ordinary Curve

・Twisted Ate、Ate[HSV06]→Optimization [MKHO07]

21

32

21

3232

3232

313)(#13

212)(#12

1)(#)4mod3(),3mod2(1

}{}|)({][

+

+

±+=±−==

±+=++=++=+=

+=≡+=≡+==

Ο=Ο=∈=

mm

qm

mm

qm

q

p

FExxyq

FExxyyxxyyq

pFEpxxypxypq

pRFERpE

で、なら 

で、やなら 

で、なら 

いう特徴がある。位数がわかっていると

Page 16: Pairing の計算法とその実装 - Institute of Electronics ...isec/event/isec070913/isec...= t− L 1 0 3 r r r r i = ± ( , , ) , 0, 1 とすると、−Pの計算の容易性を使える。直線式の代わりに

留意点

点P,Qの求め方

Distortion Map利用 ← Supersingular

となってしまう。でないと最終冪で

 

1),( )()(

)( ,)(#

)()(])[(),(

=−∈

∈∀=

×∈

QPeFEFEQ

FERRrFEP

FrEFErFEQP

qq

rr

qqq

k

k

1 01,013),(),(

01),(),(

)()()(:

32

32

2

+−=

=−−=+=−=

=+=−=

−→

xxyqyxyx

ipqiyxyx

FEFEFE

m

qqq k

   ただし

のとき、   

のとき、 例 

ρρσσρφ

φ

φ

Page 17: Pairing の計算法とその実装 - Institute of Electronics ...isec/event/isec070913/isec...= t− L 1 0 3 r r r r i = ± ( , , ) , 0, 1 とすると、−Pの計算の容易性を使える。直線式の代わりに

簡単化Millerアルゴリズム(q=pのとき)

rq

PVi

VV

t

k

f

PVVQlffrVVQlff

tiPVfrrr

1

,

,2

201

return

for end and ))(( then 1 if

2 and ))(( do 0 to1for

,1,),,(

+=⋅==

=⋅=

−====

ϕϕ

L

の計算),( QPe

Page 18: Pairing の計算法とその実装 - Institute of Electronics ...isec/event/isec070913/isec...= t− L 1 0 3 r r r r i = ± ( , , ) , 0, 1 とすると、−Pの計算の容易性を使える。直線式の代わりに

標数p=3のときの高速化とηTPairing3倍算が容易

rの3進表現

2次曲線利用

ηT Pairing

),1(),(3 99 yxyx −−=

る。の計算の容易性を使えとすると、 Prrrr it −±== − 1,0 ,),,( 301 L

が使える。式の代わりに直線

において再帰式

)( 4

233

2

,

3

2,33

bxyh

vl

vl

ff

V

jP

jPjP

jP

jPjPjj

+−−=

⋅=

αβ

LTM

PTT

QPeQP

fQPTr

))(,()),((

(Q))(),(23

T

,

φη

φη

=

= は双線形性を持ち、に対して、より小さいある

Page 19: Pairing の計算法とその実装 - Institute of Electronics ...isec/event/isec070913/isec...= t− L 1 0 3 r r r r i = ± ( , , ) , 0, 1 とすると、−Pの計算の容易性を使える。直線式の代わりに

ηTPairingアルゴリズム

f

yyxx

yyxx

fgf

uuyyg

bxxumj

xxyyf

yy

qqqq

pppp

qp

qp

qppq

Pp

return for end

,

,

do 2/)1( to0for

)1(

33

3/13/1

22

←←

←←

−−−←

++←−←

−−−+←

−←

ρρσ

ρσ

 

 

),( ),,( qqpp yxQyxP ==

の計算),( QPTη

Page 20: Pairing の計算法とその実装 - Institute of Electronics ...isec/event/isec070913/isec...= t− L 1 0 3 r r r r i = ± ( , , ) , 0, 1 とすると、−Pの計算の容易性を使える。直線式の代わりに

改良ηTPairingアルゴリズム[STO06]の計算

2/)1(3),(+m

QPTη

f

bdd

yyxx

yyfgf

uuyyg

dxxumj

yuyyfbd

bxxu

yy

qqqq

pp

qp

qp

ppq

qp

pp

return for end

3mod

,

)(

do 2/)1( to0for

99

3

22

−←

←←

−←←

−−−←

++←−←

+−←←

++←

−←

 

 

ρρσ

ρσ

Page 21: Pairing の計算法とその実装 - Institute of Electronics ...isec/event/isec070913/isec...= t− L 1 0 3 r r r r i = ± ( , , ) , 0, 1 とすると、−Pの計算の容易性を使える。直線式の代わりに

ηTPairingの実装例:ソフトウェア環境

OS:Red Hat Linux 9CPU:Pem4 3.4GHzzメモリ:1GB

処理時間

4.32msec同環境で

1024ビットRSA型べき乗剰余演算 8.69msec

97697697 333 )()(: ⋅⋅ →× FFEFETη

Page 22: Pairing の計算法とその実装 - Institute of Electronics ...isec/event/isec070913/isec...= t− L 1 0 3 r r r r i = ± ( , , ) , 0, 1 とすると、−Pの計算の容易性を使える。直線式の代わりに

ηTPairingの実装例:ハードウェア

FPGA マルチプロセッサタイプ・Cyclone Ⅱ EP2C35・9プロセッサ・18000スライス・クロック周波数 149MHz

・計算時間 27μsecFPGA シングルプロセッサタイプ

・Vertex-4 LX15・1プロセッサ・1857スライス・クロック周波数 200MHz

・計算時間 141μsec

Page 23: Pairing の計算法とその実装 - Institute of Electronics ...isec/event/isec070913/isec...= t− L 1 0 3 r r r r i = ± ( , , ) , 0, 1 とすると、−Pの計算の容易性を使える。直線式の代わりに
Page 24: Pairing の計算法とその実装 - Institute of Electronics ...isec/event/isec070913/isec...= t− L 1 0 3 r r r r i = ± ( , , ) , 0, 1 とすると、−Pの計算の容易性を使える。直線式の代わりに

まとめ

Pairingの定義を与えた。

Pairing計算のアルゴリズムを与え、その改良例

を紹介した。

ソフトウェア実装例を示した。

ハードウェア実装例を示した。