STCRYPTOLIB_SHA512_ALT ¶
MBEDTLS IMPLEMENTATION STCRYPTOLIB SHA512 ALT FUNCTIONS ¶
- group MBEDTLS_IMPLEMENTATION_STCRYPTOLIB_SHA512_ALT_FUNCTIONS
-
Public API functions for STCRYPTOLIB SHA512 alternate implementation.
FIPS-180-2 compliant SHA-512 implementation
This file implements SHA512 based on STM32 crypto library.
The SHA-512 Secure Hash Standard was published by NIST in 2002.
http://csrc.nist.gov/publications/fips/fips180-2/fips180-2.pdf
Functions
-
void
mbedtls_sha512_init
(
mbedtls_sha512_context
*
ctx
)
-
void
mbedtls_sha512_free
(
mbedtls_sha512_context
*
ctx
)
-
void
mbedtls_sha512_clone
(
mbedtls_sha512_context
*
dst
,
const
mbedtls_sha512_context
*
src
)
-
int
mbedtls_sha512_starts
(
mbedtls_sha512_context
*
ctx
,
int
is384
)
-
int
mbedtls_internal_sha512_process
(
mbedtls_sha512_context
*
ctx
,
const
unsigned
char
data
[
128
]
)
¶
-
int
mbedtls_sha512_update
(
mbedtls_sha512_context
*
ctx
,
const
unsigned
char
*
input
,
size_t
ilen
)
-
int
mbedtls_sha512_finish
(
mbedtls_sha512_context
*
ctx
,
unsigned
char
*
output
)
-
void
mbedtls_sha512_init
(
mbedtls_sha512_context
*
ctx
)
MBEDTLS IMPLEMENTATION STCRYPTOLIB SHA512 ALT TYPES ¶
- group MBEDTLS_IMPLEMENTATION_STCRYPTOLIB_SHA512_ALT_TYPES
-
This file contains SHA-384 and SHA-512 definitions and functions based on STM32 crypto library.
The Secure Hash Algorithms 384 and 512 (SHA-384 and SHA-512) cryptographic hash functions are defined in FIPS 180-4: Secure Hash Standard (SHS) .
-
struct
mbedtls_sha512_context
-
#include <hal_sha512_alt.h>
SHA-512 context structure.
The structure is used both for SHA-512 and for SHA-384 checksum calculations. The choice between these two is made in the call to mbedtls_sha512_starts_ret().
Public Members
-
int
is384
-
0 = use SHA512, 1 = use SHA384
-
uint32_t
output_size_byte
-
output length
-
cmox_hash_handle_t
*
hash_ctx
-
Hash ctx
-
cmox_sha512_handle_t
sha512_ctx
-
Sha512 ctx
-
cmox_sha384_handle_t
sha384_ctx
-
Sha384 ctx
-
size_t
dig_len
-
Digest len generate by STCryptoLib
-
uint8_t
is384
-
1 if sha384, 0 otherwise
-
int
is384
-
struct
mbedtls_sha512_context