xtest: include tests for HKDF_DERIVE - #819
Conversation
etienne-lms
left a comment
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.
| 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; |
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)"); |
There was a problem hiding this comment.
Suggestion: test case summary could be shorten to ease adding other tests.
| "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)"); |
Test HKDF_DERIVE in PKCS#11 TA using RFC 5869 test vectors. Only some of the RFC 5869 vectors are included here. Link to source: https://datatracker.ietf.org/doc/html/rfc5869. Signed-off-by: Hussain Miyaziwala <hussain_miya@hotmail.com>
|
@etienne-lms , thanks for the review, I have addressed your comments. |
|
This pull request has been marked as a stale pull request because it has been open (more than) 30 days with no activity. Remove the stale label or add a comment, otherwise this pull request will automatically be closed in 5 days. Note that you can always re-open a closed pull request at any time. |
|
not stale, optee os changes pending |
Test HKDF_DERIVE in PKCS#11 TA using RFC 5869 test vectors.