Docsity

Elliptic Curves: Understanding Discrete Logarithm Problem and Group Operation, Study notes of Advanced Computer Architecture

Toggle sidebar
bg1
ECC: Fundamentals
Discrete Logarithm Problem (DLP)
Consider a cyclic group Gand elements p,q∈G. Given
q=l·p
if Gis written additively, or
q=pl
if Gis written multiplicatively,lis called the Discrete Logar ithm (DL) of qto the base pin G(written l=logpq); the
corresponding Discrete Logarithm Problem (DLP) is to find l.
IQuestion: which Gdo we select so that
1. the group is secure (i.e., a DLP in said group is hard), and
2. representation of, and computation with, group elements is efficient.
IAnswer: an elliptic curve group !
Dan Page
COMSM2004/COMS30124 Slide 1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20

Partial preview of the text

Download Elliptic Curves: Understanding Discrete Logarithm Problem and Group Operation and more Study notes Advanced Computer Architecture in PDF only on Docsity!

ECC: Fundamentals

Discrete Logarithm Problem (DLP)

Consider a cyclic group G and elements p, q ∈ G. Given

q = l · p

if G is written additively, or q = p l

if G is written multiplicatively, l is called the Discrete Logarithm (DL) of q to the base p in G (written l = logp q); the corresponding Discrete Logarithm Problem (DLP) is to find l.

I Question: which G do we select so that

1. the group is secure (i.e., a DLP in said group is hard), and

2. representation of, and computation with, group elements is efficient.

I Answer: an elliptic curve group!

Dan Page

General Elliptic Curves (1)

I An elliptic curve E over the field K is defined by the general (or “long”)

Weierstraß equation, for ai ∈ K

E : y

+ a 1 xy + a 3 y = x

+ a 2 x

+ a 4 x + a 6.

I The K -rational set of points on such an E is

E(K ) :

n

(x, y) ∈ K

: x, y ∈ K , y

+ a 1 xy + a 3 y = x

+ a 2 x

+ a 4 x + a 6

o

∪{OE }

i.e., the set of points that satisfy the curve equation plus an extra point at

infinity (that lies infinitely far up the y-axis).

Dan Page

General Elliptic Curves (3)

I If two curves E and E

over K are isomorphic, there must exist a birational

mapping between them; this should preserve the point at infinity.

I Given P = (x, y) ∈ E(K ) and P

= (x

, y

) ∈ E

(K ), if E and E

are

isomorphic, we can find constants r , s, t ∈ K and u ∈ K

st.

x = u

x

+ r

y = u

y

+ su

x

+ t

maps P

into P, i.e, transforms E

into E (and vise versa).

I This is a lot less clever than it looks: we are just applying an “admissible” (i.e.,

sane) change of variables ...

I ... any cleverness is limited to finding r , s, t and u.

Dan Page

General Elliptic Curves (4)

Example

I (^) Consider E(R) for a 1 =^ 0,^ a 2 =^ 0,^ a 3 =^ 0, a 4 = −1, a 6 = 0 ... I (^) ... ∆ = 64, j(E) = 1728:

-1.

-0.

0

1

2

-2 -1.5 -1 -0.5 0 0.5 1 1.5 2

Example

I (^) Consider E(R) for a 1 = 0, a 2 = 0, a 3 = 0, a 4 = 1, a 6 = 0 ...

I (^) ... ∆ = −64, j(E) = 1728:

-1.

-0.

0

1

2

-2 -1.5 -1 -0.5 0 0.5 1 1.5 2

Dan Page

General Elliptic Curves (6)

I We’d like to construct a group to work with; this means we need

1. A set of group elements; these will be the set of K -rational points on some elliptic

curve E.

2. A group operation ⊕E that operates as required, i.e., is associative, commutative

and so on.

3. An identity element wrt. ⊕E ; this will be the point at infinity OE.

I The elliptic curve group law allows us to define ⊕E ; for P 1 , P 2 , R ∈ E(K )

P 1 ⊕E P 2 ⊕E R = OE

holds iff. P 1 , P 2 and R lie on a straight line ...

I ... this is a direct result of the form of curve we’ve selected.

Dan Page

General Elliptic Curves (7)

I The group law implies four cases ...

Case #1: P 1 ⊕E P 2 ⊕E R = OE

P 1

P 2

R

Case^ #2:^ P 1 ⊕E P 1 ⊕E R^ =^ OE

P 1

R

Case #3: P 1 ⊕E P 2 ⊕E OE = OE

P 1

P 2

Case^ #4:^ P 1 ⊕E P 1 ⊕E OE =^ OE

P 1

Dan Page

General Elliptic Curves (9)

Affine Point Negation

P 1

  • P 1

I (^) For P 1 = (x 1 ,^ y 1 ),^ P 3 = (x 3 ,^ y 3 ) =^ −P 1 is computed via

x 3 = x 1 y 3 = −y 1 − a 1 x 1 − a 3

Dan Page

General Elliptic Curves (10)

Affine Point Addition

P 1

P 2

R

P 1 + P 2

I (^) For P 1 = (x 1 ,^ y 1 )^ and^ P 2 = (x 2 ,^ y 2 ), let

