Home | History | Annotate | Download | only in tpm2
      1 // This file was extracted from the TCG Published
      2 // Trusted Platform Module Library
      3 // Part 4: Supporting Routines
      4 // Family "2.0"
      5 // Level 00 Revision 01.16
      6 // October 30, 2014
      7 
      8 static const TPMA_CC           s_ccAttr [] =      {
      9        {0x011f, 0, 1,        0, 0, 2, 0, 0,      0},    //   TPM_CC_NV_UndefineSpaceSpecial
     10        {0x0120, 0, 1,        0, 0, 2, 0, 0,      0},    //   TPM_CC_EvictControl
     11        {0x0121, 0, 1,        1, 0, 1, 0, 0,      0},    //   TPM_CC_HierarchyControl
     12        {0x0122, 0, 1,        0, 0, 2, 0, 0,      0},    //   TPM_CC_NV_UndefineSpace
     13        {0x0123, 0, 0,        0, 0, 0, 0, 0,      0},    //   No command
     14        {0x0124, 0, 1,        1, 0, 1, 0, 0,      0},    //   TPM_CC_ChangeEPS
     15        {0x0125, 0, 1,        1, 0, 1, 0, 0,      0},    //   TPM_CC_ChangePPS
     16        {0x0126, 0, 1,        1, 0, 1, 0, 0,      0},    //   TPM_CC_Clear
     17        {0x0127, 0, 1,        0, 0, 1, 0, 0,      0},    //   TPM_CC_ClearControl
     18        {0x0128, 0, 1,        0, 0, 1, 0, 0,      0},    //   TPM_CC_ClockSet
     19        {0x0129, 0, 1,        0, 0, 1, 0, 0,      0},    //   TPM_CC_HierarchyChangeAuth
     20        {0x012a, 0, 1,        0, 0, 1, 0, 0,      0},    //   TPM_CC_NV_DefineSpace
     21        {0x012b, 0, 1,        0, 0, 1, 0, 0,      0},    //   TPM_CC_PCR_Allocate
     22        {0x012c, 0, 1,        0, 0, 1, 0, 0,      0},    //   TPM_CC_PCR_SetAuthPolicy
     23        {0x012d, 0, 1,        0, 0, 1, 0, 0,      0},    //   TPM_CC_PP_Commands
     24        {0x012e, 0, 1,        0, 0, 1, 0, 0,      0},    //   TPM_CC_SetPrimaryPolicy
     25        {0x012f, 0, 0,        0, 0, 2, 0, 0,      0},    //   TPM_CC_FieldUpgradeStart
     26        {0x0130, 0, 0,        0, 0, 1, 0, 0,      0},    //   TPM_CC_ClockRateAdjust
     27        {0x0131, 0, 0,        0, 0, 1, 1, 0,      0},    //   TPM_CC_CreatePrimary
     28        {0x0132, 0, 0,        0, 0, 1, 0, 0,      0},    //   TPM_CC_NV_GlobalWriteLock
     29        {0x0133, 0, 1,        0, 0, 2, 0, 0,      0},    //   TPM_CC_GetCommandAuditDigest
     30        {0x0134, 0, 1,        0, 0, 2, 0, 0,      0},    //   TPM_CC_NV_Increment
     31        {0x0135, 0, 1,        0, 0, 2, 0, 0,      0},    //   TPM_CC_NV_SetBits
     32        {0x0136, 0, 1,        0, 0, 2, 0, 0,      0},    //   TPM_CC_NV_Extend
     33        {0x0137, 0, 1,        0, 0, 2, 0, 0,      0},    //   TPM_CC_NV_Write
     34        {0x0138, 0, 1,        0, 0, 2, 0, 0,      0},    //   TPM_CC_NV_WriteLock
     35        {0x0139, 0, 1,        0, 0, 1, 0, 0,      0},    //   TPM_CC_DictionaryAttackLockReset
     36        {0x013a, 0, 1,        0, 0, 1, 0, 0,      0},    //   TPM_CC_DictionaryAttackParameters
     37        {0x013b, 0, 1,        0, 0, 1, 0, 0,      0},    //   TPM_CC_NV_ChangeAuth
     38        {0x013c, 0, 1,        0, 0, 1, 0, 0,      0},    //   TPM_CC_PCR_Event
     39        {0x013d, 0, 1,        0, 0, 1, 0, 0,      0},    //   TPM_CC_PCR_Reset
     40        {0x013e, 0, 0,        0, 1, 1, 0, 0,      0},    //   TPM_CC_SequenceComplete
     41        {0x013f, 0, 1,        0, 0, 1, 0, 0,      0},    //   TPM_CC_SetAlgorithmSet
     42        {0x0140, 0, 1,        0, 0, 1, 0, 0,      0},    //   TPM_CC_SetCommandCodeAuditStatus
     43        {0x0141, 0, 1,        0, 0, 0, 0, 0,      0},    //   TPM_CC_FieldUpgradeData
     44        {0x0142, 0, 1,        0, 0, 0, 0, 0,      0},    //   TPM_CC_IncrementalSelfTest
     45        {0x0143, 0, 1,        0, 0, 0, 0, 0,      0},    //   TPM_CC_SelfTest
     46        {0x0144, 0, 1,        0, 0, 0, 0, 0,      0},    //   TPM_CC_Startup
     47        {0x0145, 0, 1,        0, 0, 0, 0, 0,      0},    //   TPM_CC_Shutdown
     48        {0x0146, 0, 1,        0, 0, 0, 0, 0,      0},    //   TPM_CC_StirRandom
     49         {0x0147,   0,   0,   0,   0,   2,   0,   0,   0},   //   TPM_CC_ActivateCredential
     50         {0x0148,   0,   0,   0,   0,   2,   0,   0,   0},   //   TPM_CC_Certify
     51         {0x0149,   0,   0,   0,   0,   3,   0,   0,   0},   //   TPM_CC_PolicyNV
     52         {0x014a,   0,   0,   0,   0,   2,   0,   0,   0},   //   TPM_CC_CertifyCreation
     53         {0x014b,   0,   0,   0,   0,   2,   0,   0,   0},   //   TPM_CC_Duplicate
     54         {0x014c,   0,   0,   0,   0,   2,   0,   0,   0},   //   TPM_CC_GetTime
     55         {0x014d,   0,   0,   0,   0,   3,   0,   0,   0},   //   TPM_CC_GetSessionAuditDigest
     56         {0x014e,   0,   0,   0,   0,   2,   0,   0,   0},   //   TPM_CC_NV_Read
     57         {0x014f,   0,   0,   0,   0,   2,   0,   0,   0},   //   TPM_CC_NV_ReadLock
     58         {0x0150,   0,   0,   0,   0,   2,   0,   0,   0},   //   TPM_CC_ObjectChangeAuth
     59         {0x0151,   0,   0,   0,   0,   2,   0,   0,   0},   //   TPM_CC_PolicySecret
     60         {0x0152,   0,   0,   0,   0,   2,   0,   0,   0},   //   TPM_CC_Rewrap
     61         {0x0153,   0,   0,   0,   0,   1,   0,   0,   0},   //   TPM_CC_Create
     62         {0x0154,   0,   0,   0,   0,   1,   0,   0,   0},   //   TPM_CC_ECDH_ZGen
     63         {0x0155,   0,   0,   0,   0,   1,   0,   0,   0},   //   TPM_CC_HMAC
     64         {0x0156,   0,   0,   0,   0,   1,   0,   0,   0},   //   TPM_CC_Import
     65         {0x0157,   0,   0,   0,   0,   1,   1,   0,   0},   //   TPM_CC_Load
     66         {0x0158,   0,   0,   0,   0,   1,   0,   0,   0},   //   TPM_CC_Quote
     67         {0x0159,   0,   0,   0,   0,   1,   0,   0,   0},   //   TPM_CC_RSA_Decrypt
     68         {0x015a,   0,   0,   0,   0,   0,   0,   0,   0},   //   No command
     69         {0x015b,   0,   0,   0,   0,   1,   1,   0,   0},   //   TPM_CC_HMAC_Start
     70         {0x015c,   0,   0,   0,   0,   1,   0,   0,   0},   //   TPM_CC_SequenceUpdate
     71         {0x015d,   0,   0,   0,   0,   1,   0,   0,   0},   //   TPM_CC_Sign
     72         {0x015e,   0,   0,   0,   0,   1,   0,   0,   0},   //   TPM_CC_Unseal
     73         {0x015f,   0,   0,   0,   0,   0,   0,   0,   0},   //   No command
     74         {0x0160,   0,   0,   0,   0,   2,   0,   0,   0},   //   TPM_CC_PolicySigned
     75         {0x0161,   0,   0,   0,   0,   0,   1,   0,   0},   //   TPM_CC_ContextLoad
     76         {0x0162,   0,   0,   0,   0,   1,   0,   0,   0},   //   TPM_CC_ContextSave
     77         {0x0163,   0,   0,   0,   0,   1,   0,   0,   0},   //   TPM_CC_ECDH_KeyGen
     78         {0x0164,   0,   0,   0,   0,   1,   0,   0,   0},   //   TPM_CC_EncryptDecrypt
     79         {0x0165,   0,   0,   0,   0,   0,   0,   0,   0},   //   TPM_CC_FlushContext
     80         {0x0166,   0,   0,   0,   0,   0,   0,   0,   0},   //   No command
     81         {0x0167,   0,   0,   0,   0,   0,   1,   0,   0},   //   TPM_CC_LoadExternal
     82         {0x0168,   0,   0,   0,   0,   1,   0,   0,   0},   //   TPM_CC_MakeCredential
     83         {0x0169,   0,   0,   0,   0,   1,   0,   0,   0},   //   TPM_CC_NV_ReadPublic
     84         {0x016a,   0,   0,   0,   0,   1,   0,   0,   0},   //   TPM_CC_PolicyAuthorize
     85         {0x016b,   0,   0,   0,   0,   1,   0,   0,   0},   //   TPM_CC_PolicyAuthValue
     86         {0x016c,   0,   0,   0,   0,   1,   0,   0,   0},   //   TPM_CC_PolicyCommandCode
     87         {0x016d,   0,   0,   0,   0,   1,   0,   0,   0},   //   TPM_CC_PolicyCounterTimer
     88         {0x016e,   0,   0,   0,   0,   1,   0,   0,   0},   //   TPM_CC_PolicyCpHash
     89         {0x016f,   0,   0,   0,   0,   1,   0,   0,   0},   //   TPM_CC_PolicyLocality
     90         {0x0170,   0,   0,   0,   0,   1,   0,   0,   0},   //   TPM_CC_PolicyNameHash
     91         {0x0171,   0,   0,   0,   0,   1,   0,   0,   0},   //   TPM_CC_PolicyOR
     92         {0x0172,   0,   0,   0,   0,   1,   0,   0,   0},   //   TPM_CC_PolicyTicket
     93         {0x0173,   0,   0,   0,   0,   1,   0,   0,   0},   //   TPM_CC_ReadPublic
     94         {0x0174,   0,   0,   0,   0,   1,   0,   0,   0},   //   TPM_CC_RSA_Encrypt
     95         {0x0175,   0,   0,   0,   0,   0,   0,   0,   0},   //   No command
     96         {0x0176,   0,   0,   0,   0,   2,   1,   0,   0},   //   TPM_CC_StartAuthSession
     97         {0x0177,   0,   0,   0,   0,   1,   0,   0,   0},   //   TPM_CC_VerifySignature
     98         {0x0178,   0,   0,   0,   0,   0,   0,   0,   0},   //   TPM_CC_ECC_Parameters
     99         {0x0179,   0,   0,   0,   0,   0,   0,   0,   0},   //   TPM_CC_FirmwareRead
    100         {0x017a,   0,   0,   0,   0,   0,   0,   0,   0},   //   TPM_CC_GetCapability
    101         {0x017b,   0,   0,   0,   0,   0,   0,   0,   0},   //   TPM_CC_GetRandom
    102         {0x017c,   0,   0,   0,   0,   0,   0,   0,   0},   //   TPM_CC_GetTestResult
    103         {0x017d,   0,   0,   0,   0,   0,   0,   0,   0},   //   TPM_CC_Hash
    104         {0x017e,   0,   0,   0,   0,   0,   0,   0,   0},   //   TPM_CC_PCR_Read
    105         {0x017f,   0,   0,   0,   0,   1,   0,   0,   0},   //   TPM_CC_PolicyPCR
    106         {0x0180,   0,   0,   0,   0,   1,   0,   0,   0},   //   TPM_CC_PolicyRestart
    107         {0x0181,   0,   0,   0,   0,   0,   0,   0,   0},   //   TPM_CC_ReadClock
    108         {0x0182,   0,   1,   0,   0,   1,   0,   0,   0},   //   TPM_CC_PCR_Extend
    109         {0x0183,   0,   0,   0,   0,   1,   0,   0,   0},   //   TPM_CC_PCR_SetAuthValue
    110         {0x0184,   0,   0,   0,   0,   3,   0,   0,   0},   //   TPM_CC_NV_Certify
    111         {0x0185,   0,   1,   0,   1,   2,   0,   0,   0},   //   TPM_CC_EventSequenceComplete
    112         {0x0186,   0,   0,   0,   0,   0,   1,   0,   0},   //   TPM_CC_HashSequenceStart
    113         {0x0187,   0,   0,   0,   0,   1,   0,   0,   0},   //   TPM_CC_PolicyPhysicalPresence
    114         {0x0188,   0,   0,   0,   0,   1,   0,   0,   0},   //   TPM_CC_PolicyDuplicationSelect
    115          {0x0189,   0,   0,   0,   0,   1,   0,   0,   0},     //   TPM_CC_PolicyGetDigest
    116          {0x018a,   0,   0,   0,   0,   0,   0,   0,   0},     //   TPM_CC_TestParms
    117          {0x018b,   0,   0,   0,   0,   1,   0,   0,   0},     //   TPM_CC_Commit
    118          {0x018c,   0,   0,   0,   0,   1,   0,   0,   0},     //   TPM_CC_PolicyPassword
    119          {0x018d,   0,   0,   0,   0,   1,   0,   0,   0},     //   TPM_CC_ZGen_2Phase
    120          {0x018e,   0,   0,   0,   0,   0,   0,   0,   0},     //   TPM_CC_EC_Ephemeral
    121          {0x018f,   0,   0,   0,   0,   1,   0,   0,   0}      //   TPM_CC_PolicyNvWritten
    122 };
    123 typedef    UINT16                    _ATTR_;
    124 #define    NOT_IMPLEMENTED           (_ATTR_)(0)
    125 #define    ENCRYPT_2                (_ATTR_)(1 <<          0)
    126 #define    ENCRYPT_4                (_ATTR_)(1 <<          1)
    127 #define    DECRYPT_2                (_ATTR_)(1 <<          2)
    128 #define    DECRYPT_4                (_ATTR_)(1 <<          3)
    129 #define    HANDLE_1_USER            (_ATTR_)(1 <<          4)
    130 #define    HANDLE_1_ADMIN           (_ATTR_)(1 <<          5)
    131 #define    HANDLE_1_DUP             (_ATTR_)(1 <<          6)
    132 #define    HANDLE_2_USER            (_ATTR_)(1 <<          7)
    133 #define    PP_COMMAND               (_ATTR_)(1 <<          8)
    134 #define    IS_IMPLEMENTED           (_ATTR_)(1 <<          9)
    135 #define    NO_SESSIONS              (_ATTR_)(1 <<         10)
    136 #define    NV_COMMAND               (_ATTR_)(1 <<         11)
    137 #define    PP_REQUIRED              (_ATTR_)(1 <<         12)
    138 #define    R_HANDLE                 (_ATTR_)(1 <<         13)
    139 //
    140 //      This is the command code attribute structure.
    141 //
    142 typedef UINT16 COMMAND_ATTRIBUTES;
    143 static const COMMAND_ATTRIBUTES    s_commandAttributes [] = {
    144    (_ATTR_)(CC_NV_UndefineSpaceSpecial     *
    145       (IS_IMPLEMENTED+HANDLE_1_ADMIN+HANDLE_2_USER+PP_COMMAND)),                                    // 0x011f
    146    (_ATTR_)(CC_EvictControl                *
    147       (IS_IMPLEMENTED+HANDLE_1_USER+PP_COMMAND)),                                                   // 0x0120
    148    (_ATTR_)(CC_HierarchyControl            *
    149       (IS_IMPLEMENTED+HANDLE_1_USER+PP_COMMAND)),                                                   // 0x0121
    150    (_ATTR_)(CC_NV_UndefineSpace            *
    151       (IS_IMPLEMENTED+HANDLE_1_USER+PP_COMMAND)),                                                   // 0x0122
    152    (_ATTR_)                                  (NOT_IMPLEMENTED),
    153       // 0x0123 - Not assigned
    154    (_ATTR_)(CC_ChangeEPS                   *
    155       (IS_IMPLEMENTED+HANDLE_1_USER+PP_COMMAND)),                                                   // 0x0124
    156    (_ATTR_)(CC_ChangePPS                   *
    157       (IS_IMPLEMENTED+HANDLE_1_USER+PP_COMMAND)),                                                   // 0x0125
    158    (_ATTR_)(CC_Clear                       *
    159       (IS_IMPLEMENTED+HANDLE_1_USER+PP_COMMAND)),                                                   // 0x0126
    160    (_ATTR_)(CC_ClearControl                *
    161       (IS_IMPLEMENTED+HANDLE_1_USER+PP_COMMAND)),                                                   // 0x0127
    162    (_ATTR_)(CC_ClockSet                    *
    163       (IS_IMPLEMENTED+HANDLE_1_USER+PP_COMMAND)),                                                   // 0x0128
    164    (_ATTR_)(CC_HierarchyChangeAuth         *
    165       (IS_IMPLEMENTED+DECRYPT_2+HANDLE_1_USER+PP_COMMAND)),                                         // 0x0129
    166    (_ATTR_)(CC_NV_DefineSpace              *
    167       (IS_IMPLEMENTED+DECRYPT_2+HANDLE_1_USER+PP_COMMAND)),                                         // 0x012a
    168    (_ATTR_)(CC_PCR_Allocate                *
    169       (IS_IMPLEMENTED+HANDLE_1_USER+PP_COMMAND)),                                                   // 0x012b
    170    (_ATTR_)(CC_PCR_SetAuthPolicy           *
    171       (IS_IMPLEMENTED+DECRYPT_2+HANDLE_1_USER+PP_COMMAND)),                                         // 0x012c
    172    (_ATTR_)(CC_PP_Commands                 *
    173       (IS_IMPLEMENTED+HANDLE_1_USER+PP_REQUIRED)),                                                  // 0x012d
    174    (_ATTR_)(CC_SetPrimaryPolicy            *
    175       (IS_IMPLEMENTED+DECRYPT_2+HANDLE_1_USER+PP_COMMAND)),                                         // 0x012e
    176    (_ATTR_)(CC_FieldUpgradeStart           *
    177       (IS_IMPLEMENTED+DECRYPT_2+HANDLE_1_ADMIN+PP_COMMAND)),                                        // 0x012f
    178    (_ATTR_)(CC_ClockRateAdjust             *
    179       (IS_IMPLEMENTED+HANDLE_1_USER+PP_COMMAND)),                                                   // 0x0130
    180 //
    181    (_ATTR_)(CC_CreatePrimary               *
    182       (IS_IMPLEMENTED+DECRYPT_2+HANDLE_1_USER+PP_COMMAND+ENCRYPT_2+R_HANDLE)), // 0x0131
    183    (_ATTR_)(CC_NV_GlobalWriteLock          *
    184       (IS_IMPLEMENTED+HANDLE_1_USER+PP_COMMAND)),                                // 0x0132
    185    (_ATTR_)(CC_GetCommandAuditDigest       *
    186       (IS_IMPLEMENTED+DECRYPT_2+HANDLE_1_USER+HANDLE_2_USER+ENCRYPT_2)),         // 0x0133
    187    (_ATTR_)(CC_NV_Increment                * (IS_IMPLEMENTED+HANDLE_1_USER)),
    188       // 0x0134
    189    (_ATTR_)(CC_NV_SetBits                  * (IS_IMPLEMENTED+HANDLE_1_USER)),
    190       // 0x0135
    191    (_ATTR_)(CC_NV_Extend                   *
    192       (IS_IMPLEMENTED+DECRYPT_2+HANDLE_1_USER)),                                 // 0x0136
    193    (_ATTR_)(CC_NV_Write                    *
    194       (IS_IMPLEMENTED+DECRYPT_2+HANDLE_1_USER)),                                 // 0x0137
    195    (_ATTR_)(CC_NV_WriteLock                * (IS_IMPLEMENTED+HANDLE_1_USER)),
    196       // 0x0138
    197    (_ATTR_)(CC_DictionaryAttackLockReset * (IS_IMPLEMENTED+HANDLE_1_USER)),
    198       // 0x0139
    199    (_ATTR_)(CC_DictionaryAttackParameters * (IS_IMPLEMENTED+HANDLE_1_USER)),
    200       // 0x013a
    201    (_ATTR_)(CC_NV_ChangeAuth               *
    202       (IS_IMPLEMENTED+DECRYPT_2+HANDLE_1_ADMIN)),                                // 0x013b
    203    (_ATTR_)(CC_PCR_Event                   *
    204       (IS_IMPLEMENTED+DECRYPT_2+HANDLE_1_USER)),                                 // 0x013c
    205    (_ATTR_)(CC_PCR_Reset                   * (IS_IMPLEMENTED+HANDLE_1_USER)),
    206       // 0x013d
    207    (_ATTR_)(CC_SequenceComplete            *
    208       (IS_IMPLEMENTED+DECRYPT_2+HANDLE_1_USER+ENCRYPT_2)),                       // 0x013e
    209    (_ATTR_)(CC_SetAlgorithmSet             * (IS_IMPLEMENTED+HANDLE_1_USER)),
    210       // 0x013f
    211    (_ATTR_)(CC_SetCommandCodeAuditStatus *
    212       (IS_IMPLEMENTED+HANDLE_1_USER+PP_COMMAND)),                                // 0x0140
    213    (_ATTR_)(CC_FieldUpgradeData            * (IS_IMPLEMENTED+DECRYPT_2)),
    214       // 0x0141
    215    (_ATTR_)(CC_IncrementalSelfTest         * (IS_IMPLEMENTED)),
    216       // 0x0142
    217    (_ATTR_)(CC_SelfTest                    * (IS_IMPLEMENTED)),
    218       // 0x0143
    219    (_ATTR_)(CC_Startup                     * (IS_IMPLEMENTED+NO_SESSIONS)),
    220       // 0x0144
    221    (_ATTR_)(CC_Shutdown                    * (IS_IMPLEMENTED)),
    222       // 0x0145
    223    (_ATTR_)(CC_StirRandom                  * (IS_IMPLEMENTED+DECRYPT_2)),
    224       // 0x0146
    225    (_ATTR_)(CC_ActivateCredential          *
    226       (IS_IMPLEMENTED+DECRYPT_2+HANDLE_1_ADMIN+HANDLE_2_USER+ENCRYPT_2)),        // 0x0147
    227    (_ATTR_)(CC_Certify                     *
    228       (IS_IMPLEMENTED+DECRYPT_2+HANDLE_1_ADMIN+HANDLE_2_USER+ENCRYPT_2)),        // 0x0148
    229    (_ATTR_)(CC_PolicyNV                    *
    230       (IS_IMPLEMENTED+DECRYPT_2+HANDLE_1_USER)),                                 // 0x0149
    231    (_ATTR_)(CC_CertifyCreation             *
    232       (IS_IMPLEMENTED+DECRYPT_2+HANDLE_1_USER+ENCRYPT_2)),                       // 0x014a
    233    (_ATTR_)(CC_Duplicate                   *
    234       (IS_IMPLEMENTED+DECRYPT_2+HANDLE_1_DUP+ENCRYPT_2)),                        // 0x014b
    235    (_ATTR_)(CC_GetTime                     *
    236       (IS_IMPLEMENTED+DECRYPT_2+HANDLE_1_USER+HANDLE_2_USER+ENCRYPT_2)),         // 0x014c
    237    (_ATTR_)(CC_GetSessionAuditDigest       *
    238       (IS_IMPLEMENTED+DECRYPT_2+HANDLE_1_USER+HANDLE_2_USER+ENCRYPT_2)),         // 0x014d
    239    (_ATTR_)(CC_NV_Read                     *
    240       (IS_IMPLEMENTED+HANDLE_1_USER+ENCRYPT_2)),                                 // 0x014e
    241    (_ATTR_)(CC_NV_ReadLock                 * (IS_IMPLEMENTED+HANDLE_1_USER)),
    242       // 0x014f
    243    (_ATTR_)(CC_ObjectChangeAuth            *
    244       (IS_IMPLEMENTED+DECRYPT_2+HANDLE_1_ADMIN+ENCRYPT_2)),                      // 0x0150
    245    (_ATTR_)(CC_PolicySecret                *
    246       (IS_IMPLEMENTED+DECRYPT_2+HANDLE_1_USER+ENCRYPT_2)),                       // 0x0151
    247    (_ATTR_)(CC_Rewrap                     *
    248       (IS_IMPLEMENTED+DECRYPT_2+HANDLE_1_USER+ENCRYPT_2)),                      // 0x0152
    249    (_ATTR_)(CC_Create                     *
    250       (IS_IMPLEMENTED+DECRYPT_2+HANDLE_1_USER+ENCRYPT_2)),                      // 0x0153
    251    (_ATTR_)(CC_ECDH_ZGen                  *
    252       (IS_IMPLEMENTED+DECRYPT_2+HANDLE_1_USER+ENCRYPT_2)),                      // 0x0154
    253    (_ATTR_)(CC_HMAC                       *
    254       (IS_IMPLEMENTED+DECRYPT_2+HANDLE_1_USER+ENCRYPT_2)),                      // 0x0155
    255    (_ATTR_)(CC_Import                     *
    256       (IS_IMPLEMENTED+DECRYPT_2+HANDLE_1_USER+ENCRYPT_2)),                      // 0x0156
    257    (_ATTR_)(CC_Load                       *
    258       (IS_IMPLEMENTED+DECRYPT_2+HANDLE_1_USER+ENCRYPT_2+R_HANDLE)),             // 0x0157
    259    (_ATTR_)(CC_Quote                      *
    260       (IS_IMPLEMENTED+DECRYPT_2+HANDLE_1_USER+ENCRYPT_2)),                      // 0x0158
    261    (_ATTR_)(CC_RSA_Decrypt                *
    262       (IS_IMPLEMENTED+DECRYPT_2+HANDLE_1_USER+ENCRYPT_2)),                      // 0x0159
    263    (_ATTR_)                                 (NOT_IMPLEMENTED),
    264       // 0x015a - Not assigned
    265    (_ATTR_)(CC_HMAC_Start                 *
    266       (IS_IMPLEMENTED+DECRYPT_2+HANDLE_1_USER+R_HANDLE)),                       // 0x015b
    267    (_ATTR_)(CC_SequenceUpdate             *
    268       (IS_IMPLEMENTED+DECRYPT_2+HANDLE_1_USER)),                                // 0x015c
    269    (_ATTR_)(CC_Sign                       *
    270       (IS_IMPLEMENTED+DECRYPT_2+HANDLE_1_USER)),                                // 0x015d
    271    (_ATTR_)(CC_Unseal                     *
    272       (IS_IMPLEMENTED+HANDLE_1_USER+ENCRYPT_2)),                                // 0x015e
    273    (_ATTR_)                                 (NOT_IMPLEMENTED),
    274       // 0x015f - Not assigned
    275    (_ATTR_)(CC_PolicySigned               * (IS_IMPLEMENTED+DECRYPT_2+ENCRYPT_2)),
    276       // 0x0160
    277    (_ATTR_)(CC_ContextLoad                * (IS_IMPLEMENTED+NO_SESSIONS+R_HANDLE)),
    278       // 0x0161
    279    (_ATTR_)(CC_ContextSave                * (IS_IMPLEMENTED+NO_SESSIONS)),
    280       // 0x0162
    281    (_ATTR_)(CC_ECDH_KeyGen                * (IS_IMPLEMENTED+ENCRYPT_2)),
    282       // 0x0163
    283    (_ATTR_)(CC_EncryptDecrypt             *
    284       (IS_IMPLEMENTED+HANDLE_1_USER+ENCRYPT_2)),                                // 0x0164
    285    (_ATTR_)(CC_FlushContext               * (IS_IMPLEMENTED+NO_SESSIONS)),
    286       // 0x0165
    287    (_ATTR_)                                 (NOT_IMPLEMENTED),
    288       // 0x0166 - Not assigned
    289    (_ATTR_)(CC_LoadExternal               *
    290       (IS_IMPLEMENTED+DECRYPT_2+ENCRYPT_2+R_HANDLE)),                           // 0x0167
    291    (_ATTR_)(CC_MakeCredential             * (IS_IMPLEMENTED+DECRYPT_2+ENCRYPT_2)),
    292       // 0x0168
    293    (_ATTR_)(CC_NV_ReadPublic              * (IS_IMPLEMENTED+ENCRYPT_2)),
    294       // 0x0169
    295    (_ATTR_)(CC_PolicyAuthorize            * (IS_IMPLEMENTED+DECRYPT_2)),
    296       // 0x016a
    297    (_ATTR_)(CC_PolicyAuthValue            * (IS_IMPLEMENTED)),
    298       // 0x016b
    299    (_ATTR_)(CC_PolicyCommandCode          * (IS_IMPLEMENTED)),
    300       // 0x016c
    301    (_ATTR_)(CC_PolicyCounterTimer         * (IS_IMPLEMENTED+DECRYPT_2)),
    302       // 0x016d
    303    (_ATTR_)(CC_PolicyCpHash               * (IS_IMPLEMENTED+DECRYPT_2)),
    304       // 0x016e
    305    (_ATTR_)(CC_PolicyLocality             * (IS_IMPLEMENTED)),
    306       // 0x016f
    307    (_ATTR_)(CC_PolicyNameHash             * (IS_IMPLEMENTED+DECRYPT_2)),
    308       // 0x0170
    309    (_ATTR_)(CC_PolicyOR                   * (IS_IMPLEMENTED)),
    310       // 0x0171
    311    (_ATTR_)(CC_PolicyTicket               * (IS_IMPLEMENTED+DECRYPT_2)),
    312       // 0x0172
    313    (_ATTR_)(CC_ReadPublic                 * (IS_IMPLEMENTED+ENCRYPT_2)),
    314       // 0x0173
    315    (_ATTR_)(CC_RSA_Encrypt                * (IS_IMPLEMENTED+DECRYPT_2+ENCRYPT_2)),
    316       // 0x0174
    317    (_ATTR_)                                 (NOT_IMPLEMENTED),
    318       // 0x0175 - Not assigned
    319    (_ATTR_)(CC_StartAuthSession           *
    320       (IS_IMPLEMENTED+DECRYPT_2+ENCRYPT_2+R_HANDLE)),                           // 0x0176
    321    (_ATTR_)(CC_VerifySignature            * (IS_IMPLEMENTED+DECRYPT_2)),
    322       // 0x0177
    323    (_ATTR_)(CC_ECC_Parameters             * (IS_IMPLEMENTED)),
    324       // 0x0178
    325    (_ATTR_)(CC_FirmwareRead               * (IS_IMPLEMENTED+ENCRYPT_2)),
    326       // 0x0179
    327    (_ATTR_)(CC_GetCapability              * (IS_IMPLEMENTED)),
    328       // 0x017a
    329    (_ATTR_)(CC_GetRandom                  * (IS_IMPLEMENTED+ENCRYPT_2)),
    330       // 0x017b
    331    (_ATTR_)(CC_GetTestResult              * (IS_IMPLEMENTED+ENCRYPT_2)),
    332       // 0x017c
    333    (_ATTR_)(CC_Hash                       * (IS_IMPLEMENTED+DECRYPT_2+ENCRYPT_2)),
    334       // 0x017d
    335    (_ATTR_)(CC_PCR_Read                   * (IS_IMPLEMENTED)),
    336       // 0x017e
    337    (_ATTR_)(CC_PolicyPCR                  * (IS_IMPLEMENTED+DECRYPT_2)),
    338       // 0x017f
    339    (_ATTR_)(CC_PolicyRestart              * (IS_IMPLEMENTED)),
    340       // 0x0180
    341    (_ATTR_)(CC_ReadClock                  * (IS_IMPLEMENTED+NO_SESSIONS)),
    342       // 0x0181
    343    (_ATTR_)(CC_PCR_Extend                 * (IS_IMPLEMENTED+HANDLE_1_USER)),
    344       // 0x0182
    345    (_ATTR_)(CC_PCR_SetAuthValue           *
    346       (IS_IMPLEMENTED+DECRYPT_2+HANDLE_1_USER)),                                // 0x0183
    347    (_ATTR_)(CC_NV_Certify                 *
    348       (IS_IMPLEMENTED+DECRYPT_2+HANDLE_1_USER+HANDLE_2_USER+ENCRYPT_2)),        // 0x0184
    349    (_ATTR_)(CC_EventSequenceComplete      *
    350       (IS_IMPLEMENTED+DECRYPT_2+HANDLE_1_USER+HANDLE_2_USER)),                  // 0x0185
    351    (_ATTR_)(CC_HashSequenceStart          * (IS_IMPLEMENTED+DECRYPT_2+R_HANDLE)),
    352       // 0x0186
    353    (_ATTR_)(CC_PolicyPhysicalPresence     * (IS_IMPLEMENTED)),
    354       // 0x0187
    355    (_ATTR_)(CC_PolicyDuplicationSelect    * (IS_IMPLEMENTED+DECRYPT_2)),
    356       // 0x0188
    357    (_ATTR_)(CC_PolicyGetDigest            * (IS_IMPLEMENTED+ENCRYPT_2)),
    358       // 0x0189
    359    (_ATTR_)(CC_TestParms                  * (IS_IMPLEMENTED)),
    360       // 0x018a
    361    (_ATTR_)(CC_Commit                     *
    362       (IS_IMPLEMENTED+DECRYPT_2+HANDLE_1_USER+ENCRYPT_2)),                      // 0x018b
    363    (_ATTR_)(CC_PolicyPassword             * (IS_IMPLEMENTED)),
    364       // 0x018c
    365    (_ATTR_)(CC_ZGen_2Phase                *
    366       (IS_IMPLEMENTED+DECRYPT_2+HANDLE_1_USER+ENCRYPT_2)),                      // 0x018d
    367    (_ATTR_)(CC_EC_Ephemeral               * (IS_IMPLEMENTED+ENCRYPT_2)),
    368       // 0x018e
    369    (_ATTR_)(CC_PolicyNvWritten            * (IS_IMPLEMENTED))
    370       // 0x018f
    371 };
    372