From f06a57237bb34010a280e4f4e96b76af59ae6c44 Mon Sep 17 00:00:00 2001 From: Martin Milata Date: Wed, 7 Jul 2021 13:08:21 +0200 Subject: [PATCH] style(core): trezorhal/random_delays.c --- core/embed/trezorhal/random_delays.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/core/embed/trezorhal/random_delays.c b/core/embed/trezorhal/random_delays.c index 6ad90b71e..a2f11bd31 100644 --- a/core/embed/trezorhal/random_delays.c +++ b/core/embed/trezorhal/random_delays.c @@ -18,14 +18,15 @@ */ /* -Random delay interrupts (RDI) is a contermeasure against side channel attacks. It -consists of an interrupt handler that is supposed to be called every millisecond -or so. The handler waits for a random number of cpu ticks that is a sample of so -called floating mean distribution. That means that the number is the sum of two -numbers generated uniformly at random in the interval [0, 255]. The first number -is generated freshly for each call of the handler, the other number is supposed -to be refreshed when the device performs an operation that leaks the current -state of the execution flow, such as sending or receiving an usb packet. +Random delay interrupts (RDI) is a contermeasure against side channel attacks. +It consists of an interrupt handler that is supposed to be called every +millisecond or so. The handler waits for a random number of cpu ticks that is a +sample of so called floating mean distribution. That means that the number is +the sum of two numbers generated uniformly at random in the interval [0, 255]. +The first number is generated freshly for each call of the handler, the other +number is supposed to be refreshed when the device performs an operation that +leaks the current state of the execution flow, such as sending or receiving an +usb packet. See Differential Power Analysis in the Presence of Hardware Countermeasures by Christophe Clavier, Jean-Sebastien Coron, Nora Dabbous and Efficient Use of