4 ms·
I am disappointed in the field of cryptography. I feel like everyone settles for crypto that is 'just strong enough', and it turns out to be broken a decade l
by londons_explore 3y ago
I am disappointed in the field of cryptography. I feel like everyone settles for crypto that is 'just strong enough', and it turns out to be broken a decade later.
I would like to be able to put openssl into "100 year crypto" mode, which means it refuses to encrypt/decrypt/hash anything with any algorithm that doesn't have general consensus among experts that it is unlikely to be broken in 100 years.
We keep using algorithms like SHA1/MD5/SHA256 that merely mix bits with no theoretical basis, and just hope nobody figures out how to unmix them. Yet historically people usually do!
- eru 3y agoWe have some amazing theory around cryptography, but we have no theory that's good enough for your '100 year crypto' goal.
- baobabKoodaa 3y agoWell, depends what you want to do. If you can get away with using a one-time pad, that's 100 year crypto for you.
- tptacek 3y agoIf you're storing a message for 100 years, and you're considering a one-time pad, just put the plaintext message wherever it is you plan to hide the equally long key for 100 years. "You can use a one-time pad" is a little like saying "you can just not encrypt".
- baobabKoodaa 3y agoI don't really get the hostility in your response. Yes, one-time pads are not a practical solution for most use cases, but I never claimed they would be. I was just making a point about their "theoretically unbreakable" property, which I thought is interesting in this context.
- tptacek 3y agoThere's no hostility here, just realism about what one-time pads represent in cryptography.
- eru 3y agoYou are a bit too harsh on the one-time pad. What a one-time pad gives you is the ability to time-shift: You can meet in person now, exchange your one-time pad, and then securely communicate later. (And destroy the pad after you communicated.)
- jxf 3y ago> any algorithm that doesn't have general consensus among experts that it is unlikely to be broken in 100 years Does that algorithm exist and are its performance constraints acceptable to you? If not, you have your answer about why you can't activate "100 year crypto mode".
- londons_explore 3y agoWell there are plenty of use cases where performance isn't the limiting factor. To encrypt a message to my lover, I would be happy to wait multiple seconds - which at 3 Ghz is tens of billions of math operations for a message perhaps just a few paragraphs long. Give people the option between "wait 3 seconds" or "the FBI can read your love letter in a decade", I'm pretty sure most people would choose to wait. Yet programmers have already chosen the other option for the user by picking nearly-broken crypto.
- tptacek 3y agoNo, they haven't. This isn't an accurate framing of how attacks on cryptography work. Ironically: the subject of this thread would probably be pretty helpful in understanding why.
- upofadown 3y ago>...any algorithm that doesn't have general consensus among experts that it is unlikely to be broken in 100 years. How could anyone, expert or not, possibly know this? You would have to be able to predict advances in computing technology and advances in algorithms and the synergy between them.
- londons_explore 3y agoIf the algorithm was based on a theoretically hard mathematical problem perhaps...
- londons_explore 3y agoFor advances in computing, "double the performance every 18 months" would seem like a good upper bound. Algorithm advances are harder to predict, but choosing something dependant on a provably hard mathematical problem would be one approach. Another approach would be a construction that is secure if any of a set of base encryption/hashing primitives remains unbroken. (so an attacker has to break MD5/BLAKE/Whirlpool/SHA256 all at the same time to break your hash). One can probably draw some kind of 'survival' curve to predict how long a given algorithm will stand up before failure, and therefore predict how long a set of say 10 or 20 algorithms would survive.
- upofadown 3y ago>For advances in computing, "double the performance every 18 months" would seem like a good upper bound. But not a realistic one past the mid '00s. Due to the end of Dennard scaling[1] that sort of exponential performance increase is no longer available. At this point a fundamental breakthrough (quantum computing for example) would be required to get a large and cheap increase in computing capability. That puts the hardware side in more or less the same situation as the algorithmic side. A fundamental breakthrough is required. That does not help with the uncertainty here. This stuff is more or less impossible to predict. [1] https://www.extremetech.com/computing/116561-the-death-of-cpu-scaling-from-one-core-to-many-and-why-were-still-stuck https://www.extremetech.com/computing/116561-the-death-of-cp...
- thristian 3y agoAs I understand it, there's two categories of cryptographic algorithms: - ones which we're pretty sure would take longer than the heat death of the universe to crack - ones that turned out not to be as strong as we'd thought Currently your "100 year crypto mode" is "all the non-deprecated algorithms", to the very best of our current knowledge. But that might change at the next cryptography conference. That's why we make algorithms that would take longer than the heat death of the universe to crack - it's the intended lifetime (maybe ten years) multiplied by a safety factor of like a gazillion, because we're still not sure what we can rely on.
- londons_explore 3y agoThis isn't the case. Most of the hashing algorithms have "rounds". For example, SHA1 has 80 rounds. A single round could easily be reversed by you and I. Researchers figure out clever attacks that break a larger and larger number of rounds. For example, 63 rounds of SHA were broken in 2004. When all 80 rounds are broken, the hash algorithm has failed (happened in 2017). However, if one is happy to trade a little performance for security, you could easily multiply the number of rounds by 10 or even 100.
- spac 3y agoSHA1 is definitely not in the category "will not break in 100 years given current knowledge".
- londons_explore 3y agoBut the design of SHA1 looks pretty similar to SHA256[1]... And BLAKE[2].. and many other unbroken hash functions. They nearly all have the idea of doing a bunch of simple bit-mixing operations (for example. shuffle the bits and xor) a lot of times so it becomes infeasible to reason about how to manipulate the input to get a given output. [1]: https://upload.wikimedia.org/wikipedia/commons/thumb/7/7d/SHA-2.svg/400px-SHA-2.svg.png https://upload.wikimedia.org/wikipedia/commons/thumb/7/7d/SH... [2]: https://d3i71xaburhd42.cloudfront.net/cd2e43a515c8a65a58c87e9caa4c514ddc22f4b4/2-Figure2-1.png https://d3i71xaburhd42.cloudfront.net/cd2e43a515c8a65a58c87e...
- tptacek 3y agoThis remark has little to do with the topic of the thread, but for what it's worth, SHA2 doesn't belong near SHA1 and MD5 in your list of "merely mix bits with no theoretical basis" category. SHA2 is fine, and may be fine forever. The theory by which people worked out SHA1 collisions is extraordinarily well studied. And I think it's worth saying: nobody has figured out how to "unmix" MD5 or SHA1: HMAC-SHA1 and HMAC-MD5 are still unbroken.