Diffie-Hellman key exchange, then so what? 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?
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.