VirtualBox

Changeset 104893 in vbox


Ignore:
Timestamp:
Jun 12, 2024 1:52:28 PM (10 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
163495
Message:

include/formats/tpm.h: Add more constants, bugref:10701

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/formats/tpm.h

    r98103 r104893  
    102102
    103103
     104/** @name TPM 2.0 Algorithm ID codes.
     105 * @{ */
     106/** Invalid algorithm ID - should not occur. */
     107#define TPM2_ALG_ERROR                      UINT16_C(0x0000)
     108/** RSA algorithm ID. */
     109#define TPM2_ALG_RSA                        UINT16_C(0x0001)
     110/** TDES (Triple Data Encryption Standard) algorithm ID. */
     111#define TPM2_ALG_TDES                       UINT16_C(0x0003)
     112/** SHA1 algorithm ID. */
     113#define TPM2_ALG_SHA1                       UINT16_C(0x0004)
     114/** HMAC (Hash Message Authentication Code) algorithm ID. */
     115#define TPM2_ALG_HMAC                       UINT16_C(0x0005)
     116/** AES algorithm ID. */
     117#define TPM2_ALG_AES                        UINT16_C(0x0006)
     118/** Hash-based mask-generation function algorithm ID. */
     119#define TPM2_ALG_MGF1                       UINT16_C(0x0007)
     120/** Object type that may use XOR for encryption or an HMAC for signing. */
     121#define TPM2_ALG_KEYEDHASH                  UINT16_C(0x0008)
     122/** XOR algorithm ID. */
     123#define TPM2_ALG_XOR                        UINT16_C(0x000a)
     124/** SHA256 algorithm ID. */
     125#define TPM2_ALG_SHA256                     UINT16_C(0x000b)
     126/** SHA384 algorithm ID. */
     127#define TPM2_ALG_SHA384                     UINT16_C(0x000c)
     128/** SHA512 algorithm ID. */
     129#define TPM2_ALG_SHA512                     UINT16_C(0x000d)
     130/** SHA256 with only 192 most significant bits algorithm ID. */
     131#define TPM2_ALG_SHA256_192                 UINT16_C(0x000e)
     132/** Null algorithm ID. */
     133#define TPM2_ALG_NULL                       UINT16_C(0x0010)
     134/** SM3 hash algorithm ID. */
     135#define TPM2_ALG_SM3_256                    UINT16_C(0x0012)
     136/** SM4 symmetric block cipher algorithm ID. */
     137#define TPM2_ALG_SM4                        UINT16_C(0x0013)
     138/** RSASSA-PKCS1-v1_5 signature algorithm ID. */
     139#define TPM2_ALG_RSASSA                     UINT16_C(0x0014)
     140/** RSAES-PKCS1-v1_5 padding algorithm ID. */
     141#define TPM2_ALG_RSAES                      UINT16_C(0x0015)
     142/** RSASSA-PSS signature algorithm ID. */
     143#define TPM2_ALG_RSAPSS                     UINT16_C(0x0016)
     144/** RSAES_OAEP padding algorithm ID. */
     145#define TPM2_ALG_OAEP                       UINT16_C(0x0017)
     146/** Elliptic curve cryptography signature algorithm ID. */
     147#define TPM2_ALG_ECDSA                      UINT16_C(0x0018)
     148/** Secret sharing using ECC algorithm ID. */
     149#define TPM2_ALG_ECDH                       UINT16_C(0x0019)
     150/** Elliptic curve based anonymous signing scheme algorithm ID. */
     151#define TPM2_ALG_ECDAA                      UINT16_C(0x001a)
     152/** SM2 algorithm ID. */
     153#define TPM2_ALG_SM2                        UINT16_C(0x001b)
     154/** Elliptic-curve based Schnorr signature algorithm ID. */
     155#define TPM2_ALG_ECSCHNORR                  UINT16_C(0x001c)
     156/** Two phase elliptic curve key exchange algorithm ID. */
     157#define TPM2_ALG_ECMQV                      UINT16_C(0x001d)
     158/** NIST SP800-56A Concatenation key derivation function algorithm ID. */
     159#define TPM2_ALG_KDF1_SP800_56A             UINT16_C(0x0020)
     160/** Key derivation function KDF2 algorithm ID. */
     161#define TPM2_ALG_KDF2                       UINT16_C(0x0021)
     162/** NIST SP800-108 key derivation function algorithm ID. */
     163#define TPM2_ALG_KDF1_SP800_108             UINT16_C(0x0022)
     164/** Prime field ECC algorithm ID. */
     165#define TPM2_ALG_ECC                        UINT16_C(0x0023)
     166/** Object type for a symmetric block cipher algorithm ID. */
     167#define TPM2_ALG_SYMCIPHER                  UINT16_C(0x0025)
     168/** Camellia symmetric block cipher algorithm ID. */
     169#define TPM2_ALG_CAMELLIA                   UINT16_C(0x0026)
     170/** SHA3 hash algorithm ID - produces 256-bit digest. */
     171#define TPM2_ALG_SHA3_256                   UINT16_C(0x0027)
     172/** SHA3 hash algorithm ID - produces 384-bit digest. */
     173#define TPM2_ALG_SHA3_384                   UINT16_C(0x0028)
     174/** SHA3 hash algorithm ID - produces 512-bit digest. */
     175#define TPM2_ALG_SHA3_512                   UINT16_C(0x0029)
     176/** ISO/IEC 10118-3 extendable output function algorithm ID - provides 128-bits of collision and preimage resistance. */
     177#define TPM2_ALG_SHAKE128                   UINT16_C(0x002a)
     178/** ISO/IEC 10118-3 extendable output function algorithm ID - provides 256-bits of collision and preimage resistance. */
     179#define TPM2_ALG_SHAKE256                   UINT16_C(0x002b)
     180/** ISO/IEC 10118-3 extendable output function algorithm ID - the first 192 bits of SHAKE256 output. */
     181#define TPM2_ALG_SHAKE256_192               UINT16_C(0x002c)
     182/** ISO/IEC 10118-3 extendable output function algorithm ID - the first 256 bits of SHAKE256 output. */
     183#define TPM2_ALG_SHAKE256_256               UINT16_C(0x002d)
     184/** ISO/IEC 10118-3 extendable output function algorithm ID - the first 512 bits of SHAKE256 output. */
     185#define TPM2_ALG_SHAKE256_512               UINT16_C(0x002e)
     186/** ISO/IEC 9797-1:2011 Block Cipher based Message Authentication Code algorithm ID. */
     187#define TPM2_ALG_CMAC                       UINT16_C(0x003f)
     188/** ISO/IEC 10116 Counter mode for symmetric block ciphers algorithm ID. */
     189#define TPM2_ALG_CTR                        UINT16_C(0x0040)
     190/** ISO/IEC 10116 Output feedback mode for symmetric block ciphers algorithm ID. */
     191#define TPM2_ALG_OFB                        UINT16_C(0x0041)
     192/** ISO/IEC 10116 Cipher Block Chaining mode for symmetric block ciphers algorithm ID. */
     193#define TPM2_ALG_CBC                        UINT16_C(0x0042)
     194/** ISO/IEC 10116 Cipher Feedback mode for symmetric block ciphers algorithm ID. */
     195#define TPM2_ALG_CFB                        UINT16_C(0x0043)
     196/** ISO/IEC 10116 Electronic codebook mode for symmetric block ciphers algorithm ID. */
     197#define TPM2_ALG_ECB                        UINT16_C(0x0044)
     198/** NIST SP800-38C Counter with Cipher Block Chaining Message Authentication Code algorithm ID. */
     199#define TPM2_ALG_CCM                        UINT16_C(0x0050)
     200/** NIST SP800-38D Galois/Counter Mode algorithm ID. */
     201#define TPM2_ALG_GCM                        UINT16_C(0x0051)
     202/** NIST SP800-38F AES Key Wrap (KW) algorithm ID. */
     203#define TPM2_ALG_KW                         UINT16_C(0x0052)
     204/** NIST SP800-38F AES Key Wrap with Padding (KWP) algorithm ID. */
     205#define TPM2_ALG_KWP                        UINT16_C(0x0053)
     206/** ISO/IEC 19772 Authentication Encryption Mode algorithm ID. */
     207#define TPM2_ALG_EAX                        UINT16_C(0x0054)
     208/** IETF RFC 8083 Edwards curve Digital Signature Algorithm (PureEdDSA) algorithm ID. */
     209#define TPM2_ALG_EDDSA                      UINT16_C(0x0060)
     210/** IETF RFC 8082 Edwards curve Digital Signature Algorithm (HashEdDSA) algorithm ID. */
     211#define TPM2_ALG_EDDSA_PH                   UINT16_C(0x0061)
     212/** NIST SP800-208 Leighton-Micali Signatures algorithm ID. */
     213#define TPM2_ALG_LMS                        UINT16_C(0x0070)
     214/** NIST SP800-208 eXtended Merkle Signature Scheme algorithm ID. */
     215#define TPM2_ALG_XMSS                       UINT16_C(0x0071)
     216/** Keyed XOF algorithm ID. */
     217#define TPM2_ALG_KEYEDXOF                   UINT16_C(0x0080)
     218/** NIST SP800-185 Keyed XOF providing 128-bit security strength algorithm ID. */
     219#define TPM2_ALG_KMACXOF128                 UINT16_C(0x0081)
     220/** NIST SP800-185 Keyed XOF providing 256-bit security strength algorithm ID. */
     221#define TPM2_ALG_KMACXOF256                 UINT16_C(0x0082)
     222/** NIST SP800-185 Variable length MAC providing 128-bit security strength algorithm ID. */
     223#define TPM2_ALG_KMAC128                    UINT16_C(0x0090)
     224/** NIST SP800-185 Variable length MAC providing 256-bit security strength algorithm ID. */
     225#define TPM2_ALG_KMAC256                    UINT16_C(0x0091)
     226/** @} */
     227
     228
     229/** @name TPM 2.0 ECC Curve codes.
     230 * @{ */
     231#define TPM2_ECC_NONE                       UINT16_C(0x0000)
     232#define TPM2_ECC_NIST_P192                  UINT16_C(0x0001)
     233#define TPM2_ECC_NIST_P224                  UINT16_C(0x0002)
     234#define TPM2_ECC_NIST_P256                  UINT16_C(0x0003)
     235#define TPM2_ECC_NIST_P384                  UINT16_C(0x0004)
     236#define TPM2_ECC_NIST_P521                  UINT16_C(0x0005)
     237#define TPM2_ECC_BN_P256                    UINT16_C(0x0010)
     238#define TPM2_ECC_BN_P638                    UINT16_C(0x0011)
     239#define TPM2_ECC_SM2_P256                   UINT16_C(0x0020)
     240#define TPM2_ECC_BP_P256_R1                 UINT16_C(0x0030)
     241#define TPM2_ECC_BP_P384_R1                 UINT16_C(0x0031)
     242#define TPM2_ECC_BP_P512_R1                 UINT16_C(0x0032)
     243#define TPM2_ECC_CURVE_25519                UINT16_C(0x0040)
     244#define TPM2_ECC_CURVE_448                  UINT16_C(0x0041)
     245/** @} */
     246
     247
    104248/** @name TPM 2.0 command codes.
    105249 * @{ */
    106 /** Get a capability. */
    107 #define TPM2_CC_GET_CAPABILITY              UINT32_C(378)
     250#define TPM2_CC_NV_UNDEFINE_SPACE_SPECIAL       UINT32_C(0x11f)
     251#define TPM2_CC_EVICT_CONTROL                   UINT32_C(0x120)
     252#define TPM2_CC_HIERARCHY_CONTROL               UINT32_C(0x121)
     253#define TPM2_CC_NV_UNDEFINE_SPACE               UINT32_C(0x122)
     254#define TPM2_CC_CHANGE_EPS                      UINT32_C(0x124)
     255#define TPM2_CC_CHANGE_PPS                      UINT32_C(0x125)
     256#define TPM2_CC_CLEAR                           UINT32_C(0x126)
     257#define TPM2_CC_CLEAR_CONTROL                   UINT32_C(0x127)
     258#define TPM2_CC_CLOCK_SET                       UINT32_C(0x128)
     259#define TPM2_CC_HIERARCHY_CHANGE_AUTH           UINT32_C(0x129)
     260#define TPM2_CC_NV_DEFINE_SPACE                 UINT32_C(0x12a)
     261#define TPM2_CC_PCR_ALLOCATE                    UINT32_C(0x12b)
     262#define TPM2_CC_PCR_SET_AUTH_POLICY             UINT32_C(0x12c)
     263#define TPM2_CC_PP_COMMANDS                     UINT32_C(0x12d)
     264#define TPM2_CC_SET_PRIMARY_POLICY              UINT32_C(0x12e)
     265#define TPM2_CC_FIELD_UPGRADE_START             UINT32_C(0x12f)
     266#define TPM2_CC_CLOCK_RATE_ADJUST               UINT32_C(0x130)
     267#define TPM2_CC_CREATE_PRIMARY                  UINT32_C(0x131)
     268#define TPM2_CC_NV_GLOBAL_WRITE_LOCK            UINT32_C(0x132)
     269#define TPM2_CC_GET_COMMAND_AUDIT_DIGEST        UINT32_C(0x133)
     270#define TPM2_CC_NV_INCREMENT                    UINT32_C(0x134)
     271#define TPM2_CC_NV_SET_BITS                     UINT32_C(0x135)
     272#define TPM2_CC_NV_EXTEND                       UINT32_C(0x136)
     273#define TPM2_CC_NV_WRITE                        UINT32_C(0x137)
     274#define TPM2_CC_NV_WRITE_LOCK                   UINT32_C(0x138)
     275#define TPM2_CC_DICTIONARY_ATTACK_LOCK_RESET    UINT32_C(0x139)
     276#define TPM2_CC_DICTIONARY_ATTACK_PARAMETERS    UINT32_C(0x13a)
     277#define TPM2_CC_NV_CHANGE_AUTH                  UINT32_C(0x13b)
     278#define TPM2_CC_PCR_EVENT                       UINT32_C(0x13c)
     279#define TPM2_CC_PCR_RESET                       UINT32_C(0x13d)
     280#define TPM2_CC_SEQUENCE_COMPLETE               UINT32_C(0x13e)
     281#define TPM2_CC_SET_ALGORITHM_SET               UINT32_C(0x13f)
     282#define TPM2_CC_SET_COMMAND_CODE_AUDIT_STATUS   UINT32_C(0x140)
     283#define TPM2_CC_FIELD_UPGRADE_DATA              UINT32_C(0x141)
     284#define TPM2_CC_INCREMENTAL_SELF_TEST           UINT32_C(0x142)
     285#define TPM2_CC_SELF_TEST                       UINT32_C(0x143)
     286#define TPM2_CC_STARTUP                         UINT32_C(0x144)
     287#define TPM2_CC_SHUTDOWN                        UINT32_C(0x145)
     288#define TPM2_CC_STIR_RANDOM                     UINT32_C(0x146)
     289#define TPM2_CC_ACTIVATE_CREDENTIAL             UINT32_C(0x147)
     290#define TPM2_CC_CERTIFY                         UINT32_C(0x148)
     291#define TPM2_CC_POLICY_NV                       UINT32_C(0x149)
     292#define TPM2_CC_CERTIFY_CREATION                UINT32_C(0x14a)
     293#define TPM2_CC_DUPLICATE                       UINT32_C(0x14b)
     294#define TPM2_CC_GET_TIME                        UINT32_C(0x14c)
     295#define TPM2_CC_GET_SESSION_AUDIT_DIGEST        UINT32_C(0x14d)
     296#define TPM2_CC_NV_READ                         UINT32_C(0x14e)
     297#define TPM2_CC_NV_READ_LOCK                    UINT32_C(0x14f)
     298#define TPM2_CC_OBJECT_CHANGE_AUTH              UINT32_C(0x150)
     299#define TPM2_CC_POLICY_SECRET                   UINT32_C(0x151)
     300#define TPM2_CC_REWRAP                          UINT32_C(0x152)
     301#define TPM2_CC_CREATE                          UINT32_C(0x153)
     302#define TPM2_CC_ECDH_ZGEN                       UINT32_C(0x154)
     303#define TPM2_CC_HMAC_MAC                        UINT32_C(0x155)
     304#define TPM2_CC_IMPORT                          UINT32_C(0x156)
     305#define TPM2_CC_LOAD                            UINT32_C(0x157)
     306#define TPM2_CC_QUOTE                           UINT32_C(0x158)
     307#define TPM2_CC_RSA_DECRYPT                     UINT32_C(0x159)
     308#define TPM2_CC_HMAC_MAC_START                  UINT32_C(0x15b)
     309#define TPM2_CC_SEQUENCE_UPDATE                 UINT32_C(0x15c)
     310#define TPM2_CC_SIGN                            UINT32_C(0x15d)
     311#define TPM2_CC_UNSEAL                          UINT32_C(0x15e)
     312#define TPM2_CC_POLICY_SIGNED                   UINT32_C(0x160)
     313#define TPM2_CC_CONTEXT_LOAD                    UINT32_C(0x161)
     314#define TPM2_CC_CONTEXT_SAVE                    UINT32_C(0x162)
     315#define TPM2_CC_ECDH_KEY_GEN                    UINT32_C(0x163)
     316#define TPM2_CC_ENCRYPT_DECRYPT                 UINT32_C(0x164)
     317#define TPM2_CC_FLUSH_CONTEXT                   UINT32_C(0x165)
     318#define TPM2_CC_LOAD_EXTERNAL                   UINT32_C(0x167)
     319#define TPM2_CC_MAKE_CREDENTIAL                 UINT32_C(0x168)
     320#define TPM2_CC_NV_READ_PUBLIC                  UINT32_C(0x169)
     321#define TPM2_CC_POLICY_AUTHORIZE                UINT32_C(0x16a)
     322#define TPM2_CC_POLICY_AUTH_VALUE               UINT32_C(0x16b)
     323#define TPM2_CC_POLICY_COMMAND_CODE             UINT32_C(0x16c)
     324#define TPM2_CC_POLICY_COUNTER_TIMER            UINT32_C(0x16d)
     325#define TPM2_CC_POLICY_CP_HASH                  UINT32_C(0x16e)
     326#define TPM2_CC_POLICY_LOCALITY                 UINT32_C(0x16f)
     327#define TPM2_CC_POLICY_NAME_HASH                UINT32_C(0x170)
     328#define TPM2_CC_POLICY_OR                       UINT32_C(0x171)
     329#define TPM2_CC_POLICY_TICKET                   UINT32_C(0x172)
     330#define TPM2_CC_READ_PUBLIC                     UINT32_C(0x173)
     331#define TPM2_CC_RSA_ENCRYPT                     UINT32_C(0x174)
     332#define TPM2_CC_START_AUTH_SESSION              UINT32_C(0x176)
     333#define TPM2_CC_VERIFY_SIGNATURE                UINT32_C(0x177)
     334#define TPM2_CC_ECC_PARAMETERS                  UINT32_C(0x178)
     335#define TPM2_CC_FIRMWARE_READ                   UINT32_C(0x179)
     336#define TPM2_CC_GET_CAPABILITY                  UINT32_C(0x17a)
     337#define TPM2_CC_GET_RANDOM                      UINT32_C(0x17b)
     338#define TPM2_CC_GET_TEST_RESULT                 UINT32_C(0x17c)
     339#define TPM2_CC_GET_HASH                        UINT32_C(0x17d)
     340#define TPM2_CC_PCR_READ                        UINT32_C(0x17e)
     341#define TPM2_CC_POLICY_PCR                      UINT32_C(0x17f)
     342#define TPM2_CC_POLICY_RESTART                  UINT32_C(0x180)
     343#define TPM2_CC_READ_CLOCK                      UINT32_C(0x181)
     344#define TPM2_CC_PCR_EXTEND                      UINT32_C(0x182)
     345#define TPM2_CC_PCR_SET_AUTH_VALUE              UINT32_C(0x183)
     346#define TPM2_CC_NV_CERTIFY                      UINT32_C(0x184)
     347#define TPM2_CC_EVENT_SEQUENCE_COMPLETE         UINT32_C(0x185)
     348#define TPM2_CC_HASH_SEQUENCE_START             UINT32_C(0x186)
     349#define TPM2_CC_POLICY_PHYSICAL_PRESENCE        UINT32_C(0x187)
     350#define TPM2_CC_POLICY_DUPLICATION_SELECT       UINT32_C(0x188)
     351#define TPM2_CC_POLICY_GET_DIGEST               UINT32_C(0x189)
     352#define TPM2_CC_TEST_PARMS                      UINT32_C(0x18a)
     353#define TPM2_CC_COMMIT                          UINT32_C(0x18b)
     354#define TPM2_CC_POLICY_PASSWORD                 UINT32_C(0x18c)
     355#define TPM2_CC_ZGEN_2PHASE                     UINT32_C(0x18d)
     356#define TPM2_CC_EC_EPHEMERAL                    UINT32_C(0x18e)
     357#define TPM2_CC_POLICY_NV_WRITTEN               UINT32_C(0x18f)
     358#define TPM2_CC_POLICY_TEMPLATE                 UINT32_C(0x190)
     359#define TPM2_CC_CREATE_LOADED                   UINT32_C(0x191)
     360#define TPM2_CC_POLICY_AUTHORIZE_NV             UINT32_C(0x192)
     361#define TPM2_CC_ENCRYPT_DECRYPT_2               UINT32_C(0x193)
     362#define TPM2_CC_AC_GET_CAPABILITY               UINT32_C(0x194)
     363#define TPM2_CC_AC_SEND                         UINT32_C(0x195)
     364#define TPM2_CC_POLICY_AC_SEND_SELECT           UINT32_C(0x196)
     365#define TPM2_CC_CERTIFY_X509                    UINT32_C(0x197)
     366#define TPM2_CC_ACT_SET_TIMEOUT                 UINT32_C(0x198)
     367#define TPM2_CC_ECC_ENCRYPT                     UINT32_C(0x199)
     368#define TPM2_CC_ECC_DECRYPT                     UINT32_C(0x19a)
     369#define TPM2_CC_POLICY_CAPABILITY               UINT32_C(0x19b)
     370#define TPM2_CC_POLICY_PARAMETERS               UINT32_C(0x19c)
     371#define TPM2_CC_NV_DEFINE_SPACE_2               UINT32_C(0x19d)
     372#define TPM2_CC_NV_READ_PUBLIC_2                UINT32_C(0x19e)
     373#define TPM2_CC_SET_CAPABILITY                  UINT32_C(0x19f)
    108374/** @} */
    109375
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette