Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added certs/slhdsa/cms-slhdsa-sha2-128s-noattr.der
Binary file not shown.
Binary file added certs/slhdsa/cms-slhdsa-shake-128s-sha224.der
Binary file not shown.
Binary file added certs/slhdsa/cms-slhdsa-shake-128s.der
Binary file not shown.
22 changes: 22 additions & 0 deletions certs/slhdsa/gen-slhdsa-mldsa-certs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -243,5 +243,27 @@ check_result $? "Export ${BENCH} public key"
tail -c 32 "${BENCH}_pub.der" > "${BENCH}_pub.bin"
rm -f "${BENCH}_pub.der"

# RFC 9814 SignedData interop vectors, verified by
# pkcs7signed_slhdsa_interop_test() in wolfcrypt/test/test.c. One per hash
# family, covering both the signed-attributes and the no-signed-attributes
# form. OpenSSL picks the RFC 9814 digestAlgorithm for the parameter set.
printf 'RFC 9814 SLH-DSA SignedData from OpenSSL' > cms-content.tmp
openssl cms -sign -binary -nodetach -outform DER -in cms-content.tmp \
-signer root-slhdsa-shake-128s.pem -inkey root-slhdsa-shake-128s-priv.pem \
-out cms-slhdsa-shake-128s.der
check_result $? "Sign SLH-DSA-SHAKE-128s SignedData"
openssl cms -sign -binary -nodetach -noattr -outform DER -in cms-content.tmp \
-signer root-slhdsa-sha2-128s.pem -inkey root-slhdsa-sha2-128s-priv.pem \
-out cms-slhdsa-sha2-128s-noattr.der
check_result $? "Sign SLH-DSA-SHA2-128s SignedData without attributes"
# Negative vector: SHA-224 is shorter than RFC 9814 allows for 128-bit
# parameter sets when signed attributes are present. Must fail to verify.
openssl cms -sign -binary -nodetach -md sha224 -outform DER \
-in cms-content.tmp -signer root-slhdsa-shake-128s.pem \
-inkey root-slhdsa-shake-128s-priv.pem \
-out cms-slhdsa-shake-128s-sha224.der
check_result $? "Sign SLH-DSA-SHAKE-128s SignedData with SHA-224"
rm -f cms-content.tmp

echo
echo "All SLH-DSA / ML-DSA-44 test certificates regenerated."
3 changes: 3 additions & 0 deletions certs/slhdsa/include.am
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ EXTRA_DIST += \
certs/slhdsa/root-slhdsa-sha2-128s-priv.der \
certs/slhdsa/root-slhdsa-sha2-128s.pem \
certs/slhdsa/root-slhdsa-sha2-128s.der \
certs/slhdsa/cms-slhdsa-shake-128s.der \
certs/slhdsa/cms-slhdsa-shake-128s-sha224.der \
certs/slhdsa/cms-slhdsa-sha2-128s-noattr.der \
certs/slhdsa/server-mldsa44-sha2.pem \
certs/slhdsa/client-mldsa44-sha2.pem \
certs/slhdsa/server-slhdsa-shake-128f-priv.pem \
Expand Down
Loading
Loading