wood burning stoves 2.0*
The moose likes Security and the fly likes Algorithm AES not available Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Security
Bookmark "Algorithm AES not available" Watch "Algorithm AES not available" New topic
Author

Algorithm AES not available

Peter Primrose
Ranch Hand

Joined: Sep 10, 2004
Posts: 755
err msg: Algorithm AES not available
Does anyone know what can possibly cause this problem?

on my computer (XP) everything works fine, but when trying the same code on a different computer (MS2003) it doesn't work.

I get "Algorithm AES not available"

anyonw?
Lin Feng
Ranch Hand

Joined: Dec 11, 2002
Posts: 142
You should config the java.security on the different computer to add a Provider with AES algorithm

Thanks

Lin
Peter Primrose
Ranch Hand

Joined: Sep 10, 2004
Posts: 755
Lin, thank you so much for your reply. How do I do that?
what should I add there?
Lin Feng
Ranch Hand

Joined: Dec 11, 2002
Posts: 142
You can compare the java.security files on the two computers.
Look at the security provider section
The following is an excerpt from the java.security file

security.provider.1=sun.security.provider.Sun
security.provider.2=com.sun.net.ssl.internal.ssl.Provider
security.provider.3=com.sun.rsajca.Provider
security.provider.4=com.sun.crypto.provider.SunJCE
security.provider.5=sun.security.jgss.SunProvider

You should have something like
security.provider.6= ....
in the java.security file on your computer. That defines the provider for AES. Add it to the remote computer.

Usually the jar file which contains the provider should be in your ext class path. Copy it to your remote computer.

The sun jdk does not provide AES. I am not sure which 3rd party packages you have on your local computer.
ankoor shah
Greenhorn

Joined: Sep 02, 2005
Posts: 3
I need to know what is the provider classes JAR required for AES encrytion?
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
The following article might help:

Using AES with Java Technology


SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[Blog] [Blogroll] [My Reviews] My Linked In
basha khan
Ranch Hand

Joined: Jan 26, 2002
Posts: 516
Try Bouncycastle JCE
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Algorithm AES not available
 
Similar Threads
Encrypting and Decrypt String
No Such Algorithm Exception
Difference between public key size and encrypting algorithm key size?
Performance improvement for AES
Blowfish and AES algorithm