TianoCore EDK2 master
|
#include "InternalCryptLib.h"
#include <openssl/bn.h>
#include <openssl/rsa.h>
#include <openssl/objects.h>
#include <openssl/evp.h>
Go to the source code of this file.
Functions | |
STATIC const EVP_MD * | GetEvpMD (IN UINT16 DigestLen) |
BOOLEAN EFIAPI | RsaPssVerify (IN VOID *RsaContext, IN CONST UINT8 *Message, IN UINTN MsgSize, IN CONST UINT8 *Signature, IN UINTN SigSize, IN UINT16 DigestLen, IN UINT16 SaltLen) |
RSA Asymmetric Cipher Wrapper Implementation over OpenSSL.
This file implements following APIs which provide basic capabilities for RSA: 1) RsaPssVerify
Copyright (c) 2021, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file CryptRsaPss.c.
Retrieve a pointer to EVP message digest object.
[in] | DigestLen | Length of the message digest. |
Definition at line 28 of file CryptRsaPss.c.
BOOLEAN EFIAPI RsaPssVerify | ( | IN VOID * | RsaContext, |
IN CONST UINT8 * | Message, | ||
IN UINTN | MsgSize, | ||
IN CONST UINT8 * | Signature, | ||
IN UINTN | SigSize, | ||
IN UINT16 | DigestLen, | ||
IN UINT16 | SaltLen | ||
) |
Verifies the RSA signature with RSASSA-PSS signature scheme defined in RFC 8017. Implementation determines salt length automatically from the signature encoding. Mask generation function is the same as the message digest algorithm. Salt length should be equal to digest length.
[in] | RsaContext | Pointer to RSA context for signature verification. |
[in] | Message | Pointer to octet message to be verified. |
[in] | MsgSize | Size of the message in bytes. |
[in] | Signature | Pointer to RSASSA-PSS signature to be verified. |
[in] | SigSize | Size of signature in bytes. |
[in] | DigestLen | Length of digest for RSA operation. |
[in] | SaltLen | Salt length for PSS encoding. |
TRUE | Valid signature encoded in RSASSA-PSS. |
FALSE | Invalid signature or invalid RSA context. |
Definition at line 67 of file CryptRsaPss.c.