RSA Encryption Demonstration

Enter your plaintext message below Encrypted message below
Decrypted message above

The text is converted to a number by the following scheme:
a=01b=02c=03d=04e=05f=06g=07
h=08i=09j=10k=11l=12m=13n=14
o=15p=16q=17r=18s=19t=20u=21
v=22w=23x=24y=25z=26
Spaces are coded as 00 and all other characters as 99

Call the resulting number m
Then we choose two (very large) secret prime numbers p and q. We compute their product n and make it public. In this case,
n = 10683081960076689824380157655404250581208130674684407161717552784958286015376134725322317285000880803846917
Now we compute a = (p - 1)(q - 1) and pick another secret number d and find a number e so that ed has remainder 1 when we divide by a. In this case,
e = 1538881947187475630269118728499309243962984730698421993222988433439753687771998523413212597312430011890963
Finally, to encrypt the message, we compute the remainder obtained from multiplying m to itself e times and then dividing by n. This is the number given as the encrypted message.
This method is very secure. The security is based on the difficulty of factoring very large numbers. Can you factor n? In practice, the numbers used are much much larger!
This method is used to tell people how to encrypt messages that they send you that only you know how to decrypt. To get the original message back, we take the encrypted message, multiply it by itself d times (remember, we kept d a secret), and then look at the remainder we get from dividing this number by n. The resulting number turns out to be the original m, which you can translate back into letters using the same scheme. Generally, only e and n are public. For those who are curious, in this case,
d = 7056410014866816666030739739