2 ms·
ZIP encryption is an anti-feature, and you should probably never, ever use it. The problem is that the ZIP ecosystem is full of implementations of horrible inse
by tptacek 5y ago
ZIP encryption is an anti-feature, and you should probably never, ever use it. The problem is that the ZIP ecosystem is full of implementations of horrible insecure cipher constructions (even the modern implementations may support them for backwards compatibility). "Horrible" here means "breakable with a Perl script".
We relied on ZIP encryption at a previous firm, because no client of ours could ever get PGP to work. But we had to train everyone to use 7z, and getting files back from clients was fraught (they might just click the "encrypt" button in whichever random ZIP program they used).
If you want to encrypt an archive file, you should do it with a dedicated encryption program that you trust (Filippo Valsorda's `age` is a good bet, since it has good implementations in both Go and Rust, so it's very easy to integrate into designs, and also has a very clean, simple command line interface). You should not lean on ZIP's supposed AES support.
The rest of this critique of `sqlar` might be valid! But I can't let the encryption thing pass unchallenged.
- lifthrasiir 5y agoI think I made it clear that ZIP encryption is "very bad" :-)
- tptacek 5y agoTotally fair! I think I'm mostly pushing back on the idea that archive formats with built-in encryption are a good idea.
- lifthrasiir 5y agoThat's reasonable. Given that compression softwares are likely what typical people would use for encryption though, I'd like to see an actually good encrypted format design in a commonly used archival format. I'm even okay and more than welcome if that'd be just `age` plus some carefully selected headers.
- nextaccountic 5y agoTo be fair, they said that ZIP had very bad encryption.