Enum ate::crypto::PrivateEncryptKey[][src]

pub enum PrivateEncryptKey {
    Ntru128 {
        pk: Vec<u8>,
        sk: Vec<u8>,
    },
    Ntru192 {
        pk: Vec<u8>,
        sk: Vec<u8>,
    },
    Ntru256 {
        pk: Vec<u8>,
        sk: Vec<u8>,
    },
}

Private encryption keys provide the ability to decrypt a secret that was encrypted using a Public Key - this capability is useful for key-exchange and trust validation in the crypto chain. Asymetric crypto in ATE uses the leading candidates from NIST that provide protection against quantom computer attacks

Variants

Ntru128

Fields of Ntru128

pk: Vec<u8>sk: Vec<u8>
Ntru192

Fields of Ntru192

pk: Vec<u8>sk: Vec<u8>
Ntru256

Fields of Ntru256

pk: Vec<u8>sk: Vec<u8>

Implementations

impl PrivateEncryptKey[src]

pub fn generate(size: KeySize) -> PrivateEncryptKey[src]

pub fn as_public_key(&self) -> PublicEncryptKey[src]

pub fn hash(&self) -> Hash[src]

pub fn pk(&self) -> Vec<u8>[src]

pub fn sk(&self) -> Vec<u8>[src]

pub fn decapsulate(&self, iv: &InitializationVector) -> Option<EncryptKey>[src]

pub fn decrypt(
    &self,
    iv: &InitializationVector,
    data: &[u8]
) -> Result<Vec<u8>, Error>
[src]

Trait Implementations

impl Clone for PrivateEncryptKey[src]

impl Debug for PrivateEncryptKey[src]

impl<'de> Deserialize<'de> for PrivateEncryptKey[src]

impl Display for PrivateEncryptKey[src]

impl Eq for PrivateEncryptKey[src]

impl Hash for PrivateEncryptKey[src]

impl PartialEq<PrivateEncryptKey> for PrivateEncryptKey[src]

impl Serialize for PrivateEncryptKey[src]

impl StructuralEq for PrivateEncryptKey[src]

impl StructuralPartialEq for PrivateEncryptKey[src]

Auto Trait Implementations

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> CallHasher for T where
    T: Hash

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[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

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,