I am using a library to password protect my files into a zip file. The implementation has been taken from this piece of code.
I want to understand which algorithm(if any) has been used here to password protect the files.
The code is minimal and easily readable.
Any leads on this would be helpful.
Asked
Active
Viewed 1,002 times
1
YetAnotherBot
- 113
- 5
1 Answers
3
This is Traditional PKWARE Encryption as documented in the PKWARE ZIP specification (see Section 6.0). It's an old stream cipher which suffers from a known-plaintext attack (see Biham and Stay publications) and has been replaced with AES in newer ZIP archive utilities.
See a lengthy answer here regarding the possibility of ZIP file password recovery when this cipher is in use.
Various people have implemented the known-plaintext attack and code is available (pkcrack and bkcrack).
conchild
- 685
- 5
- 18