introduction to elliptic curve...

36
Introduction to Elliptic Curve Cryptography Anupam Datta 18-733

Upload: others

Post on 30-Aug-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Introduction to Elliptic Curve Cryptographycourse.ece.cmu.edu/~ece733/lectures/21-intro-ecc.pdfPairing Based Cryptography β€’ Computational Diffie-Hellman –Given 𝑔,𝑔 ,𝑔

Introduction toElliptic Curve Cryptography

Anupam Datta

18-733

Page 2: Introduction to Elliptic Curve Cryptographycourse.ece.cmu.edu/~ece733/lectures/21-intro-ecc.pdfPairing Based Cryptography β€’ Computational Diffie-Hellman –Given 𝑔,𝑔 ,𝑔

Elliptic Curve Cryptography

β€’ Public Key Cryptosystem

β€’ Duality between Elliptic Curve Cryptography and Discrete Log Based Cryptography– Groups / Number Theory Basis

– Additive group based on curves

β€’ What is the point?– Less efficient attacks exist so we can use smaller keys

than discrete log / RSA based cryptography

Page 3: Introduction to Elliptic Curve Cryptographycourse.ece.cmu.edu/~ece733/lectures/21-intro-ecc.pdfPairing Based Cryptography β€’ Computational Diffie-Hellman –Given 𝑔,𝑔 ,𝑔

Computing Dlog in (Zp)*(n-bit prime p)

Best known algorithm (GNFS): run time exp( )

cipher key size modulus size80 bits 1024 bits128 bits 3072 bits256 bits (AES) 15360 bits

As a result: slow transition away from (mod p) to elliptic curves

Elliptic Curvegroup size

160 bits

256 bits

512 bits

Page 4: Introduction to Elliptic Curve Cryptographycourse.ece.cmu.edu/~ece733/lectures/21-intro-ecc.pdfPairing Based Cryptography β€’ Computational Diffie-Hellman –Given 𝑔,𝑔 ,𝑔

Discrete Logs

β€’ Let 𝑝 = 2π‘ž + 1 where 𝑝, π‘ž are large primes

β€’ ℀𝑝 is the group of integers modulo 𝑝

β€’ ℀𝑝 = 2π‘ž

β€’ πΊπ‘ž = 𝑄𝑅 ℀𝑝 is the quadratic residue subgroup of ℀𝑝

β€’ 𝑄𝑅 ℀𝑝 = π‘ž, subgroup of prime order

β€’ Every element 𝑔 ∈ πΊπ‘ž is a generator, pick a random one

β€’ Pick secret π‘₯, compute 𝑔π‘₯π‘šπ‘œπ‘‘ 𝑝

β€’ Public: 𝑝, π‘ž, 𝑔, 𝑔π‘₯ Secret: π‘₯

β€’ Discrete Log Assumption: Given Public it is hard to find Secret

Page 5: Introduction to Elliptic Curve Cryptographycourse.ece.cmu.edu/~ece733/lectures/21-intro-ecc.pdfPairing Based Cryptography β€’ Computational Diffie-Hellman –Given 𝑔,𝑔 ,𝑔

Outline

β€’ Elliptic curves over reals

β€’ Elliptic curves over 𝑍𝑝

β€’ ECDH and ECDSA

Page 6: Introduction to Elliptic Curve Cryptographycourse.ece.cmu.edu/~ece733/lectures/21-intro-ecc.pdfPairing Based Cryptography β€’ Computational Diffie-Hellman –Given 𝑔,𝑔 ,𝑔

Elliptic Curves

β€’ Consider the following equation:𝑦2 = π‘₯3 + π‘Žπ‘₯ + 𝑏

β€’ Idea: we pick (π‘Ž, 𝑏) and form a group which is a set containing all of the points that satisfy the equation

β€’ This group will be defined with a very special addition operation which introduces an additional imaginary point

