RSA CBC encoding

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

RSA CBC encoding

Usman Ismail

I am newbie to bouncy castle so try to accomodate my ignorance. I am trying to use RSA keys to encrypt a message and it is working fine is I use Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding","BC"); however if I try to use CBC (Cipher cipher = Cipher.getInstance("RSA/CBC/PKCS1Padding","BC");) I get the following error: No such algorithm: RSA/CBC/PKCS1Padding
        at javax.crypto.Cipher.getInstance(DashoA13*..)
        at javax.crypto.Cipher.getInstance(DashoA13*..)
        at RSACoder.encrypt(
        at RSACoder.main(

The reson seams obvious but I am sure CBC is supported by bouncy castle as the documentation clearly states this.

What am I doing wrong?


PS: Source file is