λ =

y 2 −y 1 x 2 −x 1

μ =

y 1 x 2 −y 2 x 1 x 2 −x 1

I (^) P 3 = (x 3 , y 3 ) = P 1 + P 2 , is computed via

x 3 = λ^2 + a 1 λ − a 2 − x 1 − x 2 y 3 = −(λ + a 1 )x 3 − μ − a 3

Dan Page

General Elliptic Curves (12)

I Now we have a group; the final step toward making it useful is to define what

scalar multiplication means ...

I ... that, given some P

1 ∈^ E(K^ )^ and^ l^ ∈^ Z^ we define

P 2 = l · P 1 ,

which is sometimes written P 2 = [l]P 1 , as

P 2 = P 1 + P 1 + · · · + P 1

| {z }

total of l terms

I This allows us to pose a DLP on E:

I Given P

1 and^ l, it is easy to compute^ P 2 via an additive version of common

exponentiation algorithms.

I Given P

1 and^ P 2 (and a suitably parametrised curve), it is hard to compute^ l.

Dan Page

Elliptic Curves over Fq (1)

I In cryptography, we’d prefer to set K = F

q , i.e. use elliptic curves over some

finite field Fq ...

I ... basically everything works the same, but we get some advantages:

1. Can represent, and compute with, group elements efficiently.

2. Can simplify (i.e., specialise) the general Weierstraß equation and hence the

related group operation.

3. Can reason more directly about security of such curves.

I There are two standard choices:

1. Set q = p, i.e., use a large prime characteristic field Fp.

2. Set q = 2

n

, i.e., use a characteristic two field F 2 n^ (a binary extension field).

Dan Page

Elliptic Curves over Fq (3)

I For q = p, i.e., using elliptic curves over Fp , we can specialise the Weierstraß

equation to

E : y

= x

+ a 4 x + a 6.

I To compute P 3 = (x 3 , y 3 ) = −P 1 given P 1 = (x 1 , y 1 ), we simply set

x 3 = x 1

y 3 = −y 1

I To compute P 3 = (x 3 , y 3 ) = P 1 + P 2 given P 1 = (x 1 , y 1 ) and P 2 = (x 2 , y 2 ), we

first set

y 2 − y 1

x 2 − x 1

when x 1 6 = x 2 (i.e., we are doing addition), and

3 x

1 +^ a^4

2 y 1

when x 1 = x 2 and y 1 6 = 0 (i.e., we are doing doubling), then set

x 3 = λ

− x 1 − x 2

y 3 = λ(x 1 − x 3 ) − y 1

Dan Page

Elliptic Curves over Fq (4)

I For q = 2 n, i.e., using elliptic curves over F

2 n^ , we can specialise the

Weierstraß equation to

E : y

+ xy = x

+ a 2 x

+ a 6.

I To compute P 3 = (x 3 , y 3 ) = −P 1 given P 1 = (x 1 , y 1 ), we simply set

x 3 = x 1

y 3 = y 1 + x 1

I To compute P 3 = (x 3 , y 3 ) = P 1 + P 2 given P 1 = (x 1 , y 1 ) and P 2 = (x 2 , y 2 ), we

first set

y 2 + y 1

x 2 + x 1

when x 1 6 = x 2 (i.e., we are doing addition), and

x

1 +^ y 1

x 1

when x 1 = x 2 and y 1 6 = 0 (i.e., we are doing doubling), then set

x 3 = λ

+ λ + a 2 + x 1 + x 2

y 3 = λ(x 1 + x 3 ) + x 3 + y 1

Dan Page

Elliptic Curves over Fq (6)

I In cryptographic schemes, we are often required to use a group of large prime

order n; this implies we need a curve group of prime order ...

I ... or one where we can make a prime order subgroup:

I Imagine |E(Fq )| = n′^ = h · n, where n is a large prime and h is a small integer

called the cofactor.

I The subgroup

hE(Fq ) = {h · P : P ∈ E}

“kills” any point of order h (i.e., makes them O) ...

I ... leaving only points of order n, i.e., the subgroup is of large prime order n.

Dan Page

Elliptic Curves over Fq (7)

I In cryptographic schemes, we are often required to generate a random point;

focusing on E(Fp ) for example, there are (at least) two options:

1. Select an x, then solve the curve equation ...

1.1 Select a random x.

1.2 If there is a solution to y

2

= x

3

+ a 4 x + a 6 , that solution gives a random point

P = (x, y) ∈ E(Fp ).

1.3 If there is no solution, go back to step 1.1.

1.4 If E has a cofactor, compute P

′

= hP to get a point in the right subgroup.

... note that this approach allows some extra capabilities:

1.1 We can “hash” some message M into a point by setting x = HASH(M) for a suitable

hash function.

1.2 If we need to communicate some point P = (x, y), we can just communicate x plus a

1-bit flag that tells us which root of x

3

+ a 4 x + a 6 to select as y; this is called point

compression.

2. Often, part of the public domain parameters is a fixed generator G ∈ E(Fp ) which

is already a valid point; just select a random r ∈ Z and compute P = r · G.

Dan Page