TianoCore EDK2 master
|
#include "TestBaseCryptLib.h"
Go to the source code of this file.
Data Structures | |
struct | _OAEP_ENC_DEC_TEST_CONTEXT |
Typedefs | |
typedef struct _OAEP_ENC_DEC_TEST_CONTEXT | OAEP_ENC_DEC_TEST_CONTEXT |
typedef BOOLEAN(EFIAPI * | OAEP_TEST_ENCRYPT) (IN OAEP_ENC_DEC_TEST_CONTEXT *TestContext, IN CONST UINT8 *ClearText, IN UINTN ClearTextSize, IN CONST UINT8 *PrngSeed, IN UINTN PrngSeedSize, IN UINT16 DigestLen, OUT UINT8 **CipherText, OUT UINTN *CipherTextSize) |
typedef BOOLEAN(EFIAPI * | OAEP_TEST_DECRYPT) (IN OAEP_ENC_DEC_TEST_CONTEXT *TestContext, IN CONST UINT8 *CipherText, IN UINTN CipherTextSize, IN UINT16 DigestLen, OUT UINT8 **ClearText, OUT UINTN *ClearTextSize) |
Functions | |
BOOLEAN EFIAPI | CallPkcs1v2Encrypt (OAEP_ENC_DEC_TEST_CONTEXT *TestCtx, CONST UINT8 *ClearText, UINTN ClearTextSize, CONST UINT8 *PrngSeed, UINTN PrngSeedSize, UINT16 DigestLen, UINT8 **CipherText, UINTN *CipherTextSize) |
BOOLEAN EFIAPI | CallPkcs1v2Decrypt (OAEP_ENC_DEC_TEST_CONTEXT *TestCtx, CONST UINT8 *CipherText, UINTN CipherTextSize, UINT16 DigestLen, UINT8 **ClearText, UINTN *ClearTextSize) |
BOOLEAN EFIAPI | CallRsaOaepEncrypt (OAEP_ENC_DEC_TEST_CONTEXT *TestCtx, CONST UINT8 *ClearText, UINTN ClearTextSize, CONST UINT8 *RandSeedIn, UINTN RandSeedSizeIn, UINT16 DigestLen, UINT8 **CipherText, UINTN *CipherTextSize) |
BOOLEAN EFIAPI | CallRsaOaepDecrypt (OAEP_ENC_DEC_TEST_CONTEXT *TestCtx, CONST UINT8 *CipherText, UINTN CipherTextSize, UINT16 DigestLen, UINT8 **ClearText, UINTN *ClearTextSize) |
UNIT_TEST_STATUS EFIAPI | TestVerifyEncrypt (IN UNIT_TEST_CONTEXT Context) |
UNIT_TEST_STATUS EFIAPI | TestVerifyDecrypt (IN UNIT_TEST_CONTEXT Context) |
UNIT_TEST_STATUS EFIAPI | TestVerifyEncryptDecrypt (IN UNIT_TEST_CONTEXT Context) |
UNIT_TEST_STATUS EFIAPI | TestVerifyPkcs1v2EncryptInterface (IN UNIT_TEST_CONTEXT Context) |
UNIT_TEST_STATUS EFIAPI | TestVerifyRsaOaepEncryptInterface (IN UNIT_TEST_CONTEXT Context) |
This is a unit test for RSA OAEP encrypt/decrypt.
Copyright (c) 2019, Intel Corporation. All rights reserved.
Copyright (c) Microsoft Corporation. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file OaepEncryptTests.c.
typedef struct _OAEP_ENC_DEC_TEST_CONTEXT OAEP_ENC_DEC_TEST_CONTEXT |
Definition at line 246 of file OaepEncryptTests.c.
typedef BOOLEAN(EFIAPI * OAEP_TEST_DECRYPT) (IN OAEP_ENC_DEC_TEST_CONTEXT *TestContext, IN CONST UINT8 *CipherText, IN UINTN CipherTextSize, IN UINT16 DigestLen, OUT UINT8 **ClearText, OUT UINTN *ClearTextSize) |
Definition at line 261 of file OaepEncryptTests.c.
typedef BOOLEAN(EFIAPI * OAEP_TEST_ENCRYPT) (IN OAEP_ENC_DEC_TEST_CONTEXT *TestContext, IN CONST UINT8 *ClearText, IN UINTN ClearTextSize, IN CONST UINT8 *PrngSeed, IN UINTN PrngSeedSize, IN UINT16 DigestLen, OUT UINT8 **CipherText, OUT UINTN *CipherTextSize) |
Definition at line 248 of file OaepEncryptTests.c.
BOOLEAN EFIAPI CallPkcs1v2Decrypt | ( | OAEP_ENC_DEC_TEST_CONTEXT * | TestCtx, |
CONST UINT8 * | CipherText, | ||
UINTN | CipherTextSize, | ||
UINT16 | DigestLen, | ||
UINT8 ** | ClearText, | ||
UINTN * | ClearTextSize | ||
) |
Definition at line 325 of file OaepEncryptTests.c.
BOOLEAN EFIAPI CallPkcs1v2Encrypt | ( | OAEP_ENC_DEC_TEST_CONTEXT * | TestCtx, |
CONST UINT8 * | ClearText, | ||
UINTN | ClearTextSize, | ||
CONST UINT8 * | PrngSeed, | ||
UINTN | PrngSeedSize, | ||
UINT16 | DigestLen, | ||
UINT8 ** | CipherText, | ||
UINTN * | CipherTextSize | ||
) |
Definition at line 296 of file OaepEncryptTests.c.
BOOLEAN EFIAPI CallRsaOaepDecrypt | ( | OAEP_ENC_DEC_TEST_CONTEXT * | TestCtx, |
CONST UINT8 * | CipherText, | ||
UINTN | CipherTextSize, | ||
UINT16 | DigestLen, | ||
UINT8 ** | ClearText, | ||
UINTN * | ClearTextSize | ||
) |
Definition at line 388 of file OaepEncryptTests.c.
BOOLEAN EFIAPI CallRsaOaepEncrypt | ( | OAEP_ENC_DEC_TEST_CONTEXT * | TestCtx, |
CONST UINT8 * | ClearText, | ||
UINTN | ClearTextSize, | ||
CONST UINT8 * | RandSeedIn, | ||
UINTN | RandSeedSizeIn, | ||
UINT16 | DigestLen, | ||
UINT8 ** | CipherText, | ||
UINTN * | CipherTextSize | ||
) |
Definition at line 349 of file OaepEncryptTests.c.
UNIT_TEST_STATUS EFIAPI TestVerifyDecrypt | ( | IN UNIT_TEST_CONTEXT | Context | ) |
Definition at line 484 of file OaepEncryptTests.c.
UNIT_TEST_STATUS EFIAPI TestVerifyEncrypt | ( | IN UNIT_TEST_CONTEXT | Context | ) |
Definition at line 426 of file OaepEncryptTests.c.
UNIT_TEST_STATUS EFIAPI TestVerifyEncryptDecrypt | ( | IN UNIT_TEST_CONTEXT | Context | ) |
Definition at line 519 of file OaepEncryptTests.c.
UNIT_TEST_STATUS EFIAPI TestVerifyPkcs1v2EncryptInterface | ( | IN UNIT_TEST_CONTEXT | Context | ) |
Definition at line 581 of file OaepEncryptTests.c.
UNIT_TEST_STATUS EFIAPI TestVerifyRsaOaepEncryptInterface | ( | IN UNIT_TEST_CONTEXT | Context | ) |
Definition at line 630 of file OaepEncryptTests.c.
GLOBAL_REMOVE_IF_UNREFERENCED STATIC CONST UINT8 Ct1230RsaesOaep2048MdSha256Mgf1Sha256[] |
Definition at line 227 of file OaepEncryptTests.c.
GLOBAL_REMOVE_IF_UNREFERENCED STATIC CONST UINT8 Ct1230RsaesOaepMdSha1Mgf1Sha1[] |
Definition at line 207 of file OaepEncryptTests.c.
TEST_DESC mOaepTest[] |
Definition at line 884 of file OaepEncryptTests.c.
UINTN mOaepTestNum = ARRAY_SIZE (mOaepTest) |
Definition at line 922 of file OaepEncryptTests.c.
GLOBAL_REMOVE_IF_UNREFERENCED STATIC CONST UINT8 Msg1230[] |
Definition at line 202 of file OaepEncryptTests.c.
OAEP_ENC_DEC_TEST_CONTEXT mTestVerifyPkcs1v2EncryptRsaOaepDecrypt |
Definition at line 779 of file OaepEncryptTests.c.
OAEP_ENC_DEC_TEST_CONTEXT mTestVerifyPkcs1v2Msg1230 |
Definition at line 687 of file OaepEncryptTests.c.
OAEP_ENC_DEC_TEST_CONTEXT mTestVerifyPkcs1v2Msg1230PrngSeed |
Definition at line 710 of file OaepEncryptTests.c.
OAEP_ENC_DEC_TEST_CONTEXT mTestVerifyRsaesOaep2048MdDefaultBgf1Default |
Definition at line 821 of file OaepEncryptTests.c.
OAEP_ENC_DEC_TEST_CONTEXT mTestVerifyRsaesOaep2048MdSha1Mgf1Sha1 |
Definition at line 842 of file OaepEncryptTests.c.
OAEP_ENC_DEC_TEST_CONTEXT mTestVerifyRsaesOaep2048MdSha256Mgf1Sha256 |
Definition at line 863 of file OaepEncryptTests.c.
OAEP_ENC_DEC_TEST_CONTEXT mTestVerifyRsaOaepEncryptPkcs1v2Decrypt |
Definition at line 800 of file OaepEncryptTests.c.
OAEP_ENC_DEC_TEST_CONTEXT mTestVerifyRsaOaepMsg1230 |
Definition at line 733 of file OaepEncryptTests.c.
OAEP_ENC_DEC_TEST_CONTEXT mTestVerifyRsaOaepMsg1230PrngSeed |
Definition at line 756 of file OaepEncryptTests.c.
GLOBAL_REMOVE_IF_UNREFERENCED STATIC CONST UINT8 PrivateKey[] |
Definition at line 79 of file OaepEncryptTests.c.
Definition at line 11 of file OaepEncryptTests.c.
GLOBAL_REMOVE_IF_UNREFERENCED STATIC CONST UINT8 RsaD[] |
Definition at line 182 of file OaepEncryptTests.c.
GLOBAL_REMOVE_IF_UNREFERENCED STATIC CONST UINT8 RsaE[] |
Definition at line 178 of file OaepEncryptTests.c.
GLOBAL_REMOVE_IF_UNREFERENCED STATIC CONST UINT8 RsaN[] |
Definition at line 158 of file OaepEncryptTests.c.
GLOBAL_REMOVE_IF_UNREFERENCED STATIC CONST UINT8 SelfTestCert[] |
Definition at line 18 of file OaepEncryptTests.c.