Skip to main content

rsa/
algorithms.rs

1//! Building blocks for the schemes in [RFC8017]:
2//!
3//! - OAEP and PKCS#1 v1.5 encryption encoding/decoding operate on encoded-message octet strings.
4//! - EMSA-PSS and EMSA-PKCS1-v1_5 operate on encoded-message octet strings for signatures.
5//! - OS2IP and I2OSP convert between octet strings and integer representatives.
6//! - RSAEP/RSAVP1 use public-key arithmetic; RSADP/RSASP1 use private-key arithmetic.
7//!
8//! Scheme boundaries enforce encoded lengths and representative ranges. The internal infallible
9//! I2OSP helpers require callers to establish that the integer fits in the requested width.
10//! For secret representatives, storage precision and conversion widths must be independent of
11//! the representative's value; see [`pad::i2osp_zeroizing`].
12//!
13//! [RFC8017]: https://www.rfc-editor.org/rfc/rfc8017.html
14
15mod mgf;
16
17pub(crate) mod blinding;
18pub(crate) mod generate;
19pub(crate) mod oaep;
20pub(crate) mod pad;
21pub(crate) mod pss;
22pub(crate) mod reduction;
23pub(crate) mod rsa;
24
25#[cfg(feature = "pkcs1v15")]
26pub(crate) mod pkcs1v15;