Skip to content

Is there a limit to password length? #175

Answered by rikyoz
ra-dave asked this question in Q&A
Discussion options

You must be logged in to vote

Hi!
Yeah, it seems to be a limitation of 7-zip, even in the GUI program:

I did a quick search in the 7-zip source code, and indeed, it doesn't allow passwords longer than 99 characters when using AES encryption (https://github.com/rikyoz/7-Zip/blob/df1b8d60abd8246f3cf56c275b0f88ea6d14c4da/CPP/7zip/Archive/Zip/ZipHandlerOut.cpp#L421 https://github.com/rikyoz/7-Zip/blob/df1b8d60abd8246f3cf56c275b0f88ea6d14c4da/CPP/7zip/Crypto/WzAes.h#L38).
Using ZipCrypto, 7-zip doesn't impose the same limit.

I did some tests using WinRar, too, and it managed to create AES256-encrypted Zip files with passwords longer than 99 characters without issues, so it seems more a limitation of 7-zip, not of the Zip …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ra-dave
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants