Compatbilities with Java OAEPWithSHA-512AndMGF1Padding implementation and Bouncy Castle implementation

Solution In Progress - Updated -

Issue

  • Converting to use new RSA and OAEPWithSHA-512AndMGF1Padding implementation in Java 17 from BouncyCastle, but encountering javax.crypto.BadPaddingException trying to decrypt with Java 17 a ciphertext encrypted with Bouncy Castle

Environment

  • Using RSA and OAEPWithSHA-512AndMGF1Padding encryption
  • Encrypted ciphertest using Bouncy Castle
  • Decrypting with Java implementation

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content