Skip to main content
Bumped by Community user
capitalization
Source Link
forest
  • 15.5k
  • 2
  • 49
  • 103

I'm trying to use HKDF after DIffieDiffie-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 CHACHA20ChaCha20 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?

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?

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?

Bumped by Community user
minor mistakes
Source Link
Patriot
  • 3.1k
  • 3
  • 19
  • 66

Apply HKDF After DIffieafter Diffie-hellmanHellman Key Exchange

ImI'm trying to use HKDF after DIffie-hellmanHellman key exchange. However, iI 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, iI only need one key for the CHACHA20 or AES256AES-256-GCM. Is it a good idea if iI only generate one key by HKDF?

One more thing, how can iI generate a good salt for this case?

Apply HKDF After DIffie-hellman Key Exchange

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?

Apply HKDF after Diffie-Hellman Key Exchange

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?

Source Link

Apply HKDF After DIffie-hellman Key Exchange

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?