TLS1.3: Understanding HKDF calls #442
-
In p11prov_exch_hkdf_derive API, we are calling EVP_KDF_derive (openssl API) to perform HKDF derive, shouldn't it be like in below screenshot:- Correct if I am wrong here. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 18 replies
-
We need to rework it to look like p11prov_ecdh_derive() more or less |
Beta Was this translation helpful? Give feedback.
-
Ok sorry looking at this more carefully I now remember how odd the code is around key derivation in openssl. The key exchange providers "wrap" kdf providers, so in thie case calling EVP_KDF_derive(hkdfctx->kdfctx, secret, outlen, NULL) should be correct as this will do nothing more than simply end up calling the KDF provider with a KDF context for HKDF. |
Beta Was this translation helpful? Give feedback.
-
We have added CKM_HKDF_DERIVE mechanism in our token, but we don't see p11prov_exch_hkdf_derive getting called when working with TLS1.3. Is there any config or any other option that we need to enable for offloading HKDF operation to provider. |
Beta Was this translation helpful? Give feedback.
Ok sorry looking at this more carefully I now remember how odd the code is around key derivation in openssl.
The key exchange providers "wrap" kdf providers, so in thie case calling EVP_KDF_derive(hkdfctx->kdfctx, secret, outlen, NULL) should be correct as this will do nothing more than simply end up calling the KDF provider with a KDF context for HKDF.