brevleq
brevleq

Reputation: 2141

Can't find RSA/NONE/NoPadding provider in JDK 1.8

I've generated a RSA key using 1024 bits and I'm trying cipher a 128 block using RSA with no padding.

Cipher cifrador = Cipher.getInstance ("RSA/NONE/NoPadding");

However I got this exception:

java.security.NoSuchAlgorithmException: Cannot find any provider supporting RSA/NONE/NoPadding

I'm using JDK 1.8, is it an error in this JVM version?

Upvotes: 2

Views: 3677

Answers (1)

erickson
erickson

Reputation: 269817

The Oracle provider (SunJCE) only supports "ECB" mode (which is the same as "NONE"). "NONE" isn't supported in Java 7 either.

Upvotes: 3

Related Questions