Page 7: Introduction to Elliptic Curve Cryptographycourse.ece.cmu.edu/~ece733/lectures/21-intro-ecc.pdfPairing Based Cryptography β€’ Computational Diffie-Hellman –Given 𝑔,𝑔 ,𝑔

Example

Page 8: Introduction to Elliptic Curve Cryptographycourse.ece.cmu.edu/~ece733/lectures/21-intro-ecc.pdfPairing Based Cryptography β€’ Computational Diffie-Hellman –Given 𝑔,𝑔 ,𝑔

Not all curves are valid elliptic curves

β€’ Left: 𝑦2 = π‘₯3 has a β€œcusp”

β€’ Right: 𝑦2 = π‘₯3 βˆ’ 3π‘₯ + 2 has a β€œself intersection”

β€’ In general we require: 4π‘Ž3 + 27𝑏2 β‰  0

β€’ Observation: curves are symmetric about the point 𝑦 = 0

Page 9: Introduction to Elliptic Curve Cryptographycourse.ece.cmu.edu/~ece733/lectures/21-intro-ecc.pdfPairing Based Cryptography β€’ Computational Diffie-Hellman –Given 𝑔,𝑔 ,𝑔

Elliptic Curves as a Group

β€’ Groups are sets defined over some operation with some structure / properties

β€’ 𝐺 = π‘₯, 𝑦 : 𝑦2 = π‘₯3 + π‘Žπ‘₯ + 𝑏

β€’ Define an operation denoted by β€˜+’ such that:

β€’ If 𝑝1, 𝑝2 ∈ 𝐺, 𝑝1 + 𝑝2 ∈ 𝐺 (Closure)

β€’ 𝑝1 + 𝑝2 + 𝑝3 = 𝑝1 + (𝑝2 + 𝑝3) (Associative)

β€’ βˆƒ0 𝑠. 𝑑. βˆ€π‘ 𝑝 + 0 = 0 + 𝑝 = 𝑝 (Identity)

β€’ βˆ€π‘ βˆƒπ‘βˆ’1 𝑠. 𝑑. 𝑝 + π‘βˆ’1 = 0 (Inverse)

– Curves will form an abelian group

β€’ 𝑝1 + 𝑝2 = 𝑝2 + 𝑝1 (Communitive)

Page 10: Introduction to Elliptic Curve Cryptographycourse.ece.cmu.edu/~ece733/lectures/21-intro-ecc.pdfPairing Based Cryptography β€’ Computational Diffie-Hellman –Given 𝑔,𝑔 ,𝑔

The Group Operation

β€’ Not typical point-wise addition!

β€’ What is this 0 element?

– 𝑦2 = π‘₯3 + π‘Žπ‘₯ + 𝑏 does not include (0, 0) if 𝑏 β‰  0

β€’ How do we know inverses exist if we don’t know what the 0 element is?

β€’ How do we maintain closure?

– π‘₯, 𝑦 + π‘₯, 𝑦 = 2π‘₯, 2𝑦 for typical pointwise addition which in general does not lie on the curve

Page 11: Introduction to Elliptic Curve Cryptographycourse.ece.cmu.edu/~ece733/lectures/21-intro-ecc.pdfPairing Based Cryptography β€’ Computational Diffie-Hellman –Given 𝑔,𝑔 ,𝑔

The Group Operation

β€’ Let 𝑃, 𝑄, 𝑅 ∈ 𝐺, such that a line passes through all of them, then group operation is:

𝑃 + 𝑄 + 𝑅 = 0

β€’ This is strange, we have a relationship between points that lie along but no clear notion of traditional addition

β€’ We can use the relationship to define a more traditional form of addition:

𝑃 + 𝑄 = βˆ’π‘…

Page 12: Introduction to Elliptic Curve Cryptographycourse.ece.cmu.edu/~ece733/lectures/21-intro-ecc.pdfPairing Based Cryptography β€’ Computational Diffie-Hellman –Given 𝑔,𝑔 ,𝑔

