pub trait PrivateKeyParts: PublicKeyParts {
// Required methods
fn d(&self) -> &BoxedUint;
fn primes(&self) -> &[Odd<BoxedUint>];
fn p(&self) -> Option<&MontyParams<BoxedUint>>;
fn q(&self) -> Option<&MontyParams<BoxedUint>>;
fn dp(&self) -> Option<&BoxedUint>;
fn dq(&self) -> Option<&BoxedUint>;
fn qinv(&self) -> Option<&BoxedMontyForm>;
fn crt_values(&self) -> Option<&[CrtValue]>;
}Expand description
Components of an RSA private key.
Implementations used for private operations must choose all storage precisions from public
parameters, not from the significant bits of secret components. In particular, d, dp, and
dq are processed for their full storage precision. Prime and Montgomery-parameter precisions
must follow the same public policy. RsaPrivateKey enforces this during construction.
Required Methods§
Sourcefn primes(&self) -> &[Odd<BoxedUint>]
fn primes(&self) -> &[Odd<BoxedUint>]
Returns the prime factors as Odd.
Blinded non-CRT private operations require all factors to compute φ(n).
Sourcefn p(&self) -> Option<&MontyParams<BoxedUint>>
fn p(&self) -> Option<&MontyParams<BoxedUint>>
Returns prime p if precomputed.
Sourcefn q(&self) -> Option<&MontyParams<BoxedUint>>
fn q(&self) -> Option<&MontyParams<BoxedUint>>
Returns prime q if precomputed.
Sourcefn qinv(&self) -> Option<&BoxedMontyForm>
fn qinv(&self) -> Option<&BoxedMontyForm>
Returns the precomputed qinv value, Q^-1 mod P
Sourcefn crt_values(&self) -> Option<&[CrtValue]>
fn crt_values(&self) -> Option<&[CrtValue]>
Returns an iterator over the CRT Values
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".