Skip to content

Conversation

@aidangarske
Copy link
Contributor

@aidangarske aidangarske commented Dec 26, 2025

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_SignSequenceStart
  • TPM2_VerifySequenceStart
  • TPM2_SignSequenceComplete
  • TPM2_VerifySequenceComplete
  • TPM2_SignDigest
  • TPM2_VerifyDigestSignature

These 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 commands

  • New structure tags:

    • TPM_ST_MESSAGE_VERIFIED
    • TPM_ST_DIGEST_VERIFIED
  • New TPM2B types:

    • TPM2B_SIGNATURE_CTX
    • TPM2B_KEM_CIPHERTEXT
    • TPM2B_SHARED_SECRET
  • New input/output command structures added to tpm2.h

Testing

unit.c unit testing

  • test_wolfTPM2_MLDSA_*
  • test_wolfTPM2_MLKEM_*

@aidangarske aidangarske self-assigned this Dec 26, 2025
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