Add SP800-108 KDF implementation to crypto API
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest4 patches 2 repliesIn review
- v34 patches 5 repliesSuperseded
- v27 patches 8 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 5 patches | 11 replies | Superseded |
Changes in v4 from the cover letter
* SP800-108 KDF kernel configuration parameter is not user selectable as suggested by Eric Biggers
* update the error code path for the self test handling to mirror testmgr.c as suggested by Eric Biggers
* further cleanup in kdf_alloc as suggested by Mat Martineau
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | crypto: Add key derivation self-test support codeinclude/ | +71 | 0 replies | |
| 2/4 | crypto: add SP800-108 counter key derivation functioncrypto/ crypto/ crypto/ +1 more | +223 | 0 replies | |
| 3/4 | security: DH - remove dead code for zero paddingsecurity/ | +4 | 0 replies | |
| 4/4 | security: DH - use KDF implementation from crypto APIsecurity/ security/ | +19 | 1 reply |
Reviews trailers per patch
2 of 4 patches have a Reviewed-by or Acked-by.
| Patch | Mat Martineau |
|---|---|
| 1/4 | |
| 2/4 | |
| 3/4 | A-b |
| 4/4 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v4 0/4] Add SP800-108 KDF implementation to crypto API
Hi,
The key derviation functions are considered to be a cryptographic operation. As cryptographic operations are provided via the kernel crypto API, this patch set consolidates the SP800-108 KDF implementation into the crypto API.
If this patch is accepted, another patch set will be published attempting to move the HKDF implementation from the crypto file system code base to the kernel crypto API.
The KDF implementation is provided as service functions. Yet, the interface to the the provided KDF is modeled such, that additional KDF implementation can use the same API style. The goal is to allow the transformation from a service function into a crypto API template eventually.
The KDF executes a power-on self test with test vectors from commonly known sources.
Tbe SP800-108 KDF implementation is used to replace the implementation in the keys subsystem. The implementation was verified using the keyutils command line test code provided in tests/keyctl/dh_compute/valid. All tests show that the expected values are calculated with the new code.
Changes v3 to v4:
* SP800-108 KDF kernel configuration parameter is not user selectable as suggested by Eric Biggers
* update the error code path for the self test handling to mirror testmgr.c as suggested by Eric Biggers
* further cleanup in kdf_alloc as suggested by Mat Martineau
Changes v2 to v3:
* port to kernel 5.16-rc1
* remove the HKDF patch to only leave the SP800-108 patch
Stephan Mueller (4):
crypto: Add key derivation self-test support code
crypto: add SP800-108 counter key derivation function
security: DH - remove dead code for zero padding
security: DH - use KDF implementation from crypto API
crypto/Kconfig | 4 + crypto/Makefile | 5 + crypto/kdf_sp800108.c | 153 +++++++++++++++++++++++++ include/crypto/internal/kdf_selftest.h | 71 ++++++++++++ include/crypto/kdf_sp800108.h | 61 ++++++++++ security/keys/Kconfig | 2 +- security/keys/dh.c | 130 ++++----------------- 7 files changed, 315 insertions(+), 111 deletions(-) create mode 100644 crypto/kdf_sp800108.c create mode 100644 include/crypto/internal/kdf_selftest.h create mode 100644 include/crypto/kdf_sp800108.h
Signature · 1 line
2.33.1