Skip to content

Unable to decrypt in java #184

@agsha

Description

@agsha

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions