The "rxtx" used as ctx argument to crypto_kdf_derive_from_key is too short of a string. It should be exactly 8 bytes. I was using a code search on github and found it in 2 occurrences in your code:
|
crypto_kdf_derive_from_key((uint8_t *) key, secretbox :: key :: size, (this->_lesser ? 0 : 1), "rxtx", this->_bytes); |
and
|
crypto_kdf_derive_from_key((uint8_t *) key, secretbox :: key :: size, (this->_lesser ? 1 : 0), "rxtx", this->_bytes); |
I've raised an issue with libsodium that this interface is indeed very prone to errors.
The
"rxtx"used asctxargument tocrypto_kdf_derive_from_keyis too short of a string. It should be exactly 8 bytes. I was using a code search on github and found it in 2 occurrences in your code:leaf/src/drop/crypto/keyexchanger.cpp
Line 31 in 57aba45
and
leaf/src/drop/crypto/keyexchanger.cpp
Line 38 in 57aba45
I've raised an issue with libsodium that this interface is indeed very prone to errors.