0Pricing
Cryptology Academy · Lesson

RSA Encryption & Decryption Math

Apply modular exponentiation to encrypt and decrypt a message.

Welcome

With RSA keys generated, we now apply them. Encryption and decryption are both modular exponentiations — simple to compute, infeasible to reverse without the private key.

Textbook RSA Encryption

Encrypt message M (as integer) with public key (e, n): C = M^e mod n Example: M=42, e=17, n=3233 C = 42^17 mod 3233 Python: C = pow(42, 17, 3233) = 2557

All lessons in this course

  1. Public-Key Cryptography Concepts
  2. RSA Key Generation Step by Step
  3. RSA Encryption & Decryption Math
  4. RSA Real-World Use Cases & Key Sizes
← Back to Cryptology Academy