Trait rsa_cortex_m4::padding::SignaturePadding[][src]

pub trait SignaturePadding<const D: usize> {
    fn pad(msg: &[u8], rng: impl CryptoRng + RngCore) -> Result<Long<D>>;
fn verify(msg: &[u8], padded: &Long<D>) -> Result<()>; }

Padding usable for signatures and their verification.

PKCS1-v1_5 padding (for signatures) is deterministic, so ideally we would have two of these types, one that requires and RNG in pad and one that doesn't.

Required methods

fn pad(msg: &[u8], rng: impl CryptoRng + RngCore) -> Result<Long<D>>[src]

fn verify(msg: &[u8], padded: &Long<D>) -> Result<()>[src]

Implementation note: Try to just regenerate the signature and compare, instead of parsing it.

Loading content...

Implementors

impl<H: Digest, const D: usize> SignaturePadding<D> for Pss<H>[src]

impl<H: Asn1Digest, const D: usize> SignaturePadding<D> for Pkcs1<H>[src]

Loading content...