
Zip Encryption Explained
Question:
I am inquiring about the Zip component in Chilkat's suite (.NET version). We need to compress and encrypt large quantities of files to be sent across unsecured networks. We prefer to use the rijndael (AES) algorithm/encryption. Given the documentation for the Zip component, I assume that only the Passphrase is needed for the AES encryption as there are'nt any other options. Using the Crypt component does have all options (like Initilization Vector, Key Length, Cipher Mode etc). Is there any way to configure this in Encrypting the Zip components?
If not, what is the default key length size and cipher mode for the encryption under the Zip component? Also can the Compression Algorithm (BZIP2) under the Crypt component as efficient as the Zip component? Is using encryption + compression more efficient with the Zip component or the Crypt component?
Answer:
The encryption for the Zip component is determined by the Encryption property:
0 = none, 1 = blowfish, 2 = twofish, 3 = rijndael (AES).
There is also a Zip.EncryptKeyLength property that can be set to either 128, 192, or 256
to get up to 256-bit encryption.
One important note: the PasswordProtect property is separate from the Encryption property.
If it is set, you get the older (more standard) Zip password protection, which is not very secure.
To get AES encryption, you would leave PasswordProtect off, but set the Encryption property to 3 (AES).
I find both BZip2 and Zip compression to be very similar in performance, so in my opinion, either is fine.
When using the Zip AES Encryption, the cipher mode is "CBC" (Cipher Block Chaining) and NOT ECB.
The IV is effectively all zeros. If these parameters need to be changed, you would have to use the
Crypt component.
|