You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pass raw message through CryptoCb; expose HashMsg helpers
Reverts the dispatcher-side pre-hashing introduced in 958c5f4 so
the crypto-callback receives the raw message and can decide for
itself whether to operate on the message (wolfHSM-style) or on a
pre-computed digest (PKCS#11 v3.2 CKM_HSS / CKM_XMSS / CKM_XMSSMT).
- wc_CryptoInfo.pk.pqc_stateful_sig_sign / _verify go back to
msg / msgSz fields.
- wc_CryptoCb_PqcStatefulSigSign / _Verify take msg / msgSz again.
- wc_lms.c / wc_xmss.c stop hashing before dispatch.
The hashing helpers are kept and promoted to public API so a
PKCS#11-style callback can produce the right digest from inside
the callback when needed:
- wc_LmsKey_HashMsg(key, msg, msgSz, hash, *hashSz) declared in
wolfssl/wolfcrypt/lms.h.
- wc_XmssKey_HashMsg(key, msg, msgSz, hash, *hashSz) declared in
wolfssl/wolfcrypt/xmss.h.
Both honour the parameter set's hash family (SHA-256 / SHA-256-192 /
SHAKE256 / SHAKE256-192 for LMS; SHA-256 / SHA-512 / SHAKE128 /
SHAKE256 for XMSS) and now live outside the WOLF_CRYPTO_CB ifdef so
they remain available when CryptoCb is disabled.
All three config combinations (lms+xmss+cryptocb, lms+xmss, cryptocb
alone) build and pass testwolfcrypt.
https://claude.ai/code/session_01MixzJP9kPWkS8bhfDDDBnX
0 commit comments