Diffie-Hellman Key Agreement
Context: FIT1058_MOC Β· two parties agree a shared secret over an insecure channel Β· built on the modular-exponentiation one-way function Β· security rests on the Discrete Logarithm
Quick Revision
- π― Objective: two users agree a shared key over a public channel β no pre-shared secret needed.
- π¦ Core Components: public β private , public β shared .
- β‘ Key Constraint: not itself a cryptosystem; security rests on the hard Discrete Log.
π Core
1. The Scheme
- Goal β shared key without a pre-arranged secret channel.
- Primitive β , a primitive root of a large prime (One-Way Function).
- Not a cryptosystem β only agrees a key, then used with a separate cipher.
2. The Protocol
- Public β large prime , primitive root .
- Each user β private random ; publishes .
- Shared key β each raises the otherβs public value to its own private: , .
3. Security
- DH problem β given , find .
- Reduces to β Discrete Log (recover from ), believed hard.
Key identities:
βοΈ Core Decision Matrix
| Item | Public? | Role |
|---|---|---|
| yes | system parameters | |
| private | no | each userβs secret |
| yes | published | |
| never sent | shared key |
When It Flips: DH solves key distribution β only public numbers are exchanged β but conveys no chosen message, so it must be paired with a secret-key Cryptosystem. Security needs a large prime and primitive-root base (max ).
π Exam Execution Trace
Applied Exercise
Problem: Compute both keys and confirm they match. Derivation Proof / Hand-Calculation Walkthrough:
Final Extracted Output: shared key , never transmitted; eavesdropper sees only .
β οΈ Common Mistakes
- π‘ Key never transmitted β the shared is computed independently; an eavesdropper sees only and faces the DH/Discrete-Log problem.
π§ Active Recall
Walk through Diffie-Hellman and show why Alice and Bob compute the same key.
- Hint: Commuting exponents.
Answer
- Short answer: Alice forms , Bob ; both equal .
- Why: Never sent β the key needs a private exponent; only are public.
What problem must an eavesdropper solve, and why is DH not a cryptosystem by itself?
- Hint: DH problem = discrete log.
Answer
- Short answer: Given , find β reduces to the hard Discrete Log.
- Why: No message β DH only agrees a key; a separate Cryptosystem encrypts traffic.