RSA Encryption Demo

Explore RSA public-key cryptography with interactive key generation and encryption/decryption

🔑 Key Generation

🔐 Encrypt/Decrypt

How RSA Works

Key Generation: Choose two large prime numbers p and q
Calculate n: n = p × q (public modulus)
Calculate φ(n): φ(n) = (p-1) × (q-1)
Choose e: Public exponent (commonly 65537)
Calculate d: Private exponent where e × d ≡ 1 (mod φ(n))

Security Considerations

⚠️ This is a simplified demo. Real RSA uses much larger keys (2048+ bits)
🔒 RSA security relies on the difficulty of factoring large composite numbers
🚨 Never use small key sizes in production (minimum 2048 bits)
✅ RSA is widely used for key exchange and digital signatures

Real-World Applications

HTTPS/TLS
Email Encryption
Digital Signatures
SSH Keys
Code Signing
VPN Authentication

Copyright © 2025 Kryptography. All rights reserved.

Built with ❤️ By Ali HD