STCRYPTOLIB_SHA256_ALT ¶
MBEDTLS IMPLEMENTATION STCRYPTOLIB SHA256 ALT FUNCTIONS ¶
- group MBEDTLS_IMPLEMENTATION_STCRYPTOLIB_SHA256_ALT_FUNCTIONS
-
Public API functions for STCRYPTOLIB SHA256 alternate implementation.
FIPS-180-2 compliant SHA-256 implementation
This file implements SHA256 based on STM32 crypto library.
The SHA-256 Secure Hash Standard was published by NIST in 2002.
http://csrc.nist.gov/publications/fips/fips180-2/fips180-2.pdf
Functions
-
void
mbedtls_sha256_init
(
mbedtls_sha256_context
*
ctx
)
-
void
mbedtls_sha256_free
(
mbedtls_sha256_context
*
ctx
)
-
void
mbedtls_sha256_clone
(
mbedtls_sha256_context
*
dst
,
const
mbedtls_sha256_context
*
src
)
-
int
mbedtls_sha256_starts
(
mbedtls_sha256_context
*
ctx
,
int
is224
)
-
int
mbedtls_internal_sha256_process
(
mbedtls_sha256_context
*
ctx
,
const
unsigned
char
data
[
64
]
)
¶
-
int
mbedtls_sha256_update
(
mbedtls_sha256_context
*
ctx
,
const
unsigned
char
*
input
,
size_t
ilen
)
-
int
mbedtls_sha256_finish
(
mbedtls_sha256_context
*
ctx
,
unsigned
char
*
output
)
-
void
mbedtls_sha256_init
(
mbedtls_sha256_context
*
ctx
)
MBEDTLS IMPLEMENTATION STCRYPTOLIB SHA256 ALT TYPES ¶
- group MBEDTLS_IMPLEMENTATION_STCRYPTOLIB_SHA256_ALT_TYPES
-
This file contains SHA-224 and SHA-256 definitions and functions based on STM32 crypto library.
The Secure Hash Algorithms 224 and 256 (SHA-224 and SHA-256) cryptographic hash functions are defined in FIPS 180-4: Secure Hash Standard (SHS) .
SHA-256 context structure
The structure is used both for SHA-256 and for SHA-224 checksum calculations. The choice between these two is made in the call to mbedtls_sha256_starts_ret().
-
struct
mbedtls_sha256_context
-
#include <hal_sha256_alt.h>
Public Members
-
int
is224
-
0 = use SHA256, 1 = use SHA224
-
uint32_t
output_size_byte
-
output length
-
cmox_hash_handle_t
*
hash_ctx
-
Hash ctx
-
cmox_sha256_handle_t
sha256_ctx
-
Sha256 ctx
-
cmox_sha224_handle_t
sha224_ctx
-
Sha224 ctx
-
size_t
dig_len
-
Digest len generate by STCryptoLib
-
uint8_t
is224
-
1 if sha224, 0 otherwise
-
int
is224
-
struct
mbedtls_sha256_context