The Group Operationβ€’ 𝑃 + 𝑄 = βˆ’π‘…

β€’ 𝑅 = π‘₯π‘Ÿ , π‘¦π‘Ÿ , βˆ’π‘… = π‘₯π‘Ÿ , βˆ’π‘¦π‘Ÿβ€’ What happens if we want to compute

βˆ’ 𝑅 + 𝑅?β€’ What third point on the curve lies

on the line defined by (𝑅, βˆ’π‘…)?

β€’ We say this is the point defined at infinity, we denote it by 0, and it is the additive identity

β€’ βˆ’π‘… + 𝑅 = 0

β€’ Adjust our definition of the group:β€’ 𝐺 = π‘₯, 𝑦 : 𝑦2 = π‘₯3 + π‘Žπ‘₯ + 𝑏 βˆͺ {0}

Page 13: Introduction to Elliptic Curve Cryptographycourse.ece.cmu.edu/~ece733/lectures/21-intro-ecc.pdfPairing Based Cryptography β€’ Computational Diffie-Hellman –Given 𝑔,𝑔 ,𝑔

The Group Operation (Geometric)

β€’ Given 𝐺 = π‘₯, 𝑦 : 𝑦2 = π‘₯3 + π‘Žπ‘₯ + 𝑏 βˆͺ {0}, calculate 𝑃 + 𝑄– Geometrically, figure out the third point 𝑅 such that a line goes through 𝑃,𝑄, 𝑅 and then

set P + 𝑄 = βˆ’π‘…

β€’ What could possibly go wrong?– P or Q could be 0

β€’ 0 Is the identity under the group operation, so 𝑃 + 0 = 0 + 𝑃 = 𝑃

– P = -Qβ€’ This is the case of βˆ’π‘… + 𝑅 = 0 which was defined by the vertical line

– P = Qβ€’ Imagine tangent to P, use that to find R. 𝑃 + 𝑃 = βˆ’π‘… describes the line tangent to 𝑃 that intersects at 𝑅

– There is no 3rd pointβ€’ This occurs when the line is tangent to exactly one of 𝑃 or 𝑄. Suppose the line is tangent to 𝑃, then from before

we have 𝑃 + 𝑃 = βˆ’π‘„ which gives us 𝑃 + 𝑄 = βˆ’π‘ƒ

β€’ If line is tangent to 𝑄, then 𝑄 + 𝑄 = βˆ’π‘ƒ which would give us 𝑃 + 𝑄 = βˆ’π‘„

Page 14: Introduction to Elliptic Curve Cryptographycourse.ece.cmu.edu/~ece733/lectures/21-intro-ecc.pdfPairing Based Cryptography β€’ Computational Diffie-Hellman –Given 𝑔,𝑔 ,𝑔

Algebraic Solution

β€’ Let 𝑃 β‰  𝑄, line defined by 𝑃, 𝑄 has slope

π‘š =𝑦𝑃 βˆ’ 𝑦𝑄

π‘₯𝑃 βˆ’ π‘₯𝑄

β€’ Intersection with point 𝑅 = xR, yR :

– π‘₯𝑅 = π‘š2 βˆ’ π‘₯𝑃 βˆ’ π‘₯𝑄

– 𝑦𝑅 = 𝑦𝑃 +π‘š π‘₯𝑅 βˆ’ π‘₯𝑃 = yQ +m xR βˆ’ xQ

β€’ How would we check that this is correct?– Check if π‘₯𝑅, 𝑦𝑅 ∈ 𝐺, if it is then correct with high probability

Page 15: Introduction to Elliptic Curve Cryptographycourse.ece.cmu.edu/~ece733/lectures/21-intro-ecc.pdfPairing Based Cryptography β€’ Computational Diffie-Hellman –Given 𝑔,𝑔 ,𝑔

Multiplication

β€’ We have defined addition, so now we can define multiplication

β€’ 𝑛 βˆ— 𝑃 = 𝑃 + 𝑃 + …+ 𝑃 𝑛 βˆ’ π‘‘π‘–π‘šπ‘’π‘ 

β€’ Inefficient for multiplying by large numbers

β€’ Use doubling algorithm, analogue of repeated squaring algorithm for exponentiation

β€’ Calculate 19 (6 Additions):– A = 1+1 = 2

– B = A + A = 2 + 2 = 4

– C = B + B = 4 + 4 = 8

– D = C + C = 16

– 19 = D + A + 1

Page 16: Introduction to Elliptic Curve Cryptographycourse.ece.cmu.edu/~ece733/lectures/21-intro-ecc.pdfPairing Based Cryptography β€’ Computational Diffie-Hellman –Given 𝑔,𝑔 ,𝑔

Back to Discrete Logs

β€’ In the discrete log setting, exponentiation was easy, but logs were hard

– 𝑔π‘₯ βˆ’ Easy, log𝑔 𝑔π‘₯ βˆ’ Hard

β€’ In the elliptic curve setting, multiplication is easy but division is hard

– We still call division β€œlogarithm” even though its really division here

β€’ We used the asymmetry of these operations in the discrete log setting to do key exchange / encryption, can do a similar thing with elliptic curves

Page 17: Introduction to Elliptic Curve Cryptographycourse.ece.cmu.edu/~ece733/lectures/21-intro-ecc.pdfPairing Based Cryptography β€’ Computational Diffie-Hellman –Given 𝑔,𝑔 ,𝑔

Fields

β€’ A field is a set 𝔽 with two operations (+,Γ—) that has the following properties:

– 𝔽 is an abelian group under +

– The non-zero elements of 𝔽 are an abelian group under Γ—

– π‘Ž 𝑏 + 𝑐 = π‘Žπ‘ + π‘Žπ‘ βˆ€π‘Ž, 𝑏, 𝑐 ∈ 𝔽 (Distributive)

Page 18: Introduction to Elliptic Curve Cryptographycourse.ece.cmu.edu/~ece733/lectures/21-intro-ecc.pdfPairing Based Cryptography β€’ Computational Diffie-Hellman –Given 𝑔,𝑔 ,𝑔

Elliptic Curves Over a Field

β€’ Note: β„€π‘›βˆ— (+,Γ—) is a field when 𝑛 is prime

β€’ Refine the definition of the curve group again:

β€’ 𝐺 =π‘₯, 𝑦 ∈ 𝔽𝑃

2: 𝑦2 = π‘₯3 + π‘Žπ‘₯ + 𝑏 π‘šπ‘œπ‘‘ 𝑝

4π‘Ž3ΩΏ + 27𝑏2 β‰  0 π‘šπ‘œπ‘‘ 𝑝βˆͺ {0}

β€’ Curves are now defined only at discrete points and not over the smooth lines that we had before

Page 19: Introduction to Elliptic Curve Cryptographycourse.ece.cmu.edu/~ece733/lectures/21-intro-ecc.pdfPairing Based Cryptography β€’ Computational Diffie-Hellman –Given 𝑔,𝑔 ,𝑔

Elliptic Curves Over a Field

𝑦2 = π‘₯3 βˆ’ 7π‘₯ + 10 π‘šπ‘œπ‘‘ 𝑝 where 𝑝 = 19, 97, 127, 487

Page 20: Introduction to Elliptic Curve Cryptographycourse.ece.cmu.edu/~ece733/lectures/21-intro-ecc.pdfPairing Based Cryptography β€’ Computational Diffie-Hellman –Given 𝑔,𝑔 ,𝑔

Operation for Curves Over a Field

Curve 𝑦2 = π‘₯3 βˆ’ π‘₯ + 3 (π‘šπ‘œπ‘‘ 127), 𝑃 = 16, 20 , 𝑄 = (41, 120)

