Beruflich Dokumente
Kultur Dokumente
(1) View the graph and an elliptic curve Graph the elliptic curve y 2 = x3 x over the
real number field R.
>> v =y^2 - x*(x-1)*(x+1)
v =
y^2 - x*(x-1)*(x+1)
>> ezplot(v, [-1,3,-5,5])
(2) Determine the elements in an elliptic curve over a finite field.
When F = Zp (or more generally, when F is a finite field), the elliptic curves over Zp will
be a finite set. Here we take a = 1 and b = 0 with F = Z17 and consider
E = {(x, y) : y 2 = x3 + x (mod 17)} {O}.
Now we want to know what points are on E.
To do that, we first compute the square table over F , which tells us what element in F can
have a square root. This can be done by using powermod in matlab.
>> Y=[]; for y=[0:16], z=[y; powermod(y,2,17)]; Y=[Y, z]; end, Y,
Y =
0
1
2
3
4
5
6
7
8
9
10
0
1
4
9
16
8
2
15
13
13
15
11
2
12
8
13
16
1
1
2
4
3
9
4
16
5
8
6
2
7
15
8
13
9
13
10
15
11
2
12
8
13
16
14
9
15
4
16
1
10
7
11
16
12
6
13
0
= (11, 10)
3P
= (23, 28)
4P
= (0, 10)
5P
= (19, 7)
6P
= (18, 19)
7P
= (15, 6)
8P
= (20, 24)
This can let us to find the order of P = (1, 3) is 19. Try it. This can also solve the discrete
log problem: Find n such that (0, 19) = n(1, 3). (Answer: n = 18).
Alice
Chooses a secret integer nA
& computes QA = nA P
Sends QA to Bob
Computes QAB = nA QB
Bob
Chooses a secret integer
& computes QB = nB P
Sends QB to Alice
Computes QAB = nB QA .
bf Example Alice and Bob uses E: y 2 = x3 + 24x + 13 (mod 29) with a based point P = (1, 3)
to build their common secret.
Alice choose her secret nA = 3 and Bob chooses his secret 8. What will be their common
secret?
>> na=3; nb=8;
>> Qa=multell([1,3], na, 24, 13, 29)
Qa =
23
28
>> K=multell(Qa, nb, 24, 13, 29)
K =
19
7
Alice sends QA = (23, 28) to Bob. Bob computes the common key K = nB QA = (19, 7).
(8) Description of an Elliptic curve ElGamal Cryptosystem
System Parameters: Let p be a prime. The alphabet will be points in E, an elliptic curve
E(Zp ), and a point P E (usually called the base point of the system). Note that the public
is assumed to know E.
Making Keys: Bob chooses his secret number nB (which will be the secret deciphering key),
and he computes and publicizes QB = nB P (his public key).
Encryption and Decryption Process: Alice wants to send Bob a plain text M (which is
a point or a string of points in E). She first pick her secret integer nA , computes QA = nA P
and D = M + nA (QB ), (where QA is the clue and D is the cipher text). Then she sends the
pair (QA , D) to Bob.
4
Bob receives (QA , D). He uses his secret key nB and computes
D + (nB ) QA = M + nA (nB P ) nB (nA P ) = M,
and so he recovers M .
Example: Let p = 8831, and E be the elliptic curve with equation y 2 p x3 + 3x + 45 over Zp .
The base point is P = (4, 11). Bobs secret key is nB = 3. He keeps nB a secret and publishes
QB = 3 P = (413, 1808).
Alice wants to send a message M = (5, 1743) to Bob. She first picks her secret number
nA k = 8. Then she computes QA = nA P = 8 (4, 11) = (5415, 6321), and D = M + nA QB =
(5, 1743) + 8 (413, 1808) = (6626, 3576).
Getting (QA , D) from Alice, Bob computes
(6626, 3576)3(5415, 6321) = (6626, 3576)(617, 146) = (6626, 3576)+(617, 146) = (5, 1743).