Elliptic Curve Cryptography
Slide deck 12: elliptic curves over the reals and GF(p), point addition and doubling, the elliptic curve logarithm problem, ECC Diffie-Hellman, ECC encryption and the key-size table.
Elliptic Curves - ComputerphileComputerphile · what elliptic curves are and why crypto uses them, 9 min
Elliptic Curve (ECC) with example - Cryptography lecture seriesEezytutorials CSE & Kids channel · ECC point addition and doubling with a worked example, 17 min
Elliptic Curves: Diffie-Hellman key exchangeTrustica · elliptic curve Diffie-Hellman, 3 minWhy elliptic curvesSearch on YouTube
Most public-key schemes (RSA, Diffie-Hellman) use integer or polynomial arithmetic with very large numbers or polynomials. This puts a significant load on the storage and processing of keys and messages.
Elliptic curves are an alternative. They give the same security with smaller bit sizes.
| RSA / D-H arithmetic | ECC arithmetic |
|---|---|
| Very large integers or polynomials | Points on a curve, small bit sizes |
| Heavy storage and processing load | Lighter load for the same security |
Elliptic curve arithmeticSearch on YouTube
Real elliptic curvesSearch on YouTube
An equation in two variables and , with coefficients, defines an elliptic curve. The slides use a cubic elliptic curve of this form:
Here , , and are all real numbers. The scheme also defines a zero point .
- is the set of points that satisfy the equation.
- The set has an addition operation.
- Geometrically, the sum is the reflection of the intersection .
The line through and meets the curve again at a third point . The reflection of across the -axis is .
Real curve exampleSearch on YouTube
The slide figure shows the curve .
- The points and are on the curve.
- The dashed line through and meets the curve a third time, in the upper branch. The figure labels this point .
- The vertical dashed line reflects this point across the -axis. The result in the lower branch is .
Draw a line through two points. Find the third point where the line meets the curve. Reflect that point across the -axis. The reflected point is the sum.
Addition over GF(p)Search on YouTube
Cryptography uses a finite field, not real numbers. The same equation is used over with a prime . All arithmetic is mod .
Let and be two points on the curve. Then is:
The slope depends on whether the two points are equal:
| Case | Name | Slope |
|---|---|---|
| Point addition | ||
| Point doubling |
Both cases need a multiplicative inverse mod .
Compute first. Then compute . Then compute . Reduce every value mod .
Worked example in Search on YouTube
The slide example uses the curve over . The name of this curve is . Let and .
Step 1: add and .
| Step | Computation | Result |
|---|---|---|
| Slope | ||
| 17 | ||
| 20 | ||
| Sum |
Step 2: double .
| Step | Computation | Result |
|---|---|---|
| Slope | ||
| 7 | ||
| 12 | ||
| Double |
The last slope step uses the multiplicative inverse of in . The extended Euclidean algorithm finds it. To confirm: .
Check that both results are on the curve. For : , and . For : , and .
Repeated additionSearch on YouTube
Multiplication of a point by an integer is repeated addition. For example:
ECC schemesSearch on YouTube
The hard problemSearch on YouTube
The slides compare ECC arithmetic with modular arithmetic:
| Modular arithmetic | ECC analog |
|---|---|
| Modulo multiply | ECC addition |
| Modulo exponentiation | ECC repeated addition |
ECC needs a "hard" problem that is equivalent to the discrete log:
- , where and belong to a prime curve.
- It is "easy" to compute from and .
- It is "hard" to find from and .
- The name of this problem is the elliptic curve logarithm problem.
The slide gives the Certicom example curve . This is over .
Small curves such as are for practice only. On a small curve, a search by hand finds . Real curves use hundreds of bits.
ECC Diffie-HellmanSearch on YouTube
ECC can do a key exchange that is analogous to Diffie-Hellman.
| Step | Computation |
|---|---|
| Curve | The users select a suitable curve |
| Base point | with a large order , such that |
| Private keys | A selects . B selects |
| Public keys | and |
| Shared key | (A) and (B) |
The two keys are the same, because:
An attacker who sees , and must find . This is the hard problem.
Order: Curve, G, Private, Public, Key. To get the shared key, multiply the public point of the other side by your private key.
Encryption and decryptionSearch on YouTube
There are several alternatives for ECC encryption. The slides use the simplest one:
- Encode the message as a point on the elliptic curve.
- Select a suitable curve and point , as in Diffie-Hellman.
- Each user chooses a private key .
- Each user computes the public key .
To encrypt , the sender selects a random and sends:
To decrypt , the receiver uses the private key and computes:
The value is equal to the mask . Subtraction removes the mask and gives .
Slide example: Search on YouTube
The handwritten slide does a full example on this curve:
Key setup.
| Party | Compute | Result |
|---|---|---|
| Alice, private | none | |
| Alice, public | ||
| Bob, private | none | |
| Bob, public | ||
| Alice, shared | ||
| Bob, shared |
Both sides get the same shared point .
Encryption. Alice encrypts for Bob.
| Step | Value |
|---|---|
| Plaintext point | |
| Random chosen by Alice | |
| Ciphertext |
Decryption. Bob computes:
Bob gets the plaintext point .
Follow the mask. Alice adds to . Bob knows . He computes , which is equal to . Then he subtracts it.
ECC securitySearch on YouTube
Security basisSearch on YouTube
- The security of ECC relies on the elliptic curve logarithm problem.
- ECC can use much smaller key sizes than RSA, which relies on factoring.
- For equivalent key lengths, the computations are roughly equivalent.
- Thus, for similar security, ECC gives significant computational advantages.
Comparable key sizesSearch on YouTube
| Symmetric scheme (key size in bits) | ECC-based scheme (size of in bits) | RSA/DSA (modulus size in bits) |
|---|---|---|
| 56 | 112 | 512 |
| 80 | 160 | 1024 |
| 112 | 224 | 2048 |
| 128 | 256 | 3072 |
| 192 | 384 | 7680 |
| 256 | 512 | 15360 |
The ECC size is two times the symmetric key size. The RSA/DSA modulus grows much faster. For example, a 160-bit curve gives the same security as an 80-bit symmetric key and a 1024-bit RSA modulus.
Learn the ECC column: 112, 160, 224, 256, 384, 512. It is two times the symmetric column: 56, 80, 112, 128, 192, 256. The RSA column is 512, 1024, 2048, 3072, 7680, 15360.
Quick self-testSearch on YouTube
Why does ECC give the same security as RSA with smaller bit sizes?
RSA and Diffie-Hellman need very large integers or polynomials. These put a load on storage and processing. The elliptic curve logarithm problem is hard at much smaller sizes. For example, a 256-bit ECC key matches a 3072-bit RSA modulus.
Give the equation of a real elliptic curve and the special point.
, with real numbers. The scheme also defines a zero point . is the set of points that satisfy the equation.
Describe the geometric view of on a real elliptic curve.
Draw the line through and . The line meets the curve a third time at . The sum is the reflection of across the -axis.
State the point addition and doubling formulas over .
and . If , . If , .
Find and for , in .
: . . . So . : . . . So .
What is the elliptic curve logarithm problem?
on a prime curve. It is easy to compute from and . It is hard to find from and . ECC security relies on this problem.
Write the ECC Diffie-Hellman steps.
Select a curve and a base point with a large order , so that . Select private keys . Compute public keys and . The shared key is .
Give the ECC encryption and decryption formulas.
Encode as a point . Encrypt with a random : . Decrypt: .
Give the results of the slide example.
Curve , . Alice: , . Bob: , . Shared key: . Encrypt with : . Decrypt: .
Give the key-size pairs for 80-bit and 128-bit security.
80-bit symmetric: 160-bit ECC, 1024-bit RSA/DSA. 128-bit symmetric: 256-bit ECC, 3072-bit RSA/DSA.
- RSA and Diffie-Hellman use very large numbers. Elliptic curves give the same security with smaller bit sizes.
- A real elliptic curve is , with a zero point . The sum is the reflection of the third intersection point .
- Over : and . The slope is for addition and for doubling.
- Multiplication is repeated addition: . The hard problem is the elliptic curve logarithm problem.
- ECC Diffie-Hellman: , , . Encryption: . Decryption subtracts .
- Slide example , : public keys and , shared key , ciphertext , plaintext .
- Key sizes: ECC 112 to 512 bits matches symmetric 56 to 256 bits and RSA 512 to 15360 bits.