-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Iotcrypt 237 hkdf doc #1920
Iotcrypt 237 hkdf doc #1920
Conversation
include/mbedtls/hkdf.h
Outdated
* \param prk A pseudorandom key of at least md.size bytes. \p prk is usually, | ||
* the output from the HKDF extract step. | ||
* \param prk A pseudorandom key of at least md.size bytes. \p prk is | ||
* usually, the output from the HKDF extract step. |
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.
I feel that this comma is not needed in this sentence.
ChangeLog
Outdated
@@ -6,6 +6,12 @@ Bugfix | |||
* Fixes an issue with MBEDTLS_CHACHAPOLY_C which would not compile if | |||
MBEDTLS_ARC4_C and MBEDTLS_CIPHER_NULL_CIPHER weren't also defined. #1890 | |||
|
|||
Changes | |||
|
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.
We don't usually put a newline after the section title.
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.
LGTM
I'd recommend a rebase into two commits after the review completes:
- HKDF: Fix style issue
- HKDF: Add warning to partial functions
CI failure is test_suite_timing on FreeBSD, which is a known issue. |
Travis CI failure is odd: filed as #1925 |
retest |
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.
LGTM
The standard HKDF security guarantees only hold if `mbedtls_hkdf()` is used or if `mbedtls_hkdf_extract()` and `mbedtls_hkdf_expand()` are called in succession carefully and an equivalent way. Making `mbedtls_hkdf_extract()` and `mbedtls_hkdf_expand()` static would prevent any misuse, but doing so would require the TLS 1.3 stack to break abstraction and bypass the module API. To reduce the risk of misuse we add warnings to the function descriptions.
08a4aeb
d680211
to
08a4aeb
Compare
I have rebased the PR, it should be identical to the original. You can find the original branch here: @moranpeker @Patater could you please review it again? |
retest |
1 similar comment
retest |
retest |
retest |
This is labelled as 'Mbed TLS team', and is from Arm, so doesn't need the 'CLA not applicable' label. |
Description
Add warnings to the documentation of the HKDF module to reduce the risk of misusing the mbedtls_hkdf_extract() and mbedtls_hkdf_expand() functions. Fixes #1775.
Status
READY
Requires Backporting
NO
Migrations
NO