remicuson / winzipaes

Automatically exported from code.google.com/p/winzipaes
0 stars 0 forks source link

128 bit encryption by JCA not working. #40

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Use a AESEncrypterJCA encrypter
2. Call zipAndEncrypt
3. Change the add(String, InputStream, String), use encrypter.init(password, 
128); in the first line instead of encrypter.init(password, 256); (Line number 
176)

What is the expected output? What do you see instead?
The zip file should be opened by winzip with the given password. 
The file is not getting opened. Also in the file properties, winzip is showing 
256 bit encryption.  

What version of the product are you using? On what operating system?
I am using winzipaes_src_20111204.zip. I also tried with 
winzipaes_src_20110911.zip. 
I am using it on Windows XP 32 bit. 

Please provide any additional information below.
I initially tried changing the init method of AESEncrypterJCA, and tried salt = 
createSalt(keySize / 8), but reverted back after going through the 
specifications again. 

Original issue reported on code.google.com by kashyap....@gmail.com on 8 Dec 2011 at 6:56

Attachments:

GoogleCodeExporter commented 8 years ago
As stated on the project's home page: "This library only supports Win-Zip's 
256-Bit AES mode". It's not enough to just change the crypto libraries key 
size. The byte handling for the zip file varies as well and is not implemented 
yet. If you (or someone else) extends the code, I'm happy to check and 
integrate it.

Original comment by olaf.merkert on 8 Dec 2011 at 5:16