Struct rsa_cortex_m4::PublicKey[][src]

pub struct PublicKey<const D: usize> {
    pub N: Convenient<D, D>,
}

RSA public key.

Here, N = pq is the product of the private pair of primes. e is fixed to be 65537 = 0x10001.

Fields

N: Convenient<D, D>

Implementations

impl<const D: usize> PublicKey<D>[src]

pub fn encryption_primitive(&self, msg: &[u8]) -> Result<Long<D>>[src]

pub fn verification_primitive(&self, signature: &[u8]) -> Result<Long<D>>[src]

pub fn encrypt<P, R>(&self, plaintext: &[u8], _: P, rng: R) -> Result<Long<D>> where
    P: EncryptionPadding<D>,
    R: CryptoRng + RngCore
[src]

Encrypt a plaintext with respect to a padding method.

pub fn verify<P>(&self, msg: &[u8], signature: &[u8], _: P) -> Result<()> where
    P: SignaturePadding<D>, 
[src]

Verify a signature with respect to a padding method.

Trait Implementations

impl<const D: usize> Bits for PublicKey<D>[src]

impl<const D: usize> From<(&'_ Prime<D, 0_usize>, &'_ Prime<D, 0_usize>)> for PublicKey<D>[src]

impl<const D: usize> Zeroize for PublicKey<D>[src]

Auto Trait Implementations

impl<const D: usize> Send for PublicKey<D>[src]

impl<const D: usize> Sync for PublicKey<D>[src]

impl<const D: usize> Unpin for PublicKey<D>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.