TianoCore EDK2 master
Loading...
Searching...
No Matches
Kms.h
Go to the documentation of this file.
1
16#ifndef __KMS_H__
17#define __KMS_H__
18
19#define EFI_KMS_PROTOCOL_GUID \
20 { \
21 0xEC3A978D, 0x7C4E, 0x48FA, {0x9A, 0xBE, 0x6A, 0xD9, 0x1C, 0xC8, 0xF8, 0x11 } \
22 }
23
25
26//
27// Where appropriate, EFI_KMS_DATA_TYPE values may be combined using a bitwise 'OR'
28// operation to indicate support for multiple data types.
29//
30#define EFI_KMS_DATA_TYPE_NONE 0
31#define EFI_KMS_DATA_TYPE_BINARY 1
32#define EFI_KMS_DATA_TYPE_ASCII 2
33#define EFI_KMS_DATA_TYPE_UNICODE 4
34#define EFI_KMS_DATA_TYPE_UTF8 8
35
36//
37// The key formats recognized by the KMS protocol are defined by an EFI_GUID which specifies
38// a (key-algorithm, key-size) pair. The names of these GUIDs are in the format
39// EFI_KMS_KEY_(key-algorithm)_(key-size)_GUID, where the key-size is expressed in bits.
40// The key formats recognized fall into three categories, generic (no algorithm), hash algorithms,
41// and encrypted algorithms.
42//
43
48#define EFI_KMS_FORMAT_GENERIC_128_GUID \
49 { \
50 0xec8a3d69, 0x6ddf, 0x4108, {0x94, 0x76, 0x73, 0x37, 0xfc, 0x52, 0x21, 0x36 } \
51 }
52#define EFI_KMS_FORMAT_GENERIC_160_GUID \
53 { \
54 0xa3b3e6f8, 0xefca, 0x4bc1, {0x88, 0xfb, 0xcb, 0x87, 0x33, 0x9b, 0x25, 0x79 } \
55 }
56#define EFI_KMS_FORMAT_GENERIC_256_GUID \
57 { \
58 0x70f64793, 0xc323, 0x4261, {0xac, 0x2c, 0xd8, 0x76, 0xf2, 0x7c, 0x53, 0x45 } \
59 }
60#define EFI_KMS_FORMAT_GENERIC_512_GUID \
61 { \
62 0x978fe043, 0xd7af, 0x422e, {0x8a, 0x92, 0x2b, 0x48, 0xe4, 0x63, 0xbd, 0xe6 } \
63 }
64#define EFI_KMS_FORMAT_GENERIC_1024_GUID \
65 { \
66 0x43be0b44, 0x874b, 0x4ead, {0xb0, 0x9c, 0x24, 0x1a, 0x4f, 0xbd, 0x7e, 0xb3 } \
67 }
68#define EFI_KMS_FORMAT_GENERIC_2048_GUID \
69 { \
70 0x40093f23, 0x630c, 0x4626, {0x9c, 0x48, 0x40, 0x37, 0x3b, 0x19, 0xcb, 0xbe } \
71 }
72#define EFI_KMS_FORMAT_GENERIC_3072_GUID \
73 { \
74 0xb9237513, 0x6c44, 0x4411, {0xa9, 0x90, 0x21, 0xe5, 0x56, 0xe0, 0x5a, 0xde } \
75 }
76#define EFI_KMS_FORMAT_GENERIC_DYNAMIC_GUID \
77 { \
78 0x2156e996, 0x66de, 0x4b27, {0x9c, 0xc9, 0xb0, 0x9f, 0xac, 0x4d, 0x2, 0xbe } \
79 }
81
86#define EFI_KMS_FORMAT_MD2_128_GUID \
87 { \
88 0x78be11c4, 0xee44, 0x4a22, {0x9f, 0x05, 0x03, 0x85, 0x2e, 0xc5, 0xc9, 0x78 } \
89 }
90#define EFI_KMS_FORMAT_MDC2_128_GUID \
91 { \
92 0xf7ad60f8, 0xefa8, 0x44a3, {0x91, 0x13, 0x23, 0x1f, 0x39, 0x9e, 0xb4, 0xc7 } \
93 }
94#define EFI_KMS_FORMAT_MD4_128_GUID \
95 { \
96 0xd1c17aa1, 0xcac5, 0x400f, {0xbe, 0x17, 0xe2, 0xa2, 0xae, 0x06, 0x67, 0x7c } \
97 }
98#define EFI_KMS_FORMAT_MDC4_128_GUID \
99 { \
100 0x3fa4f847, 0xd8eb, 0x4df4, {0xbd, 0x49, 0x10, 0x3a, 0x0a, 0x84, 0x7b, 0xbc } \
101 }
102#define EFI_KMS_FORMAT_MD5_128_GUID \
103 { \
104 0xdcbc3662, 0x9cda, 0x4b52, {0xa0, 0x4c, 0x82, 0xeb, 0x1d, 0x23, 0x48, 0xc7 } \
105 }
106#define EFI_KMS_FORMAT_MD5SHA_128_GUID \
107 { \
108 0x1c178237, 0x6897, 0x459e, {0x9d, 0x36, 0x67, 0xce, 0x8e, 0xf9, 0x4f, 0x76 } \
109 }
110#define EFI_KMS_FORMAT_SHA1_160_GUID \
111 { \
112 0x453c5e5a, 0x482d, 0x43f0, {0x87, 0xc9, 0x59, 0x41, 0xf3, 0xa3, 0x8a, 0xc2 } \
113 }
114#define EFI_KMS_FORMAT_SHA256_256_GUID \
115 { \
116 0x6bb4f5cd, 0x8022, 0x448d, {0xbc, 0x6d, 0x77, 0x1b, 0xae, 0x93, 0x5f, 0xc6 } \
117 }
118#define EFI_KMS_FORMAT_SHA512_512_GUID \
119 { \
120 0x2f240e12, 0xe14d, 0x475c, {0x83, 0xb0, 0xef, 0xff, 0x22, 0xd7, 0x7b, 0xe7 } \
121 }
123
128#define EFI_KMS_FORMAT_AESXTS_128_GUID \
129 { \
130 0x4776e33f, 0xdb47, 0x479a, {0xa2, 0x5f, 0xa1, 0xcd, 0x0a, 0xfa, 0xb3, 0x8b } \
131 }
132#define EFI_KMS_FORMAT_AESXTS_256_GUID \
133 { \
134 0xdc7e8613, 0xc4bb, 0x4db0, {0x84, 0x62, 0x13, 0x51, 0x13, 0x57, 0xab, 0xe2 } \
135 }
136#define EFI_KMS_FORMAT_AESCBC_128_GUID \
137 { \
138 0xa0e8ee6a, 0x0e92, 0x44d4, {0x86, 0x1b, 0x0e, 0xaa, 0x4a, 0xca, 0x44, 0xa2 } \
139 }
140#define EFI_KMS_FORMAT_AESCBC_256_GUID \
141 { \
142 0xd7e69789, 0x1f68, 0x45e8, {0x96, 0xef, 0x3b, 0x64, 0x07, 0xa5, 0xb2, 0xdc } \
143 }
144#define EFI_KMS_FORMAT_RSASHA1_1024_GUID \
145 { \
146 0x56417bed, 0x6bbe, 0x4882, {0x86, 0xa0, 0x3a, 0xe8, 0xbb, 0x17, 0xf8, 0xf9 } \
147 }
148#define EFI_KMS_FORMAT_RSASHA1_2048_GUID \
149 { \
150 0xf66447d4, 0x75a6, 0x463e, {0xa8, 0x19, 0x07, 0x7f, 0x2d, 0xda, 0x05, 0xe9 } \
151 }
152#define EFI_KMS_FORMAT_RSASHA256_2048_GUID \
153 { \
154 0xa477af13, 0x877d, 0x4060, {0xba, 0xa1, 0x25, 0xd1, 0xbe, 0xa0, 0x8a, 0xd3 } \
155 }
156#define EFI_KMS_FORMAT_RSASHA256_3072_GUID \
157 { \
158 0x4e1356c2, 0xeed, 0x463f, {0x81, 0x47, 0x99, 0x33, 0xab, 0xdb, 0xc7, 0xd5 } \
159 }
161
162#define EFI_KMS_ATTRIBUTE_TYPE_NONE 0x00
163#define EFI_KMS_ATTRIBUTE_TYPE_INTEGER 0x01
164#define EFI_KMS_ATTRIBUTE_TYPE_LONG_INTEGER 0x02
165#define EFI_KMS_ATTRIBUTE_TYPE_BIG_INTEGER 0x03
166#define EFI_KMS_ATTRIBUTE_TYPE_ENUMERATION 0x04
167#define EFI_KMS_ATTRIBUTE_TYPE_BOOLEAN 0x05
168#define EFI_KMS_ATTRIBUTE_TYPE_BYTE_STRING 0x06
169#define EFI_KMS_ATTRIBUTE_TYPE_TEXT_STRING 0x07
170#define EFI_KMS_ATTRIBUTE_TYPE_DATE_TIME 0x08
171#define EFI_KMS_ATTRIBUTE_TYPE_INTERVAL 0x09
172#define EFI_KMS_ATTRIBUTE_TYPE_STRUCTURE 0x0A
173#define EFI_KMS_ATTRIBUTE_TYPE_DYNAMIC 0x0B
174
175typedef struct {
179 UINT32 KeySize;
183 UINT8 KeyData[1];
185
186typedef struct {
194 VOID *ClientId;
213
214typedef struct {
231 VOID *KeyValue;
251
252typedef struct {
257 UINT16 Tag;
262 UINT16 Type;
266 UINT32 Length;
270 UINT8 KeyAttributeData[1];
272
273typedef struct {
283
284typedef struct {
344
358typedef
361 IN EFI_KMS_PROTOCOL *This
362 );
363
407typedef
410 IN EFI_KMS_PROTOCOL *This,
411 IN EFI_KMS_CLIENT_INFO *Client,
412 IN OUT UINTN *ClientDataSize OPTIONAL,
413 IN OUT VOID **ClientData OPTIONAL
414 );
415
501typedef
503(EFIAPI *EFI_KMS_CREATE_KEY)(
504 IN EFI_KMS_PROTOCOL *This,
505 IN EFI_KMS_CLIENT_INFO *Client,
506 IN OUT UINT16 *KeyDescriptorCount,
507 IN OUT EFI_KMS_KEY_DESCRIPTOR *KeyDescriptors,
508 IN OUT UINTN *ClientDataSize OPTIONAL,
509 IN OUT VOID **ClientData OPTIONAL
510 );
511
589typedef
591(EFIAPI *EFI_KMS_GET_KEY)(
592 IN EFI_KMS_PROTOCOL *This,
593 IN EFI_KMS_CLIENT_INFO *Client,
594 IN OUT UINT16 *KeyDescriptorCount,
595 IN OUT EFI_KMS_KEY_DESCRIPTOR *KeyDescriptors,
596 IN OUT UINTN *ClientDataSize OPTIONAL,
597 IN OUT VOID **ClientData OPTIONAL
598 );
599
675typedef
677(EFIAPI *EFI_KMS_ADD_KEY)(
678 IN EFI_KMS_PROTOCOL *This,
679 IN EFI_KMS_CLIENT_INFO *Client,
680 IN OUT UINT16 *KeyDescriptorCount,
681 IN OUT EFI_KMS_KEY_DESCRIPTOR *KeyDescriptors,
682 IN OUT UINTN *ClientDataSize OPTIONAL,
683 IN OUT VOID **ClientData OPTIONAL
684 );
685
754typedef
756(EFIAPI *EFI_KMS_DELETE_KEY)(
757 IN EFI_KMS_PROTOCOL *This,
758 IN EFI_KMS_CLIENT_INFO *Client,
759 IN OUT UINT16 *KeyDescriptorCount,
760 IN OUT EFI_KMS_KEY_DESCRIPTOR *KeyDescriptors,
761 IN OUT UINTN *ClientDataSize OPTIONAL,
762 IN OUT VOID **ClientData OPTIONAL
763 );
764
841typedef
844 IN EFI_KMS_PROTOCOL *This,
845 IN EFI_KMS_CLIENT_INFO *Client,
846 IN UINT8 *KeyIdentifierSize,
847 IN CONST VOID *KeyIdentifier,
848 IN OUT UINT16 *KeyAttributesCount,
849 IN OUT EFI_KMS_KEY_ATTRIBUTE *KeyAttributes,
850 IN OUT UINTN *ClientDataSize OPTIONAL,
851 IN OUT VOID **ClientData OPTIONAL
852 );
853
931typedef
934 IN EFI_KMS_PROTOCOL *This,
935 IN EFI_KMS_CLIENT_INFO *Client,
936 IN UINT8 *KeyIdentifierSize,
937 IN CONST VOID *KeyIdentifier,
938 IN OUT UINT16 *KeyAttributesCount,
939 IN OUT EFI_KMS_KEY_ATTRIBUTE *KeyAttributes,
940 IN OUT UINTN *ClientDataSize OPTIONAL,
941 IN OUT VOID **ClientData OPTIONAL
942 );
943
1014typedef
1017 IN EFI_KMS_PROTOCOL *This,
1018 IN EFI_KMS_CLIENT_INFO *Client,
1019 IN UINT8 *KeyIdentifierSize,
1020 IN CONST VOID *KeyIdentifier,
1021 IN OUT UINT16 *KeyAttributesCount,
1022 IN OUT EFI_KMS_KEY_ATTRIBUTE *KeyAttributes,
1023 IN OUT UINTN *ClientDataSize OPTIONAL,
1024 IN OUT VOID **ClientData OPTIONAL
1025 );
1026
1117typedef
1120 IN EFI_KMS_PROTOCOL *This,
1121 IN EFI_KMS_CLIENT_INFO *Client,
1122 IN OUT UINTN *KeyAttributeCount,
1123 IN OUT EFI_KMS_KEY_ATTRIBUTE *KeyAttributes,
1124 IN OUT UINTN *KeyDescriptorCount,
1125 IN OUT EFI_KMS_KEY_DESCRIPTOR *KeyDescriptors,
1126 IN OUT UINTN *ClientDataSize OPTIONAL,
1127 IN OUT VOID **ClientData OPTIONAL
1128 );
1129
1288 UINT16 KeyAttributeIdMaxCount;
1308};
1309
1310extern EFI_GUID gEfiKmsFormatGeneric128Guid;
1311extern EFI_GUID gEfiKmsFormatGeneric160Guid;
1312extern EFI_GUID gEfiKmsFormatGeneric256Guid;
1313extern EFI_GUID gEfiKmsFormatGeneric512Guid;
1314extern EFI_GUID gEfiKmsFormatGeneric1024Guid;
1315extern EFI_GUID gEfiKmsFormatGeneric2048Guid;
1316extern EFI_GUID gEfiKmsFormatGeneric3072Guid;
1317extern EFI_GUID gEfiKmsFormatMd2128Guid;
1318extern EFI_GUID gEfiKmsFormatMdc2128Guid;
1319extern EFI_GUID gEfiKmsFormatMd4128Guid;
1320extern EFI_GUID gEfiKmsFormatMdc4128Guid;
1321extern EFI_GUID gEfiKmsFormatMd5128Guid;
1322extern EFI_GUID gEfiKmsFormatMd5sha128Guid;
1323extern EFI_GUID gEfiKmsFormatSha1160Guid;
1324extern EFI_GUID gEfiKmsFormatSha256256Guid;
1325extern EFI_GUID gEfiKmsFormatSha512512Guid;
1326extern EFI_GUID gEfiKmsFormatAesxts128Guid;
1327extern EFI_GUID gEfiKmsFormatAesxts256Guid;
1328extern EFI_GUID gEfiKmsFormatAescbc128Guid;
1329extern EFI_GUID gEfiKmsFormatAescbc256Guid;
1330extern EFI_GUID gEfiKmsFormatRsasha11024Guid;
1331extern EFI_GUID gEfiKmsFormatRsasha12048Guid;
1332extern EFI_GUID gEfiKmsFormatRsasha2562048Guid;
1333extern EFI_GUID gEfiKmsFormatRsasha2563072Guid;
1334extern EFI_GUID gEfiKmsProtocolGuid;
1335
1336#endif
UINT64 UINTN
#define CONST
Definition: Base.h:259
#define OPTIONAL
Definition: Base.h:290
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
EFI_STATUS(EFIAPI * EFI_KMS_GET_KEY)(IN EFI_KMS_PROTOCOL *This, IN EFI_KMS_CLIENT_INFO *Client, IN OUT UINT16 *KeyDescriptorCount, IN OUT EFI_KMS_KEY_DESCRIPTOR *KeyDescriptors, IN OUT UINTN *ClientDataSize OPTIONAL, IN OUT VOID **ClientData OPTIONAL)
Definition: Kms.h:591
EFI_STATUS(EFIAPI * EFI_KMS_CREATE_KEY)(IN EFI_KMS_PROTOCOL *This, IN EFI_KMS_CLIENT_INFO *Client, IN OUT UINT16 *KeyDescriptorCount, IN OUT EFI_KMS_KEY_DESCRIPTOR *KeyDescriptors, IN OUT UINTN *ClientDataSize OPTIONAL, IN OUT VOID **ClientData OPTIONAL)
Definition: Kms.h:503
EFI_STATUS(EFIAPI * EFI_KMS_DELETE_KEY_ATTRIBUTES)(IN EFI_KMS_PROTOCOL *This, IN EFI_KMS_CLIENT_INFO *Client, IN UINT8 *KeyIdentifierSize, IN CONST VOID *KeyIdentifier, IN OUT UINT16 *KeyAttributesCount, IN OUT EFI_KMS_KEY_ATTRIBUTE *KeyAttributes, IN OUT UINTN *ClientDataSize OPTIONAL, IN OUT VOID **ClientData OPTIONAL)
Definition: Kms.h:1016
EFI_STATUS(EFIAPI * EFI_KMS_GET_KEY_ATTRIBUTES)(IN EFI_KMS_PROTOCOL *This, IN EFI_KMS_CLIENT_INFO *Client, IN UINT8 *KeyIdentifierSize, IN CONST VOID *KeyIdentifier, IN OUT UINT16 *KeyAttributesCount, IN OUT EFI_KMS_KEY_ATTRIBUTE *KeyAttributes, IN OUT UINTN *ClientDataSize OPTIONAL, IN OUT VOID **ClientData OPTIONAL)
Definition: Kms.h:843
EFI_STATUS(EFIAPI * EFI_KMS_GET_KEY_BY_ATTRIBUTES)(IN EFI_KMS_PROTOCOL *This, IN EFI_KMS_CLIENT_INFO *Client, IN OUT UINTN *KeyAttributeCount, IN OUT EFI_KMS_KEY_ATTRIBUTE *KeyAttributes, IN OUT UINTN *KeyDescriptorCount, IN OUT EFI_KMS_KEY_DESCRIPTOR *KeyDescriptors, IN OUT UINTN *ClientDataSize OPTIONAL, IN OUT VOID **ClientData OPTIONAL)
Definition: Kms.h:1119
EFI_STATUS(EFIAPI * EFI_KMS_GET_SERVICE_STATUS)(IN EFI_KMS_PROTOCOL *This)
Definition: Kms.h:360
EFI_STATUS(EFIAPI * EFI_KMS_ADD_KEY_ATTRIBUTES)(IN EFI_KMS_PROTOCOL *This, IN EFI_KMS_CLIENT_INFO *Client, IN UINT8 *KeyIdentifierSize, IN CONST VOID *KeyIdentifier, IN OUT UINT16 *KeyAttributesCount, IN OUT EFI_KMS_KEY_ATTRIBUTE *KeyAttributes, IN OUT UINTN *ClientDataSize OPTIONAL, IN OUT VOID **ClientData OPTIONAL)
Definition: Kms.h:933
EFI_STATUS(EFIAPI * EFI_KMS_DELETE_KEY)(IN EFI_KMS_PROTOCOL *This, IN EFI_KMS_CLIENT_INFO *Client, IN OUT UINT16 *KeyDescriptorCount, IN OUT EFI_KMS_KEY_DESCRIPTOR *KeyDescriptors, IN OUT UINTN *ClientDataSize OPTIONAL, IN OUT VOID **ClientData OPTIONAL)
Definition: Kms.h:756
EFI_STATUS(EFIAPI * EFI_KMS_REGISTER_CLIENT)(IN EFI_KMS_PROTOCOL *This, IN EFI_KMS_CLIENT_INFO *Client, IN OUT UINTN *ClientDataSize OPTIONAL, IN OUT VOID **ClientData OPTIONAL)
Definition: Kms.h:409
EFI_STATUS(EFIAPI * EFI_KMS_ADD_KEY)(IN EFI_KMS_PROTOCOL *This, IN EFI_KMS_CLIENT_INFO *Client, IN OUT UINT16 *KeyDescriptorCount, IN OUT EFI_KMS_KEY_DESCRIPTOR *KeyDescriptors, IN OUT UINTN *ClientDataSize OPTIONAL, IN OUT VOID **ClientData OPTIONAL)
Definition: Kms.h:677
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
UINT16 ClientIdMaxSize
Definition: Kms.h:1220
EFI_GUID ServiceId
Definition: Kms.h:1187
BOOLEAN KeyAttributesSupported
Definition: Kms.h:1280
UINT16 ClientNameMaxCount
Definition: Kms.h:1236
EFI_KMS_REGISTER_CLIENT RegisterClient
Definition: Kms.h:1144
EFI_KMS_ADD_KEY_ATTRIBUTES AddKeyAttributes
Definition: Kms.h:1169
UINT8 ClientNameStringTypes
Definition: Kms.h:1227
EFI_KMS_DELETE_KEY DeleteKey
Definition: Kms.h:1161
UINTN KeyAttributesCount
Definition: Kms.h:1294
BOOLEAN ClientDataSupported
Definition: Kms.h:1243
UINTN KeyIdMaxSize
Definition: Kms.h:1259
UINTN KeyFormatsCount
Definition: Kms.h:1263
UINT32 ServiceVersion
Definition: Kms.h:1197
EFI_KMS_GET_KEY GetKey
Definition: Kms.h:1152
EFI_KMS_DELETE_KEY_ATTRIBUTES DeleteKeyAttributes
Definition: Kms.h:1173
EFI_GUID * KeyFormats
Definition: Kms.h:1275
EFI_KMS_GET_KEY_BY_ATTRIBUTES GetKeyByAttributes
Definition: Kms.h:1177
UINT32 ProtocolVersion
Definition: Kms.h:1182
CHAR16 * ServiceName
Definition: Kms.h:1192
BOOLEAN ClientIdSupported
Definition: Kms.h:1211
BOOLEAN ClientIdRequired
Definition: Kms.h:1216
EFI_KMS_CREATE_KEY CreateKey
Definition: Kms.h:1148
EFI_KMS_ADD_KEY AddKey
Definition: Kms.h:1157
BOOLEAN KeyIdVariableLenSupported
Definition: Kms.h:1253
BOOLEAN ServiceAvailable
Definition: Kms.h:1206
BOOLEAN ClientNameRequired
Definition: Kms.h:1232
UINTN ClientDataMaxSize
Definition: Kms.h:1248
UINT8 KeyAttributeIdStringTypes
Definition: Kms.h:1287
EFI_KMS_KEY_ATTRIBUTE * KeyAttributes
Definition: Kms.h:1307
EFI_KMS_GET_SERVICE_STATUS GetServiceStatus
Definition: Kms.h:1140
EFI_KMS_GET_KEY_ATTRIBUTES GetKeyAttributes
Definition: Kms.h:1165
UINT8 ClientNameCount
Definition: Kms.h:206
VOID * ClientId
Definition: Kms.h:194
UINT8 ClientNameType
Definition: Kms.h:200
UINT16 ClientIdSize
Definition: Kms.h:190
VOID * ClientName
Definition: Kms.h:211
EFI_STATUS KeyAttributeStatus
Definition: Kms.h:342
UINT8 KeyAttributeIdentifierType
Definition: Kms.h:290
UINT16 KeyAttributeValueSize
Definition: Kms.h:319
UINT8 KeyAttributeIdentifierCount
Definition: Kms.h:295
VOID * KeyAttributeIdentifier
Definition: Kms.h:300
UINT16 KeyAttributeType
Definition: Kms.h:314
VOID * KeyAttributeValue
Definition: Kms.h:324
UINT16 KeyAttributeInstance
Definition: Kms.h:309
UINT8 KeyIdentifierSize
Definition: Kms.h:218
VOID * KeyIdentifier
Definition: Kms.h:222
EFI_STATUS KeyStatus
Definition: Kms.h:249
EFI_GUID KeyFormat
Definition: Kms.h:226
Definition: Base.h:213