Add comment for mbedtls_platform_random_delay()
Signed-off-by: Piotr Nowicki <piotr.nowicki@arm.com>
diff --git a/library/platform_util.c b/library/platform_util.c
index 3869f30..19958fa 100644
--- a/library/platform_util.c
+++ b/library/platform_util.c
@@ -190,6 +190,9 @@
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 ) );