I need to decrypt messages via RSA in order to send it over an unsecured channel, but I\'m afraid of the Padding Oracle Attack. Therefore I already have asked the follwoing
That's not a good advice given in the first link to the cryptography site. You should never rely on the defaults of cryptographic libraries cryptographic algorithms. There are quite a few reasons for this:
The SunJCEProvider provided by Oracle defaults to PKCS#1 padding ("PKCS1Padding"
) for historical reasons (see reason #2 above). This is not well documented.
At that time that default was set you basically had just the insecure textbook RSA ("NoPadding"
) and the PKCS#1 v1.5 version ("PKCS1Padding"
or RSAES-PKCS1-v1_5 in the PKCS#1 v2.1 standard). At that time RSAES-PKCS1-v1_5
was definitely the more secure choice. Changing the default now to OAEP would break every RSA implementation out there that uses the default.
The advice of otus (in the first link within this answer) is be better suited to protocol implementations in libraries than to cryptographic algorithms. In the end you should be able to defend the security of the choices made, whatever you choose.