[−][src]Struct pq_newhope::Cpa
Trait Implementations
impl<N> Kem for Cpa<N> where
N: PolySize,
PublicKeyCpa<N>: LineValid,
SecretKeyCpa<N>: LineValid,
CipherTextCpa<N>: LineValid,
Parameter<N>: Pke<Seed = U32, GenerationSeed = U32, Plain = U32, Cipher = N::CompressedLength, PublicKey = PublicKey<N>, SecretKey = SecretKey<N>>,
[src]
N: PolySize,
PublicKeyCpa<N>: LineValid,
SecretKeyCpa<N>: LineValid,
CipherTextCpa<N>: LineValid,
Parameter<N>: Pke<Seed = U32, GenerationSeed = U32, Plain = U32, Cipher = N::CompressedLength, PublicKey = PublicKey<N>, SecretKey = SecretKey<N>>,
type PublicKey = PublicKeyCpa<N>
type SecretKey = SecretKeyCpa<N>
type CipherText = CipherTextCpa<N>
type PairSeedLength = U32
type EncapsulationSeedLength = U32
type SharedSecretLength = U32
fn generate_pair(
seed: &GenericArray<u8, Self::PairSeedLength>
) -> (Self::PublicKey, Self::SecretKey)
[src]
seed: &GenericArray<u8, Self::PairSeedLength>
) -> (Self::PublicKey, Self::SecretKey)
fn encapsulate(
seed: &GenericArray<u8, Self::EncapsulationSeedLength>,
public_key: &Self::PublicKey
) -> (Self::CipherText, GenericArray<u8, Self::SharedSecretLength>)
[src]
seed: &GenericArray<u8, Self::EncapsulationSeedLength>,
public_key: &Self::PublicKey
) -> (Self::CipherText, GenericArray<u8, Self::SharedSecretLength>)
fn decapsulate(
secret_key: &Self::SecretKey,
cipher_text: &Self::CipherText
) -> GenericArray<u8, Self::SharedSecretLength>
[src]
secret_key: &Self::SecretKey,
cipher_text: &Self::CipherText
) -> GenericArray<u8, Self::SharedSecretLength>
Auto Trait Implementations
impl<N> RefUnwindSafe for Cpa<N> where
N: RefUnwindSafe,
N: RefUnwindSafe,
impl<N> Send for Cpa<N> where
N: Send,
N: Send,
impl<N> Sync for Cpa<N> where
N: Sync,
N: Sync,
impl<N> Unpin for Cpa<N> where
N: Unpin,
N: Unpin,
impl<N> UnwindSafe for Cpa<N> where
N: UnwindSafe,
N: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,