TianoCore EDK2 master
Loading...
Searching...
No Matches
CryptParallelHash.c File Reference

Go to the source code of this file.

Macros

#define PARALLELHASH_CUSTOMIZATION   "ParallelHash"
 

Functions

VOID EFIAPI ParallelHashApExecute (IN VOID *ProcedureArgument)
 
BOOLEAN EFIAPI ParallelHash256HashAll (IN CONST VOID *Input, IN UINTN InputByteLen, IN UINTN BlockSize, OUT VOID *Output, IN UINTN OutputByteLen, IN CONST VOID *Customization, IN UINTN CustomByteLen)
 

Variables

UINTN mBlockNum
 
UINTN mBlockSize
 
UINTN mLastBlockSize
 
UINT8 * mInput
 
UINTN mBlockResultSize
 
UINT8 * mBlockHashResult
 
BOOLEAN * mBlockIsCompleted
 
SPIN_LOCKmSpinLockList
 

Detailed Description

ParallelHash Implementation.

Copyright (c) 2022, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file CryptParallelHash.c.

Macro Definition Documentation

◆ PARALLELHASH_CUSTOMIZATION

#define PARALLELHASH_CUSTOMIZATION   "ParallelHash"

Definition at line 12 of file CryptParallelHash.c.

Function Documentation

◆ ParallelHash256HashAll()

BOOLEAN EFIAPI ParallelHash256HashAll ( IN CONST VOID *  Input,
IN UINTN  InputByteLen,
IN UINTN  BlockSize,
OUT VOID *  Output,
IN UINTN  OutputByteLen,
IN CONST VOID *  Customization,
IN UINTN  CustomByteLen 
)

Parallel hash function ParallelHash256, as defined in NIST's Special Publication 800-185, published December 2016.

Parameters
[in]InputPointer to the input message (X).
[in]InputByteLenThe number(>0) of input bytes provided for the input data.
[in]BlockSizeThe size of each block (B).
[out]OutputPointer to the output buffer.
[in]OutputByteLenThe desired number of output bytes (L).
[in]CustomizationPointer to the customization string (S).
[in]CustomByteLenThe length of the customization string in bytes.
Return values
TRUEParallelHash256 digest computation succeeded.
FALSEParallelHash256 digest computation failed.
FALSEThis interface is not supported.

Definition at line 90 of file CryptParallelHash.c.

◆ ParallelHashApExecute()

VOID EFIAPI ParallelHashApExecute ( IN VOID *  ProcedureArgument)

Complete computation of digest of each block.

Each AP perform the function called by BSP.

Parameters
[in]ProcedureArgumentArgument of the procedure.

Definition at line 32 of file CryptParallelHash.c.

Variable Documentation

◆ mBlockHashResult

UINT8* mBlockHashResult

Definition at line 19 of file CryptParallelHash.c.

◆ mBlockIsCompleted

BOOLEAN* mBlockIsCompleted

Definition at line 20 of file CryptParallelHash.c.

◆ mBlockNum

UINTN mBlockNum

Definition at line 14 of file CryptParallelHash.c.

◆ mBlockResultSize

UINTN mBlockResultSize

Definition at line 18 of file CryptParallelHash.c.

◆ mBlockSize

UINTN mBlockSize

Definition at line 15 of file CryptParallelHash.c.

◆ mInput

UINT8* mInput

Definition at line 17 of file CryptParallelHash.c.

◆ mLastBlockSize

UINTN mLastBlockSize

Definition at line 16 of file CryptParallelHash.c.

◆ mSpinLockList

SPIN_LOCK* mSpinLockList

Definition at line 21 of file CryptParallelHash.c.