zerox251 / winzipaes

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

Patch to use Java Cryptography Architecture APIs #35

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Attached is a patch to add adapters that use the Java Cryptography Architecture 
APIs instead of BouncyCastle.  (BouncyCastle can still be registered as a 
provider through JCA if desired.)  These adapters also support 128- and 192-bit 
keys, but I left the rest of winzipaes still hard coded for 256-bit keys.

There are also a bunch of ugly "throw new Error()"s that shouldn't happen 
anyway, but I wasn't sure how to best handle.

I've also uploaded this diff to Rietveld at 
http://codereview.appspot.com/4515130, if you're familiar with using it for 
code reviews.

I've lightly tested that AesZipFileEncrypter still generates zip files 
compatible with p7zip, but I haven't tested AesZipFileDecrypter yet.

Original issue reported on code.google.com by mdemp...@google.com on 24 May 2011 at 2:46

Attachments:

GoogleCodeExporter commented 8 years ago
Hello Matthew,

thanks a lot for the patch. Unfortunately, I get an InvalidKeyException (in all 
testcases). Do I have to configure the JCA provider explicitly?

Regards,
Olaf

Original comment by olaf.merkert on 25 May 2011 at 5:56

GoogleCodeExporter commented 8 years ago
Odd.  I didn't do any explicit JCA provider configuration in my testing.  What 
version of the JRE are you using?  It works fine for me with:

$ java -version
java version "1.6.0_20"
OpenJDK Runtime Environment (IcedTea6 1.9.7) (6b20-1.9.7-0ubuntu1~10.04.1)
OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)

Original comment by mdemp...@google.com on 25 May 2011 at 6:33

GoogleCodeExporter commented 8 years ago
integrated Matthew's patch (some time ago)

Original comment by olaf.merkert on 16 Sep 2011 at 5:05