Search code examples
encryptionwiresharkdiffie-hellman

Exposing Diffie Hellman shared key in the logs for openssl lib


In the openssl libarary there is a function called DH_Compute_key which will create the shared key.can we use it and expose it in the log for debugging purpose?


Solution

  • Yes. OpenSSL is opensource as you know - so just add some printfs there, rebuild it, and expose everything you need.