Discrete Logarithms
1. What Is the Problem? (beginner!)
Forward = easy: mod (multiply!). Backward = HARD: find with mod (try 0,1,2,... → !). With 2048-bit primes, trying all is impossible — that gap IS the security (Diffie-Hellman, ElGamal, DSA live here!).
p = 7, g = 3 (primitive root — generates all 1..6!)
powers: 3⁰=1, 3¹=3, 3²=2, 3³=6, 3⁴=4, 3⁵=5, 3⁶=1 (cycle len 6!)
discrete log: log₃(4) = 4 (which power gives 4?)
forward 1 multiply; backward up to 6 tries (tiny — real: 2²⁰⁴⁸ tries!)
Tiny numbers: , , , → , → shared (verify: mod mod !).
4. Security Notes (exam viva!)
- Prime ≥ 2048 bits; of large PRIME order (else Pohlig-Hellman + CRT attack!).
- Safe primes ( prime) preferred!
- NO authentication alone (man-in-the-middle! need signatures/STS!).
5. Exam Points
- Define DLP + toy log ( mod ) — 5 marks, very frequent.
- DH steps + tiny-number key — 7 marks, favourite numerical.
- Safe-prime + MITM caveat — 3 marks, frequent.