Page 21: Introduction to Elliptic Curve Cryptographycourse.ece.cmu.edu/~ece733/lectures/21-intro-ecc.pdfPairing Based Cryptography β€’ Computational Diffie-Hellman –Given 𝑔,𝑔 ,𝑔

Operation for Curves Over a Field

β€’ The addition operation that we defined before works exactly the same on curves defined over a field

β€’ All of the special cases are handled exactly the same as before

β€’ Intersection with point 𝑅 = xR, yR still computed as:

– π‘₯𝑅 = π‘š2 βˆ’ π‘₯𝑃 βˆ’ π‘₯π‘„π‘šπ‘œπ‘‘ 𝑝

– 𝑦𝑅 = 𝑦𝑃 +π‘š π‘₯𝑅 βˆ’ π‘₯𝑃 π‘šπ‘œπ‘‘ 𝑝 = yQ +m xR βˆ’ xQ π‘šπ‘œπ‘‘ 𝑝

Page 22: Introduction to Elliptic Curve Cryptographycourse.ece.cmu.edu/~ece733/lectures/21-intro-ecc.pdfPairing Based Cryptography β€’ Computational Diffie-Hellman –Given 𝑔,𝑔 ,𝑔

Order of Elliptic Curve Group

β€’ # of unique points in the group

– Could simply try and count them, but there are too many for this to be possible

β€’ Efficient algorithms for computing this exist

Page 23: Introduction to Elliptic Curve Cryptographycourse.ece.cmu.edu/~ece733/lectures/21-intro-ecc.pdfPairing Based Cryptography β€’ Computational Diffie-Hellman –Given 𝑔,𝑔 ,𝑔

Subgroups of Elliptic Curve Groups

β€’ In the discrete log setting, we selected a generator 𝑔 and computed 𝑔0, 𝑔1, … π‘šπ‘œπ‘‘ 𝑝

β€’ This group generated by the generator had an order that divided the order of the parent group by Lagrange’s Theorem

β€’ In Elliptic Curves we can select a point P which is like a generator and compute 0𝑃, 𝑃, 2𝑃, 3𝑃,… π‘šπ‘œπ‘‘ 𝑝, we call this a Base Point

β€’ This operation will also generate a cyclic subgroup of the Elliptic curve group whose order divides the order of the parent group

Page 24: Introduction to Elliptic Curve Cryptographycourse.ece.cmu.edu/~ece733/lectures/21-intro-ecc.pdfPairing Based Cryptography β€’ Computational Diffie-Hellman –Given 𝑔,𝑔 ,𝑔

Subgroups of Elliptic Curve Groups

β€’ Suppose we pick a point, 𝑃, how can we find the order of the subgroup generated by 𝑃?

β€’ Let N be the order of the parent group

β€’ Let 𝑁 = 𝑝1π‘˜1𝑝2

π‘˜2 … be the prime factorization of N

β€’ Let n be the order of the subgroup

β€’ Idea: take all divisors of N, given by the prime factorization, and sort them smallest to largest, call them n. The order of the subgroup is the smallest n such that nP = 0.

Page 25: Introduction to Elliptic Curve Cryptographycourse.ece.cmu.edu/~ece733/lectures/21-intro-ecc.pdfPairing Based Cryptography β€’ Computational Diffie-Hellman –Given 𝑔,𝑔 ,𝑔

Finding Base Point With High Order

β€’ We will want to find a base point that generates a subgroup with prime order that is as high as possible

β€’ Let β„Ž =𝑁

𝑛we will call β„Ž the cofactor of the subgroup

β€’ Let 𝑛 be the largest prime factor in the prime factorization of 𝑁

β€’ 𝑁𝑃 = 0 because 𝑁 is an integer multiple of any point 𝑃

β€’ 𝑛 β„Žπ‘ƒ = 0 by re-writing 𝑁 = π‘›β„Ž

