Add TPM 2.0 v1.85 PQC (ML-DSA and ML-KEM) Support #445
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.
Description
This PR adds initial support for TPM 2.0 Library Specification v1.85 PQC APIs to wolfTPM.
It implements new ML-DSA (Dilithium) and ML-KEM (Kyber) commands that were not present in the v1.84 RFC.
New TPM v1.85 Features Added
ML-DSA (Dilithium) – Signature & Verification
TPM2_SignSequenceStartTPM2_VerifySequenceStartTPM2_SignSequenceCompleteTPM2_VerifySequenceCompleteTPM2_SignDigestTPM2_VerifyDigestSignatureThese commands add context-based and sequence-based signing/verification required for PQ signature schemes.
ML-KEM (Kyber) – Key Encapsulation
TPM2_Encapsulate(public-key operation)TPM2_Decapsulate(private-key operation)Supports generation and recovery of shared secrets via PQ KEM.
New Types, Enums, and Structures
New
TPM_CC_*command codes for all v1.85 PQ commandsNew structure tags:
TPM_ST_MESSAGE_VERIFIEDTPM_ST_DIGEST_VERIFIEDNew TPM2B types:
TPM2B_SIGNATURE_CTXTPM2B_KEM_CIPHERTEXTTPM2B_SHARED_SECRETNew input/output command structures added to
tpm2.hTesting
unit.c unit testing
test_wolfTPM2_MLDSA_*test_wolfTPM2_MLKEM_*