- p -> Prime Number 2^L-1 < p < 2^L
- q -> prime divisor of (p-1)
- g -> h^(p-1)q mod p
- h -> any Integer (1 < h < p-1)
- x -> sender private key random number between 0 and q
- y -> public key g^x mod p
- k -> any Integer (0 < k < q)
- r = (g^k mod p) mod q
- s = [k^-1(Hash(M)+x*r)] mod q
- V = [(g^u1 * y^u2)mod p] mod q
- u1 = [Hash(M) w] mod q
- w = s^-1 mod q
- u2 = r*w mod q
- if r == V -> True
- Sent message
- Recieved message
- All variables that calculated above
- pip install gmpy2