Crate rsa_cortex_m4[][src]

Allocation-free implementation of RSA for the standard cases.

The implementation is fairly efficient as:

PKCS #1 (RSA) revision history

Bleichenbacher's attack (chosen ciphertexts) on RSAES in 1998 caused v2.0, updated in 2006 with forgery attacks against RSASSA.

Actual RSA v2.2 (2012)

Re-exports

pub use arithmetic::Modular;
pub use arithmetic::PrimeModular;
pub use numbers::Convenient;
pub use numbers::Long;
pub use numbers::Odd;
pub use numbers::Prime;
pub use numbers::Short;
pub use numbers::ShortPrime;
pub use numbers::Unsigned;
pub use padding::Oaep;
pub use padding::Pss;
pub use padding::Pkcs1;

Modules

aliases

Type aliases by bit-size, independent of architecture/features.

arithmetic

Modular arithmetic (for moduli that are either Convenient or word-sized powers-of-two).

numbers

Large unsized integers (specialized to our allocation-free purposes).

padding

Padding for RSA.

Structs

Error

There is but one – failure 🤪.

F4

The fourth Fermat prime, $2^{16} + 1$ (used as public exponent $e$).

PrivateKey

RSA private key.

PublicKey

RSA public key.

Traits

Rsa

The RSA cryptosystem. Sealed trait to avoid experiments.

Functions

umaal

Intention is to replace this with the UMAAL assembly instruction on Cortex-M4.

Type Definitions

Digit

A word on the machine. Unsigned is composed of many digits.

Digits

Multiple Digits. Since this type is unsized, we use Number.

Result

Error or success.