Changed every memcpy to SCA equivalent mbedtls_platform_memcpy
This makes physical attacks more difficult.
diff --git a/library/ripemd160.c b/library/ripemd160.c
index 3a896ae..bdfad2c 100644
--- a/library/ripemd160.c
+++ b/library/ripemd160.c
@@ -340,7 +340,7 @@
if( left && ilen >= fill )
{
- memcpy( (void *) (ctx->buffer + left), input, fill );
+ mbedtls_platform_memcpy( (void *) (ctx->buffer + left), input, fill );
if( ( ret = mbedtls_internal_ripemd160_process( ctx, ctx->buffer ) ) != 0 )
return( ret );
@@ -361,7 +361,7 @@
if( ilen > 0 )
{
- memcpy( (void *) (ctx->buffer + left), input, ilen );
+ mbedtls_platform_memcpy( (void *) (ctx->buffer + left), input, ilen );
}
return( 0 );