4 ms·
Recognizing a need for non-disruptive extensability is yet another benefit of decades' hindsight. Invariably, though, dimensions not so well allowed for will sp
by ncmncm 5y ago
Recognizing a need for non-disruptive extensability is yet another benefit of decades' hindsight. Invariably, though, dimensions not so well allowed for will sprout necessary extensions like thistles that need to be lived with indefinitely.
Of much greater value than smugness for bullets dodged is humility in recognition that not all will be (or, indeed, have been).
- tialaramex 5y agoSure, however, sometimes it turns out you did a good enough job and you're done. Subsequent work is academically interesting or has some narrow use cases, but there isn't going to be further revolutionary change. In cryptography for example, AES-256 is probably enough. Permanently. When DES was designed its keys were purposefully too short and the block size was purposefully too small, and those are the only two elements that are actually broken decades later despite years of intense scrutiny, in AES the keys are long enough and the block size is big enough, and so we're done. Or in audio. Some prototype work for Sony's Compact Disc assumed 14-bit PCM. 14-bit PCM is kinda marginal, some people are going to notice if the track is properly dithered, trivial transformations leave noticeable distortion, levels must be set correctly at all stages, and so you can make a reasonable argument it's not quite good enough. But they actually shipped 16-bit PCM. And 16-bit PCM is easily transparent. Bad dithering in the final mix? Can't hear it. The recording studio wants 20-bit PCM (for headroom), non-audio sampling applications may need 24-bit PCM, but for recorded music playback we are done. It's also disingenuous to say bullets were merely dodged. Happening to not have two increment operators because you couldn't figure out how to do that in your parser would be a bullet dodged. Intentionally choosing not to provide either of them because they are footguns is something else. C++ is old, and C is even older, but neither of them is old enough to argue that all their mistakes were unrecognised at the time.
- ncmncm 5y agoC++ had no choice about increment operators; they came to it directly from C, so anything "recognized" in the '80s would be wholly moot. If you expect to maintain that C's post-increment operator was recognized as some sort of problem in the mid-'70s, you will need documentary evidence. As Bruce Schneier likes to say, cryptanalysis only ever gets better; it never gets worse. The best we can say about AES-256 is that it might be good enough for any chosen period, with probability declining monotonically as the period increases. But the key schedules originally published for AES-256 made it no stronger than AES-128. I don't know if that detail has been fixed in a revision, or if it is still no stronger than AES-128. For Wireguard, Jason chose ChaCha20. It is many years too early to determine which parts of Rust are "done". What we can say with certainty is that some that were thought done will turn out not to be, some not provisioned for extensions will end up needing them, and some defaults will turn out to be regrettable but not fixable.
- tialaramex 5y ago> C++ had no choice about increment operators I don't buy this at all. Stroustrup was keen on this particular bad idea, it is even provisioned with operator overloading that has a special optional syntax so that early weak C++ compilers can overload it despite lacking a good way to distinguish the two cases. He spends two pages of the Second Edition defending this construction which, we may note, is wholly a C feature not something novel in C++: while (*p++ = *q++) ; Stroustrup apparently admires this for being terse, admitting that this chosen example is neither commonly faster nor easier to understand than alternatives. > cryptanalysis only ever gets better; it never gets worse And it did. Eventually Linear cryptanalysis breaks DES, and it is theorised (but not demonstrated) that a refined multiple linear cryptanalysis breaks DES in just 2^41 known plaintexts less than fifty years after it was standardized... Completely useless of course, but that's the state of the art after fifty years of only getting better. Work on AES has also proceeded as Bruce would suggest, and after twenty years, with just 2^254.3 operations you can do key recovery on AES-256. AES-256 doesn't actually need to be stronger than AES-128 in the sense you're talking about, 128-bits is plenty, the trick is that the larger keys defeat Grover's algorithm and thus defang hypothetical inexpensive yet powerful quantum computers. With Grover's algorithm you get to do 2^128 quantum operations instead of 2^256 conventional operations to perform a brute force attack, but you can't do 2^128 operations either because that's far too many, so you lose. > Jason chose ChaCha20 WireGuard practices zero-agility, it picks exactly one of each component and if there's a problem the entire protocol has to be refreshed. So, choosing ChaCha20 rather than AES means it's penalized slightly on fast modern general purpose hardware (e.g. your laptop) but much faster than it might be otherwise on cheap micro controllers and archaic gear, a very reasonable trade. [Modern TLS just can choose whichever both parties agree on]. > It is many years too early to determine which parts of Rust are "done". I mostly agree with this. However, there's a spectrum. I'm pretty confident that in 2050 programmers will still find core::cmp::Ordering useful, I don't think a fundamental revolution in mathematics will have rendered the idea that 5 is Less than 10 useless. In contrast core::sync::atomic::Ordering might well have fallen entirely out of use in 2050 with a very different model of concurrent programming for very different hardware where Acquire-Release semantics seem silly. Or for example I'd be astonished if "constant by default" turned out to be a bad idea but not at all surprised if "narrowing as" goes away because it turns out that's a bad idea.