by ZoFreX · 12y ago · 0 comments
I understand the problems with adding a random delay to try to add "noise" to the measurements, but what if the delay was non-random? Specifically, what if the delay was calculated to make the whole operation always take constant time?
Example:
User input comes in on thread A. Thread A sends the request to thread B and delays for time t. Thread B does the encryption and sets the result. Thread A resumes and returns the result.
If we pick 't' such that it is always larger than the amount of time it takes to do the operation, any timing differences observed by the attacker won't be correlated with the timing of the cryptographic operations. I think.
(NB: it could be something other than threads, such as "microservice B" instead of "thread B", that particular detail isn't important)
For example: http://rd.springer.com/chapter/10.1007%2F11935070_14
Actually, this isn't problematic at all... it's called random blinding: https://en.wikipedia.org/wiki/Blinding_(cryptography)
It's a commonly used method used to implement things like RSA in constant time.
c = encrypt(k, m)
sleep(rand())
return c
Which is not what blinding is. Blinding is not really about adding a random delay as much as it is about preventing an attacker from controlling inputs to variable-time functions.Also, it's not clear how blinding could be applied to AES.