Types of digital signatures that we won't discuss:
Digital signature scheme: A digital signature scheme consists of a finite set P of plain-texts, a finite set S of signatures, and a finite key-space K such that, for each k in K, we have a signing algorithm Sign_k: P --> S and a verification algorithm Verify_k: P x S --> bool such that Verify_k(M,S) = true "iff" S = Sign_k(M). The algorithms Sign_k and Verify_k should be efficiently derivable, given k, and should have reasonable performance. Needless to say, given M, an opponent should have no chance of producing some S with S = Sign_k(M), unless the opponent knows the key k.
Digital signature standard:
DSS_Prime_Generation(int l,int lseed) \{
// generates two prime numbers p and q for the DSS
// input: an integer l between 0 and 8
// an integer lseed, the length of the seed
// output: a 160-bit prime q
// a prime p with 512 + 64*l bits such that q divides p - 1
// the value of an internal counter
// the value of the successful seed
int L = 512 + 64 * l;
int n = L - 1 div 160;
int b = L - 1 mod 160;
bool q_not_prime = true;
loc: while q_not_Prime \{
BigInteger seed = Random(1,2**lseed - 1) XOR 2**(lseed - 1);
BigInteger u = hash(seed) XOR hash(seed + 1\mod 2**lseed);
BigInteger q = u OR 2**159 OR 1;
q_not_prime = Miller-Rabin(q,80);
\}
int counter = 0;
int offset = 2;
while counter <= 4096 \{
for (int k = 0; k <= n; ++k) v[k] = hash(seed + offset + k mod 2**lseed);
BigInteger w = v[0];
for (int k = 1; k < n; ++k) w = w + v[k] * 2**(k*160);
w = w + (v[n] mod 2**b) * 2**(2*160);
BigInteger x = w + 2**(L - 1);
BigInteger c = x mod 2*q;
BigInteger p = x - (c - 1);
if p >= 2**(L-1) && Miller-Rabin(p,80) return (q,p,counter,seed);
counter = counter + 1;
offset = offset + n + 1;
goto loc;
Let p >3 be a prime and a,b in {1,2,...,p-1} such that
(1) 4a3 + 27b2 is different from 0 mod p.
An elliptic curve E(Zp) over Zp has
the numbers a and b as implicit parameters; the set E(Zp)
consists of all pairs (x,y) which satisfy
(2) y2 = x3 + ax + b mod p (0 <= x,y <= p-1)
together with an additional element, O, the ``point at infinity''.
Let p be 13, a be 4, and b be 12. Then the equation above is met, and the set E(Z13), without O, consists of the pairs
(0, 5) (0, 8) (1, 2) (1, 11) (3, 5) (3, 8) (4, 1) (4, 12) (5, 1) (5, 12) (8, 6) (8, 7) (9, 6) (9, 7) (10, 5) (10, 8) (11, 3) (11, 10)Note the set E(Z13) has 19 elements. In general, the number of elements will be of the "order" p. Compare that to the number of units for p, which is p-1. From the equation above, it follows that (x,-y) is an element on the curve whenever (x,y) is one. If such curves are defined over the real numbers, then two points on that curve determine a third one, the ``addition'' of the former two. This geometric operation can be transfered to the case E(Zp) and the operation can be expressed in a completely algebraic fashion.
Group structure on elliptic curve:
l = (y2 - y1)(x2-x1)-1mod p, if (x1,y1) and (x2,y2) are different;
l = (3x12 + a)(2y1)-1 mod p, otherwise.
x3 = l2 - x1 - x2 mod p
y3 = l(x1 - x3) - y1 mod p.
If P = (x,y), then we write -P for the pair
(x,-y). Generally, for r, we define
(3) r(x,y) = (x,y) + (x,y) + .... + (x,y) [r times]
l = (7-10)(9-3)-1 = -3*6-1 = 11 mod 23
x3 = 112 - 3 - 9 = 6 - 3 - 9 = -6 = 13 mod 23
y3 = 11(3 - (-6)) - 10 = 11*9 - 10 = 89 = 20 mod 23.
Thus, P + Q = (17,20).
As for scalar multiplication, let R = (3,10). Then 2R = R + R. The latter computes to:
l = (3*32 + 1)*20-1 = 5*20 = 6 mod 23
x3 = 62 - 6 = 7 mod 23
y3 = 6(3 - 7) - 10 = -24 - 10 = 12 mod 23.
Hence, 2R = (7,12).
Y = xG.
(x0,y0) = u1G + u2Y
v = x0 mod q.
Note that + in this equation refers to the addition of
points in the elliptic curve.
The ``scalar multiplication''
Feel free to consult me during my Office Hours: W 2:00--3:00 P.M., U 10:30--11:30 A.M.
Michael Huth (huth@cis.ksu.edu)