TianoCore EDK2 master
|
#include "InternalCryptLib.h"
Go to the source code of this file.
Functions | |
VOID *EFIAPI | DhNew (VOID) |
VOID EFIAPI | DhFree (IN VOID *DhContext) |
BOOLEAN EFIAPI | DhGenerateParameter (IN OUT VOID *DhContext, IN UINTN Generator, IN UINTN PrimeLength, OUT UINT8 *Prime) |
BOOLEAN EFIAPI | DhSetParameter (IN OUT VOID *DhContext, IN UINTN Generator, IN UINTN PrimeLength, IN CONST UINT8 *Prime) |
BOOLEAN EFIAPI | DhGenerateKey (IN OUT VOID *DhContext, OUT UINT8 *PublicKey, IN OUT UINTN *PublicKeySize) |
BOOLEAN EFIAPI | DhComputeKey (IN OUT VOID *DhContext, IN CONST UINT8 *PeerPublicKey, IN UINTN PeerPublicKeySize, OUT UINT8 *Key, IN OUT UINTN *KeySize) |
Diffie-Hellman 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 CryptDhNull.c.
BOOLEAN EFIAPI DhComputeKey | ( | IN OUT VOID * | DhContext, |
IN CONST UINT8 * | PeerPublicKey, | ||
IN UINTN | PeerPublicKeySize, | ||
OUT UINT8 * | Key, | ||
IN OUT UINTN * | KeySize | ||
) |
Computes exchanged common key.
Return FALSE to indicate this interface is not supported.
[in,out] | DhContext | Pointer to the DH context. |
[in] | PeerPublicKey | Pointer to the peer's public key. |
[in] | PeerPublicKeySize | Size of peer's public key in bytes. |
[out] | Key | Pointer to the buffer to receive generated key. |
[in,out] | KeySize | On input, the size of Key buffer in bytes. On output, the size of data returned in Key buffer in bytes. |
FALSE | This interface is not supported. |
Definition at line 140 of file CryptDhNull.c.
VOID EFIAPI DhFree | ( | IN VOID * | DhContext | ) |
Release the specified DH context.
If the interface is not supported, then ASSERT().
[in] | DhContext | Pointer to the DH context to be released. |
Definition at line 39 of file CryptDhNull.c.
BOOLEAN EFIAPI DhGenerateKey | ( | IN OUT VOID * | DhContext, |
OUT UINT8 * | PublicKey, | ||
IN OUT UINTN * | PublicKeySize | ||
) |
Generates DH public key.
Return FALSE to indicate this interface is not supported.
[in,out] | DhContext | Pointer to the DH context. |
[out] | PublicKey | Pointer to the buffer to receive generated public key. |
[in,out] | PublicKeySize | On input, the size of PublicKey buffer in bytes. On output, the size of data returned in PublicKey buffer in bytes. |
FALSE | This interface is not supported. |
Definition at line 113 of file CryptDhNull.c.
BOOLEAN EFIAPI DhGenerateParameter | ( | IN OUT VOID * | DhContext, |
IN UINTN | Generator, | ||
IN UINTN | PrimeLength, | ||
OUT UINT8 * | Prime | ||
) |
Generates DH parameter.
Return FALSE to indicate this interface is not supported.
[in,out] | DhContext | Pointer to the DH context. |
[in] | Generator | Value of generator. |
[in] | PrimeLength | Length in bits of prime to be generated. |
[out] | Prime | Pointer to the buffer to receive the generated prime number. |
FALSE | This interface is not supported. |
Definition at line 61 of file CryptDhNull.c.
VOID *EFIAPI DhNew | ( | VOID | ) |
Allocates and Initializes one Diffie-Hellman Context for subsequent use.
Definition at line 21 of file CryptDhNull.c.
BOOLEAN EFIAPI DhSetParameter | ( | IN OUT VOID * | DhContext, |
IN UINTN | Generator, | ||
IN UINTN | PrimeLength, | ||
IN CONST UINT8 * | Prime | ||
) |
Sets generator and prime parameters for DH.
Return FALSE to indicate this interface is not supported.
[in,out] | DhContext | Pointer to the DH context. |
[in] | Generator | Value of generator. |
[in] | PrimeLength | Length in bits of prime to be generated. |
[in] | Prime | Pointer to the prime number. |
FALSE | This interface is not supported. |
Definition at line 87 of file CryptDhNull.c.