This is a from-scratch implementation of RSA in Rust, built to follow the cryptographic specification outlined in RFC 8017. It includes support for PSS (Probabilistic Signature Scheme) and full key management logic.
Unlike most "naive RSA" examples you’ll find online, this project attempts to cover all edge cases — from PSS padding internals to modular arithmetic — making it a deeper educational tool.
⚠️ WARNING
This crate is not fast, not constant-time, and not safe for any real-world cryptographic use.
Do not use it in production.
- 📜 Implements RSA key generation, signing, and verification
- 🧂 Includes full PSS padding with salt and MGF1
- 🔢 Bit-accurate manipulation for digest and encoded messages
- 🧪 Thorough handling of edge cases and parameter validation
- 🔬 Follows the logic and structure of RFC 8017
- ❌ Not hardened against side-channel attacks
- ❌ Not optimized for performance
- ❌ Not constant-time
- ❌ Not using vetted big-integer or cryptographic primitives (yet)