1
$\begingroup$

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.

$\endgroup$

1 Answer 1

3
$\begingroup$

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).

$\endgroup$
2
  • $\begingroup$ Thank you for the quick reply. As I understand, PKWARE is an organization. So which algorithm do they use? Or PKWARE is an encryption standard. $\endgroup$ Commented Jul 6, 2018 at 8:54
  • $\begingroup$ It is a proprietary encryption algorithm developed by PKWARE. The algorithm is described in the specification. $\endgroup$
    – conchild
    Commented Jul 6, 2018 at 8:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.