+typedef struct {\r
+ //\r
+ // GUID of the algorithm.\r
+ //\r
+ EFI_GUID Algorithm;\r
+ //\r
+ // Specifies KeySizein bits used with this Algorithm.\r
+ //\r
+ UINT64 KeySize;\r
+ //\r
+ // Specifies bitmask of block sizes supported by this algorithm.\r
+ // Bit j being set means that 2^j bytes crypto block size is supported.\r
+ //\r
+ UINT64 CryptoBlockSizeBitMask;\r
+} EFI_BLOCK_IO_CRYPTO_CAPABILITY;\r
+\r
+///\r
+/// EFI_BLOCK_IO_CRYPTO_IV_INPUT structure is used as a common header in CryptoIvInput\r
+/// parameters passed to the ReadExtended and WriteExtended methods for Inline\r
+/// Cryptographic Interface.\r
+/// Its purpose is to pass size of the entire CryptoIvInputparameter memory buffer to\r
+/// the Inline Cryptographic Interface.\r
+///\r
+typedef struct {\r
+ UINT64 InputSize;\r
+} EFI_BLOCK_IO_CRYPTO_IV_INPUT;\r
+\r
+#define EFI_BLOCK_IO_CRYPTO_ALGO_GUID_AES_XTS \\r
+ { \\r
+ 0x2f87ba6a, 0x5c04, 0x4385, {0xa7, 0x80, 0xf3, 0xbf, 0x78, 0xa9, 0x7b, 0xec} \\r
+ }\r
+\r
+extern EFI_GUID gEfiBlockIoCryptoAlgoAesXtsGuid;\r
+\r
+typedef struct {\r
+ EFI_BLOCK_IO_CRYPTO_IV_INPUT Header;\r
+ UINT64 CryptoBlockNumber;\r
+ UINT64 CryptoBlockByteSize;\r
+} EFI_BLOCK_IO_CRYPTO_IV_INPUT_AES_XTS;\r
+\r
+#define EFI_BLOCK_IO_CRYPTO_ALGO_GUID_AES_CBC_MICROSOFT_BITLOCKER \\r
+ { \\r
+ 0x689e4c62, 0x70bf, 0x4cf3, {0x88, 0xbb, 0x33, 0xb3, 0x18, 0x26, 0x86, 0x70} \\r
+ }\r
+\r
+extern EFI_GUID gEfiBlockIoCryptoAlgoAesCbcMsBitlockerGuid;\r
+\r
+typedef struct {\r
+ EFI_BLOCK_IO_CRYPTO_IV_INPUT Header;\r
+ UINT64 CryptoBlockByteOffset;\r
+ UINT64 CryptoBlockByteSize;\r
+} EFI_BLOCK_IO_CRYPTO_IV_INPUT_AES_CBC_MICROSOFT_BITLOCKER;\r
+\r
+#define EFI_BLOCK_IO_CRYPTO_INDEX_ANY 0xFFFFFFFFFFFFFFFF\r
+\r
+typedef struct {\r
+ //\r
+ // Is inline cryptographic capability supported on this device.\r
+ //\r
+ BOOLEAN Supported;\r
+ //\r
+ // Maximum number of keys that can be configured at the same time.\r
+ //\r
+ UINT64 KeyCount;\r
+ //\r
+ // Number of supported capabilities.\r
+ //\r
+ UINT64 CapabilityCount;\r
+ //\r
+ // Array of supported capabilities.\r
+ //\r
+ EFI_BLOCK_IO_CRYPTO_CAPABILITY Capabilities[1];\r
+} EFI_BLOCK_IO_CRYPTO_CAPABILITIES;\r
+\r
+typedef struct {\r
+ //\r
+ // Configuration table index. A special Index EFI_BLOCK_IO_CRYPTO_INDEX_ANY can be\r
+ // used to set any available entry in the configuration table.\r
+ //\r
+ UINT64 Index;\r
+ //\r
+ // Identifies the owner of the configuration table entry. Entry can also be used\r
+ // with the Nil value to clear key from the configuration table index.\r
+ //\r
+ EFI_GUID KeyOwnerGuid;\r
+ //\r
+ // A supported capability to be used. The CryptoBlockSizeBitMask field of the\r
+ // structure should have only one bit set from the supported mask.\r
+ //\r
+ EFI_BLOCK_IO_CRYPTO_CAPABILITY Capability;\r
+ //\r
+ // Pointer to the key. The size of the key is defined by the KeySize field of\r
+ // the capability specified by the Capability parameter.\r
+ //\r
+ VOID *CryptoKey;\r
+} EFI_BLOCK_IO_CRYPTO_CONFIGURATION_TABLE_ENTRY;\r
+\r
+typedef struct {\r
+ //\r
+ // Configuration table index.\r
+ //\r
+ UINT64 Index;\r
+ //\r
+ // Identifies the current owner of the entry.\r
+ //\r
+ EFI_GUID KeyOwnerGuid;\r
+ //\r
+ // The capability to be used. The CryptoBlockSizeBitMask field of the structure\r
+ // has only one bit set from the supported mask.\r
+ //\r
+ EFI_BLOCK_IO_CRYPTO_CAPABILITY Capability;\r
+} EFI_BLOCK_IO_CRYPTO_RESPONSE_CONFIGURATION_ENTRY;\r