Clever Geek Handbook
📜 ⬆️ ⬇️

Ecdlp

ECDLP (Elliptic Curve Discrete Logarithm Problem) is a discrete logarithm problem in a group of points of an elliptic curve .

Let an elliptic curve E, a finite field F p and points P, Q ∈ E (F p ) be given. The task of ECDLP is to find k if it exists such that Q = [k] P.

Definitions

An elliptic curve E over a finite field F p is called a curve of the form (Weierstrass form):

E:Y2=X3+aX+b{\ displaystyle E: Y ^ {2} = X ^ {3} + aX + b} {\displaystyle E:Y^{2}=X^{3}+aX+b} , where a, b ∈ F p .

The set of points on the elliptic curve in the field F p , including the point "infinity" (denoted by Ο), forms a finite Abelian group and is denoted by E (F p ) .

A point Q ∈E (F p ) is called a return point to P ∈ E (F p ) if P + Q = Ο and is denoted as Q = -P .

For a natural number n and P ∈ E (F p ) we will assume:

[n]P=P+P+...+P⏟n{\ displaystyle [n] P = \ underbrace {P + P + ... + P} _ {n}} {\displaystyle [n]P=\underbrace {P+P+...+P} _{n}}

The entries are [n] P and nP equivalents. The definition can be extended to any integer n if you use -P.

The order of a group of points is the number N equal to the cardinality of the set E (F p ) and is denoted by | E (F p ) | = N. Usually, elliptic cryptography takes curves such that N = h * l, where h = 1, 2 or 4, and l is a large prime number.

The order of a point P ∈ E (Fp) is the minimum number s such that [s] P = Ο. This forms a subgroup⟨P⟩={[k]P:k=one,s¯} {\ displaystyle \ langle P \ rangle = \ {[k] P: k = {\ overline {1, s}} \}} {\displaystyle \langle P\rangle =\{[k]P:k={\overline {1,s}}\}} and point P is called a generator⟨P⟩ {\ displaystyle \ langle P \ rangle} {\displaystyle \langle P\rangle } .

Decision Algorithms

Full search

It is the simplest attack in the implementation. It is only necessary to be able to do the operation R = [k] P.

Algorithm

  1. k: =one{\ displaystyle k: = 1}  
  2. R: =[k]P{\ displaystyle R: = [k] P}  
  3. ifR=Q {\ displaystyle R = Q}   , thenk {\ displaystyle k}   - decision
  4. elsek: =k+one {\ displaystyle k: = k + 1}   ; go to [2].

Algorithm complexity: Ο (N).

Polyg - Hellman Algorithm

Description

Let G be a subgroup of E (F p ),N=|G|=∏i=onetpiei {\ displaystyle N = | G | = \ prod _ {i = 1} ^ {t} {p_ {i}} ^ {e ^ {i}}}   (i.e. it is assumed that the number N can be factorized)P,Q∈G {\ displaystyle P, Q \ in G}   and∃k:Q=[k]P {\ displaystyle \ exists k: Q = [k] P}   .

We will solve the problem of finding k modulopiei {\ displaystyle {p_ {i}} ^ {e_ {i}}}   , then, using the Chinese remainder theorem , we find a solution k modulo N.

From group theory it is known that there is an isomorphism of groups:

ϕ:G→Cponeeone⊗...⊗Cptet{\ displaystyle \ phi: G \ rightarrow C _ {{p_ {1}} ^ {e_ {1}}} \ otimes ... \ otimes C _ {{p_ {t}} ^ {e_ {t}}}}  

WhereCpiei {\ displaystyle C _ {{p_ {i}} ^ {e_ {i}}}}   Is a cyclic subgroup G,|Cpiei|=piei {\ displaystyle | C _ {{p_ {i}} ^ {e_ {i}}} | = {p_ {i}} ^ {e_ {i}}}  

Then projectionϕ {\ displaystyle \ phi}   onCpe {\ displaystyle C_ {p ^ {e}}}   :

