Page 1 of 1

7-zip password length limited to 30?

Posted: 19 Aug 2010, 13:05
by daern
To reproduce:

Using the 7z plugin, create an archive containing a single file. Select encrypt, enter a 30 char password, create archive. Use integrity check to confirm that it can decrypt ok.

Now repeat with a 31 char password. Note the CRC error when trying to extract / test the archive.

Any ideas?

Re: 7-zip password length limited to 30?

Posted: 19 Aug 2010, 13:20
by Jan Patera
daern wrote:Now repeat with a 31 char password. Note the CRC error when trying to extract / test the archive.
I can't reproduce it. The limit is 128. I just tried a 60-char password and it worked fine.

Re: 7-zip password length limited to 30?

Posted: 19 Aug 2010, 16:59
by therube
@daern, what version of Salamander & what version of 7-zip plugin?

Re: 7-zip password length limited to 30?

Posted: 19 Aug 2010, 22:59
by therube
OK, I can confirm a problem.

Not at 31 or 62 character PW length, but with an 80 character password.

Select a file
Pack using 7-zip Plugin
Choose Encrypt, (paste in) 80 char PW & confirm

(all other 7-zip settings are at defaults)

Archive is created.

Jump to command prompt
C:\> 7-zip.EXE t archive.7z
7-zip prompts for PW
Paste PW in

7-zip returns: "Everything is Ok"

Back in Salamander
Click on archive.7z
F3 to view the file

You're prompted for the 7-zip PW
Paste the PW in

7-zip presents error message:

"Data error occured when unpacking file 'archive.test'."
"The wrong password may have been entered."

Test Archive, archive.7z, with plugin
Prompts for PW
Paste PW in

Returns: "Archive 'C:\TMP\archive.7z' is corrupted."


Maybe at some "magic" length, plugin is inadvertently tacking on an extra character?
So what I've pasted is correct:
"12345678901234567890123456789012345678901234567890123456789012345678901234567890"
But internally, it sends:
"12345678901234567890123456789012345678901234567890123456789012345678901234567890"+"X"


Now I did not try any password lengths between 62 & 80, but somewhere in there, it must break (for me, & obviously different for daern)?

XP SP3 x86, not much RAM or HDD space, 7-zip command line version 4.65, plugin version 1.24 ;-).

Re: 7-zip password length limited to 30?

Posted: 20 Aug 2010, 07:23
by Jan Patera
therube wrote:Now I did not try any password lengths between 62 & 80, but somewhere in there, it must break (for me, & obviously different for daern)?
Ech, indeed, guys, you are right. The exact limit depends on the font, actually. The password edit field was not autoscrolled -> you could enter as much characters as much the width of the control was. The limit was 71 on my WinXP. The same problem was in Eroiica Viewer. Both solved for the next version of Salamander (2.54)