[][src]Enum yaca::Padding

pub enum Padding {
    None,
    X931,
    Pkcs1,
    Pkcs1Pss,
    Pkcs1Oaep,
    Pkcs1SslV23,
    Pkcs7,
}

Enumeration of YACA paddings

Variants

None

No padding at all. This method assumes that the input data already has a proper length for a given cryptographic operation (e.g. it has been padded by the client). Suitable for symmetric Encrypt/Decrypt operations as well as low-level RSA operations.

X931

X9.31 padding. Suitable for RSA Sign/Verify operation. Not supported in low-level RSA operations.

Pkcs1

PKCS #1 v1.5 padding. Suitable for RSA Sign/Verify and low-level RSA operations. For low-level operations the input must be at least 11 bytes shorter than the key length.

Pkcs1Pss

PKCS #1 PSS padding. Suitable for RSA Sign/Verify operations. Not supported in low-level RSA operations.

Pkcs1Oaep

EME-OAEP as defined in PKCS #1 v2.0 with SHA-1, MGF1 and an empty encoding parameter. Suitable for low-level RSA public_encrypt/private_decrypt operations. For low-level operations the input must be at least 42 bytes shorter than the key length.

Pkcs1SslV23

PKCS #1 v1.5 padding with an SSL-specific modification that denotes that the party is SSL3 capable. It is used for rollback attack detection in SSLv3. If during decryption it turns out that both parties are using Pkcs1SslV23 (both are communicating using SSL2 and both are SSL3 capable) it is treated as a rollback attack and an error is returned. Suitable for low-level RSA public_encrypt/private_decrypt operations. For low-level operations the input must be at least 11 bytes shorter than the key length.

Pkcs7

PKCS #7 padding. Suitable for symmetric Encrypt/Decrypt operation.

Trait Implementations

impl Debug for Padding[src]

impl PartialEq<Padding> for Padding[src]

impl StructuralPartialEq for Padding[src]

Auto Trait Implementations

impl RefUnwindSafe for Padding

impl Send for Padding

impl Sync for Padding

impl Unpin for Padding

impl UnwindSafe for Padding

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, 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.