Skip to content

Add LMS and XMSS PQC benchmark modules#454

Merged
padelsbach merged 1 commit into
wolfSSL:mainfrom
Frauschi:lms_xmss_bench
Jul 16, 2026
Merged

Add LMS and XMSS PQC benchmark modules#454
padelsbach merged 1 commit into
wolfSSL:mainfrom
Frauschi:lms_xmss_bench

Conversation

@Frauschi

Copy link
Copy Markdown
Contributor

Adds LMS and XMSS post-quantum stateful hash-based signature benchmark modules to the wolfHSM benchmark harness.

Changes:

  • New wh_bench_mod_lms.c — benchmarks LMS/HSS keygen, sign, and verify (RFC 8554, NIST SP 800-208)
  • New wh_bench_mod_xmss.c — benchmarks XMSS/XMSS^MT keygen, sign, and verify (RFC 8391, NIST SP 800-208)
  • Registered both modules in wh_bench_mod_all.h and wh_bench.c
  • Support for VERIFY_ONLY builds
  • Enabled WOLFSSL_HAVE_LMS / WOLFSSL_HAVE_XMSS in the benchmark user_settings.h
  • Minor tweak to wh_bench_ops.h

Add KeyGen/Sign/Verify benchmarks for the two stateful hash-based PQC
schemes wolfHSM supports: LMS (L1/H5/W8) and XMSS (SHA2_10_256). Both
are DMA-only, so each operation is a single variant.

Verify runs against embedded precomputed (public key, signature)
vectors instead of generating them at runtime, so it is available in
verify-only builds (guarded by WOLFSSL_HAVE_{LMS,XMSS}); keygen and
sign require a signing build (!WOLFSSL_{LMS,XMSS}_VERIFY_ONLY).

The stateful sign benchmark clamps its iteration count to the key's
2^H one-time-signature budget (logging when it caps) so raising the
shared WOLFHSM_CFG_BENCH_PK_ITERS does not exhaust the key. Each
generated key is erased from server NVM after the measured operation.

Enable LMS/XMSS in the benchmark config and raise MAX_BENCH_OPS to fit
the new modules.
@Frauschi Frauschi self-assigned this Jul 16, 2026

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Fenrir Automated Review — PR #454

No scan targets match the changed files in this PR. Review skipped.

@Frauschi Frauschi assigned wolfSSL-Bot and unassigned Frauschi Jul 16, 2026
@Frauschi
Frauschi requested a review from padelsbach July 16, 2026 09:49
Comment thread benchmark/wh_bench_ops.h
@bigbrett bigbrett assigned padelsbach and unassigned wolfSSL-Bot Jul 16, 2026
@bigbrett

Copy link
Copy Markdown
Contributor

@padelsbach LGTM over to you. Pls merge if you approve.

@padelsbach padelsbach left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, thanks

@padelsbach
padelsbach merged commit 0dcc316 into wolfSSL:main Jul 16, 2026
108 checks passed
@Frauschi
Frauschi deleted the lms_xmss_bench branch July 17, 2026 06:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants