TianoCore EDK2 master
Loading...
Searching...
No Matches
CryptParallelHash.h
Go to the documentation of this file.
1
24#include "InternalCryptLib.h"
25
26#define KECCAK1600_WIDTH 1600
27
28typedef UINT64 uint64_t;
29
30//
31// This struct referring to m_sha3.c from opessl and modified its type name.
32//
33typedef struct {
34 uint64_t A[5][5];
35 size_t block_size; /* cached ctx->digest->block_size */
36 size_t md_size; /* output length, variable in XOF */
37 size_t num; /* used bytes in below buffer */
38 unsigned char buf[KECCAK1600_WIDTH / 8 - 32];
39 unsigned char pad;
41
52size_t
54 uint64_t A[5][5],
55 const unsigned char *inp,
56 size_t len,
57 size_t r
58 );
59
64void
66 uint64_t A[5][5],
67 unsigned char *out,
68 size_t len,
69 size_t r
70 );
71
85EFIAPI
87 OUT UINT8 *EncBuf,
88 IN UINTN Value
89 );
90
103UINTN
104EFIAPI
106 OUT UINT8 *EncBuf,
107 IN UINTN Value
108 );
109
123UINT8
124EFIAPI
126 OUT Keccak1600_Ctx *Context,
127 IN UINT8 Pad,
128 IN UINTN BlockSize,
129 IN UINTN MessageDigstLen
130 );
131
144UINT8
145EFIAPI
147 IN OUT Keccak1600_Ctx *Context,
148 IN const VOID *Data,
149 IN UINTN DataSize
150 );
151
164UINT8
165EFIAPI
166Sha3Final (
167 IN OUT Keccak1600_Ctx *Context,
168 OUT UINT8 *MessageDigest
169 );
170
192BOOLEAN
193EFIAPI
195 IN CONST VOID *Data,
196 IN UINTN DataSize,
197 IN UINTN OutputLen,
198 IN CONST VOID *Name,
199 IN UINTN NameLen,
200 IN CONST VOID *Customization,
201 IN UINTN CustomizationLen,
202 OUT UINT8 *HashValue
203 );
204
212VOID
213EFIAPI
215 IN VOID *ProcedureArgument
216 );
217
222VOID
223EFIAPI
225 VOID
226 );
UINT64 UINTN
UINTN EFIAPI RightEncode(OUT UINT8 *EncBuf, IN UINTN Value)
Definition: CryptXkcp.c:79
UINTN EFIAPI LeftEncode(OUT UINT8 *EncBuf, IN UINTN Value)
Definition: CryptXkcp.c:35
UINT8 EFIAPI KeccakInit(OUT Keccak1600_Ctx *Context, IN UINT8 Pad, IN UINTN BlockSize, IN UINTN MessageDigstLen)
Definition: CryptSha3.c:31
void SHA3_squeeze(uint64_t A[5][5], unsigned char *out, size_t len, size_t r)
VOID EFIAPI DispatchBlockToAp(VOID)
UINT8 EFIAPI Sha3Final(IN OUT Keccak1600_Ctx *Context, OUT UINT8 *MessageDigest)
Definition: CryptSha3.c:137
VOID EFIAPI ParallelHashApExecute(IN VOID *ProcedureArgument)
UINT8 EFIAPI Sha3Update(IN OUT Keccak1600_Ctx *Context, IN const VOID *Data, IN UINTN DataSize)
Definition: CryptSha3.c:66
size_t SHA3_absorb(uint64_t A[5][5], const unsigned char *inp, size_t len, size_t r)
BOOLEAN EFIAPI CShake256HashAll(IN CONST VOID *Data, IN UINTN DataSize, IN UINTN OutputLen, IN CONST VOID *Name, IN UINTN NameLen, IN CONST VOID *Customization, IN UINTN CustomizationLen, OUT UINT8 *HashValue)
#define CONST
Definition: Base.h:259
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284