Skip to main content

Ciphertext

Struct Ciphertext 

Source
pub struct Ciphertext<const D_POLY: usize, const D_PV: usize, const K: usize, const M: usize = { KYBER_N / 8 }> { /* private fields */ }

Trait Implementations§

Source§

impl<const K: usize, const D1: usize, const D2: usize> CompressCiphertext for Ciphertext<D1, D2, K, 32>

Source§

type PolyType = Poly<KyberFq, { KYBER_N / 2 }>

Source§

type PolyVecType = PolyVec<Poly<KyberFq, { KYBER_N / 2 }>, { KyberPoly::N }, K>

Source§

fn compress_poly(&mut self, v: &Self::PolyType)

Source§

fn decompress_poly(&self, v: &mut Self::PolyType)

Source§

fn compress_polyvec(&mut self, b: &Self::PolyVecType)

Source§

fn decompress_polyvec(&self, b: &mut Self::PolyVecType)

Source§

impl<const D_POLY: usize, const D_PV: usize, const M: usize, const K: usize> CompressedCiphertex for Ciphertext<D_POLY, D_PV, K, M>

Source§

const M: usize = M

Source§

fn poly_bytes(&self) -> &[u8]

Source§

fn polyvec_bytes(&self) -> &[u8]

Source§

fn poly_bytes_mut(&mut self) -> &mut [u8]

Source§

fn polyvec_bytes_mut(&mut self) -> &mut [u8]

Source§

impl<const D_POLY: usize, const D_PV: usize, const K: usize, const M: usize> Debug for Ciphertext<D_POLY, D_PV, K, M>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<const D_POLY: usize, const D_PV: usize, const M: usize, const K: usize> Default for Ciphertext<D_POLY, D_PV, K, M>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<const D_POLY: usize, const D_PV: usize, const K: usize, const M: usize> Freeze for Ciphertext<D_POLY, D_PV, K, M>

§

impl<const D_POLY: usize, const D_PV: usize, const K: usize, const M: usize> RefUnwindSafe for Ciphertext<D_POLY, D_PV, K, M>

§

impl<const D_POLY: usize, const D_PV: usize, const K: usize, const M: usize> Send for Ciphertext<D_POLY, D_PV, K, M>

§

impl<const D_POLY: usize, const D_PV: usize, const K: usize, const M: usize> Sync for Ciphertext<D_POLY, D_PV, K, M>

§

impl<const D_POLY: usize, const D_PV: usize, const K: usize, const M: usize> Unpin for Ciphertext<D_POLY, D_PV, K, M>

§

impl<const D_POLY: usize, const D_PV: usize, const K: usize, const M: usize> UnsafeUnpin for Ciphertext<D_POLY, D_PV, K, M>

§

impl<const D_POLY: usize, const D_PV: usize, const K: usize, const M: usize> UnwindSafe for Ciphertext<D_POLY, D_PV, K, M>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

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

Source§

fn vzip(self) -> V