TianoCore EDK2 master
Loading...
Searching...
No Matches
CryptRsaExtNull.c File Reference
#include "InternalCryptLib.h"

Go to the source code of this file.

Functions

BOOLEAN EFIAPI RsaGetKey (IN OUT VOID *RsaContext, IN RSA_KEY_TAG KeyTag, OUT UINT8 *BigNumber, IN OUT UINTN *BnSize)
 
BOOLEAN EFIAPI RsaGenerateKey (IN OUT VOID *RsaContext, IN UINTN ModulusLength, IN CONST UINT8 *PublicExponent, IN UINTN PublicExponentSize)
 
BOOLEAN EFIAPI RsaCheckKey (IN VOID *RsaContext)
 
BOOLEAN EFIAPI RsaPkcs1Sign (IN VOID *RsaContext, IN CONST UINT8 *MessageHash, IN UINTN HashSize, OUT UINT8 *Signature, IN OUT UINTN *SigSize)
 

Detailed Description

RSA Asymmetric Cipher Wrapper Null Implementation.

This file does not provide real capabilities for following APIs in RSA handling: 1) RsaGetKey 2) RsaGenerateKey 3) RsaCheckKey 4) RsaPkcs1Sign

Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file CryptRsaExtNull.c.

Function Documentation

◆ RsaCheckKey()

BOOLEAN EFIAPI RsaCheckKey ( IN VOID *  RsaContext)

Validates key components of RSA context.

Return FALSE to indicate this interface is not supported.

Parameters
[in]RsaContextPointer to RSA context to check.
Return values
FALSEThis interface is not supported.

Definition at line 82 of file CryptRsaExtNull.c.

◆ RsaGenerateKey()

BOOLEAN EFIAPI RsaGenerateKey ( IN OUT VOID *  RsaContext,
IN UINTN  ModulusLength,
IN CONST UINT8 *  PublicExponent,
IN UINTN  PublicExponentSize 
)

Generates RSA key components.

Return FALSE to indicate this interface is not supported.

Parameters
[in,out]RsaContextPointer to RSA context being set.
[in]ModulusLengthLength of RSA modulus N in bits.
[in]PublicExponentPointer to RSA public exponent.
[in]PublicExponentSizeSize of RSA public exponent buffer in bytes.
Return values
FALSEThis interface is not supported.

Definition at line 59 of file CryptRsaExtNull.c.

◆ RsaGetKey()

BOOLEAN EFIAPI RsaGetKey ( IN OUT VOID *  RsaContext,
IN RSA_KEY_TAG  KeyTag,
OUT UINT8 *  BigNumber,
IN OUT UINTN BnSize 
)

Gets the tag-designated RSA key component from the established RSA context.

Return FALSE to indicate this interface is not supported.

Parameters
[in,out]RsaContextPointer to RSA context being set.
[in]KeyTagTag of RSA key component being set.
[out]BigNumberPointer to octet integer buffer.
[in,out]BnSizeOn input, the size of big number buffer in bytes. On output, the size of data returned in big number buffer in bytes.
Return values
FALSEThis interface is not supported.

Definition at line 33 of file CryptRsaExtNull.c.

◆ RsaPkcs1Sign()

BOOLEAN EFIAPI RsaPkcs1Sign ( IN VOID *  RsaContext,
IN CONST UINT8 *  MessageHash,
IN UINTN  HashSize,
OUT UINT8 *  Signature,
IN OUT UINTN SigSize 
)

Carries out the RSA-SSA signature generation with EMSA-PKCS1-v1_5 encoding scheme.

Return FALSE to indicate this interface is not supported.

Parameters
[in]RsaContextPointer to RSA context for signature generation.
[in]MessageHashPointer to octet message hash to be signed.
[in]HashSizeSize of the message hash in bytes.
[out]SignaturePointer to buffer to receive RSA PKCS1-v1_5 signature.
[in,out]SigSizeOn input, the size of Signature buffer in bytes. On output, the size of data returned in Signature buffer in bytes.
Return values
FALSEThis interface is not supported.

Definition at line 107 of file CryptRsaExtNull.c.