TianoCore EDK2 master
|
#include "InternalCryptLib.h"
Go to the source code of this file.
Functions | |
BOOLEAN EFIAPI | AeadAesGcmEncrypt (IN CONST UINT8 *Key, IN UINTN KeySize, IN CONST UINT8 *Iv, IN UINTN IvSize, IN CONST UINT8 *AData, IN UINTN ADataSize, IN CONST UINT8 *DataIn, IN UINTN DataInSize, OUT UINT8 *TagOut, IN UINTN TagSize, OUT UINT8 *DataOut, OUT UINTN *DataOutSize) |
BOOLEAN EFIAPI | AeadAesGcmDecrypt (IN CONST UINT8 *Key, IN UINTN KeySize, IN CONST UINT8 *Iv, IN UINTN IvSize, IN CONST UINT8 *AData, IN UINTN ADataSize, IN CONST UINT8 *DataIn, IN UINTN DataInSize, IN CONST UINT8 *Tag, IN UINTN TagSize, OUT UINT8 *DataOut, OUT UINTN *DataOutSize) |
AEAD Wrapper Implementation which does not provide real capabilities.
Copyright (c) 2023, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file CryptAeadAesGcmNull.c.
BOOLEAN EFIAPI AeadAesGcmDecrypt | ( | IN CONST UINT8 * | Key, |
IN UINTN | KeySize, | ||
IN CONST UINT8 * | Iv, | ||
IN UINTN | IvSize, | ||
IN CONST UINT8 * | AData, | ||
IN UINTN | ADataSize, | ||
IN CONST UINT8 * | DataIn, | ||
IN UINTN | DataInSize, | ||
IN CONST UINT8 * | Tag, | ||
IN UINTN | TagSize, | ||
OUT UINT8 * | DataOut, | ||
OUT UINTN * | DataOutSize | ||
) |
Performs AEAD AES-GCM authenticated decryption on a data buffer and additional authenticated data (AAD).
IvSize must be 12, otherwise FALSE is returned. KeySize must be 16, 24 or 32, otherwise FALSE is returned. TagSize must be 12, 13, 14, 15, 16, otherwise FALSE is returned. If additional authenticated data verification fails, FALSE is returned.
[in] | Key | Pointer to the encryption key. |
[in] | KeySize | Size of the encryption key in bytes. |
[in] | Iv | Pointer to the IV value. |
[in] | IvSize | Size of the IV value in bytes. |
[in] | AData | Pointer to the additional authenticated data (AAD). |
[in] | ADataSize | Size of the additional authenticated data (AAD) in bytes. |
[in] | DataIn | Pointer to the input data buffer to be decrypted. |
[in] | DataInSize | Size of the input data buffer in bytes. |
[in] | Tag | Pointer to a buffer that contains the authentication tag. |
[in] | TagSize | Size of the authentication tag in bytes. |
[out] | DataOut | Pointer to a buffer that receives the decryption output. |
[out] | DataOutSize | Size of the output data buffer in bytes. |
TRUE | AEAD AES-GCM authenticated decryption succeeded. |
FALSE | AEAD AES-GCM authenticated decryption failed. |
Definition at line 83 of file CryptAeadAesGcmNull.c.
BOOLEAN EFIAPI AeadAesGcmEncrypt | ( | IN CONST UINT8 * | Key, |
IN UINTN | KeySize, | ||
IN CONST UINT8 * | Iv, | ||
IN UINTN | IvSize, | ||
IN CONST UINT8 * | AData, | ||
IN UINTN | ADataSize, | ||
IN CONST UINT8 * | DataIn, | ||
IN UINTN | DataInSize, | ||
OUT UINT8 * | TagOut, | ||
IN UINTN | TagSize, | ||
OUT UINT8 * | DataOut, | ||
OUT UINTN * | DataOutSize | ||
) |
Performs AEAD AES-GCM authenticated encryption on a data buffer and additional authenticated data (AAD).
IvSize must be 12, otherwise FALSE is returned. KeySize must be 16, 24 or 32, otherwise FALSE is returned. TagSize must be 12, 13, 14, 15, 16, otherwise FALSE is returned.
[in] | Key | Pointer to the encryption key. |
[in] | KeySize | Size of the encryption key in bytes. |
[in] | Iv | Pointer to the IV value. |
[in] | IvSize | Size of the IV value in bytes. |
[in] | AData | Pointer to the additional authenticated data (AAD). |
[in] | ADataSize | Size of the additional authenticated data (AAD) in bytes. |
[in] | DataIn | Pointer to the input data buffer to be encrypted. |
[in] | DataInSize | Size of the input data buffer in bytes. |
[out] | TagOut | Pointer to a buffer that receives the authentication tag output. |
[in] | TagSize | Size of the authentication tag in bytes. |
[out] | DataOut | Pointer to a buffer that receives the encryption output. |
[out] | DataOutSize | Size of the output data buffer in bytes. |
TRUE | AEAD AES-GCM authenticated encryption succeeded. |
FALSE | AEAD AES-GCM authenticated encryption failed. |
Definition at line 37 of file CryptAeadAesGcmNull.c.