Enum ate::crypto::PublicEncryptKey[][src]

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

Public encryption keys provide the ability to encrypt a secret without the ability to decrypt it yourself - 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>
Ntru192

Fields of Ntru192

pk: Vec<u8>
Ntru256

Fields of Ntru256

pk: Vec<u8>

Implementations

impl PublicEncryptKey[src]

pub fn from_bytes(bytes: Vec<u8>) -> Option<PublicEncryptKey>[src]

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

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

pub fn encapsulate(&self) -> (InitializationVector, EncryptKey)[src]

pub fn encrypt(&self, data: &[u8]) -> Result<EncryptResult, Error>[src]

Trait Implementations

impl Clone for PublicEncryptKey[src]

impl Debug for PublicEncryptKey[src]

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

impl Display for PublicEncryptKey[src]

impl Eq for PublicEncryptKey[src]

impl Hash for PublicEncryptKey[src]

impl PartialEq<PublicEncryptKey> for PublicEncryptKey[src]

impl Serialize for PublicEncryptKey[src]

impl StructuralEq for PublicEncryptKey[src]

impl StructuralPartialEq for PublicEncryptKey[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>,