Demonstration of the RSA scheme from class on Mon Nov 17:
| > | p:=nextprime(89156123486012398448956156123789431245123474145123541234651234651234); |
| > | q:=nextprime(89123561237461237854326147123679452451234512452134521384751239452139452134); |
| > | n:=p*q; |
| > | ifactor(n); |
Warning, computation interrupted
| > | e:=615562346210787541293874612345123452134512347512345123451234513241; |
| > | gcd(e,(p-1)*(q-1)); |
| > | d:=1/e mod ((p-1)*(q-1)); |
The plaintext message m :
| > | m:=123456789000000000010203040506070809; |
The ciphertext:
| > | m1:=m &^ e mod n; |
Decrypting the ciphertext to recover the plaintext:
| > | m1 &^ d mod n; |
| > |