Vault 7: Projects

This publication series is about specific projects related to the Vault 7 main publication.

1.6.4.3 SHA512_Initialize Function
Initializes a SHA-256 context to perform a SHA-512 hash.
File
sha512.h
Syntax
void SHA512_Initialize(SHA512_CONTEXT * context, SHA512_BIT_LENGTH length, uint64_t *
workingBuffer);
Module
SHA-512
Returns
None.
Description
This routine initializes a hash context for the SHA-512 hash.
Remarks
You must initialize a context before calculating a SHA-512 hash.
Preconditions
None.
Example
// Initialization for CRYPTO_HASH_CONFIG_SHA_SMALL_RAM
uint64_t buffer[16];
SHA512_CONTEXT context;
SHA512_Initialize (&context, SHA2_512, buffer);
Parameters
Parameters Description
context The context to initialize.
length Digest bit length to use with the SHA-512 algorithm.
SHA2_384 or SHA2_512.
workingBuffer A working buffer used by the module to calculate the hash. If
the CRYPTO_HASH_CONFIG_SHA_SMALL_RAM macro is
defined in sha_config.h, this buffer must contain 16 uint64_t
words. Otherwise, this buffer must contain 80 64-bit words,
but performance will be slightly improved.
Function
void SHA512_Initialize ( SHA512_CONTEXT * context, SHA512_BIT_LENGTH length, uint32_t * workingBuffer);
1.6.4.4 SHA512_DataAdd Function
Adds data to a hash being calculated.
File
sha512.h
Syntax
void SHA512_DataAdd(SHA512_CONTEXT * context, uint8_t * data, uint32_t len);
1.6 Library Interface MLA - Crypto Hash Library Help SHA-512
22
1

e-Highlighter

Click to send permalink to address bar, or right-click to copy permalink.

Un-highlight all Un-highlight selectionu Highlight selectionh