Skip to main content
Presentation 9 of 16

RSA Algorithm: Key Generation, Encryption/Decryption and Correctness Proof

The first practical public-key cryptosystem: two keys, one mathematical foundation — multiplying large numbers is easy, factoring them is hard.

Slides: 26 PDF · 832 KB
Loading slides…

Keyboard: Left arrow Right arrow Slides; F — fullscreen

Summary

The lecture builds RSA from scratch: its history (Rivest–Shamir–Adleman in 1977 and Clifford Cocks's secret 1973 discovery), why its security rests on the hardness of factoring, five-step key generation (p, q → n → φ(n) → e → d), and encryption c ≡ mᵉ (mod n) with decryption m ≡ cᵈ (mod n). Students follow the correctness proof via Euler's theorem and the CRT, work a complete example with p=61 and q=53 by hand, and then cover fast exponentiation, CRT-accelerated decryption, e=65537, OAEP padding, key-length recommendations and a full Python implementation.

Key terms

RSA φ(n) Eyler teoremasi kengaytirilgan Yevklid CRT Miller-Rabin tez darajalash e=65537 OAEP GNFS NIST SP 800-57

Lecture outline

  1. RSA history — the discovery and the secret discovery
  2. Why it works — the hardness of factoring
  3. Key generation — five steps
  4. Encryption and decryption formulas
  5. Correctness proof — why decryption works
  6. A complete numeric example — p=61, q=53
  7. Fast exponentiation and CRT speed-up
  8. Parameter choice and security practice
  9. Python implementation and conclusions
Related lesson Asymmetric Cryptography: RSA, Diffie-Hellman & ECC