In this article I’ll demonstrate how easy it is to implement the most popular asymmetric-key cryptosystem, RSA in Java language. RSA, named after its inventors Rivest, Shamir and Adleman, is basis of many modern encryption protocols e.g. SSL, PGP etc. The detailed explanation of how RSA works is beyond the scope of this article; nonetheless, you’ll find in this article practical implementation of RSA’s encryption and decryption algorithms. Moreover, you’ll also find, in its basic form, implementation of Optimal Asymmetric Encryption Padding (OAEP), which is an essential part of RSA (Thanks to Ojash Shrestha).