JoshKaufman / ursa

URSA - RSA public/private key OpenSSL bindings for Node.js
Other
618 stars 135 forks source link

Unable to decrypt in java #184

Open agsha opened 5 years ago

agsha commented 5 years ago

What is the Cipher transformation string to be used while decrypting RSA in java? I assume the default for ursa is RSA_PKCS1_OAEP_PADDING but I am not able to decrypt it in java. I am using BouncyCastle. I have tried the following and none of it works

RSA/ECB/NoPadding RSA/ECB/OAEPPadding RSA/ECB/OAEPWithSHA-1AndMGF1Padding RSA/ECB/OAEPWithSHA-224AndMGF1Padding RSA/ECB/OAEPWithSHA-256AndMGF1Padding RSA/ECB/OAEPWithSHA-384AndMGF1Padding RSA/ECB/OAEPWithSHA-512AndMGF1Padding RSA/ECB/PKCS1Padding

I also tried with Mode None. It doesnt work