-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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 1: PSA: implement HKDF_Expand and HKDF_Extract algorithms #5784
Comments
Just to be sure: is it also OK to leave that refactoring for later? |
I would prefer to do the refactoring before, but either way works. What wouldn't work is to do the two in parallel. |
I read about Lines 5195 to 5198 in 9bbb7ba
The result of Form my perspective we need to:
For
For info we have now special flag So it looks like we could have same states for
And the following states for expand:
I'm not sure why we don't have state for
@gilles-peskine-arm @mpg Please confirm it this is what needs to be done here before I start working on implementation. |
Alternatively it looks like it would be better maybe to adapt |
That's correct.
I don't understand what you mean by “define steps”. All the code to process those input steps is already there as part of HKDF code. Now HKDF-Extract needs to directly use the PRK as output, and HKDF-Expand needs to use the PRK as input.
Yes.
Yes. The last state actually starts as soon as info is received.
Yes. Since info can be provided at any time, the states of HKDF are Regarding
vs
that detail is up to you. Avoid duplicating code and keep the code readable. |
Being resolved in Mbed-TLS#5784 Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
Being resolved in Mbed-TLS#5784 Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
Being resolved in Mbed-TLS#5784 Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
Implement HKDF-Expand and HKDF-Extract as separate algorithms in the PSA API. We already have HKDF as a single algorithm, but this is not sufficient for TLS 1.3.
These algorithms will be added in the next version of the PSA Crypto API specification. Draft specification (private link).
We may want to first do the pending refactoring of the PSA key derivation code, needed to support drivers: #5477 and follow-ups.
The text was updated successfully, but these errors were encountered: