Skip to main content

arcana/rsa/
mod.rs

1// SPDX-License-Identifier: Apache-2.0
2// Copyright 2026 Cédric Mesnil <cslashm@pm.me>
3
4// `rsa::rsa` module inception is intentional: the crate groups RSA under an
5// `rsa/` directory, and the core key/primitive lives in `rsa.rs`; renaming
6// would churn every `rsa::rsa::*` public path. Documented allow (CLAUDE.md §6).
7#![allow(clippy::module_inception)]
8
9//! RSA encryption and signatures.
10//!
11//! # Algorithms
12//! - **PKCS#1 v1.5** (RFC 8017): encryption and signature padding
13//! - **OAEP** (RFC 8017): optimal asymmetric encryption padding
14//! - **RSASSA-PSS** (RFC 8017 / PKCS#1 v2.2 §8.1): modern signature padding
15//! - Key sizes: 512 (tests only), 1024 (tests), 2048, 3072, 4096 bits
16//!
17//! # Modules
18//! - `bigint`: Big integer arithmetic (up to 4096-bit)
19//! - `rsa`: RSA core key generation, raw encrypt/decrypt
20//! - `pkcs1`: PKCS#1 v1.5 padding for encryption and signatures
21//! - `oaep`: OAEP padding for encryption
22//! - `pss`: RSASSA-PSS signatures (the modern RSA signature padding)
23
24pub mod bigint;
25pub mod oaep;
26pub mod pkcs1;
27pub mod pss;
28pub mod rsa;