mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-23 09:35:39 +00:00
Add comment for mbedtls_platform_random_delay()
Signed-off-by: Piotr Nowicki <piotr.nowicki@arm.com>
This commit is contained in:
parent
478b05c34c
commit
b06ec05dc0
|
@ -190,6 +190,9 @@ void mbedtls_platform_random_delay( void )
|
|||
do
|
||||
{
|
||||
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;
|
||||
if ( i % 2 )
|
||||
rn_2 = (uint32_t)( rn_2 >> shift | rn_2 << ( 32 - shift ) );
|
||||
|
|
Loading…
Reference in a new issue