MCUX CLNS
MCUX Crypto Library Normal Secure
 
Loading...
Searching...
No Matches
mcuxClEls_Hash.h File Reference

ELS header for hashing. More...

#include <mcuxClConfig.h>
#include <mcuxClEls_Common.h>

Go to the source code of this file.

Data Structures

union  mcuxClEls_HashOption_t
 Command option bit field for mcuxClEls_Hash_Async and #mcuxClEls_Hash_ShaDirect. More...
 

Macros

#define MCUXCLELS_HASH_INIT_ENABLE
 Set this option at mcuxClEls_HashOption_t.hashini to initialize the hash.
 
#define MCUXCLELS_HASH_INIT_DISABLE
 Set this option at mcuxClEls_HashOption_t.hashini to continue the hash.
 
#define MCUXCLELS_HASH_LOAD_ENABLE
 Set this option at mcuxClEls_HashOption_t.hashld to load the hash state from pDigest.
 
#define MCUXCLELS_HASH_LOAD_DISABLE
 Set this option at mcuxClEls_HashOption_t.hashld to not load the hash state.
 
#define MCUXCLELS_HASH_OUTPUT_ENABLE
 Set this option at mcuxClEls_HashOption_t.hashoe to output the hash to pDigest.
 
#define MCUXCLELS_HASH_OUTPUT_DISABLE
 Set this option at mcuxClEls_HashOption_t.hashoe to not output the hash.
 
#define MCUXCLELS_HASH_RTF_UPDATE_ENABLE
 Set this option at mcuxClEls_HashOption_t.rtfupd to update the run-time fingerprint (only supported by mcuxClEls_Hash_Async)
 
#define MCUXCLELS_HASH_RTF_UPDATE_DISABLE
 Set this option at mcuxClEls_HashOption_t.rtfupd to not update the run-time fingerprint.
 
#define MCUXCLELS_HASH_RTF_OUTPUT_ENABLE
 Set this option at mcuxClEls_HashOption_t.rtfoe to output the run-time fingerprint (only supported by mcuxClEls_Hash_Async)
 
#define MCUXCLELS_HASH_RTF_OUTPUT_DISABLE
 Set this option at mcuxClEls_HashOption_t.rtfoe to not output the run-time fingerprint.
 
#define MCUXCLELS_HASH_MODE_SHA_224
 Set this option at mcuxClEls_HashOption_t.hashmd to use the hash algorithm SHA-224.
 
#define MCUXCLELS_HASH_MODE_SHA_256
 Set this option at mcuxClEls_HashOption_t.hashmd to use the hash algorithm SHA-256.
 
#define MCUXCLELS_HASH_MODE_SHA_384
 Set this option at mcuxClEls_HashOption_t.hashmd to use the hash algorithm SHA-384.
 
#define MCUXCLELS_HASH_MODE_SHA_512
 Set this option at mcuxClEls_HashOption_t.hashmd to use the hash algorithm SHA-512.
 
#define MCUXCLELS_HASH_VALUE_MODE_SHA_224
 Set this option at #mcuxClEls_HashOption_t.word.value to use the hash algorithm SHA-224.
 
#define MCUXCLELS_HASH_VALUE_MODE_SHA_256
 Set this option at #mcuxClEls_HashOption_t.word.value to use the hash algorithm SHA-256.
 
#define MCUXCLELS_HASH_VALUE_MODE_SHA_384
 Set this option at #mcuxClEls_HashOption_t.word.value to use the hash algorithm SHA-384.
 
#define MCUXCLELS_HASH_VALUE_MODE_SHA_512
 Set this option at #mcuxClEls_HashOption_t.word.value to use the hash algorithm SHA-512.
 
#define MCUXCLELS_HASH_BLOCK_SIZE_SHA_224
 SHA-224 output size: 512 bit (64 bytes)
 
#define MCUXCLELS_HASH_BLOCK_SIZE_SHA_256
 SHA-256 output size: 512 bit (64 bytes)
 
#define MCUXCLELS_HASH_BLOCK_SIZE_SHA_384
 SHA-384 output size: 1024 bit (128 bytes)
 
#define MCUXCLELS_HASH_BLOCK_SIZE_SHA_512
 SHA-512 output size: 1024 bit (128 bytes)
 
#define MCUXCLELS_HASH_STATE_SIZE_SHA_224
 SHA-224 state size: 256 bit (32 bytes)
 
#define MCUXCLELS_HASH_STATE_SIZE_SHA_256
 SHA-256 state size: 256 bit (32 bytes)
 
#define MCUXCLELS_HASH_STATE_SIZE_SHA_384
 SHA-384 state size: 512 bit (64 bytes)
 
#define MCUXCLELS_HASH_STATE_SIZE_SHA_512
 SHA-512 state size: 512 bit (64 bytes)
 
#define MCUXCLELS_HASH_OUTPUT_SIZE_SHA_224
 SHA-224 output size: 224 bit (28 bytes)
 
#define MCUXCLELS_HASH_OUTPUT_SIZE_SHA_256
 SHA-256 output size: 256 bit (32 bytes)
 
#define MCUXCLELS_HASH_OUTPUT_SIZE_SHA_384
 SHA-384 output size: 384 bit (48 bytes)
 
#define MCUXCLELS_HASH_OUTPUT_SIZE_SHA_512
 SHA-512 output size: 512 bit (64 bytes)
 
#define MCUXCLELS_HASH_RTF_OUTPUT_SIZE
 

Functions

MCUXCLELS_API mcuxClEls_Status_t mcuxClEls_Hash_Async (mcuxClEls_HashOption_t options, uint8_t const *pInput, size_t inputLength, uint8_t *pDigest)
 Computes the hash of a message.
 

Detailed Description

ELS header for hashing.

This header exposes functions that enable using the ELS for hashing. There are two modes to hash a message: The asynchronous way as an ELS command, and the SHA-Direct mode which feeds data to the internal registers of the ELS and is synchronous (blocking). The SHA-Direct mode is meant to be used when another command should be executed in parallel on the ELS while the hash operation is still ongoing. For this, use the DMA callback option in #mcuxClEls_Hash_ShaDirect.