Skip to content

Comments

WIP: swtpm_cert: Enable CAs with ML-DSA key to sign a certifcate#1064

Draft
stefanberger wants to merge 1 commit intomasterfrom
stefanberger/ek-with-mldsa-certificate
Draft

WIP: swtpm_cert: Enable CAs with ML-DSA key to sign a certifcate#1064
stefanberger wants to merge 1 commit intomasterfrom
stefanberger/ek-with-mldsa-certificate

Conversation

@stefanberger
Copy link
Owner

Test for GNUTLS_PK_MLDSA44 to detect whether GnuTLS supports ML-DSA.

Only SHAKE-256 can be used for hashing when ML-DSA is used for signing:

https://github.com/gnutls/gnutls/blob/df24a53136f188d77aaffe66316b0fb6ba720d40/lib/algorithms/sign.c#L405-L428

The problem is now that the size of NVRAM indices is limited to MAX_NV_INDEX_SIZE = 2048, which is too small for a certificate created even with ML-DSA-44, which is around 2757 bytes long.

@stefanberger stefanberger marked this pull request as draft October 1, 2025 19:04
@stefanberger stefanberger force-pushed the stefanberger/ek-with-mldsa-certificate branch from 785773f to 51c5019 Compare October 1, 2025 19:06
Test for GNUTLS_PK_MLDSA44 to detect whether GnuTLS supports ML-DSA.

Only SHAKE-256 can be used for hashing when ML-DSA is used for signing:

https://github.com/gnutls/gnutls/blob/df24a53136f188d77aaffe66316b0fb6ba720d40/lib/algorithms/sign.c#L405-L428

The problem is that the size of NVRAM indices is limited to
MAX_NV_INDEX_SIZE = 2048, which is too small for a certificate created
with ML-DSA:

ML-DSA-44: ~2757 bytes
ML-DSA-87: ~4964 bytes

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
@stefanberger stefanberger force-pushed the stefanberger/ek-with-mldsa-certificate branch from 51c5019 to 846228d Compare October 1, 2025 19:21
@stefanberger
Copy link
Owner Author

stefanberger commented Oct 2, 2025

Writing the larger certificates into NVRAM indices will only work with

Other choice: Wait for Falcon PQC signature algorithm since it has smaller signature sizes and hopefully EK and platform certificates that fit into existing 2048 bytes.

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.

1 participant