Cryptography and Computer Security

« nazaj

Cryptography and computer security - Tutorial 12.1.2021


Elliptic curves

Groups on elliptic curves over prime fields

Simplified ECIES


Exercise 1

Does the elliptic curve equation $y^2 = x^3 + 10x + 5$ define a group over ${\mathbb{Z}_{17}}$?



Exercise 2

Find all points on the elliptic curve $y^2 = x^3 + x + 6$ over ${\mathbb{Z}_{11}}$.


$x$ $x^2$ $x^3 + x + 6$
0 0 $6$
1 1 $8$
2 4 $5 = 4^2 = 7^2$
3 9 $3 = 5^2 = 6^2$
4 5 $8$
5 3 $4 = 2^2 = 9^2$
6 3 $8$
7 5 $4 = 2^2 = 9^2$
8 9 $9 = 3^2 = 8^2$
9 4 $7$
10 1 $4 = 2^2 = 9^2$

Points on the elliptic curve:

  1. $\mathcal{O}$
  2. $(2, 4) = 4P = -8Q = 5Q$
  3. $(2, 7) = -4P = 8Q$
  4. $(3, 5) = P + Q = -Q = 12Q$
  5. $(3, 6) = Q$
  6. $(5, 2) = 5P = -10Q = 3Q$
  7. $(5, 9) = -5P = 8P = 10Q$
  8. $(7, 2) = -2P = 4Q$
  9. $(7, 9) = 2P = -4Q = 9Q$
  10. $(8, 3) = P = -2Q = 11Q$
  11. $(8, 8) = -P = 12P = 2Q$
  12. $(10, 2) = 10P = 6Q$
  13. $(10, 9) = 3P = 7Q$

($P$ and $Q$ from exercise 3)


Exercise 3

Let $P = (8, 3)$ and $Q = (3, 6)$ be points on the elliptic curve $y^2 = x^3 + x + 6$ over ${\mathbb{Z}_{11}}$. Compute $P + Q$ and $5P$.



Exercise 4

Let $P = (2, 4)$ be a generator of order $n = 13$ of the group on the elliptic curve $y^2 = x^3 + x + 6$ over $\mathbb{Z}{_{11}}$. The Simplified ECIES has $\mathbb{Z}{_{11}^{*}}$ as its plaintext space. Suppose that the private key is $d = 3$.

  1. Compute the public key $Q = dP$.
  2. Encrypt the plaintext $m = 7$ and then decrypt the obtained ciphertext. Use the random value $r = 4$.

  1. $Q = dP = 3P = 2P + P = (8, 8)$
    • $2P = P + P = (5, 9)$
      • $\lambda = {3 \cdot 2^2 + 1 \over 2 \cdot 4} = {2 \over 8} = 3$
      • ${(2P)_x} = 3^2 - 2 \cdot 2 = 9 - 4 = 5$
      • ${(2P)_y} = 3(2 - 5) - 4 = -3 \cdot 3 - 4 = 9$
    • $3P = 2P + P = (8, 8)$
      • $\lambda = {9 - 4 \over 5 - 2} = {5 \over 3} = 5 \cdot 4 = 9$
      • ${(3P)_x} = 9^2 - 2 - 5 = 8$
      • ${(3P)_y} = 9(5 - 8) - 9 = 9 \cdot (-3) - 9 = 8$
    • $R = rP = 4P = 2P + 2P = (10, 9)$
      • $\lambda = {3 \cdot 5^2 + 1 \over 2 \cdot 9} = {-1 \over -4} = 3$
      • ${R_x} = 3^2 - 2 \cdot 5 = 10$
      • ${R_y} = 3(5 - 10) - 9 = -3 \cdot 5 - 9 = 9$
    • $S = rQ = 4Q = (2, 7)$
    • $z = {S_x} m = 2 \cdot 7 = 3$
    • $c = (R, z) = ((10, 9), 3)$

Exercise 5

We will show how computing a multiple of a point on an elliptic curve can be sped up.

  1. Show that subtraction over elliptic curves has the same complexity as addition.

  2. Show that any integer $n$ can be written as

    \[n = \sum_{i=0}^{\ell-1} c_i 2^i ,\]

    where for all $i$, ${c_i} \in \lbrace -1, 0, 1 \rbrace$, and ${c_i} \ne 0$ implies ${c_{i+1}} = 0$. How many bits do we need to store a number in this format?

  3. Show how computing a multiple of a point on an elliptic curve can be done using the format above. What is the expected speedup?