5 ms·
It's a bad reaction to a real problem. A good solution would: * Puke warnings on the screen when using insecure algorithms * Guarantee secure algorithms ever
by frognumber 3y ago
It's a bad reaction to a real problem.
A good solution would:
* Puke warnings on the screen when using insecure algorithms
* Guarantee secure algorithms everywhere
These algorithms aren't hard to implement, and anything relying on DES will be faster in interpreted Python than in optimized code on the 80486 it was intended to run on.
I'd rather have this removed than broken, but it makes sense to just fix it.
As a footnote, a lot of code doesn't rely on this for anything high-stakes. If this is hashing passwords on my local machine, it's a backup to a backup for security. It should move to something modern, but it breaking in the meantime is a bigger failure than an obsolete crypto algorithm.
- criddell 3y ago> These algorithms aren't hard to implement As I understand it, they are difficult to implement securely. By that I mean avoid side channel (often timing) attacks.
- miohtama 3y agoPyPi has robust cryptography libraries from likes of Google, others. You do not need to implement them yourself. You can just install a well-known library used by the best in the software development industry.
- maxbond 3y agoCryptography should fail to operate rather than operate insecurely. There's also a lot of precedent for removing these security footguns from the stdlib that no one actually uses. From the top of my head, the `imgop` library and the `cgi.escape` function. (My personal bugbear is `csv.Sniffer` which, as far as I can see, has no correct use case, it's just broken.) I'm somewhat out of touch with Python, but as far as I know, it's been best practice to use `cryptography`[1] for a long, long time. ETA: Just to note - DES is super, super broken. It shouldn't even be an option. DES was published in 1975. 3DES was published in 1981 - DES has been considered too small a keyspace since 1981. That's older than Python. Exporting DES in your crypto API is a bug. (Apparently, according to Wikipedia, NIST has deprecated all use of DES [including legacy applications] as of 2023. But they only deprecated new applications in 2017, so perhaps I overstate.) [1] https://cryptography.io/en/latest/ https://cryptography.io/en/latest/