ECC Sample Problems 2
Worked solutions for the second ECC problem set: point addition modulo 19 and modulo 31, with extended-Euclid inverses.
The two problemsSearch on YouTube
Problem set 2 is a handwritten sheet. It does point addition in two prime fields. The steps are the same as in set 1. Only the modulus and the inverses change.
| Problem | Modulus | Points | Curve |
|---|---|---|---|
| 1 | , | ||
| 2 | , | not shown on the sheet |
Addition formulasSearch on YouTube
Modular inverse with extended EuclidSearch on YouTube
Each slope contains a division. To divide by modulo , multiply by . Find with .
Inverse of 3 modulo 19Search on YouTube
The sheet uses this inverse in problem 1:
- so
Check: .
Inverse of 4 modulo 31Search on YouTube
The sheet uses this inverse in problem 2:
- so
Check: .
Run Euclid forward to get the remainders. Then substitute back until 1 is a sum of multiples of and . The multiplier of is .
Problem 1: modulo 19Search on YouTube
Given. Curve , modulus , points and .
SlopeSearch on YouTube
, so . The sheet cancels 5 and gets . Then .
Another route gives the same value. , because . Then .
x coordinateSearch on YouTube
, so:
y coordinateSearch on YouTube
Put , and in the formula:
, so:
Answer.
The sheet has two slips in this problem:
- It subtracts in place of . It gets . The correct value is .
- Its last line writes . It puts in place of .
Also, and do not satisfy . Use this problem only to practise the formulas.
Problem 2: modulo 31Search on YouTube
Given. Modulus , points and . The sheet notes that , so the addition formula applies.
SlopeSearch on YouTube
Use from the Euclid steps above:
x coordinateSearch on YouTube
y coordinateSearch on YouTube
Put , and in the formula:
The sheet writes . , so:
Answer.
Comparing the two problemsSearch on YouTube
| Aspect | Problem 1 | Problem 2 |
|---|---|---|
| Modulus | ||
| Divisor in | ||
| Inverse used | (or ) | |
The steps do not change. Only the modulus, the divisor and its inverse change.
Write each modulus reduction in full. Examiners give method marks for the reductions.
Quick self-testSearch on YouTube
Reduce modulo 19 and give .
. , and . So .
What is in problem 1?
, and . So .
What is in problem 1, and which value does the formula subtract?
. The formula subtracts .
Find with extended Euclid.
and . So . Thus .
Give for problem 2.
. . . So .
Why does problem 2 not use the doubling formula?
, because . The doubling slope is only for .
What is when and ?
The line is vertical and the slope is not defined. , the point at infinity.
- Formulas: , , . Reduce all values mod .
- Problem 1, : , , . The sheet gives because of two slips.
- Problem 2, : with , , .
- Each division is a multiplication by an inverse from extended Euclid.
Elliptic Curve (ECC) with example - Cryptography lecture series