Skip to content

galadd/rsa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔐 Rust RSA — A Complete but Unsafe RFC 8017 Implementation

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.


✅ What This Project Does

  • 📜 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

🚫 What This Project Is Not

  • ❌ Not hardened against side-channel attacks
  • ❌ Not optimized for performance
  • ❌ Not constant-time
  • ❌ Not using vetted big-integer or cryptographic primitives (yet)

🔧 Planned Improvements

I plan to refactor the internals when in use, generate_key took so much time for larger bits. there are ways to improve that That's the main entry point delay

About

A from-scratch RSA implementation in Rust (RFC 8017-compliant). Not fast, not safe, but covers all edges — including PSS. Built for depth, not production.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages