rsa algoritham in java
no vote
/*
rsa.c = Demo os RSA public key encryption
This code uses small (i.e. bad) primes, reduces the ASCII
upper-case letters to 1, 2, 3, ..., and encrypts each character
independently. This results in rotten security, but keeps the
numbers small enough to calculate without using complex algorithms.
This code also doesn't compute inverses efficiently (in the
interest of clear code), and picks a small fixed encryption
key, rather than a random one.
It is worth remembering that the strength of this method is that
it is very hard to compute d from e and n. This in turn depends
on n being hard to factor. That's why you should use huge primes,
not 3, 5, 7, 11, or