-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
HKDF rejects maximum key size #14050
Labels
bug
Observed behavior contradicts documented or intended behavior
Comments
guidovranken
added
the
bug
Observed behavior contradicts documented or intended behavior
label
Dec 23, 2022
Change: Line 25 in f211c15
to: assert(out.len <= Hmac.mac_length * 255); // output size is too large for the Hkdf construction |
jedisct1
added a commit
to jedisct1/zig
that referenced
this issue
Dec 23, 2022
jedisct1
added a commit
to jedisct1/zig
that referenced
this issue
Dec 23, 2022
Good catch, thanks! Changing the Thanks again! |
jedisct1
added a commit
that referenced
this issue
Dec 23, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Zig Version
0.10.0
Steps to Reproduce and Observed Behavior
Expected Behavior
No crash because HKDF permits key sizes up to and including
255 * hash size
. The hash size of SHA512 is 64 bytes. So a key size of 255 * 64 = 16320 bytes should be permitted. See https://www.rfc-editor.org/rfc/rfc5869 section 2.3:The text was updated successfully, but these errors were encountered: