TianoCore EDK2 master
Loading...
Searching...
No Matches
PcdCryptoServiceFamilyEnable.h
Go to the documentation of this file.
1
31#ifndef __PCD_CRYPTO_SERVICE_FAMILY_ENABLE_H__
32#define __PCD_CRYPTO_SERVICE_FAMILY_ENABLE_H__
33
37#define PCD_CRYPTO_SERVICE_ENABLE_FAMILY 0xFFFFFFFF
38
46typedef struct {
47 union {
48 struct {
49 UINT8 New : 1; // Deprecated
50 UINT8 Free : 1; // Deprecated
51 UINT8 SetKey : 1; // Deprecated
52 UINT8 Duplicate : 1; // Deprecated
53 UINT8 Update : 1; // Deprecated
54 UINT8 Final : 1; // Deprecated
55 } Services;
56 UINT32 Family; // Deprecated
57 } HmacMd5;
58 union {
59 struct {
60 UINT8 New : 1; // Deprecated
61 UINT8 Free : 1; // Deprecated
62 UINT8 SetKey : 1; // Deprecated
63 UINT8 Duplicate : 1; // Deprecated
64 UINT8 Update : 1; // Deprecated
65 UINT8 Final : 1; // Deprecated
66 } Services;
67 UINT32 Family; // Deprecated
68 } HmacSha1;
69 union {
70 struct {
71 UINT8 New : 1;
72 UINT8 Free : 1;
73 UINT8 SetKey : 1;
74 UINT8 Duplicate : 1;
75 UINT8 Update : 1;
76 UINT8 Final : 1;
77 UINT8 All : 1;
78 } Services;
79 UINT32 Family;
80 } HmacSha256;
81 union {
82 struct {
83 UINT8 New : 1;
84 UINT8 Free : 1;
85 UINT8 SetKey : 1;
86 UINT8 Duplicate : 1;
87 UINT8 Update : 1;
88 UINT8 Final : 1;
89 UINT8 All : 1;
90 } Services;
91 UINT32 Family;
92 } HmacSha384;
93 union {
94 struct {
95 UINT8 GetContextSize : 1; // Deprecated
96 UINT8 Init : 1; // Deprecated
97 UINT8 Duplicate : 1; // Deprecated
98 UINT8 Update : 1; // Deprecated
99 UINT8 Final : 1; // Deprecated
100 UINT8 HashAll : 1; // Deprecated
101 } Services;
102 UINT32 Family; // Deprecated
103 } Md4;
104 union {
105 struct {
106 UINT8 GetContextSize : 1; // Deprecated
107 UINT8 Init : 1; // Deprecated
108 UINT8 Duplicate : 1; // Deprecated
109 UINT8 Update : 1; // Deprecated
110 UINT8 Final : 1; // Deprecated
111 UINT8 HashAll : 1; // Deprecated
112 } Services;
113 UINT32 Family;
114 } Md5; // Deprecated
115 union {
116 struct {
117 UINT8 Pkcs1v2Encrypt : 1;
118 UINT8 Pkcs5HashPassword : 1;
119 UINT8 Pkcs7Verify : 1;
121 UINT8 Pkcs7GetSigners : 1;
122 UINT8 Pkcs7FreeSigners : 1;
123 UINT8 Pkcs7Sign : 1;
124 UINT8 Pkcs7GetAttachedContent : 1;
125 UINT8 Pkcs7GetCertificatesList : 1;
126 UINT8 AuthenticodeVerify : 1;
127 UINT8 ImageTimestampVerify : 1;
128 UINT8 Pkcs1v2Decrypt : 1;
129 } Services;
130 UINT32 Family;
131 } Pkcs;
132 union {
133 struct {
134 UINT8 New : 1;
135 UINT8 Free : 1;
136 UINT8 GenerateParameter : 1;
137 UINT8 SetParameter : 1;
138 UINT8 GenerateKey : 1;
139 UINT8 ComputeKey : 1;
140 } Services;
141 UINT32 Family;
142 } Dh;
143 union {
144 struct {
145 UINT8 Seed : 1;
146 UINT8 Bytes : 1;
147 } Services;
148 UINT32 Family;
149 } Random;
150 union {
151 struct {
152 UINT8 VerifyPkcs1 : 1;
153 UINT8 New : 1;
154 UINT8 Free : 1;
155 UINT8 SetKey : 1;
156 UINT8 GetKey : 1;
157 UINT8 GenerateKey : 1;
158 UINT8 CheckKey : 1;
159 UINT8 Pkcs1Sign : 1;
160 UINT8 Pkcs1Verify : 1;
161 UINT8 GetPrivateKeyFromPem : 1;
162 UINT8 GetPublicKeyFromX509 : 1;
163 UINT8 RsaOaepEncrypt : 1;
164 UINT8 RsaOaepDecrypt : 1;
165 } Services;
166 UINT32 Family;
167 } Rsa;
168 union {
169 struct {
170 UINT8 GetContextSize : 1; // Recommend disable
171 UINT8 Init : 1; // Recommend disable
172 UINT8 Duplicate : 1; // Recommend disable
173 UINT8 Update : 1; // Recommend disable
174 UINT8 Final : 1; // Recommend disable
175 UINT8 HashAll : 1; // Recommend disable
176 } Services;
177 UINT32 Family; // Recommend disable
178 } Sha1;
179 union {
180 struct {
181 UINT8 GetContextSize : 1;
182 UINT8 Init : 1;
183 UINT8 Duplicate : 1;
184 UINT8 Update : 1;
185 UINT8 Final : 1;
186 UINT8 HashAll : 1;
187 } Services;
188 UINT32 Family;
189 } Sha256;
190 union {
191 struct {
192 UINT8 GetContextSize : 1;
193 UINT8 Init : 1;
194 UINT8 Duplicate : 1;
195 UINT8 Update : 1;
196 UINT8 Final : 1;
197 UINT8 HashAll : 1;
198 } Services;
199 UINT32 Family;
200 } Sha384;
201 union {
202 struct {
203 UINT8 GetContextSize : 1;
204 UINT8 Init : 1;
205 UINT8 Duplicate : 1;
206 UINT8 Update : 1;
207 UINT8 Final : 1;
208 UINT8 HashAll : 1;
209 } Services;
210 UINT32 Family;
211 } Sha512;
212 union {
213 struct {
214 UINT8 GetSubjectName : 1;
215 UINT8 GetCommonName : 1;
216 UINT8 GetOrganizationName : 1;
217 UINT8 VerifyCert : 1;
218 UINT8 ConstructCertificate : 1;
219 UINT8 ConstructCertificateStack : 1;
220 UINT8 ConstructCertificateStackV : 1;
221 UINT8 Free : 1;
222 UINT8 StackFree : 1;
223 UINT8 GetTBSCert : 1;
224 UINT8 GetVersion : 1;
225 UINT8 GetSerialNumber : 1;
226 UINT8 GetIssuerName : 1;
227 UINT8 GetSignatureAlgorithm : 1;
228 UINT8 GetExtensionData : 1;
229 UINT8 GetExtendedKeyUsage : 1;
230 UINT8 GetValidity : 1;
231 UINT8 FormatDateTime : 1;
232 UINT8 CompareDateTime : 1;
233 UINT8 GetKeyUsage : 1;
234 UINT8 VerifyCertChain : 1;
235 UINT8 GetCertFromCertChain : 1;
236 UINT8 Asn1GetTag : 1;
237 UINT8 GetExtendedBasicConstraints : 1;
238 } Services;
239 UINT32 Family;
240 } X509;
241 union {
242 struct {
243 UINT8 GetContextSize : 1; // Deprecated
244 UINT8 Init : 1; // Deprecated
245 UINT8 EcbEncrypt : 1; // Deprecated
246 UINT8 EcbDecrypt : 1; // Deprecated
247 UINT8 CbcEncrypt : 1; // Deprecated
248 UINT8 CbcDecrypt : 1; // Deprecated
249 } Services;
250 UINT32 Family; // Deprecated
251 } Tdes;
252 union {
253 struct {
254 UINT8 GetContextSize : 1;
255 UINT8 Init : 1;
256 UINT8 EcbEncrypt : 1; // Deprecated
257 UINT8 EcbDecrypt : 1; // Deprecated
258 UINT8 CbcEncrypt : 1;
259 UINT8 CbcDecrypt : 1;
260 } Services;
261 UINT32 Family;
262 } Aes;
263 union {
264 struct {
265 UINT8 GetContextSize : 1; // Deprecated
266 UINT8 Init : 1; // Deprecated
267 UINT8 Encrypt : 1; // Deprecated
268 UINT8 Decrypt : 1; // Deprecated
269 UINT8 Reset : 1; // Deprecated
270 } Services;
271 UINT32 Family; // Deprecated
272 } Arc4;
273 union {
274 struct {
275 UINT8 GetContextSize : 1;
276 UINT8 Init : 1;
277 UINT8 Duplicate : 1;
278 UINT8 Update : 1;
279 UINT8 Final : 1;
280 UINT8 HashAll : 1;
281 } Services;
282 UINT32 Family;
283 } Sm3;
284 union {
285 struct {
286 UINT8 Sha256ExtractAndExpand : 1;
287 UINT8 Sha256Extract : 1;
288 UINT8 Sha256Expand : 1;
289 UINT8 Sha384ExtractAndExpand : 1;
290 UINT8 Sha384Extract : 1;
291 UINT8 Sha384Expand : 1;
292 } Services;
293 UINT32 Family;
294 } Hkdf;
295 union {
296 struct {
297 UINT8 Initialize : 1;
298 UINT8 CtxFree : 1;
299 UINT8 CtxNew : 1;
300 UINT8 Free : 1;
301 UINT8 New : 1;
302 UINT8 InHandshake : 1;
303 UINT8 DoHandshake : 1;
304 UINT8 HandleAlert : 1;
305 UINT8 CloseNotify : 1;
306 UINT8 CtrlTrafficOut : 1;
307 UINT8 CtrlTrafficIn : 1;
308 UINT8 Read : 1;
309 UINT8 Write : 1;
310 UINT8 Shutdown : 1;
311 } Services;
312 UINT32 Family;
313 } Tls;
314 union {
315 struct {
316 UINT8 Version : 1;
317 UINT8 ConnectionEnd : 1;
318 UINT8 CipherList : 1;
319 UINT8 CompressionMethod : 1;
320 UINT8 Verify : 1;
321 UINT8 VerifyHost : 1;
322 UINT8 SessionId : 1;
323 UINT8 CaCertificate : 1;
324 UINT8 HostPublicCert : 1;
325 UINT8 HostPrivateKey : 1;
326 UINT8 CertRevocationList : 1;
327 UINT8 HostPrivateKeyEx : 1;
328 UINT8 SignatureAlgoList : 1;
329 UINT8 EcCurve : 1;
330 } Services;
331 UINT32 Family;
332 } TlsSet;
333 union {
334 struct {
335 UINT8 Version : 1;
336 UINT8 ConnectionEnd : 1;
337 UINT8 CurrentCipher : 1;
338 UINT8 CurrentCompressionId : 1;
339 UINT8 Verify : 1;
340 UINT8 SessionId : 1;
341 UINT8 ClientRandom : 1;
342 UINT8 ServerRandom : 1;
343 UINT8 KeyMaterial : 1;
344 UINT8 CaCertificate : 1;
345 UINT8 HostPublicCert : 1;
346 UINT8 HostPrivateKey : 1;
347 UINT8 CertRevocationList : 1;
348 UINT8 ExportKey : 1;
349 } Services;
350 UINT32 Family;
351 } TlsGet;
352 union {
353 struct {
354 UINT8 Sign : 1;
355 UINT8 Verify : 1;
356 } Services;
357 UINT32 Family;
358 } RsaPss;
359 union {
360 struct {
361 UINT8 HashAll : 1;
362 } Services;
363 UINT32 Family;
364 } ParallelHash;
365 union {
366 struct {
367 UINT8 Encrypt : 1;
368 UINT8 Decrypt : 1;
369 } Services;
370 UINT32 Family;
371 } AeadAesGcm;
372 union {
373 struct {
374 UINT8 Init : 1;
375 UINT8 FromBin : 1;
376 UINT8 ToBin : 1;
377 UINT8 Free : 1;
378 UINT8 Add : 1;
379 UINT8 Sub : 1;
380 UINT8 Mod : 1;
381 UINT8 ExpMod : 1;
382 UINT8 InverseMod : 1;
383 UINT8 Div : 1;
384 UINT8 MulMod : 1;
385 UINT8 Cmp : 1;
386 UINT8 Bits : 1;
387 UINT8 Bytes : 1;
388 UINT8 IsWord : 1;
389 UINT8 IsOdd : 1;
390 UINT8 Copy : 1;
391 UINT8 ValueOne : 1;
392 UINT8 RShift : 1;
393 UINT8 ConstTime : 1;
394 UINT8 SqrMod : 1;
395 UINT8 NewContext : 1;
396 UINT8 ContextFree : 1;
397 UINT8 SetUint : 1;
398 UINT8 AddMod : 1;
399 } Services;
400 UINT32 Family;
401 } Bn;
402 union {
403 struct {
404 UINT8 GroupInit : 1;
405 UINT8 GroupGetCurve : 1;
406 UINT8 GroupGetOrder : 1;
407 UINT8 GroupFree : 1;
408 UINT8 PointInit : 1;
409 UINT8 PointDeInit : 1;
410 UINT8 PointGetAffineCoordinates : 1;
411 UINT8 PointSetAffineCoordinates : 1;
412 UINT8 PointAdd : 1;
413 UINT8 PointMul : 1;
414 UINT8 PointInvert : 1;
415 UINT8 PointIsOnCurve : 1;
416 UINT8 PointIsAtInfinity : 1;
417 UINT8 PointEqual : 1;
418 UINT8 PointSetCompressedCoordinates : 1;
419 UINT8 NewByNid : 1;
420 UINT8 Free : 1;
421 UINT8 GenerateKey : 1;
422 UINT8 GetPubKey : 1;
423 UINT8 DhComputeKey : 1;
424 UINT8 GetPublicKeyFromX509 : 1;
425 UINT8 GetPrivateKeyFromPem : 1;
426 UINT8 DsaSign : 1;
427 UINT8 DsaVerify : 1;
428 } Services;
429 UINT32 Family;
430 } Ec;
432
433#endif
BOOLEAN EFIAPI Pkcs5HashPassword(IN UINTN PasswordLength, IN CONST CHAR8 *Password, IN UINTN SaltLength, IN CONST UINT8 *Salt, IN UINTN IterationCount, IN UINTN DigestSize, IN UINTN KeyLength, OUT UINT8 *OutKey)
BOOLEAN EFIAPI Pkcs7Sign(IN CONST UINT8 *PrivateKey, IN UINTN PrivateKeySize, IN CONST UINT8 *KeyPassword, IN UINT8 *InData, IN UINTN InDataSize, IN UINT8 *SignCert, IN UINT8 *OtherCerts OPTIONAL, OUT UINT8 **SignedData, OUT UINTN *SignedDataSize)
BOOLEAN EFIAPI Pkcs7GetSigners(IN CONST UINT8 *P7Data, IN UINTN P7Length, OUT UINT8 **CertStack, OUT UINTN *StackLength, OUT UINT8 **TrustedCert, OUT UINTN *CertLength)
BOOLEAN EFIAPI AuthenticodeVerify(IN CONST UINT8 *AuthData, IN UINTN DataSize, IN CONST UINT8 *TrustedCert, IN UINTN CertSize, IN CONST UINT8 *ImageHash, IN UINTN HashSize)
BOOLEAN EFIAPI Pkcs1v2Encrypt(IN CONST UINT8 *PublicKey, IN UINTN PublicKeySize, IN UINT8 *InData, IN UINTN InDataSize, IN CONST UINT8 *PrngSeed OPTIONAL, IN UINTN PrngSeedSize OPTIONAL, OUT UINT8 **EncryptedData, OUT UINTN *EncryptedDataSize)
BOOLEAN EFIAPI DhComputeKey(IN OUT VOID *DhContext, IN CONST UINT8 *PeerPublicKey, IN UINTN PeerPublicKeySize, OUT UINT8 *Key, IN OUT UINTN *KeySize)
Definition: CryptDh.c:265
BOOLEAN EFIAPI Asn1GetTag(IN OUT UINT8 **Ptr, IN CONST UINT8 *End, OUT UINTN *Length, IN UINT32 Tag)
Definition: CryptX509.c:1884
BOOLEAN EFIAPI RsaOaepEncrypt(IN VOID *RsaContext, IN UINT8 *InData, IN UINTN InDataSize, IN CONST UINT8 *PrngSeed OPTIONAL, IN UINTN PrngSeedSize OPTIONAL, IN UINT16 DigestLen OPTIONAL, OUT UINT8 **EncryptedData, OUT UINTN *EncryptedDataSize)
BOOLEAN EFIAPI RsaOaepDecrypt(IN VOID *RsaContext, IN UINT8 *EncryptedData, IN UINTN EncryptedDataSize, IN UINT16 DigestLen OPTIONAL, OUT UINT8 **OutData, OUT UINTN *OutDataSize)
BOOLEAN EFIAPI Pkcs7Verify(IN CONST UINT8 *P7Data, IN UINTN P7Length, IN CONST UINT8 *TrustedCert, IN UINTN CertLength, IN CONST UINT8 *InData, IN UINTN DataLength)
RETURN_STATUS EFIAPI VerifyEKUsInPkcs7Signature(IN CONST UINT8 *Pkcs7Signature, IN CONST UINT32 SignatureSize, IN CONST CHAR8 *RequiredEKUs[], IN CONST UINT32 RequiredEKUsSize, IN BOOLEAN RequireAllPresent)
VOID EFIAPI Pkcs7FreeSigners(IN UINT8 *Certs)
BOOLEAN EFIAPI Pkcs7GetAttachedContent(IN CONST UINT8 *P7Data, IN UINTN P7Length, OUT VOID **Content, OUT UINTN *ContentSize)
BOOLEAN EFIAPI ImageTimestampVerify(IN CONST UINT8 *AuthData, IN UINTN DataSize, IN CONST UINT8 *TsaCert, IN UINTN CertSize, OUT EFI_TIME *SigningTime)
Definition: CryptTs.c:555
BOOLEAN EFIAPI Pkcs1v2Decrypt(IN CONST UINT8 *PrivateKey, IN UINTN PrivateKeySize, IN UINT8 *EncryptedData, IN UINTN EncryptedDataSize, OUT UINT8 **OutData, OUT UINTN *OutDataSize)
BOOLEAN EFIAPI Pkcs7GetCertificatesList(IN CONST UINT8 *P7Data, IN UINTN P7Length, OUT UINT8 **SignerChainCerts, OUT UINTN *ChainLength, OUT UINT8 **UnchainCerts, OUT UINTN *UnchainLength)
STATIC RETURN_STATUS Initialize(VOID)
Definition: Ram.c:29
STATIC BOOLEAN GetExtensionData(CONST mbedtls_x509_crt *Cert, CONST UINT8 *Oid, UINTN OidSize, UINT8 *ExtensionData, UINTN *ExtensionDataSize)