Support RFC 9802 LMS and XMSS in X.509 certificate and CSR generation#10572
Open
Frauschi wants to merge 1 commit into
Open
Support RFC 9802 LMS and XMSS in X.509 certificate and CSR generation#10572Frauschi wants to merge 1 commit into
Frauschi wants to merge 1 commit into
Conversation
Extend wc_MakeCert_ex/wc_SignCert_ex/wc_MakeCertReq_ex to issue HSS/LMS and
XMSS/XMSS^MT certificates and PKCS#10 requests, building on the existing
RFC 9802 verification support. New LMS_TYPE/XMSS_TYPE/XMSSMT_TYPE selectors,
wc_{Lms,Xmss}Key_PublicKeyToDer SPKI encoders, runtime signature-buffer
sizing, and sigType/key consistency checks. Generation is ASN.1-template
only, matching where the verification path lives.
Tests generate self-signed roots, CSRs and a CA->ECC-leaf chain in-process
and verify them, replacing the patched Bouncy Castle fixtures (only the stock
RFC 9802-aligned LMS interop anchor is kept).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extends wolfCrypt's certificate generation to issue HSS/LMS and XMSS/XMSS^MT certificates and PKCS#10 requests, building on the existing RFC 9802 verification support so the library can now both produce and consume stateful hash-based-signature certificates.
Changes
LMS_TYPE/XMSS_TYPE/XMSSMT_TYPEforwc_MakeCert_ex,wc_SignCert_ex, andwc_MakeCertReq_ex.wc_LmsKey_PublicKeyToDerandwc_XmssKey_PublicKeyToDerto emit RFC 9802 SubjectPublicKeyInfo.sigType/key consistency checks for the new algorithms.WOLFSSL_ASN_TEMPLATE), matching where the verification path already lives. Non-template builds reject these key types withALGO_ID_E.Tests
No change to default builds — the feature is gated behind the existing LMS/XMSS and certificate-generation options.