-// Internal to TPM:\r
-//typedef struct tdTPM_NV_DATA_SENSITIVE\r
-//{\r
-// TPM_STRUCTURE_TAG tag;\r
-// TPM_NV_DATA_PUBLIC pubInfo;\r
-// TPM_AUTHDATA authValue;\r
-// UINT8 *data;\r
-//} TPM_NV_DATA_SENSITIVE;\r
-\r
-\r
-//\r
-// Part 2, section 20: Delegation\r
-//\r
-\r
-//\r
-// Part 2, section 20.3: Owner Permissions Settings for per1 bits\r
-//\r
-#define TPM_DELEGATE_SetOrdinalAuditStatus (((UINT32)1)<<30)\r
-#define TPM_DELEGATE_DirWriteAuth (((UINT32)1)<<29)\r
-#define TPM_DELEGATE_CMK_ApproveMA (((UINT32)1)<<28)\r
-#define TPM_DELEGATE_CMK_CreateTicket (((UINT32)1)<<26)\r
-#define TPM_DELEGATE_Delegate_LoadOwnerDelegation (((UINT32)1)<<24)\r
-#define TPM_DELEGATE_DAA_Join (((UINT32)1)<<23)\r
-#define TPM_DELEGATE_AuthorizeMigrationKey (((UINT32)1)<<22)\r
-#define TPM_DELEGATE_CreateMaintenanceArchive (((UINT32)1)<<21)\r
-#define TPM_DELEGATE_LoadMaintenanceArchive (((UINT32)1)<<20)\r
-#define TPM_DELEGATE_KillMaintenanceFeature (((UINT32)1)<<19)\r
-#define TPM_DELEGATE_OwnerReadInteralPub (((UINT32)1)<<18)\r
-#define TPM_DELEGATE_ResetLockValue (((UINT32)1)<<17)\r
-#define TPM_DELEGATE_OwnerClear (((UINT32)1)<<16)\r
-#define TPM_DELEGATE_DisableOwnerClear (((UINT32)1)<<15)\r
-#define TPM_DELEGATE_OwnerSetDisable (((UINT32)1)<<13)\r
-#define TPM_DELEGATE_SetCapability (((UINT32)1)<<12)\r
-#define TPM_DELEGATE_MakeIdentity (((UINT32)1)<<11)\r
-#define TPM_DELEGATE_ActivateIdentity (((UINT32)1)<<10)\r
-#define TPM_DELEGATE_OwnerReadPubek (((UINT32)1)<<9)\r
-#define TPM_DELEGATE_DisablePubekRead (((UINT32)1)<<8)\r
-#define TPM_DELEGATE_SetRedirection (((UINT32)1)<<7)\r
-#define TPM_DELEGATE_FieldUpgrade (((UINT32)1)<<6)\r
-#define TPM_DELEGATE_Delegate_UpdateVerification (((UINT32)1)<<5)\r
-#define TPM_DELEGATE_CreateCounter (((UINT32)1)<<4)\r
-#define TPM_DELEGATE_ReleaseCounterOwner (((UINT32)1)<<3)\r
-#define TPM_DELEGATE_DelegateManage (((UINT32)1)<<2)\r
-#define TPM_DELEGATE_Delegate_CreateOwnerDelegation (((UINT32)1)<<1)\r
-#define TPM_DELEGATE_DAA_Sign (((UINT32)1)<<0)\r
-\r
-//\r
-// Part 2, section 20.3: Key Permissions Settings for per1 bits\r
-//\r
-#define TPM_KEY_DELEGATE_CMK_ConvertMigration (((UINT32)1)<<28)\r
-#define TPM_KEY_DELEGATE_TickStampBlob (((UINT32)1)<<27)\r
-#define TPM_KEY_DELEGATE_ChangeAuthAsymStart (((UINT32)1)<<26)\r
-#define TPM_KEY_DELEGATE_ChangeAuthAsymFinish (((UINT32)1)<<25)\r
-#define TPM_KEY_DELEGATE_CMK_CreateKey (((UINT32)1)<<24)\r
-#define TPM_KEY_DELEGATE_MigrateKey (((UINT32)1)<<23)\r
-#define TPM_KEY_DELEGATE_LoadKey2 (((UINT32)1)<<22)\r
-#define TPM_KEY_DELEGATE_EstablishTransport (((UINT32)1)<<21)\r
-#define TPM_KEY_DELEGATE_ReleaseTransportSigned (((UINT32)1)<<20)\r
-#define TPM_KEY_DELEGATE_Quote2 (((UINT32)1)<<19)\r
-#define TPM_KEY_DELEGATE_Sealx (((UINT32)1)<<18)\r
-#define TPM_KEY_DELEGATE_MakeIdentity (((UINT32)1)<<17)\r
-#define TPM_KEY_DELEGATE_ActivateIdentity (((UINT32)1)<<16)\r
-#define TPM_KEY_DELEGATE_GetAuditDigestSigned (((UINT32)1)<<15)\r
-#define TPM_KEY_DELEGATE_Sign (((UINT32)1)<<14)\r
-#define TPM_KEY_DELEGATE_CertifyKey2 (((UINT32)1)<<13)\r
-#define TPM_KEY_DELEGATE_CertifyKey (((UINT32)1)<<12)\r
-#define TPM_KEY_DELEGATE_CreateWrapKey (((UINT32)1)<<11)\r
-#define TPM_KEY_DELEGATE_CMK_CreateBlob (((UINT32)1)<<10)\r
-#define TPM_KEY_DELEGATE_CreateMigrationBlob (((UINT32)1)<<9)\r
-#define TPM_KEY_DELEGATE_ConvertMigrationBlob (((UINT32)1)<<8)\r
-#define TPM_KEY_DELEGATE_CreateKeyDelegation (((UINT32)1)<<7)\r
-#define TPM_KEY_DELEGATE_ChangeAuth (((UINT32)1)<<6)\r
-#define TPM_KEY_DELEGATE_GetPubKey (((UINT32)1)<<5)\r
-#define TPM_KEY_DELEGATE_UnBind (((UINT32)1)<<4)\r
-#define TPM_KEY_DELEGATE_Quote (((UINT32)1)<<3)\r
-#define TPM_KEY_DELEGATE_Unseal (((UINT32)1)<<2)\r
-#define TPM_KEY_DELEGATE_Seal (((UINT32)1)<<1)\r
-#define TPM_KEY_DELEGATE_LoadKey (((UINT32)1)<<0)\r