Trait pq_kem::Kem[][src]

pub trait Kem {
    type PublicKey: LineValid;
    type SecretKey: LineValid;
    type CipherText: LineValid;
    type PairSeedLength: ArrayLength<u8>;
    type PublicKeyHashLength: ArrayLength<u8>;
    type EncapsulationSeedLength: ArrayLength<u8>;
    type SharedSecretLength: ArrayLength<u8>;
    fn generate_pair(
        seed: &GenericArray<u8, Self::PairSeedLength>
    ) -> (Self::PublicKey, Self::SecretKey);
fn encapsulate(
        seed: &GenericArray<u8, Self::EncapsulationSeedLength>,
        public_key: &Self::PublicKey,
        public_key_hash: &GenericArray<u8, Self::PublicKeyHashLength>
    ) -> (Self::CipherText, GenericArray<u8, Self::SharedSecretLength>);
fn decapsulate(
        secret_key: &Self::SecretKey,
        public_key: &Self::PublicKey,
        public_key_hash: &GenericArray<u8, Self::PublicKeyHashLength>,
        cipher_text: &Self::CipherText
    ) -> GenericArray<u8, Self::SharedSecretLength>; }

Associated Types

Loading content...

Required methods

fn generate_pair(
    seed: &GenericArray<u8, Self::PairSeedLength>
) -> (Self::PublicKey, Self::SecretKey)
[src]

fn encapsulate(
    seed: &GenericArray<u8, Self::EncapsulationSeedLength>,
    public_key: &Self::PublicKey,
    public_key_hash: &GenericArray<u8, Self::PublicKeyHashLength>
) -> (Self::CipherText, GenericArray<u8, Self::SharedSecretLength>)
[src]

fn decapsulate(
    secret_key: &Self::SecretKey,
    public_key: &Self::PublicKey,
    public_key_hash: &GenericArray<u8, Self::PublicKeyHashLength>,
    cipher_text: &Self::CipherText
) -> GenericArray<u8, Self::SharedSecretLength>
[src]

Loading content...

Implementors

Loading content...