Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zip with password bug #671

Open
oDaruma opened this issue Oct 11, 2019 · 7 comments
Open

zip with password bug #671

oDaruma opened this issue Oct 11, 2019 · 7 comments

Comments

@oDaruma
Copy link

oDaruma commented Oct 11, 2019

I have used the zip function with a password to encrypt a file, however, zip succeeded but the password was not matched when decoding.

@n1474335
Copy link
Member

@oDaruma
Copy link
Author

oDaruma commented Oct 17, 2019 via email

@n1474335
Copy link
Member

Yes, I'm seeing that too. I think this is due to the difference between encrypting each file in the archive separately and encrypting the archive itself. We should make this a user choice.

@mubix
Copy link

mubix commented Jan 9, 2020

Having the same issue :/

@slw07g
Copy link

slw07g commented Feb 4, 2020

Experienced the same issue. unzipping it may work inside of CyberChef, but when I try to use any other tool to unzip a file that I zipped+encrypted with cyberchef, the unzipping fails.

For example, try unzipping the file CyberChef generates with Windows built-in unzip and 7-zip.

Interestingly, when I uploaded a file to a sandbox which handles encrypted zips, the sandbox was able to unzip the file with no issue.

@mikecat
Copy link
Contributor

mikecat commented Nov 18, 2021

This issue looks like due to a bug in zlib.js.
Due to the bug, CRC information is not correctly set to the encryption header.
Therefore, tools that check this information will reject the correct password as incorrect unless the information happens to become the same as what is expected.
This check is not directly related to the encryption, so tools that don't check this will be able to decrypt correctly.

I reported the bug:
Bug in zip encryption · Issue #83 · imaya/zlib.js

@d-Rickyy-b
Copy link

I also came across this issue. zlib.js seems to be abandoned since it's last change was five years ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants