by scott_s · 11y ago · 0 comments
I'm not just saying this randomly in any subject that is concerned with correctness, as Regehr's work clearly shows that the places where compilers make the most mistakes are the places that cryptographic functions play in: numeric calculations at the boundaries of what is representable.
I also want to point out that Lipton's first suggestion is to basically have very smart unit tests - which is a good suggestion. If your result should have known properties, test those.
Recommended if you haven't read it already.
https://www.ece.cmu.edu/~ganger/712.fall02/papers/p761-thomp...
That sounds like floating point instructions, and cryptography uses integer instructions.
His blog, academic papers, and the paper I linked, have lots of discussions about integer issues.
[0] http://blog.erratasec.com/2015/03/x86-is-high-level-language...