I'm trying to use HKDF after Diffie-Hellman key exchange. However, I got stuck on the HKDF part.
from Crypto.Protocol import HKDF from Crypto.Hash import SHA512 from Crypto.Random import get_random_bytes salt = get_random_bytes(16) key1, key2 = HKDF(master_secret, 32, salt, SHA512, 2)
From my understanding, I only need one key for ChaCha20 or AES-256-GCM. Is it a good idea if I only generate one key by HKDF?
One more thing, how can I generate a good salt for this case?