Skip to Content

java.security.NoSuchAlgorithmException while doing AES Encryption

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Aug 17, 2011 at 11:30 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 18, 2011 at 07:23 PM

    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).

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Aditya Varma Rudraraju

      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)

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.