cancel
Showing results for 
Search instead for 
Did you mean: 

java.security.NoSuchAlgorithmException while doing AES Encryption

0 Kudos

Hi All,

We are using JDK 1.4.09 and written AES Encryption Program.

This is working fine for higher versions of JDK but not for above.

When running, this gives the following error. Is there any other way of making this run on server which runs on above jdk.

java.security.NoSuchAlgorithmException: Algorithm PBKDF2WithHmacSHA1 not available

at javax.crypto.SunJCE_b.a(DashoA12275)null

at javax.crypto.SecretKeyFactory.getInstance(DashoA12275)

at testPack.Test.generateSecretKeyFromPassword(Test.java:94)

at testPack.Test.encryptMessage(Test.java:42)

at testPack.Test.main(Test.java:30)

Regards,

Aditya

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I think that from a certain Java version the JCE (Java Cryptography Extension) was included in the distribution and prior to that you had to download the encryption libraries and install them (putting them in your JRE lib\ext folder or something like that).

0 Kudos

Hi Jonathan,

Tried by replacing the JCE Policy files with unrestricted ones which are downloaded. But still the same problem.

Former Member
0 Kudos

Re-reading your post, I noticed you specified "PBKDF2WithHmacSHA1".

Can you provide a sample of your source code?

Cipher scheme should have the format of: algorithm/mode/padding. For example: AES/CBC/NoPadding

(in this case the padding scheme is no padding - I just don't remember of the top of my head a padding scheme)

Former Member
0 Kudos

Hi Aditya,

The feature might not be available in JDK 1.4

http://www.coderanch.com/t/432039/Security/create-SecretKey-AES-Encryption-based

Regards,

Srikishan