β€’ This tells us that the point β„Žπ‘ƒ = 𝐺 has order 𝑛 unless 𝐺 = 0

β€’ 𝐺 is a generator of a cyclic subgroup of prime order 𝑛

Page 26: Introduction to Elliptic Curve Cryptographycourse.ece.cmu.edu/~ece733/lectures/21-intro-ecc.pdfPairing Based Cryptography β€’ Computational Diffie-Hellman –Given 𝑔,𝑔 ,𝑔

ECDH – Elliptic Curve Diffie-Hellman

β€’ Regular Diffie-Hellman:– Alice has secret π‘Ž and computes π‘”π‘Ž

– Bob has secret 𝑏 and computes 𝑔𝑏

– They exchange and compute π‘”π‘Žπ‘

– Key insight: it is hard for an adversary to compute π‘”π‘Žπ‘ from π‘”π‘Ž, 𝑔𝑏

β€’ ECDH Setting, Public Parameters: 𝑝, π‘Ž, 𝑏, 𝐺, 𝑛, β„Ž

– 𝑝 = large prime

– (π‘Ž, 𝑏) = coefficients in 𝑦2 = π‘₯3 + π‘Žπ‘₯ + 𝑏

– 𝐺 = base point that generates subgroup of large prime order

– 𝑛 = order of the subgroup

– β„Ž = cofactor of the subgroup

Page 27: Introduction to Elliptic Curve Cryptographycourse.ece.cmu.edu/~ece733/lectures/21-intro-ecc.pdfPairing Based Cryptography β€’ Computational Diffie-Hellman –Given 𝑔,𝑔 ,𝑔

ECDH – Elliptic Curve Diffie-Hellman

β€’ Alice: 𝑑𝐴 ←𝑅 ℀𝑛, 𝐻𝐴 = 𝑑𝐴𝐺

β€’ Bob: 𝑑𝐡 ←𝑅 ℀𝑛, 𝐻𝐡 = 𝑑𝐡𝐺

β€’ Alice -> Bob: 𝐻𝐴‒ Bob -> Alice: 𝐻𝐡

β€’ Alice: 𝑑𝐴𝐻𝐡 = 𝑑𝐴𝑑𝐡𝐺

β€’ Bob: 𝑑𝐡𝐻𝐴 = 𝑑𝐡𝑑𝐴𝐺

β€’ Say 𝑆 = 𝑑𝐴𝑑𝐡𝐺 is the shared secret, can use it to derive a symmetric key

Page 28: Introduction to Elliptic Curve Cryptographycourse.ece.cmu.edu/~ece733/lectures/21-intro-ecc.pdfPairing Based Cryptography β€’ Computational Diffie-Hellman –Given 𝑔,𝑔 ,𝑔

ECDSA – Elliptic Curve Digital Signature Algorithm

β€’ Public Information: 𝑝, π‘Ž, 𝑏, 𝐺, 𝑛, β„Ž

β€’ Alice’s Private Key: 𝑑𝐴‒ Alice’s Public Key: 𝐻𝐴 = 𝑑𝐴𝐺

β€’ Alice signs a message π‘š ∈ ℀𝑛 by performing the following:

– π‘˜ ←𝑅 ℀𝑛– 𝑃 = π‘˜πΊ = (π‘₯𝑃 , 𝑦𝑃)

– π‘Ÿ = π‘₯𝑃 π‘šπ‘œπ‘‘ 𝑛, if π‘Ÿ = 0 start over

– 𝑠 = π‘˜βˆ’1 π‘š + π‘Ÿπ‘‘π΄ π‘šπ‘œπ‘‘ 𝑛, if 𝑠 = 0 start over

– Output signature (𝑠, π‘Ÿ)

Page 29: Introduction to Elliptic Curve Cryptographycourse.ece.cmu.edu/~ece733/lectures/21-intro-ecc.pdfPairing Based Cryptography β€’ Computational Diffie-Hellman –Given 𝑔,𝑔 ,𝑔

