Skip to content

linuxkm: register ecdh.#8663

Merged
douzzer merged 2 commits intowolfSSL:masterfrom
philljj:register_ecdh
Apr 15, 2025
Merged

linuxkm: register ecdh.#8663
douzzer merged 2 commits intowolfSSL:masterfrom
philljj:register_ecdh

Conversation

@philljj
Copy link
Copy Markdown
Contributor

@philljj philljj commented Apr 11, 2025

Description

Registers wolfcrypt ecdh as a struct kpp_alg with linux kernel crypto (kpp == Key-agreement Protocol Primitives).

Supports p192, p256, p384. Note: there is no kernel ecdh p521 in crypto/ecdh.c at this time it seems.

cat /proc/crypto after loading:

name         : ecdh-nist-p384
driver       : ecdh-nist-p384-wolfcrypt
module       : libwolfssl
priority     : 10000
refcnt       : 1
selftest     : passed
internal     : no
type         : kpp

name         : ecdh-nist-p256
driver       : ecdh-nist-p256-wolfcrypt
module       : libwolfssl
priority     : 10000
refcnt       : 1
selftest     : passed
internal     : no
type         : kpp

name         : ecdh-nist-p192
driver       : ecdh-nist-p192-wolfcrypt
module       : libwolfssl
priority     : 10000
refcnt       : 1
selftest     : passed
internal     : no
type         : kpp

Building

Builds with:

  • --enable-linuxkm-lkcapi-register=ecdh
  • p192 requires --with-eccminsz=192 -DHAVE_ECC192

Build with -DWOLFKM_DEBUG_ECDH for debug logging.

Testing

wolfssl multitest scenarios:

  • linuxkm-legacy-6.12-insmod
  • linuxkm-noasm-insmod-crypto-fuzzer-extras
  • linuxkm-aescbc-cryptonly-aesni-fips-dev-dyn-hash-LKCAPI-no-twc-insmod
  • linuxkm-noasm-insmod-kmemleak
  • linuxkm-aesni-LKCS-no-twc-insmod-ksanitize-6.1.73

@philljj philljj self-assigned this Apr 11, 2025
@philljj philljj requested a review from douzzer April 12, 2025 13:03
@philljj philljj assigned douzzer and unassigned philljj Apr 12, 2025
@douzzer douzzer added the For This Release Release version 5.9.1 label Apr 14, 2025
Copy link
Copy Markdown
Contributor

@douzzer douzzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

tested with wolfssl-multi-test.sh ... 'linuxkm-6.12-all-.*' linuxkm-noasm-ksanitize-insmod linuxkm-noasm-insmod-kmemleak linuxkm-aesni-insmod-kmemleak check-source-text

@douzzer douzzer merged commit 4ae057e into wolfSSL:master Apr 15, 2025
186 checks passed
@philljj philljj deleted the register_ecdh branch April 17, 2025 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

For This Release Release version 5.9.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants