Crate rsa_cortex_m4[−][src]
Allocation-free implementation of RSA for the standard cases.
The implementation is fairly efficient as:
- we avoid GCD algorithms following GCD-Free Algorithms for Computing Modular Inverses (Joye/Paillier, 2003)
- our prime generation is fast following Improvements to RSA key generation and CRT on embedded devices (Hamburg/Tunstall/Xiao, 2020)
PKCS #1 (RSA) revision history
- v1.1-1.3, February-March 1991
- v1.4, June 1991
- RFC 2313, March 1998 (v1.5, November 1993): the origin (+adds MD4)
- RFC 2437, October 1998 (v2.0, September 1998): introduces OAEP (+removes MD4)
- RFC 3447, February 2003 (v2.1, June 2002): introduces PSS (+multi-prime RSA)
- RFC 8017, November 2016 (v2.2, October 2012): adds SHA2: 224, 512/224, 512/256 ("for FIPS 180-4 alignment")
Bleichenbacher's attack (chosen ciphertexts) on RSAES in 1998 caused v2.0, updated in 2006 with forgery attacks against RSASSA.
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 |
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. |
Digits | |
Result |
|