diff --git a/library/platform_util.c b/library/platform_util.c index 3fa943738..5e938f9c9 100644 --- a/library/platform_util.c +++ b/library/platform_util.c @@ -269,8 +269,8 @@ void mbedtls_platform_random_delay( void ) i++; /* Dummy calculations to increase the time between iterations and * make side channel attack more difficult by reducing predictability - * of its behaviour */ - shift = rn_2 & 0x07; + * of its behaviour. */ + shift = ( rn_2 & 0x07 ) + 1; if ( i % 2 ) rn_2 = ( rn_2 >> shift ) | ( rn_2 << ( 32 - shift ) ); else