K

RSA Calculator

RSA toy parameters (small primes)

Client-side computation for analysis, verification, and learning. Do not paste production secrets into untrusted sites; prefer local tooling for key material.

Educational / engineering use. RSA mode uses tiny primes for illustration only—not for real key generation.

Prime p
Prime q
Public exponent e
Message m (integer)

Add RSA Calculator Free On Your Website

Paste this HTML on your site.

What is RSA Calculator?

RSA is a public-key cryptographic algorithm based on the mathematical difficulty of factoring large prime numbers. It uses a key pair public for encryption, private for decryption to secure data transmission.

RSA Formula

Key generation:

n=p×q;φ(n)=(p1)(q1)n = p × q ; φ(n) = (p−1)(q−1)
ed1(modφ(n))e · d ≡ 1 (mod φ(n))

Encryption: C = M^e mod n

Decryption: M = C^d mod n

RSA Step-by-Step

  1. Choose prime numbers p and q.
  2. Compute n and phi(n).
  3. Choose public exponent e with gcd(e, phi)=1.
  4. Compute private exponent d (mod inverse of e).
  5. Encrypt/decrypt with modular exponentiation.

RSA Worked Example

Chooseprimesp=61,q=53.Choose primes p=61, q=53.

Step 1: n = p*q = 3233

Step 2: phi(n) = (p-1)(q-1) = 3120

Step 3: choose e=17

Step 4: compute d such that e*d ≡ 1 (mod 3120), so d=2753

EncryptM=65:C=6517mod3233=2790Encrypt M=65: C = 65^17 mod 3233 = 2790
Decrypt:M=27902753mod3233=65(verified).Decrypt: M = 2790^2753 mod 3233 = 65 (verified).

Where RSA Calculator Is Applied

  • HTTPS/TLS handshake for secure websites
  • SSH authentication (server and user keys)
  • Email signing and encryption (PGP, S/MIME)
  • Digital certificates (SSL certificates, code signing)
  • VPN authentication
  • Blockchain wallet key pair generation
  • JWT token signing in APIs

Related Cryptography Calculators

Explore similar calculators to streamline your workflow.

View all
Calculator By Adil Balti, Content Proofread and Verify by Muhammad Kumail & Gulzar Abbas.

About Calculators.is

At Calculators.is our sole focus is to provide 100% accurate, fast, comprehensive, convenient, easy-to-use free online calculators to everyone to use without spending a single $ on any online Calculators.

All the calculators on our website are designed and developed by our own team, and each one is put through strict, comprehensive testing before being made live on our website.

About, Founder and calculator.is.