Vault 7: Projects
This publication series is about specific projects related to the Vault 7 main publication.
uint32_t * workingBuffer; 64 32-bit words for the working buffer
SHA256_BIT_LENGTH length; Type of hash being calculated (SHA-224 or 256)
Module
SHA-256
Description
Context storage for hash operation
1.6.3.3 SHA256_Initialize Function
Initializes a SHA-256 context to perform a SHA-256 hash.
File
sha256.h
Syntax
void SHA256_Initialize(SHA256_CONTEXT * context, SHA256_BIT_LENGTH length, uint32_t *
workingBuffer);
Module
SHA-256
Returns
None.
Description
This routine initializes a hash context for the SHA-256 hash.
Remarks
You must initialize a context before calculating a SHA-256 hash.
Preconditions
None.
Example
// Initialization for CRYPTO_HASH_CONFIG_SHA_SMALL_RAM
uint32_t buffer[16];
SHA256_CONTEXT context;
SHA256_Initialize (&context, SHA2_256, buffer);
Parameters
Parameters Description
context The context to initialize.
length Digest bit length to use with the SHA-256 algorithm.
SHA2_224 or SHA2_256.
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 uint32_t
words. Otherwise, this buffer must contain 64 32-bit words,
but performance will be slightly improved.
Function
void SHA256_Initialize ( SHA256_CONTEXT * context, SHA256_BIT_LENGTH length, uint32_t * workingBuffer);
1.6 Library Interface MLA - Crypto Hash Library Help SHA-256
18
1
Protego_Release_01_05-Related-OEM-Documentation-MLA_v2013_12_20-help_mla_crypto_hash.pdf