]>
git.proxmox.com Git - mirror_edk2.git/blob - CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs1OaepNull.c
2 This file contains UEFI wrapper functions for RSA PKCS1v2 OAEP encryption routines.
4 SPDX-License-Identifier: BSD-2-Clause-Patent
6 Copyright (C) 2016 Microsoft Corporation. All Rights Reserved.
7 Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
11 #include "InternalCryptLib.h"
14 Encrypts a blob using PKCS1v2 (RSAES-OAEP) schema. On success, will return the
15 encrypted message in a newly allocated buffer.
17 Return FALSE to indicate this interface is not supported.
19 @param[in] PublicKey A pointer to the DER-encoded X509 certificate that
20 will be used to encrypt the data.
21 @param[in] PublicKeySize Size of the X509 cert buffer.
22 @param[in] InData Data to be encrypted.
23 @param[in] InDataSize Size of the data buffer.
24 @param[in] PrngSeed [Optional] If provided, a pointer to a random seed buffer
25 to be used when initializing the PRNG. NULL otherwise.
26 @param[in] PrngSeedSize [Optional] If provided, size of the random seed buffer.
28 @param[out] EncryptedData Pointer to an allocated buffer containing the encrypted
30 @param[out] EncryptedDataSize Size of the encrypted message buffer.
32 @retval FALSE This interface is not supported.
38 IN CONST UINT8
*PublicKey
,
39 IN UINTN PublicKeySize
,
42 IN CONST UINT8
*PrngSeed
, OPTIONAL
43 IN UINTN PrngSeedSize
, OPTIONAL
44 OUT UINT8
**EncryptedData
,
45 OUT UINTN
*EncryptedDataSize