Enum octavo_crypto::asymmetric::rsa::Rsa [] [src]

pub enum Rsa {
    Public {
        n: BigUint,
        e: BigUint,
    },
    Private {
        n: BigUint,
        d: BigUint,
        extra: Option<SecretKeyExtra>,
    },
}

Variants

Public

Fields

n: BigUint

Modulus

e: BigUint

Public Exponent

Private

Fields

n: BigUint

Modulus

d: BigUint

Private Exponent

extra: Option<SecretKeyExtra>

Methods

impl Rsa
[src]

fn keypair_from_primes<P, Q, E>(p: P, q: Q, e: E) -> KeyPair where P: Into<BigUint>, Q: Into<BigUint>, E: Into<BigUint>

fn generate_keypair<G, T>(rng: G, e: T, bits: usize) -> KeyPair where G: Rng + RandBigInt, T: Into<BigUint>

fn is_public(&self) -> bool

fn is_private(&self) -> bool

fn crypt(&self, msg: &BigUint) -> BigUint