Challenges
Addition-based fake DH
Cryptography
Easy
DH attacks
Solves: 7
Addition-based fake DH
Author: CyberSamSU
Points
25
A student wanted to "speed up" Diffie-Hellman: exponentiation is slow, so they replaced it with simple multiplication. The new protocol is as follows:
- Alice:
A = g · a mod p - Bob:
B = g · b mod p - Shared secret:
s = B · a mod p = A · b mod p = g · a · b mod p
Mathematically, everything "works": both parties arrive at the same number. But there is a fatal flaw here. Reversing exponentiation (discrete logarithm) is difficult, but reversing multiplication — modular division — is a one-second job.
The following was intercepted on the channel. Find the shared secret s:
p = 3030429341
g = 983196
A = 1436367541
B = 194826954
Flag: BAYROQ{DH_additiv_zaif_<s>}
To submit a flag, log in.