Cryptography in the 2010s is different. Now we start with basic components which are believed to be highly secure — e.g., block ciphers which are believed to be indistinguishable from random permutations — and which have been mathematically proven to be secure against certain types of attacks — e.g., AES is known to be immune to differential cryptanalysis. From those components, we then build higher-order systems using mechanisms which have been proven to not introduce vulnerabilities. For example, if you generate an ordered sequence of packets by encrypting data using an indistinguishable-from-random-permutation block cipher (e.g., AES) in CTR mode using a packet sequence number as the CTR nonce, and then append a weakly-unforgeable MAC (e.g., HMAC-SHA256) of the encrypted data and the packet sequence number, the packets both preserve privacy and do not permit any undetected tampering (including replays and reordering of packets). Life will become even better once Keccak (aka. SHA-3) becomes more widely reviewed and trusted, as its "sponge" construction can be used to construct — with provable security — a very wide range of important cryptographic components.
Cryptography in the 1990s was like trying to build a bridge: You spend a lot of time worrying about making sure that your bridge will still stand even if some of the welds aren't done perfectly, some of the bolts rust, periodic loading results in metal fatigue, et cetera. Theory may say that a particular design will work, but you know that practice never quite matches the theory, so you build in margins of safety, making your structure more costly and more complex as a result. Pure engineering.
Modern cryptography is different; rather than building a bridge, it is like planning a gravity-assisted interplanetary trajectory. Sure, it's complex and you have to get all the details right — but once you start moving, the only way you will fail to reach your destination is if the laws of physics (or mathematics) change. Modern cryptography has developed sufficiently that the theory does match the practice — so rather than learning by watching bridges fall down, it's sufficient to learn the theory, and follow one simple rule: Only do what mathematics says you can do. Pure science.
I'm sure that for what Thomas does, having experience implementing attacks against cryptographic code is very useful. After all, he makes is living finding flaws in application security — and most of the cryptography he encounters is likely to be 1990s-style cryptography. But that is an era which is best left in the past; so for developers, I recommend a more modern approach to cryptography — which means studying the theory and designing systems which you can prove are secure.
from http://www.daemonology.net/blog/2013-06-17-crypto-science-not-engineering.html
No comments:
Post a Comment