]> git.proxmox.com Git - mirror_edk2.git/blame - CryptoPkg/Library/BaseCryptLib/Pk/CryptRsaExtNull.c
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / CryptoPkg / Library / BaseCryptLib / Pk / CryptRsaExtNull.c
CommitLineData
532616bb 1/** @file\r
2 RSA Asymmetric Cipher Wrapper Implementation over OpenSSL.\r
3\r
4 This file does not provide real capabilities for following APIs in RSA handling:\r
5 1) RsaGetKey\r
6 2) RsaGenerateKey\r
7 3) RsaCheckKey\r
8 4) RsaPkcs1Sign\r
9\r
630f67dd 10Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
2009f6b4 11SPDX-License-Identifier: BSD-2-Clause-Patent\r
532616bb 12\r
13**/\r
14\r
15#include "InternalCryptLib.h"\r
16\r
17/**\r
18 Gets the tag-designated RSA key component from the established RSA context.\r
19\r
20 Return FALSE to indicate this interface is not supported.\r
21\r
22 @param[in, out] RsaContext Pointer to RSA context being set.\r
23 @param[in] KeyTag Tag of RSA key component being set.\r
24 @param[out] BigNumber Pointer to octet integer buffer.\r
25 @param[in, out] BnSize On input, the size of big number buffer in bytes.\r
26 On output, the size of data returned in big number buffer in bytes.\r
27\r
28 @retval FALSE This interface is not supported.\r
29\r
30**/\r
31BOOLEAN\r
32EFIAPI\r
33RsaGetKey (\r
34 IN OUT VOID *RsaContext,\r
35 IN RSA_KEY_TAG KeyTag,\r
36 OUT UINT8 *BigNumber,\r
37 IN OUT UINTN *BnSize\r
38 )\r
39{\r
40 ASSERT (FALSE);\r
41 return FALSE;\r
42}\r
43\r
44/**\r
45 Generates RSA key components.\r
46\r
47 Return FALSE to indicate this interface is not supported.\r
48\r
49 @param[in, out] RsaContext Pointer to RSA context being set.\r
50 @param[in] ModulusLength Length of RSA modulus N in bits.\r
51 @param[in] PublicExponent Pointer to RSA public exponent.\r
630f67dd 52 @param[in] PublicExponentSize Size of RSA public exponent buffer in bytes.\r
532616bb 53\r
54 @retval FALSE This interface is not supported.\r
55\r
56**/\r
57BOOLEAN\r
58EFIAPI\r
59RsaGenerateKey (\r
60 IN OUT VOID *RsaContext,\r
61 IN UINTN ModulusLength,\r
62 IN CONST UINT8 *PublicExponent,\r
63 IN UINTN PublicExponentSize\r
64 )\r
65{\r
66 ASSERT (FALSE);\r
67 return FALSE;\r
68}\r
69\r
70/**\r
71 Validates key components of RSA context.\r
72\r
73 Return FALSE to indicate this interface is not supported.\r
74\r
75 @param[in] RsaContext Pointer to RSA context to check.\r
76\r
77 @retval FALSE This interface is not supported.\r
78\r
79**/\r
80BOOLEAN\r
81EFIAPI\r
82RsaCheckKey (\r
83 IN VOID *RsaContext\r
84 )\r
85{\r
86 ASSERT (FALSE);\r
87 return FALSE;\r
88}\r
89\r
90/**\r
91 Carries out the RSA-SSA signature generation with EMSA-PKCS1-v1_5 encoding scheme.\r
92\r
93 Return FALSE to indicate this interface is not supported.\r
94\r
95 @param[in] RsaContext Pointer to RSA context for signature generation.\r
96 @param[in] MessageHash Pointer to octet message hash to be signed.\r
97 @param[in] HashSize Size of the message hash in bytes.\r
98 @param[out] Signature Pointer to buffer to receive RSA PKCS1-v1_5 signature.\r
99 @param[in, out] SigSize On input, the size of Signature buffer in bytes.\r
100 On output, the size of data returned in Signature buffer in bytes.\r
101\r
102 @retval FALSE This interface is not supported.\r
103\r
104**/\r
105BOOLEAN\r
106EFIAPI\r
107RsaPkcs1Sign (\r
108 IN VOID *RsaContext,\r
109 IN CONST UINT8 *MessageHash,\r
110 IN UINTN HashSize,\r
111 OUT UINT8 *Signature,\r
112 IN OUT UINTN *SigSize\r
113 )\r
114{\r
115 ASSERT (FALSE);\r
116 return FALSE;\r
117}\r