@@ -117,10 +117,12 @@ typedef enum {
117117 TPM_ALG_CBC = 0x0042 ,
118118 TPM_ALG_CFB = 0x0043 ,
119119 TPM_ALG_ECB = 0x0044 ,
120+ #ifdef WOLFTPM_V185
120121 /* Post-Quantum Algorithms - TPM 2.0 Library v185 */
121122 TPM_ALG_MLKEM = 0x00A0 ,
122123 TPM_ALG_MLDSA = 0x00A1 ,
123124 TPM_ALG_HASH_MLDSA = 0x00A2 ,
125+ #endif
124126} TPM_ALG_ID_T ;
125127typedef UINT16 TPM_ALG_ID ;
126128
@@ -137,6 +139,7 @@ typedef enum {
137139} TPM_ECC_CURVE_T ;
138140typedef UINT16 TPM_ECC_CURVE ;
139141
142+ #ifdef WOLFTPM_V185
140143/* ML-KEM Parameter Sets (TCG Algorithm Registry v2.0) */
141144typedef UINT16 TPMI_MLKEM_PARAMETER_SET ;
142145#define TPM_MLKEM_NONE 0x0000
@@ -150,6 +153,7 @@ typedef UINT16 TPMI_MLDSA_PARAMETER_SET;
150153#define TPM_MLDSA_44 0x0001
151154#define TPM_MLDSA_65 0x0002
152155#define TPM_MLDSA_87 0x0003
156+ #endif /* WOLFTPM_V185 */
153157
154158/* Command Codes */
155159typedef enum {
@@ -266,6 +270,8 @@ typedef enum {
266270 TPM_CC_CreateLoaded = 0x00000191 ,
267271 TPM_CC_PolicyAuthorizeNV = 0x00000192 ,
268272 TPM_CC_EncryptDecrypt2 = 0x00000193 ,
273+ #ifdef WOLFTPM_V185
274+ /* Post-Quantum Cryptography Commands - TPM 2.0 Library v185 */
269275 TPM_CC_VerifySequenceComplete = 0x000001A3 ,
270276 TPM_CC_SignSequenceComplete = 0x000001A4 ,
271277 TPM_CC_VerifyDigestSignature = 0x000001A5 ,
@@ -275,6 +281,9 @@ typedef enum {
275281 TPM_CC_VerifySequenceStart = 0x000001A9 ,
276282 TPM_CC_SignSequenceStart = 0x000001AA ,
277283 TPM_CC_LAST = TPM_CC_SignSequenceStart ,
284+ #else
285+ TPM_CC_LAST = TPM_CC_EncryptDecrypt2 ,
286+ #endif
278287
279288 CC_VEND = 0x20000000 ,
280289 TPM_CC_Vendor_TCG_Test = CC_VEND + 0x0000 ,
0 commit comments