-
Notifications
You must be signed in to change notification settings - Fork 1.7k
implement HKDF and HKDFExpand derive_into #13643
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
base: main
Are you sure you want to change the base?
Conversation
:raises ValueError: This exception is raised if the buffer is too small | ||
for the derived key. | ||
:raises cryptography.exceptions.AlreadyFinalized: This is raised when | ||
:meth:`derive_into` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, its really when any combination of the two methods is called more than once.
:raises ValueError: This exception is raised if the buffer is too small | ||
for the derived key. | ||
:raises cryptography.exceptions.AlreadyFinalized: This is raised when | ||
:meth:`derive_into` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
)); | ||
} | ||
|
||
let prk = self._extract(py, key_material)?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it undermind the point at all that we still end up with the prk in some buffer that the caller doesn't control?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sort of? It's not ideal. We could require that the buffer provided be >= underlying HMAC output size, but wow that sounds confusing.
If we decide we like this we can implement it for every KDF. refs #13245