1
$\begingroup$

Let's say bob says Hi and Alice says Hello, With the knowledge of n and g, how can we encrypt those message using Diffie-hellman or any ECDH

$\endgroup$
  • 2
    $\begingroup$ Diffie-Hellman is a key exchange protocol. With this protocol, the parties agree on a key and transfer messages by using a symmetric encryption algorithm like AES. $\endgroup$ – kelalaka Nov 18 '18 at 19:37
1
$\begingroup$

If you look at the Wikipedia page of Diffie–Hellman key exchange you will see that, the algorithm is actually a key exchange protocol.

That is; two parties agree on a new key such that any of the two parties doesn't know before the protocol.

We use this protocol to generate a new key, and transfer the messages by using a symmetric encryption algorithm like AES with the generated key.

If you are looking for an encryption based on the Diffie-Hellman assumption you should check ElGamal Encryption

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.