From fbd60ec77540c8fdef3ea7cbaa7758e564b0d563 Mon Sep 17 00:00:00 2001 From: Raef Coles Date: Mon, 10 Oct 2022 15:09:33 +0100 Subject: [PATCH] Change LMS and LMOTS init functions to use memset Instead of zeroize Signed-off-by: Raef Coles --- library/lmots.c | 4 ++-- library/lms.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/library/lmots.c b/library/lmots.c index 1e2702477..8ffadb89e 100644 --- a/library/lmots.c +++ b/library/lmots.c @@ -395,7 +395,7 @@ int mbedtls_lms_error_from_psa( psa_status_t status ) void mbedtls_lmots_public_init( mbedtls_lmots_public_t *ctx ) { - mbedtls_platform_zeroize( ctx, sizeof( *ctx ) ) ; + memset( ctx, 0, sizeof( *ctx ) ) ; } void mbedtls_lmots_public_free( mbedtls_lmots_public_t *ctx ) @@ -581,7 +581,7 @@ int mbedtls_lmots_verify( const mbedtls_lmots_public_t *ctx, void mbedtls_lmots_private_init( mbedtls_lmots_private_t *ctx ) { - mbedtls_platform_zeroize( ctx, sizeof( *ctx ) ) ; + memset( ctx, 0, sizeof( *ctx ) ) ; } void mbedtls_lmots_private_free( mbedtls_lmots_private_t *ctx ) diff --git a/library/lms.c b/library/lms.c index b460353a6..c115dac9d 100644 --- a/library/lms.c +++ b/library/lms.c @@ -221,7 +221,7 @@ exit: void mbedtls_lms_public_init( mbedtls_lms_public_t *ctx ) { - mbedtls_platform_zeroize( ctx, sizeof( *ctx ) ) ; + memset( ctx, 0, sizeof( *ctx ) ) ; } void mbedtls_lms_public_free( mbedtls_lms_public_t *ctx ) @@ -526,7 +526,7 @@ static int get_merkle_path( mbedtls_lms_private_t *ctx, void mbedtls_lms_private_init( mbedtls_lms_private_t *ctx ) { - mbedtls_platform_zeroize( ctx, sizeof( *ctx ) ) ; + memset( ctx, 0, sizeof( *ctx ) ) ; } void mbedtls_lms_private_free( mbedtls_lms_private_t *ctx )