OpenCore
1.0.4
OpenCore Bootloader
|
#include "CryptoInternal.h"
Go to the source code of this file.
Functions | |
INTN | SecureCompareMem (IN CONST VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length) |
VOID * | SecureZeroMem (OUT VOID *Buffer, IN UINTN Length) |
Copyright (C) 2019, Download-Fritz. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Definition in file SecureMem.c.
INTN SecureCompareMem | ( | IN CONST VOID * | DestinationBuffer, |
IN CONST VOID * | SourceBuffer, | ||
IN UINTN | Length ) |
Performs a cryptographically secure comparison of the contents of two buffers.
This function compares Length bytes of SourceBuffer to Length bytes of DestinationBuffer in a cryptographically secure fashion. This especially implies that different lengths of the longest shared prefix do not change execution time in a way relevant to security.
If Length > 0 and DestinationBuffer is NULL, then ASSERT(). If Length > 0 and SourceBuffer is NULL, then ASSERT(). If Length is greater than (MAX_ADDRESS - DestinationBuffer + 1), then ASSERT(). If Length is greater than (MAX_ADDRESS - SourceBuffer + 1), then ASSERT().
DestinationBuffer | The pointer to the destination buffer to compare. |
SourceBuffer | The pointer to the source buffer to compare. |
Length | The number of bytes to compare. |
-1 | The two buffers are not identical within Length bytes. |
Definition at line 17 of file SecureMem.c.
VOID * SecureZeroMem | ( | OUT VOID * | Buffer, |
IN UINTN | Length ) |
Performs a cryptographically secure memory zeroing.
If Length > 0 and Buffer is NULL, then ASSERT(). If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
[out] | Buffer | The pointer to the destination buffer to zero. |
[in] | Length | The number of bytes to zero. |
Definition at line 73 of file SecureMem.c.