Deriving a 32 byte key from a 380 byte key #1298
Unanswered
personalizedrefrigerator
asked this question in
Q&A
Replies: 1 comment
-
Why is the master key 380 bytes and not all of them random? Can you reduce the size of the master key? You could replicate HKDF Extract and Expand with BLAKE2b or use Argon2 with the lowest settings. If the key is mostly random, using BLAKE2b should be fine, but this protocol sounds a bit dodgy. Publishing a hash of only the key is a bad idea, and a 380 byte key is excessive. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I'm migrating an application from
sjcl
tolibsodium.js
. The app currentlyIs it safe to derive a shorter key for use with
crypto_secretstream_xchacha20poly1305
from this longer key usingcrypto_generichash
? Should I instead usecrypto_pwhash
?Thank you for your time!
Related:
crypto_kdf_derive_from_key
(requires a shorter master key)Beta Was this translation helpful? Give feedback.
All reactions