]> git.proxmox.com Git - mirror_edk2.git/blame - CryptoPkg/Library/BaseCryptLib/Pk/CryptRsaExtNull.c
CryptoPkg: Clean up source files
[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
532616bb 11This program and the accompanying materials\r
12are licensed and made available under the terms and conditions of the BSD License\r
13which accompanies this distribution. The full text of the license may be found at\r
14http://opensource.org/licenses/bsd-license.php\r
15\r
16THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
17WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
18\r
19**/\r
20\r
21#include "InternalCryptLib.h"\r
22\r
23/**\r
24 Gets the tag-designated RSA key component from the established RSA context.\r
25\r
26 Return FALSE to indicate this interface is not supported.\r
27\r
28 @param[in, out] RsaContext Pointer to RSA context being set.\r
29 @param[in] KeyTag Tag of RSA key component being set.\r
30 @param[out] BigNumber Pointer to octet integer buffer.\r
31 @param[in, out] BnSize On input, the size of big number buffer in bytes.\r
32 On output, the size of data returned in big number buffer in bytes.\r
33\r
34 @retval FALSE This interface is not supported.\r
35\r
36**/\r
37BOOLEAN\r
38EFIAPI\r
39RsaGetKey (\r
40 IN OUT VOID *RsaContext,\r
41 IN RSA_KEY_TAG KeyTag,\r
42 OUT UINT8 *BigNumber,\r
43 IN OUT UINTN *BnSize\r
44 )\r
45{\r
46 ASSERT (FALSE);\r
47 return FALSE;\r
48}\r
49\r
50/**\r
51 Generates RSA key components.\r
52\r
53 Return FALSE to indicate this interface is not supported.\r
54\r
55 @param[in, out] RsaContext Pointer to RSA context being set.\r
56 @param[in] ModulusLength Length of RSA modulus N in bits.\r
57 @param[in] PublicExponent Pointer to RSA public exponent.\r
630f67dd 58 @param[in] PublicExponentSize Size of RSA public exponent buffer in bytes.\r
532616bb 59\r
60 @retval FALSE This interface is not supported.\r
61\r
62**/\r
63BOOLEAN\r
64EFIAPI\r
65RsaGenerateKey (\r
66 IN OUT VOID *RsaContext,\r
67 IN UINTN ModulusLength,\r
68 IN CONST UINT8 *PublicExponent,\r
69 IN UINTN PublicExponentSize\r
70 )\r
71{\r
72 ASSERT (FALSE);\r
73 return FALSE;\r
74}\r
75\r
76/**\r
77 Validates key components of RSA context.\r
78\r
79 Return FALSE to indicate this interface is not supported.\r
80\r
81 @param[in] RsaContext Pointer to RSA context to check.\r
82\r
83 @retval FALSE This interface is not supported.\r
84\r
85**/\r
86BOOLEAN\r
87EFIAPI\r
88RsaCheckKey (\r
89 IN VOID *RsaContext\r
90 )\r
91{\r
92 ASSERT (FALSE);\r
93 return FALSE;\r
94}\r
95\r
96/**\r
97 Carries out the RSA-SSA signature generation with EMSA-PKCS1-v1_5 encoding scheme.\r
98\r
99 Return FALSE to indicate this interface is not supported.\r
100\r
101 @param[in] RsaContext Pointer to RSA context for signature generation.\r
102 @param[in] MessageHash Pointer to octet message hash to be signed.\r
103 @param[in] HashSize Size of the message hash in bytes.\r
104 @param[out] Signature Pointer to buffer to receive RSA PKCS1-v1_5 signature.\r
105 @param[in, out] SigSize On input, the size of Signature buffer in bytes.\r
106 On output, the size of data returned in Signature buffer in bytes.\r
107\r
108 @retval FALSE This interface is not supported.\r
109\r
110**/\r
111BOOLEAN\r
112EFIAPI\r
113RsaPkcs1Sign (\r
114 IN VOID *RsaContext,\r
115 IN CONST UINT8 *MessageHash,\r
116 IN UINTN HashSize,\r
117 OUT UINT8 *Signature,\r
118 IN OUT UINTN *SigSize\r
119 )\r
120{\r
121 ASSERT (FALSE);\r
122 return FALSE;\r
123}\r
124\r
125\r