Im trying to use HKDF after DIffie-hellman key exchange. However, i got stuck on 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 the CHACHA20 or AES256-GCM. Is it a good idea if i only generate one key by HKDF?
One more thing, how can i generate good salt for this case?