ECDSA – Elliptic Curve Digital Signature Algorithm

β€’ Bob can verify a message signed by performing the following:– Bob gets π‘š, 𝑠, π‘Ÿ, 𝐻𝐴

– Calculate 𝑒1 = π‘ βˆ’1π‘š π‘šπ‘œπ‘‘ 𝑛, 𝑒2 = π‘ βˆ’1π‘Ÿ π‘šπ‘œπ‘‘ 𝑛

– Calculate 𝑃 = 𝑒1𝐺 + 𝑒2𝐻𝐴– Valid if and only if π‘Ÿ = π‘₯𝑃 π‘šπ‘œπ‘‘ 𝑛

Page 30: Introduction to Elliptic Curve Cryptographycourse.ece.cmu.edu/~ece733/lectures/21-intro-ecc.pdfPairing Based Cryptography β€’ Computational Diffie-Hellman –Given 𝑔,𝑔 ,𝑔

ECDSA – Elliptic Curve Digital Signature Algorithm

β€’ Check that the algorithm is correct:

– 𝑃 = 𝑒1𝐺 + 𝑒2𝐻𝐴 = 𝑒1𝐺 + 𝑒2𝑑𝐴𝐺 = 𝑒1 + 𝑒2𝑑𝐴 𝐺

– 𝑃 = π‘ βˆ’1π‘š + π‘ βˆ’1π‘Ÿπ‘‘π΄ 𝐺 = π‘ βˆ’1 π‘š + π‘Ÿπ‘‘π΄ 𝐺

– 𝑠 = π‘˜βˆ’1 π‘š + π‘Ÿπ‘‘π΄ β†’ π‘˜ = π‘ βˆ’1 π‘š + π‘Ÿπ‘‘π΄

– 𝑃 = π‘ βˆ’1 π‘š + π‘Ÿπ‘‘π΄ 𝐺 = π‘˜πΊ – Thus the signature will verify correctly

Page 31: Introduction to Elliptic Curve Cryptographycourse.ece.cmu.edu/~ece733/lectures/21-intro-ecc.pdfPairing Based Cryptography β€’ Computational Diffie-Hellman –Given 𝑔,𝑔 ,𝑔

Acknowledgments

β€’ Many slides created by Kyle Soska (TA for 18733 in Spring 2016)

Page 32: Introduction to Elliptic Curve Cryptographycourse.ece.cmu.edu/~ece733/lectures/21-intro-ecc.pdfPairing Based Cryptography β€’ Computational Diffie-Hellman –Given 𝑔,𝑔 ,𝑔

Pairing Based Cryptography

β€’ Computational Diffie-Hellman

– Given 𝑔, π‘”π‘Ž, 𝑔𝑏 compute π‘”π‘Žπ‘

β€’ Decisional Diffie-Hellman

– Given 𝑔, π‘”π‘Ž, 𝑔𝑏, cant tell π‘”π‘Žπ‘ apart from random element 𝑔𝑐 for random 𝑐

β€’ Let 𝐺1, 𝐺2, 𝐺𝑇 be groups of prime order π‘ž, then a bilinear pairing denoted 𝑒 is an operation that maps from 𝐺1 Γ— 𝐺2 β†’ 𝐺𝑇 such that

β€’ βˆ€π‘Ž, 𝑏 ∈ π”½π‘ž , βˆ€π‘ƒ ∈ 𝐺1, βˆ€π‘„ ∈ 𝐺2 𝑒 π‘Žπ‘ƒ, 𝑏𝑄 = 𝑒 𝑃, 𝑄 π‘Žπ‘ β‰  1

β€’ Idea: We can use pairing based cryptography to create a situation where Computational Diffie-Hellman is hard, but Decisional Diffie-Hellman is easy

