2
$\begingroup$

I know how the Diffie-Hellman Key Exchange (DHKE) works. But where is it used? And ok, now both have the same key. But how are those keys used anyway?

I've heard that HTTPS is using the DHKE. Ok, but what are they doing with the key? Are they just multiplying the message with the key? And dividing by the key on the other hand?

$\endgroup$
3
$\begingroup$

The multiplicative DHKE and its Elliptic curve version ECDH can be used to establish a common secret between the parties. Once the key established, this key can be used to derive symmetric keys for AES-GCM, AES-CCM, and ChaCha20 which are the cipher suites in TLS 1.3. These ciphers are Authenticated Encryption with Associated Data (AEAD) and provides Confidentiality, Integrity and Authentication. In other terms, they provide the standard of IND-CCA2/NM-CCA2- ciphertext indistinguishability and non-malleability under adaptive chosen-ciphertext attack. Combining asymmetric with Symmetric encryption is called the hybrid cryptosystem and this is common practice. We prefer it since public-key cryptosystems are very slow compared to public-key encryption systems.

DHKE can be used static-static, static-ephemeral, and ephemeral-ephemeral. As of TLS 1.3, Static RSA and Diffie-Hellman cipher suites have been removed so that forward secrecy is now obligatory.

To derive a symmetric key a Key derivation Function can be used, it can be used even to derive multiple keys and IV/nonce. Once a key is derivation method is agreed on both sides, the sender can encrypt the message by one of the cipher suites of the TLS with the derived key and the other side can use the same key derivation to derive the key to decrypt.

Another example is the Integrated Encryption Scheme.

| improve this answer | |
$\endgroup$
2
$\begingroup$

In cryptography you often use hybrid system. That is a combination of asymmetric and symmetric techniques.

The asymmetric key exchange: An example for that is Diffie-Hellman. A key exchange is important in situations, where you have to find a secret key using a public way to exchange informations. A symmetric key exchange is not possible, so you need to use an asymmetric one.

The symmetric key encryption/decryption: Asymmetric system are slower than symmetric systems. So you use symmetric encryption/decryption to make sure no one, who does not have the key, can read your messages. (or at least have to do a lot of work).

How the systems work is different for each system. The security often depens on different mathematical problems. E.g. RSA and Diffie-Hellman are used for key exchange. RSA is based on the factorization problem, Diffie-Hellman is based on the discrete logarithm problem. This means, the way the data gets encrypt/decrypt is different, too.

| improve this answer | |
$\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.