Accelerated SHA-1 Hash Function
Detailed Description
Accelerated mbed TLS SHA-1 cryptographic hash function for the mbed TLS API using Silicon Labs peripherals. This implementation builds on the PSA Crypto drivers (Silicon Labs Cryptography Hardware Acceleration Plugins for PSA Crypto).
Macros | |
#define | SL_HASH_OPERATION_CTX_TYPE sli_se_transparent_hash_operation_t |
Typedefs | |
typedef SL_HASH_OPERATION_CTX_TYPE | mbedtls_sha1_context |
SHA-1 context structure. | |
Functions | |
void | mbedtls_sha1_init (mbedtls_sha1_context *ctx) |
Initialize SHA-1 context. | |
void | mbedtls_sha1_free (mbedtls_sha1_context *ctx) |
Clear SHA-1 context. | |
void | mbedtls_sha1_clone (mbedtls_sha1_context *dst, const mbedtls_sha1_context *src) |
Clone (the state of) a SHA-1 context. | |
int | mbedtls_sha1_starts_ret (mbedtls_sha1_context *ctx) |
SHA-1 context setup. | |
int | mbedtls_sha1_update_ret (mbedtls_sha1_context *ctx, const unsigned char *input, size_t ilen) |
SHA-1 process buffer. | |
int | mbedtls_sha1_finish_ret (mbedtls_sha1_context *ctx, unsigned char output[20]) |
SHA-1 final digest. | |
int | mbedtls_internal_sha1_process (mbedtls_sha1_context *ctx, const unsigned char data[64]) |
SHA-1 process data block (internal use only) | |
Macro Definition Documentation
#define SL_HASH_OPERATION_CTX_TYPE sli_se_transparent_hash_operation_t |
Definition at line 53
of file sha1_alt.h
.
Typedef Documentation
SHA-1 context structure.
Definition at line 71
of file sha1_alt.h
.
Function Documentation
int mbedtls_internal_sha1_process | ( | mbedtls_sha1_context * | ctx, |
const unsigned char | data[64] |
||
) |
SHA-1 process data block (internal use only)
- Parameters
-
ctx
SHA-1 context data
The data block being processed.
- Returns
0
if successful
- Warning
- SHA-1 is considered a weak message digest and its use constitutes a security risk. We recommend considering stronger message digests instead.
void mbedtls_sha1_clone | ( | mbedtls_sha1_context * | dst, |
const mbedtls_sha1_context * | src |
||
) |
Clone (the state of) a SHA-1 context.
- Parameters
-
dst
The destination context src
The context to be cloned
int mbedtls_sha1_finish_ret | ( | mbedtls_sha1_context * | ctx, |
unsigned char | output[20] |
||
) |
SHA-1 final digest.
- Parameters
-
ctx
SHA-1 context output
SHA-1 checksum result
- Returns
0
if successful
void mbedtls_sha1_free | ( | mbedtls_sha1_context * | ctx | ) |
Clear SHA-1 context.
- Parameters
-
ctx
SHA-1 context to be cleared
void mbedtls_sha1_init | ( | mbedtls_sha1_context * | ctx | ) |
Initialize SHA-1 context.
- Parameters
-
ctx
SHA-1 context to be initialized
int mbedtls_sha1_starts_ret | ( | mbedtls_sha1_context * | ctx | ) |
SHA-1 context setup.
- Parameters
-
ctx
context to be initialized
- Returns
0
if successful
int mbedtls_sha1_update_ret | ( | mbedtls_sha1_context * | ctx, |
const unsigned char * | input, |
||
size_t | ilen |
||
) |
SHA-1 process buffer.
- Parameters
-
ctx
SHA-1 context input
buffer holding the data ilen
length of the input data
- Returns
0
if successful