Here are examples: https://asecuritysite.com/log/rsa_examples.pdf

Select p and q

N= p x q

PHI = (p-1) x (q-1)

e should not share a factor with PHI.

(d x e) mod PHI= 1 (use inverse mod of PHI here or if simple just loop to find d)

Public key (e,N)

Private key (d,N)

Here is inverse mod N: https://asecuritysite.com/encryption/inversemod

And an introduction to RSA: https://www.youtube.com/watch?v=pHES8eNor6k

You are really going to struggle with 64-bit values, as you values will quick over run this.

Written by

Professor of Cryptography. Serial innovator. Believer in fairness, justice & freedom. EU Citizen. Auld Reekie native. Old World Breaker. New World Creator.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store