0

I am trying to decrypt the data using RSA Algorithm. While doing the decryption, I am getting an exception.That is,

java.security.NoSuchAlgorithmException: Cannot find any provider supporting RSA/ECB/PKCS5Padding
        at javax.crypto.Cipher.getInstance(DashoA13*..)

How to solve this exception? Currently, I am using java version "1.6.0_26".

3
  • Could you post an example of your code? Commented Sep 25, 2012 at 6:34
  • 1
    The problem is in the comments of the answer you copied. You should always read the comments as someone has made the effort to provide additional information. Commented Sep 26, 2012 at 1:12
  • I do fully agree with @GregS here :) Commented Sep 26, 2012 at 16:26

2 Answers 2

1

It's a typo. The correct name for RSA with PKCS #1 v1.5 padding is "RSA/ECB/PKCS1Padding". Generally, it is a good idea to compare with a list of available algorithms. E.g. this question contains some ways to print such a list.

(And of course using OAEP instead of v1.5 padding would be preferable, especially if your main field is not cryptography).

Sign up to request clarification or add additional context in comments.

Comments

0

The error means that the library you use cna't decrypt the data because there isn't an algorithm in the Lib which decrypts RSA. You can use a library like Bouncy Calste or GNU Crypto to decrypt data using RSA. There are plenty of samples how to do this on the web.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.