Simplified implementation of RSA in Java