Struct rsa_cortex_m4::PublicKey [−][src]
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]
P: EncryptionPadding<D>,
R: CryptoRng + RngCore,
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]
P: SignaturePadding<D>,
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]
fn from(prime_pair: (&ShortPrime<D>, &ShortPrime<D>)) -> Self
[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,