xtest: include tests for HKDF_DERIVE#819
Open
Hussainity wants to merge 1 commit into
Open
Conversation
Test HKDF_DERIVE in PKCS#11 TA using RFC 5869 test vectors. Signed-off-by: Hussain Miyaziwala <hussain_miya@hotmail.com>
etienne-lms
reviewed
Jun 23, 2026
etienne-lms
left a comment
Contributor
There was a problem hiding this comment.
Thanks for this test series.
I think it would be nice to have a few tests on reference keys access permissions (base key & salt key). Could be added in a later change.
Could you mention in the commit message that only some of the RFC 5869 test vectors are exercised? It also would be nice to provide an URL for the test vector location in the commit message, e.g. Link: https://www.rfc-editor.org/info/rfc5869/#appendix-A.
Comment on lines
+10320
to
+10325
| if (derived_key != CK_INVALID_HANDLE) | ||
| ADBG_EXPECT_CK_OK(c, C_DestroyObject(session, derived_key)); | ||
| if (base_key != CK_INVALID_HANDLE) | ||
| ADBG_EXPECT_CK_OK(c, C_DestroyObject(session, base_key)); | ||
| derived_key = CK_INVALID_HANDLE; | ||
| base_key = CK_INVALID_HANDLE; |
Contributor
There was a problem hiding this comment.
Destroying object could be factorized in hkdf_derive_and_get() as well as derived_key and base_key local variables.
| ADBG_EXPECT_CK_OK(c, close_lib()); | ||
| } | ||
| ADBG_CASE_DEFINE(pkcs11, 1031, xtest_pkcs11_test_1031, | ||
| "PKCS11: HKDF derive (RFC 5869 A.1-A.4, extract/expand modes, salt-as-key, negatives)"); |
Contributor
There was a problem hiding this comment.
Suggestion: test case summary could be shorten to ease adding other tests.
Suggested change
| "PKCS11: HKDF derive (RFC 5869 A.1-A.4, extract/expand modes, salt-as-key, negatives)"); | |
| "PKCS11: HKDF derive (RFC 5869 test vectors based and negative tests)"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test HKDF_DERIVE in PKCS#11 TA using RFC 5869 test vectors.