Page 33: Introduction to Elliptic Curve Cryptographycourse.ece.cmu.edu/~ece733/lectures/21-intro-ecc.pdfPairing Based Cryptography β€’ Computational Diffie-Hellman –Given 𝑔,𝑔 ,𝑔

Pairing Based Cryptography

β€’ Computational Diffie-Hellman

– Given 𝑔, π‘”π‘Ž, 𝑔𝑏 compute π‘”π‘Žπ‘

β€’ Decisional Diffie-Hellman

– Given 𝑔, π‘”π‘Ž, 𝑔𝑏, cant tell π‘”π‘Žπ‘ apart from random element 𝑔𝑐 for random 𝑐

β€’ Suppose an adversary has π‘”π‘Ž , 𝑔𝑏, 𝑔𝑧, where 𝑔𝑧 is randomly either π‘”π‘Žπ‘ or 𝑔𝑐 for 𝑐 random. How can he check which one he has?

– 𝑒 π‘”π‘Ž , 𝑔𝑏 = 𝑒 𝑔, 𝑔 π‘Žπ‘ = 𝑒 𝑔, π‘”π‘Žπ‘

– Adversary computes 𝑒 𝑔, 𝑔𝑧 =? 𝑒 π‘”π‘Ž, 𝑔𝑏

Page 34: Introduction to Elliptic Curve Cryptographycourse.ece.cmu.edu/~ece733/lectures/21-intro-ecc.pdfPairing Based Cryptography β€’ Computational Diffie-Hellman –Given 𝑔,𝑔 ,𝑔

Pairing Based Signatures (Boneh et al.)

β€’ π‘₯ ←𝑅 β„€π‘ž

β€’ Private Key: π‘₯, Public Key: 𝑔π‘₯

β€’ Sign message m by hashing it yielding β„Ž = 𝐻(π‘š) and signing the hash as 𝜎 = β„Žπ‘₯

β€’ Verify (𝜎, π‘š) as 𝑒 𝜎, 𝑔 =? 𝑒 𝐻 π‘š , 𝑔π‘₯

– 𝑒 𝜎, 𝑔 = 𝑒 β„Žπ‘₯ , 𝑔 = 𝑒 𝐻 π‘š π‘₯, 𝑔 = 𝑒 𝐻 π‘š , 𝑔 π‘₯ = 𝑒 𝐻 π‘š , 𝑔π‘₯

Page 35: Introduction to Elliptic Curve Cryptographycourse.ece.cmu.edu/~ece733/lectures/21-intro-ecc.pdfPairing Based Cryptography β€’ Computational Diffie-Hellman –Given 𝑔,𝑔 ,𝑔

Twists Of Elliptic Curves

β€’ Suppose you have an elliptic curve 𝐸[𝑝] over some field 𝔽

β€’ A twist of 𝐸[𝑝] another elliptic curve over a field extension of 𝔽

β€’ A twist of 𝐸[𝑝] will be isomorphic to 𝐸[𝑝], namely it will have the same order, and there is a 1-1 onto mapping between them

Page 36: Introduction to Elliptic Curve Cryptographycourse.ece.cmu.edu/~ece733/lectures/21-intro-ecc.pdfPairing Based Cryptography β€’ Computational Diffie-Hellman –Given 𝑔,𝑔 ,𝑔

Other Notes

β€’ Weil Pairing is a well studied paring where the groups 𝐺 are elliptic curves

β€’ There are many standardized elliptic curve groups– 𝑦2 + π‘₯𝑦 = π‘₯3 + π‘Žπ‘₯2 + 1 over 𝔽2π‘š, π‘š = prime and π‘Ž = 0 or 1β€’ Koblitz Curves, very fast addition and multiplication

– π‘₯2 + 𝑦2 = 1 + 𝑑π‘₯2𝑦2 where 𝑑 = 0 or 1β€’ Edwards Curves, point addition is the same in all cases, and

reasonably fast