2 RSA Asymmetric Cipher Wrapper Implementation over OpenSSL.
4 This file does not provide real capabilities for following APIs in RSA handling:
10 Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>
11 This program and the accompanying materials
12 are licensed and made available under the terms and conditions of the BSD License
13 which accompanies this distribution. The full text of the license may be found at
14 http://opensource.org/licenses/bsd-license.php
16 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
17 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
21 #include "InternalCryptLib.h"
24 Gets the tag-designated RSA key component from the established RSA context.
26 Return FALSE to indicate this interface is not supported.
28 @param[in, out] RsaContext Pointer to RSA context being set.
29 @param[in] KeyTag Tag of RSA key component being set.
30 @param[out] BigNumber Pointer to octet integer buffer.
31 @param[in, out] BnSize On input, the size of big number buffer in bytes.
32 On output, the size of data returned in big number buffer in bytes.
34 @retval FALSE This interface is not supported.
40 IN OUT VOID
*RsaContext
,
41 IN RSA_KEY_TAG KeyTag
,
51 Generates RSA key components.
53 Return FALSE to indicate this interface is not supported.
55 @param[in, out] RsaContext Pointer to RSA context being set.
56 @param[in] ModulusLength Length of RSA modulus N in bits.
57 @param[in] PublicExponent Pointer to RSA public exponent.
58 @param[in] PublicExponentSize Size of RSA public exponent buffer in bytes.
60 @retval FALSE This interface is not supported.
66 IN OUT VOID
*RsaContext
,
67 IN UINTN ModulusLength
,
68 IN CONST UINT8
*PublicExponent
,
69 IN UINTN PublicExponentSize
77 Validates key components of RSA context.
79 Return FALSE to indicate this interface is not supported.
81 @param[in] RsaContext Pointer to RSA context to check.
83 @retval FALSE This interface is not supported.
97 Carries out the RSA-SSA signature generation with EMSA-PKCS1-v1_5 encoding scheme.
99 Return FALSE to indicate this interface is not supported.
101 @param[in] RsaContext Pointer to RSA context for signature generation.
102 @param[in] MessageHash Pointer to octet message hash to be signed.
103 @param[in] HashSize Size of the message hash in bytes.
104 @param[out] Signature Pointer to buffer to receive RSA PKCS1-v1_5 signature.
105 @param[in, out] SigSize On input, the size of Signature buffer in bytes.
106 On output, the size of data returned in Signature buffer in bytes.
108 @retval FALSE This interface is not supported.
115 IN CONST UINT8
*MessageHash
,
117 OUT UINT8
*Signature
,
118 IN OUT UINTN
*SigSize