mirror of https://github.com/ARMmbed/mbed-os.git
[NUC472/M487] Remove unnecessary H/W context clone functions in SHA alter.
parent
acff29e6f2
commit
4023078e14
|
|
@ -59,12 +59,6 @@ void mbedtls_sha1_hw_free(crypto_sha_context *ctx)
|
|||
crypto_zeroize(ctx, sizeof(*ctx));
|
||||
}
|
||||
|
||||
void mbedtls_sha1_hw_clone(crypto_sha_context *dst,
|
||||
const crypto_sha_context *src)
|
||||
{
|
||||
*dst = *src;
|
||||
}
|
||||
|
||||
void mbedtls_sha1_hw_starts(crypto_sha_context *ctx)
|
||||
{
|
||||
// NOTE: mbedtls may call mbedtls_shaXXX_starts multiple times and then call the ending mbedtls_shaXXX_finish. Guard from it.
|
||||
|
|
@ -138,12 +132,6 @@ void mbedtls_sha256_hw_free(crypto_sha_context *ctx)
|
|||
crypto_zeroize(ctx, sizeof(*ctx));
|
||||
}
|
||||
|
||||
void mbedtls_sha256_hw_clone(crypto_sha_context *dst,
|
||||
const crypto_sha_context *src)
|
||||
{
|
||||
*dst = *src;
|
||||
}
|
||||
|
||||
void mbedtls_sha256_hw_starts( crypto_sha_context *ctx, int is224)
|
||||
{
|
||||
// NOTE: mbedtls may call mbedtls_shaXXX_starts multiple times and then call the ending mbedtls_shaXXX_finish. Guard from it.
|
||||
|
|
@ -219,12 +207,6 @@ void mbedtls_sha512_hw_free(crypto_sha_context *ctx)
|
|||
crypto_zeroize(ctx, sizeof(*ctx));
|
||||
}
|
||||
|
||||
void mbedtls_sha512_hw_clone(crypto_sha_context *dst,
|
||||
const crypto_sha_context *src)
|
||||
{
|
||||
*dst = *src;
|
||||
}
|
||||
|
||||
void mbedtls_sha512_hw_starts( crypto_sha_context *ctx, int is384)
|
||||
{
|
||||
// NOTE: mbedtls may call mbedtls_shaXXX_starts multiple times and then call the ending mbedtls_shaXXX_finish. Guard from it.
|
||||
|
|
|
|||
|
|
@ -47,8 +47,6 @@ void crypto_sha_getinternstate(unsigned char output[], size_t olen);
|
|||
|
||||
void mbedtls_sha1_hw_init( crypto_sha_context *ctx );
|
||||
void mbedtls_sha1_hw_free( crypto_sha_context *ctx );
|
||||
void mbedtls_sha1_hw_clone( crypto_sha_context *dst,
|
||||
const crypto_sha_context *src );
|
||||
void mbedtls_sha1_hw_starts( crypto_sha_context *ctx );
|
||||
void mbedtls_sha1_hw_update( crypto_sha_context *ctx, const unsigned char *input, size_t ilen );
|
||||
void mbedtls_sha1_hw_finish( crypto_sha_context *ctx, unsigned char output[20] );
|
||||
|
|
@ -60,8 +58,6 @@ void mbedtls_sha1_hw_process( crypto_sha_context *ctx, const unsigned char data[
|
|||
|
||||
void mbedtls_sha256_hw_init( crypto_sha_context *ctx );
|
||||
void mbedtls_sha256_hw_free( crypto_sha_context *ctx );
|
||||
void mbedtls_sha256_hw_clone( crypto_sha_context *dst,
|
||||
const crypto_sha_context *src );
|
||||
void mbedtls_sha256_hw_starts( crypto_sha_context *ctx, int is224 );
|
||||
void mbedtls_sha256_hw_update( crypto_sha_context *ctx, const unsigned char *input,
|
||||
size_t ilen );
|
||||
|
|
@ -74,8 +70,6 @@ void mbedtls_sha256_hw_process( crypto_sha_context *ctx, const unsigned char dat
|
|||
|
||||
void mbedtls_sha512_hw_init( crypto_sha_context *ctx );
|
||||
void mbedtls_sha512_hw_free( crypto_sha_context *ctx );
|
||||
void mbedtls_sha512_hw_clone( crypto_sha_context *dst,
|
||||
const crypto_sha_context *src );
|
||||
void mbedtls_sha512_hw_starts( crypto_sha_context *ctx, int is384 );
|
||||
void mbedtls_sha512_hw_update( crypto_sha_context *ctx, const unsigned char *input,
|
||||
size_t ilen );
|
||||
|
|
|
|||
|
|
@ -59,12 +59,6 @@ void mbedtls_sha1_hw_free(crypto_sha_context *ctx)
|
|||
crypto_zeroize(ctx, sizeof(*ctx));
|
||||
}
|
||||
|
||||
void mbedtls_sha1_hw_clone(crypto_sha_context *dst,
|
||||
const crypto_sha_context *src)
|
||||
{
|
||||
*dst = *src;
|
||||
}
|
||||
|
||||
void mbedtls_sha1_hw_starts(crypto_sha_context *ctx)
|
||||
{
|
||||
// NOTE: mbedtls may call mbedtls_shaXXX_starts multiple times and then call the ending mbedtls_shaXXX_finish. Guard from it.
|
||||
|
|
@ -138,12 +132,6 @@ void mbedtls_sha256_hw_free(crypto_sha_context *ctx)
|
|||
crypto_zeroize(ctx, sizeof(*ctx));
|
||||
}
|
||||
|
||||
void mbedtls_sha256_hw_clone(crypto_sha_context *dst,
|
||||
const crypto_sha_context *src)
|
||||
{
|
||||
*dst = *src;
|
||||
}
|
||||
|
||||
void mbedtls_sha256_hw_starts( crypto_sha_context *ctx, int is224)
|
||||
{
|
||||
// NOTE: mbedtls may call mbedtls_shaXXX_starts multiple times and then call the ending mbedtls_shaXXX_finish. Guard from it.
|
||||
|
|
|
|||
|
|
@ -47,8 +47,6 @@ void crypto_sha_getinternstate(unsigned char output[], size_t olen);
|
|||
|
||||
void mbedtls_sha1_hw_init( crypto_sha_context *ctx );
|
||||
void mbedtls_sha1_hw_free( crypto_sha_context *ctx );
|
||||
void mbedtls_sha1_hw_clone( crypto_sha_context *dst,
|
||||
const crypto_sha_context *src );
|
||||
void mbedtls_sha1_hw_starts( crypto_sha_context *ctx );
|
||||
void mbedtls_sha1_hw_update( crypto_sha_context *ctx, const unsigned char *input, size_t ilen );
|
||||
void mbedtls_sha1_hw_finish( crypto_sha_context *ctx, unsigned char output[20] );
|
||||
|
|
@ -60,8 +58,6 @@ void mbedtls_sha1_hw_process( crypto_sha_context *ctx, const unsigned char data[
|
|||
|
||||
void mbedtls_sha256_hw_init( crypto_sha_context *ctx );
|
||||
void mbedtls_sha256_hw_free( crypto_sha_context *ctx );
|
||||
void mbedtls_sha256_hw_clone( crypto_sha_context *dst,
|
||||
const crypto_sha_context *src );
|
||||
void mbedtls_sha256_hw_starts( crypto_sha_context *ctx, int is224 );
|
||||
void mbedtls_sha256_hw_update( crypto_sha_context *ctx, const unsigned char *input,
|
||||
size_t ilen );
|
||||
|
|
|
|||
Loading…
Reference in New Issue