ϕp={G→CpeR⟼[Npe]R{\ displaystyle \ phi _ {p} = {\ begin {cases} G \ rightarrow C_ {p ^ {e}} \\ R \ longmapsto [{\ frac {N} {p ^ {e}}}] R \ end {cases}}}  

Consequently,ϕp(Q)=[k]ϕp(P) {\ displaystyle {\ phi _ {p}} (Q) = [k] {\ phi _ {p}} (P)}   atCpe {\ displaystyle C_ {p ^ {e}}}   .

We show how to solve the problem inCpe {\ displaystyle C_ {p ^ {e}}}   reducing it to an ECDLP solution inCp {\ displaystyle C_ {p}}   .

Let beP,Q∈Cpe {\ displaystyle P, Q \ in C_ {p ^ {e}}}   and∃k:Q=[k]P {\ displaystyle \ exists k: Q = [k] P}   .

Numberk {\ displaystyle k}   defined modulope {\ displaystyle p ^ {e}}   . Then we can write k in the following form:

k=k0+konep+...+ke-onepe-one{\ displaystyle k = k_ {0} + {k_ {1}} p + ... + {k_ {e-1}} p ^ {e-1}}  

Find the valuesk0,kone,... {\ displaystyle k_ {0}, k_ {1}, ...}   by induction. Suppose knownk′ {\ displaystyle k '}   - valuekmodpt {\ displaystyle k \ mod \ p ^ {t}}   , i.e

k′=k0+...+kt-onept-one{\ displaystyle k '= k_ {0} + ... + k_ {t-1} p ^ {t-1}}  

Now we want to definekt {\ displaystyle k_ {t}}   and thus calculatekmodpt+one {\ displaystyle k \ mod \ p ^ {t + 1}}   :

k=k′+ptk″{\ displaystyle k = k '+ p ^ {t} k' '}  

ThenQ=[k′]P+[k″]([pt]P) {\ displaystyle Q = [k '] P + [k' '] ([p ^ {t}] P)}   .

Let beQ′=Q-[k′]P {\ displaystyle Q '= Q- [k'] P}   andP′=[pt]P {\ displaystyle P '= [p ^ {t}] P}   thenQ′=[k″]P′ {\ displaystyle Q '= [k' '] P'}  

NowP′ {\ displaystyle P '}   - element of orderpe-t {\ displaystyle p ^ {et}}   to get an order elementp {\ displaystyle p}   and therefore reduce the problem toCp {\ displaystyle C_ {p}}   you must multiply the previous expression bys=pe-t-one {\ displaystyle s = p ^ {et-1}}   . T.O.

Q″=[s]Q′{\ displaystyle Q '' = [s] Q '}   andP″=[s]P′ {\ displaystyle P '' = [s] P '}  

Got ECDLP in the boxCp {\ displaystyle C_ {p}}   asQ″=[kt]P″ {\ displaystyle Q '' = [k_ {t}] P ''}   .

Assuming that this problem can be solved inCp {\ displaystyle C_ {p}}   find a solutionk {\ displaystyle k}   atCpe {\ displaystyle C_ {p ^ {e}}}   . Using the Chinese remainder theorem, we obtain an ECDLP solution inE(Fp) {\ displaystyle E (F_ {p})}   .

As mentioned above, in practice, elliptic curves are taken such thatN=hl {\ displaystyle N = hl}   wherel {\ displaystyle l}   - a very large prime number, which makes this method ineffective.

Example

Q=[k]P(mod1009){\ displaystyle Q = [k] P \ (mod \ 1009)}  

E:y2≡x3+71x+602(mod1009){\ displaystyle E: y ^ {2} \ equiv x ^ {3} + 71x + 602 \ (mod \ 1009)}  

P=(one,237),Q=(190,271){\ displaystyle P = (1,237), Q = (190,271)}  

N=1060=22∗five∗53{\ displaystyle N = 1060 = 2 ^ {2} * 5 * 53}  

|⟨P⟩|=530=2∗five∗53{\ displaystyle | \ langle P \ rangle | = 530 = 2 * 5 * 53}  

Step 1. Findkmod2 {\ displaystyle k \ mod \ 2}  

  • Find the projections of points onC2 {\ displaystyle C_ {2}}   :
P2=265P=(50,0){\ displaystyle P_ {2} = 265P = (50.0)}  
Q2=265Q=(50,0){\ displaystyle Q_ {2} = 265Q = (50.0)}  
  • DecideQ2=[k]P2 {\ displaystyle Q_ {2} = [k] P_ {2}}  
k≡one(mod2){\ displaystyle k \ equiv 1 \ (mod \ 2)}  

Step 2. Findkmodfive {\ displaystyle k \ mod \ 5}  

  • Find the projections of points onCfive {\ displaystyle C_ {5}}   :
Pfive=106P=(639,160){\ displaystyle P_ {5} = 106P = (639,160)}  
Qfive=106Q=(639,849){\ displaystyle Q_ {5} = 106Q = (639,849)}  
  • DecideQfive=[k]Pfive {\ displaystyle Q_ {5} = [k] P_ {5}}  
notice, thatQfive = - P five {\ displaystyle Q_ {5} = - P_ {5}}   thenk≡four(modfive) {\ displaystyle k \ equiv 4 \ (mod \ 5)}  

Step 3. Findkmod53 {\ displaystyle k \ mod \ 53}  

  • Find the projections of points onC53 {\ displaystyle C_ {53}}   :
P53=tenP=(32,737){\ displaystyle P_ {53} = 10P = (32,737)}  
Q53=tenQ=(592,97){\ displaystyle Q_ {53} = 10Q = (592.97)}  
  • DecideQ53=[k]P53 {\ displaystyle Q_ {53} = [k] P_ {53}}  
k≡48(mod53){\ displaystyle k \ equiv 48 \ (mod \ 53)}  

Step 4. Findkmod530 {\ displaystyle k \ mod \ 530}  

  • From the Chinese remainder theorem for the values ​​obtained in the previous steps 1-3, we have that
k≡419(mod530){\ displaystyle k \ equiv 419 \ (mod \ 530)}  

Shanks Algorithm (Baby-Step / Giant-Step method)

Description

Let beG=⟨P⟩ {\ displaystyle G = \ langle P \ rangle}   - cyclic subgroupE(Fp);|⟨P⟩|=l;Q∈G {\ displaystyle E (F_ {p}); | \ langle P \ rangle | = l; Q \ in G}   .

Imaginek {\ displaystyle k}   as:

k=k0+kone⌈l⌉{\ displaystyle k = k_ {0} + k_ {1} \ lceil {\ sqrt {l}} \ rceil}  

Becausek≤l {\ displaystyle k \ leq l}   then0≤k0,kone<⌈l⌉ {\ displaystyle 0 \ leq k_ {0}, k_ {1} <\ lceil {\ sqrt {l}} \ rceil}   .

We calculate the list of "small steps"Pi=[i]P {\ displaystyle P_ {i} = [i] P}   ,0≤i<⌈l⌉ {\ displaystyle 0 \ leq i <\ lceil {\ sqrt {l}} \ rceil}   and save the pairs(Pi,i) {\ displaystyle (P_ {i}, i)}   .

Computational complexity:O(⌈l⌉) {\ displaystyle O (\ lceil {\ sqrt {l}} \ rceil)}   .

Now we calculate the "big steps". Let beP′=[⌈l⌉]P {\ displaystyle P '= [\ lceil {\ sqrt {l}} \ rceil] P}   we findQj=Q-[j] P ′ {\ displaystyle Q_ {j} = Q- [j] P '}   ,0≤j<⌈l⌉ {\ displaystyle 0 \ leq j <\ lceil {\ sqrt {l}} \ rceil}   .

During searchQj {\ displaystyle Q_ {j}}   try to find find among saved pairs(Pi,i) {\ displaystyle (P_ {i}, i)}   such thatPi=Qj {\ displaystyle P_ {i} = Q_ {j}}   . If you managed to find such a pair, thenk0=i,kone=j {\ displaystyle k_ {0} = i, k_ {1} = j}   .

Or, the same thing:

[i]P=Q-[j⌈l⌉]P,{\ displaystyle [i] P = Q- [j \ lceil {\ sqrt {l}} \ rceil] P,}  
[i+j⌈l⌉]P=Q{\ displaystyle [i + j \ lceil {\ sqrt {l}} \ rceil] P = Q}   .

The complexity of computing "big steps":O(⌈l⌉) {\ displaystyle O (\ lceil {\ sqrt {l}} \ rceil)}   .

In this case, the overall complexity of the methodO(l) {\ displaystyle O ({\ sqrt {l}})}   but also requiredS(l) {\ displaystyle S ({\ sqrt {l}})}   memory for storage, which is a significant minus of the algorithm.

Algorithm

  1. m: =⌈l⌉{\ displaystyle m: = \ lceil {\ sqrt {l}} \ rceil}  
  2. fori: =onetomdo{\ displaystyle \ mathbf {for} \ i: = 1 \ \ mathbf {to} \ m \ \ mathbf {do}}  
    R: =[i]P{\ displaystyle R: = [i] P}  
    save(R,i) {\ displaystyle (R, i)}  
  3. forj: =onetomdo{\ displaystyle \ mathbf {for} \ j: = 1 \ \ mathbf {to} \ m \ \ mathbf {do}}  
    T: =Q-[j⌈l⌉]P{\ displaystyle T: = Q- [j \ lceil {\ sqrt {l}} \ rceil] P}  
    checkT {\ displaystyle T}   in the list [2]
  4. ifT=Rthen{\ displaystyle \ mathbf {if} \ T = R \ \ mathbf {then}}  
    k: =i+j⌈l⌉(modl){\ displaystyle k: = i + j \ lceil {\ sqrt {l}} \ rceil \ (mod \ l)}  
    returnk{\ displaystyle \ mathbf {return} \ k}  

Pollard ρ-method

Description

Let beG=⟨P⟩ {\ displaystyle G = \ langle P \ rangle}   - cyclic subgroupE(Fp);|G|=r;Q∈G {\ displaystyle E (F_ {p}); | G | = r; Q \ in G}   .

The main idea of ​​the method is to find different pairs(c′,d′) {\ displaystyle (c ', d')}   and(c″,d ″ ) {\ displaystyle (c``, d '')}   modulor {\ displaystyle r}   such that[c′]P+[d′]Q=[c″]P+[d″]Q {\ displaystyle [c '] P + [d'] Q = [c ''] P + [d ''] Q}   .

Then[c′-c″]P=[d″-d′]Q {\ displaystyle [c'-c ''] P = [d '' - d '] Q}   orQ=c′-c″d″-d′P(modr) {\ displaystyle Q = {\ frac {c'-c ''} {d '' - d '}} P \ (mod \ r)}   . Consequently,k≡c′-c″d″-d′(modr) {\ displaystyle k \ equiv {\ frac {c'-c ''} {d '' - d '}} \ (mod \ r)}   .

To implement this idea, we choose a random function for iterationsf:G→G {\ displaystyle f: G \ rightarrow G}   , and a random pointP0 {\ displaystyle P_ {0}}   to start the crawl. The next point is calculated asPi+one=f(Pi) {\ displaystyle P_ {i + 1} = f (P_ {i})}   .

BecauseG {\ displaystyle G}   - finite, then there are such indicesi<j {\ displaystyle i <j}   , whatPi=Pj {\ displaystyle P_ {i} = P_ {j}}   .

ThenPi+one=f(Pi)=f(Pj)=Pj+one {\ displaystyle P_ {i + 1} = f (P_ {i}) = f (P_ {j}) = P_ {j + 1}}   .

In factPi+l=Pj+l {\ displaystyle P_ {i + l} = P_ {j + l}}   for∀l≥0 {\ displaystyle \ forall l \ geq 0}   .

Then the sequence{Pi} {\ displaystyle \ {P_ {i} \}}   - periodic with a periodj-i {\ displaystyle ji}   (see pic).

Since f is a random function, according to the birthday paradox , coincidence will happen in aboutπr2 {\ displaystyle {\ sqrt {\ frac {\ pi r} {2}}}}   iterations. To speed up the search for collisions, the method invented by Floyd to search for the cycle length is used: a pair of values ​​is calculated immediately(Pi,P2i) {\ displaystyle (P_ {i}, P_ {2i})}   fori=one,2,... {\ displaystyle i = 1,2, ...}   until there is a match.

Algorithm

  1. Initialization.
    Choose the number of branches L (usually 16)
    Select functionH:⟨P⟩→one,2,...,L {\ displaystyle H: \ langle P \ rangle \ rightarrow {1,2, ..., L}}  
  2. Calculation[ai]P+[bi]Q {\ displaystyle [a_ {i}] P + [b_ {i}] Q}   .
    fori: =onetoLdo{\ displaystyle \ mathbf {for} \ i: = 1 \ \ mathbf {to} \ L \ \ mathbf {do}}  
    Take randomai,bi∈[0,r-one] {\ displaystyle a_ {i}, b_ {i} \ in [0, r-1]}  
    Ri: =[ai]P+[bi]Q{\ displaystyle R_ {i}: = [a_ {i}] P + [b_ {i}] Q}  
  3. Calculation[c′]P+[d′]Q {\ displaystyle [c '] P + [d'] Q}   .
    Take randomc′,d′∈[0,r-one] {\ displaystyle c ', d' \ in [0, r-1]}  
    X′: =[c′]P+[d′]Q{\ displaystyle X ': = [c'] P + [d '] Q}  
  4. Preparing for the cycle.
    X″: =X′,c″: =c′,d″: =d′{\ displaystyle X '': = X ', c' ': = c', d '': = d '}  
  5. Cycle.
    repeat{\ displaystyle \ mathbf {repeat}}  
    j: =H(X′){\ displaystyle j: = H (X ')}  
    X′: =X′+Rj{\ displaystyle X ': = X' + R_ {j}}  
    c′: =c′+aj(modr){\ displaystyle c ': = c' + a_ {j} \ (mod \ r)}  
    d′: =d′+bj(modr){\ displaystyle d ': = d' + b_ {j} \ (mod \ r)}  
    fori: =oneto2do{\ displaystyle \ mathbf {for} \ i: = 1 \ \ mathbf {to} \ 2 \ \ mathbf {do}}  
    j: =H(X″){\ displaystyle j: = H (X '')}  
    X″: =X″+Rj{\ displaystyle X '': = X '' + R_ {j}}  
    c″: =c″+aj(modr){\ displaystyle c '': = c '' + a_ {j} \ (mod \ r)}  
    d″: =d″+bj(modr){\ displaystyle d``: = d '' + b_ {j} \ (mod \ r)}  
    untilX′=X″{\ displaystyle \ mathbf {until} \ X '= X' '}  
  6. Output.
    ifd′≠d″then{\ displaystyle \ mathbf {if} d '\ neq d' '\ \ mathbf {then}}  
    k≡c′-c″d″-d′(modr){\ displaystyle k \ equiv {\ frac {c'-c ''} {d '' - d '}} \ (mod \ r)}  
    else{\ displaystyle \ mathbf {else}}   ERROR or run the algorithm again.

Algorithm Complexity:O( r ) {\ displaystyle O ({\ sqrt {r}})}   .

Example

Q=[k]P(mod229){\ displaystyle Q = [k] P \ (mod \ 229)}  

E:y2≡x3+x+44(mod229){\ displaystyle E: y ^ {2} \ equiv x ^ {3} + x + 44 \ (mod \ 229)}  

P=(five,116),Q=(155,166){\ displaystyle P = (5,116), Q = (155,166)}  

|⟨P⟩|=239{\ displaystyle | \ langle P \ rangle | = 239}  

Step 1. Define the function.

  • H:⟨P⟩→one,2,3,four{\ displaystyle H: \ langle P \ rangle \ rightarrow {1,2,3,4}}  
  • H(x,y)=(xmodfour)+one{\ displaystyle H (x, y) = (x \ mod \ 4) +1}  
  • (aone,bone,Rone)=(79,163,(135,117)){\ displaystyle (a_ {1}, b_ {1}, R_ {1}) = (79,163, (135,117))}  
  • (a2,b2,R2)=(206,nineteen,(96,97)){\ displaystyle (a_ {2}, b_ {2}, R_ {2}) = (206.19, (96.97))}  
  • (a3,b3,R3)=(87,109,(84,62)){\ displaystyle (a_ {3}, b_ {3}, R_ {3}) = (87.109, (84.62))}  
  • (afour,bfour,Rfour)=(219,68,(72,134)){\ displaystyle (a_ {4}, b_ {4}, R_ {4}) = (219.68, (72,134))}  

Step 2. Iterations.

Iterationc′d′[c′]P+[d′]Qc″d″[c″]P+[d″]Q054175(39,159)54175(39,159)one34four(160,9)113167(130,182)2113167(130,182)180105(36,97)320037(27,17)097(108,89)four180105(36,97)4640(223,153)five2029th(119,180)232127(167,57)6097(108,89)19224(57,105)77921(81,168)139111(185,227)eight4640(223,153)1930(197,92)926108(9,18)14087(194,145)ten232127(167,57)67120(223,153)eleven212195(75,136)14207(167,57)1219224(57,105)213104(57,105){\ displaystyle {\ begin {array} {c | ccc | ccc} Iteration & c '& d' & [c '] P + [d'] Q & c '' & d '' & [c ''] P + [d ''] Q \ \\ hline 0 & 54 & 175 & (39,159) & 54 & 175 & (39,159) \\ 1 & 34 & 4 & (160,9) & 113 & 167 & (130,182) \\ 2 & 113 & 167 & (130,182) & 180 & 105 & (36,97) \\ 3 & 200 & 37 & (27,17) & 0 & 97 & (108,89) \ \ 4 & 180 & 105 & (36.97) & 46 & 40 & (223,153) \\ 5 & 20 & 29 & (119,180) & 232 & 127 & (167,57) \\ 6 & 0 & 97 & (108,89) & 192 & 24 & (57,105) \\ 7 & 79 & 21 & (81,168) & 139 & 111 & (185,227) \\ 8 ) & 193 & 0 & (197.92) \\ 9 & 26 & 108 & (9,18) & 140 & 87 & (194,145) \\ 10 & 232 & 127 & (167.57) & 67 & 120 & (223,153) \\ 11 & 212 & 195 & (75,136) & 14 & 207 & (167,57) \\ 12 & 192 & 24 & \ m 57,105)} & 213 & 104 & \ mathbf {(57,105)} \\\ end {array}}}  

Step 3. Collision Detection.

  • Ati=12 {\ displaystyle i = 12}   :[192]P+[24]Q=[213]P+[104]Q=(57,105) {\ displaystyle [192] P + [24] Q = [213] P + [104] Q = (57,105)}  
  • We get thatk≡192-213104-24≡176(mod229) {\ displaystyle k \ equiv {\ frac {192-213} {104-24}} \ equiv 176 \ (mod \ 229)}  

Literature

Bolotov, A. A., Gashkov, S. B., Frolov, A. B., Chasovskikh, A. A. Elementary introduction to elliptic cryptography: Algebraic and algorithmic foundations. - M.: KomKniga, 2006 .-- S. 328. - ISBN 5-484-00443-8 .

Bolotov, A. A., Gashkov, S. B., Frolov, A. B., Chasovskikh, A. A. Elementary introduction to elliptic cryptography: Protocols of cryptography on elliptic curves. - M.: KomKniga, 2006. - S. 280. - ISBN 5-484-00444-6 .

Galbraith, SD, Smart, NP EVALUATION REPORT FOR CRYPTREC: SECURITY LEVEL OF CRYPTOGRAPHY - ECDLP MATHEMATICAL PROBLEM.

Song Y. Yan Quantum Attacks on ECDLP-Based Cryptosystems. - Springer US, 2013 - ISBN 978-1-4419-7721-2

Source - https://ru.wikipedia.org/w/index.php?title=ECDLP&oldid=91870007


More articles:

  • Joho
  • Varga, Szabolcs
  • Royce de Berenbrauc, Charles
  • Eri Akira
  • Sanne, Suvaybu
  • Summer, Victoria
  • Chernovol, Georgy Andreevich
  • Ansbach (District)
  • Telluride Tetrapalladia
  • Mazitov, Ramil Giniyatovich

All articles

Clever Geek | 2019