1
0
mirror of https://github.com/wolfSSL/wolfssl.git synced 2026-10-24 04:09:07 +03:00
Files
wolfssl/doc
Arpan Sharma 6997631516 LMS: SigsLeft returns 0 for a key without parameters or verify-only
wc_LmsKey_SigsLeft() checked only for a NULL key and then passed
key->params to wc_hss_sigsleft(), which dereferences it. A key that
was only initialized has no parameters, so the call crashed. A
verify-only key (after wc_LmsKey_ImportPubRaw()) reported 1 although
wc_LmsKey_Sign() refuses it. Return 0 for both, as wc_LmsKey_Sign()
rejects such keys before it calls the device. The check is on the
verify-only state and not on WC_LMS_STATE_OK, because
wc_LmsKey_MakeKey() and wc_LmsKey_Reload() call wc_LmsKey_SigsLeft()
while the key is still in WC_LMS_STATE_PARMSET.

The doxygen for wc_LmsKey_SigsLeft() and wc_XmssKey_SigsLeft() said
they return the number of signatures left or a negative error code;
both return 1 or 0. Fix that in English and Japanese, and in the LMS
and XMSS group descriptions.
2026-10-15 13:16:02 -05:00
..
2023-07-04 07:21:27 +02:00
2026-09-21 12:11:46 -07:00

The wolfSSL manual is available at:
http://www.wolfssl.com/documentation/wolfSSL-Manual.pdf

The wolfSSL API guide is available at:
https://www.wolfssl.com/doxygen/wolfssl_API.html

The wolfCrypt API guide is available at:
https://www.wolfssl.com/doxygen/wolfcrypt_API.html