Win a copy of High Performance Python for Data Analytics this week in the Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
  • salvin francis
  • Frits Walraven
  • Piet Souris

AES decryption in Java

Ranch Hand
Posts: 618
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I noticed that this is the only post with aes in it:

Some folks send us password-protected zip files, and in order to automate handling them with Java programs, I have to have Java exec a pkunzip process with the -s (password) flag to extract them. I'd love to not have to use pkunzip, especially because we've occasionally run into problems using the old 16-bit version on newer operating systems, and besides, it would just be plain nice to be able to do it all from within pure Java code.

From what I can tell, the standard way that zip files have been encrypted and decrypted is via the AES algorithm, and while I know the current methods may become outdated soon, I would guess most PKWARE and Winzip software uses the same version of this right now.

However, the details of cryptography are pretty unfamiliar to me, and although I downloaded source from Bouncy Castle, I'm really not sure how to use the AESEngine or any of that. I know how to use the package to unzip a file, but I really don't know how exactly to apply the AES algorithm to the bytes in the file to decrypt it first.

I'm wondering if you have any pointers on how to do this. I realize that the time necessary for me to learn how to do this might not be worth it to me right now, but if there's something already available, or if it's not THAT hard to just hack out a simple tailored solution, then I'd like to get it working. It seems like this would be something the Java community would already want!
[ September 13, 2004: Message edited by: Stephen Huey ]
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic