-
Notifications
You must be signed in to change notification settings - Fork 18
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
How does Hacl_HKDF_expand_sha2_256
signal errors, i.e., invalid arguments?
#123
Labels
Comments
Merged
This code passes all tests, although it shouldn't according to the RFC ... bytes got_OKM = std::vector<uint8_t>(8161);
Hacl_HKDF_expand_sha2_256(got_OKM.data(),
got_prk.data(),
got_prk.size(),
test.info.data(),
test.info.size(),
8161);
std::cout << bytes_to_hex(got_OKM) << std::endl;
got_OKM.resize(test.L);
std::cout << bytes_to_hex(got_OKM) << std::endl; |
HKDF functions don't throw errors. This is something that must be handled on the outside for now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The output size of HKDF is limited to
255 * HashLen
, see https://www.rfc-editor.org/rfc/rfc5869.html#section-2.3. However,Hacl_HKDF_expand_sha2_256
accepts greater values. Should this be handled? And if so, how?The text was updated successfully, but these errors were encountered: