Module rsa_cortex_m4::numbers[][src]

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

The internal representation is in terms of little-endian machine words.

This specification of types was chosen after a few iterations of the options within the limitations of min_const_generics.

One advantage it has is that Short and Long integers (hence also short/long crate::Montgomery, etc.) can share implementations.

Structs

Array

Array of Unsigned.

BigEndian

Representation of Unsigned as big-endian bytes.

Convenient

Unsigned numbers with both their top and bottom bits set – highly convenient for modular arithmetic!

Odd
Prime

Prime number (passing primality tests); convenient by definition.

Unsigned

Multi-precision unsigned integer with at most $D + E$ digits (places) – two Limbs.

Traits

Bits

The unstable {number}::BITS implementations.

Number

Something similar to a Vec<u32>, without allocations.

NumberMut

Mutable access to a Number.

Type Definitions

BigEndianLong
BigEndianShort
Limb

Several Digits attach to a limb.

Long

Unsigned with equal limbs (e.g., public key). If only we had [T; 2*D]...

Product

Big enough to fit the product of two Unsigned.

Short

Unsigned with only one limb (e.g., private prime). Short only in comparison to Long.

ShortConvenient
ShortOdd
ShortPrime