Re:How Not to Learn Cryptography (2014)
by api on Tuesday June 02, 2020 @04:45AM
(#23389014)
I want to point out just so people understand that NO popular platforms meet these criteria for any algorithm whatsoever. Any CPU with any form of branch prediction or speculative execution can't be made truly totally secure against these attacks, and that is all high performance CPUs.
I suspect these sorts of issues are why black box hardware units like NSA type I encryptors are used for the most sensitive communication.
What you can do with popular platforms is try to mitigate the most egregious and easily exploitable variants by (a) not branching on secret data and (b) avoiding lookup tables or other memory access patterns that depend on secrets. The latter much harder to achieve and is why AES sucks on chips without hardware AES support. (But on chips with that support, it becomes better than alternatives!)
There are other competing practical concerns though like power use, speed, and standards compliance.
This stuff is hard.
Edit: these sorts of attacks do matter and are worth trying to mitigate if your code will ever run in the cloud. In that case it will run on multi tenant machines where there may be malicious neighbors who can analyze timing on shared hardware.
I suspect these sorts of issues are why black box hardware units like NSA type I encryptors are used for the most sensitive communication.
What you can do with popular platforms is try to mitigate the most egregious and easily exploitable variants by (a) not branching on secret data and (b) avoiding lookup tables or other memory access patterns that depend on secrets. The latter much harder to achieve and is why AES sucks on chips without hardware AES support. (But on chips with that support, it becomes better than alternatives!)
There are other competing practical concerns though like power use, speed, and standards compliance.
This stuff is hard.
Edit: these sorts of attacks do matter and are worth trying to mitigate if your code will ever run in the cloud. In that case it will run on multi tenant machines where there may be malicious neighbors who can analyze timing on shared hardware.