Java RSA Padding: no libraries used
Do not use raw RSA at all. 

First simple attack starts when (plain ^ public_exponent) &lt; n , i.e. when the message to be encrypted is small. Then there are more sophisticated attacks and forgeries as soon as 1 plain text and the corresponding cipher text are known, or even can be guessed. And then you have to review all possible attacks on RSA for the last 30+ years. No way.

Implement padding pkcs#1 named RSA-OAEP (based on MGF function, a variant of a feistel cipher).