In this challenge, you will play the role of Alice to perform a Diffie-Hellman key exchange (without authentication). In this protocol, Alice samples a
and computes A = g^a
. Bob samples b
and computes B = g^b
. The final key is HKDF(g^{ab})
, where HKDF
uses SHA256
as the internal hash function, and the field info
is b`DH key exchange`. You will find group parameters in parameters.pem
, Alice's a
in Alice_privkey.pem
, and Bob's B
in Bob_pubkey.pem
. Additionally, Alice's a
is encrypted using a password in Alice_password.txt
.
To find out how the above works, please check the Diffie-Hellman key exchange in Python's hazmat
module.
You can verify your result by /challenge/solve
.