(Idea and most code taken from a no more existing student's page at University Honors College (Oregon State), a more realistic demo-implementation can be found here. This page copied 3/16/06 from http://www.profactor.at/~wstoec/rsa.html)

**Key Generation:**Whoever wants to receive secret messages creates a public key (which is published) and a private key (kept secret). The keys are generated in a way that conceals their construction and makes it 'difficult' to find the private key by only knowing the public key.**Encryption:**A secret message to any person can be encrypted by his/her public key (that could be officially listed like phone numbers).**Decryption:**Only the person being addressed can easily decrypt the secret message using the private key.