Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Context too short in crypto_kdf_derive_from_key #1

Open
goblin opened this issue Apr 13, 2020 · 0 comments
Open

Context too short in crypto_kdf_derive_from_key #1

goblin opened this issue Apr 13, 2020 · 0 comments

Comments

@goblin
Copy link

goblin commented Apr 13, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant