Skip to main content

Module

Struct Module 

Source
pub struct Module<B>
where B: Backend,
{ /* private fields */ }
Expand description

Primary entry point for all polynomial operations over Z[X]/(X^N + 1).

A Module pairs a ring degree N (always a power of two) with a backend-specific handle that holds any required precomputed state. All api trait methods are dispatched through this type.

The module owns its handle; dropping the Module calls Backend::destroy.

Implementations§

Source§

impl<B> Module<B>
where B: Backend,

Source

pub fn new(n: u64) -> Module<B>
where Module<B>: ModuleNew<B>,

Creates a backend module for ring degree N.

Source

pub unsafe fn from_nonnull( ptr: NonNull<<B as Backend>::Handle>, n: u64, ) -> Module<B>

Creates a module from a NonNull backend handle.

§Safety

ptr must point to a valid, fully initialized backend handle whose lifetime is transferred to this Module (it will be destroyed on drop).

Source

pub unsafe fn from_raw_parts( ptr: *mut <B as Backend>::Handle, n: u64, ) -> Module<B>

Construct from a raw pointer managed elsewhere. SAFETY: ptr must be non-null and remain valid for the lifetime of this Module.

Source

pub unsafe fn ptr(&self) -> *mut <B as Backend>::Handle

Returns the raw pointer to the backend handle.

Source

pub fn n(&self) -> usize

Returns the ring degree N.

Source

pub fn scalar_znx_alloc( &self, cols: usize, ) -> ScalarZnx<<B as Backend>::OwnedBuf>

Allocates a zero-initialized backend-owned ScalarZnx.

Source

pub fn vec_znx_alloc( &self, cols: usize, size: usize, ) -> VecZnx<<B as Backend>::OwnedBuf>

Allocates a zero-initialized backend-owned VecZnx.

Source

pub fn vec_znx_alloc_with_max_size( &self, cols: usize, size: usize, max_size: usize, ) -> VecZnx<<B as Backend>::OwnedBuf>

Allocates a zero-initialized backend-owned VecZnx with explicit limb capacity.

Source

pub fn mat_znx_alloc( &self, rows: usize, cols_in: usize, cols_out: usize, size: usize, ) -> MatZnx<<B as Backend>::OwnedBuf>

Allocates a zero-initialized backend-owned MatZnx.

Source

pub fn as_mut_ptr(&self) -> *mut <B as Backend>::Handle

Returns the raw pointer to the backend handle.

Source

pub fn log_n(&self) -> usize

Returns log2(N).

Source

pub fn reinterpret<Other>(&self) -> &Module<Other>
where Other: Backend<Handle = <B as Backend>::Handle>,

Reinterprets this Module<B> as a Module<Other> sharing the same backend Handle type.

This is a zero-cost view used to forward API calls to a compatible source backend without rebuilding the handle.

Source

pub fn reinterpret_mut<Other>(&mut self) -> &mut Module<Other>
where Other: Backend<Handle = <B as Backend>::Handle>,

Mutable version of Module::reinterpret.

Trait Implementations§

Source§

impl CKKSAddDefault<FFT64Ref> for Module<FFT64Ref>

Source§

fn ckks_add_tmp_bytes_default(&self) -> usize
where Self: GLWEShift<BE> + GLWENormalize<BE>,

Source§

fn ckks_add_pt_vec_tmp_bytes_default(&self) -> usize
where Self: GLWEShift<BE> + GLWENormalize<BE> + VecZnxRshTmpBytes,

Source§

fn ckks_add_pt_const_tmp_bytes_default(&self) -> usize
where Self: GLWEShift<BE> + GLWENormalize<BE> + VecZnxRshTmpBytes,

Source§

fn ckks_add_into_default<Dst, A, B>( &self, dst: &mut Dst, a: &A, b: &B, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_add_into_unsafe_default<Dst, A, B>( &self, dst: &mut Dst, a: &A, b: &B, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_add_assign_default<Dst, A>( &self, dst: &mut Dst, a: &A, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_add_assign_unsafe_default<Dst, A>( &self, dst: &mut Dst, a: &A, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>
where Self: GLWEAdd<BE> + GLWEShift<BE>, Dst: GLWEToBackendMut<BE> + CKKSInfos + SetCKKSInfos, A: GLWEToBackendRef<BE> + CKKSInfos,

Source§

fn ckks_add_one_assign_default<Dst>( &self, dst: &mut Dst, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_add_pt_vec_into_default<Dst, A, P>( &self, dst: &mut Dst, a: &A, pt: &P, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_add_pt_vec_into_unsafe_default<Dst, A, P>( &self, dst: &mut Dst, a: &A, pt: &P, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_add_pt_vec_assign_default<Dst, P>( &self, dst: &mut Dst, pt: &P, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_add_pt_vec_assign_unsafe_default<Dst, P>( &self, dst: &mut Dst, pt: &P, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_add_pt_const_into_default<Dst, A, P>( &self, dst: &mut Dst, a: &A, dst_coeff: usize, cst: &P, const_coeff: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_add_pt_const_into_unsafe_default<Dst, A, P>( &self, dst: &mut Dst, a: &A, dst_coeff: usize, cst: &P, const_coeff: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_add_pt_const_assign_default<Dst, P>( &self, dst: &mut Dst, dst_coeff: usize, cst: &P, const_coeff: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_add_pt_const_assign_unsafe_default<Dst, P>( &self, dst: &mut Dst, dst_coeff: usize, cst: &P, const_coeff: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

impl CKKSAddDefault<NTT120Ref> for Module<NTT120Ref>

Source§

fn ckks_add_tmp_bytes_default(&self) -> usize
where Self: GLWEShift<BE> + GLWENormalize<BE>,

Source§

fn ckks_add_pt_vec_tmp_bytes_default(&self) -> usize
where Self: GLWEShift<BE> + GLWENormalize<BE> + VecZnxRshTmpBytes,

Source§

fn ckks_add_pt_const_tmp_bytes_default(&self) -> usize
where Self: GLWEShift<BE> + GLWENormalize<BE> + VecZnxRshTmpBytes,

Source§

fn ckks_add_into_default<Dst, A, B>( &self, dst: &mut Dst, a: &A, b: &B, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_add_into_unsafe_default<Dst, A, B>( &self, dst: &mut Dst, a: &A, b: &B, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_add_assign_default<Dst, A>( &self, dst: &mut Dst, a: &A, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_add_assign_unsafe_default<Dst, A>( &self, dst: &mut Dst, a: &A, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>
where Self: GLWEAdd<BE> + GLWEShift<BE>, Dst: GLWEToBackendMut<BE> + CKKSInfos + SetCKKSInfos, A: GLWEToBackendRef<BE> + CKKSInfos,

Source§

fn ckks_add_one_assign_default<Dst>( &self, dst: &mut Dst, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_add_pt_vec_into_default<Dst, A, P>( &self, dst: &mut Dst, a: &A, pt: &P, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_add_pt_vec_into_unsafe_default<Dst, A, P>( &self, dst: &mut Dst, a: &A, pt: &P, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_add_pt_vec_assign_default<Dst, P>( &self, dst: &mut Dst, pt: &P, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_add_pt_vec_assign_unsafe_default<Dst, P>( &self, dst: &mut Dst, pt: &P, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_add_pt_const_into_default<Dst, A, P>( &self, dst: &mut Dst, a: &A, dst_coeff: usize, cst: &P, const_coeff: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_add_pt_const_into_unsafe_default<Dst, A, P>( &self, dst: &mut Dst, a: &A, dst_coeff: usize, cst: &P, const_coeff: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_add_pt_const_assign_default<Dst, P>( &self, dst: &mut Dst, dst_coeff: usize, cst: &P, const_coeff: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_add_pt_const_assign_unsafe_default<Dst, P>( &self, dst: &mut Dst, dst_coeff: usize, cst: &P, const_coeff: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

impl<BE> CKKSAddManyOps<BE> for Module<BE>
where BE: Backend, Module<BE>: CKKSAddOps<BE> + CKKSRescaleOps<BE>,

Source§

fn ckks_add_many_tmp_bytes(&self) -> usize

Source§

fn ckks_add_many<Dst, Src>( &self, dst: &mut CKKSCiphertext<Dst>, inputs: &[&CKKSCiphertext<Src>], scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst = inputs[0] + inputs[1] + … + inputs[n-1] using a balanced binary tree of pairwise additions. Read more
Source§

impl<BE> CKKSAddOps<BE> for Module<BE>
where BE: Backend + CKKSAddImpl<BE>,

Source§

fn ckks_add_tmp_bytes(&self) -> usize

Source§

fn ckks_add_into<Dst, A, B>( &self, dst: &mut Dst, a: &A, b: &B, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst = a + b. Read more
Source§

fn ckks_add_assign<Dst, A>( &self, dst: &mut Dst, a: &A, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst += a in-place. Read more
Source§

fn ckks_add_one_assign<Dst>( &self, dst: &mut Dst, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst += 1 in-place. Read more
Source§

fn ckks_add_pt_vec_tmp_bytes(&self) -> usize

Source§

fn ckks_add_pt_vec_into<Dst, A, P>( &self, dst: &mut Dst, a: &A, pt: &P, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst = a + pt where pt is a full plaintext polynomial. Read more
Source§

fn ckks_add_pt_vec_assign<Dst, P>( &self, dst: &mut Dst, pt: &P, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst += pt in-place, where pt is a full plaintext polynomial.
Source§

fn ckks_add_pt_const_tmp_bytes(&self) -> usize

Source§

fn ckks_add_pt_const_into<Dst, A, P>( &self, dst: &mut Dst, a: &A, dst_coeff: usize, pt: &P, pt_coeff: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst = a + pt[pt_coeff], adding one quantized constant to a single coefficient slot of the ciphertext. Read more
Source§

fn ckks_add_pt_const_assign<Dst, P>( &self, dst: &mut Dst, dst_coeff: usize, pt: &P, pt_coeff: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst += pt[pt_coeff] in-place. Read more
Source§

impl<BE> CKKSAddOpsUnnormalized<BE> for Module<BE>
where BE: Backend + CKKSAddImpl<BE>,

Source§

fn ckks_add_into_unnormalized<Dst, A, B>( &self, dst: &mut CKKSCiphertext<Dst, Unnormalized>, a: &A, b: &B, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_add_assign_unnormalized<Dst, A>( &self, dst: &mut CKKSCiphertext<Dst, Unnormalized>, a: &A, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_add_pt_vec_into_unnormalized<Dst, A, P>( &self, dst: &mut CKKSCiphertext<Dst, Unnormalized>, a: &A, pt: &P, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_add_pt_vec_assign_unnormalized<Dst, P>( &self, dst: &mut CKKSCiphertext<Dst, Unnormalized>, pt: &P, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_add_pt_const_into_unnormalized<Dst, A, P>( &self, dst: &mut CKKSCiphertext<Dst, Unnormalized>, a: &A, dst_coeff: usize, pt: &P, pt_coeff: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_add_pt_const_assign_unnormalized<Dst, P>( &self, dst: &mut CKKSCiphertext<Dst, Unnormalized>, dst_coeff: usize, pt: &P, pt_coeff: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

impl<BE> CKKSAffineOps<BE> for Module<BE>
where BE: Backend, Module<BE>: CKKSAddOps<BE> + CKKSMulOps<BE>,

Source§

fn ckks_affine_pt_const_tmp_bytes<R, A, P>( &self, res: &R, a: &A, affine_const: &P, ) -> usize

Source§

fn ckks_affine_pt_const_into<Dst, A, P>( &self, dst: &mut Dst, a: &A, affine_const: &P, offset_coeff: usize, scale_coeff: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst = a * affine_const[scale_coeff] + affine_const[offset_coeff]. Read more
Source§

fn ckks_affine_pt_const_assign<Dst, P>( &self, dst: &mut Dst, affine_const: &P, offset_coeff: usize, scale_coeff: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst = dst * affine_const[scale_coeff] + affine_const[offset_coeff] in-place. Read more
Source§

fn ckks_affine_pt_vec_tmp_bytes<R, A, S>( &self, res: &R, a: &A, scale: &S, ) -> usize

Source§

fn ckks_affine_pt_vec_into<Dst, A, S, P>( &self, dst: &mut Dst, a: &A, scale: &S, offset: &P, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst = a * scale + offset where scale and offset are full plaintext polynomials in the ZNX domain. Read more
Source§

fn ckks_affine_pt_vec_assign<Dst, S, P>( &self, dst: &mut Dst, scale: &S, offset: &P, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst = dst * scale + offset in-place. Read more
Source§

impl<BE> CKKSAllOpsTmpBytes<BE> for Module<BE>

Source§

fn ckks_all_ops_tmp_bytes<C, T, P>( &self, ct_infos: &C, tsk_infos: &T, pt_prec: &P, ) -> usize

Returns a scratch size large enough for the common CKKS workflow using ciphertext ops, plaintext ops, encryption/decryption, multiplication, and tensor-key setup.
Source§

fn ckks_all_ops_with_atk_tmp_bytes<C, T, A, P>( &self, ct_infos: &C, tsk_infos: &T, atk_infos: &A, pt_prec: &P, ) -> usize

Returns a scratch size large enough for Self::ckks_all_ops_tmp_bytes plus automorphism-key setup, rotation, and conjugation.
Source§

impl CKKSConjugateDefault<FFT64Ref> for Module<FFT64Ref>

Source§

fn ckks_conjugate_tmp_bytes_default<C, K>( &self, ct_infos: &C, key_infos: &K, ) -> usize
where C: GLWEInfos, K: GGLWEInfos, Self: GLWEAutomorphism<BE>,

Source§

fn ckks_conjugate_into_default<Dst, Src, K>( &self, dst: &mut Dst, src: &Src, key: &K, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_conjugate_assign_default<Dst, K>( &self, dst: &mut Dst, key: &K, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

impl CKKSConjugateDefault<NTT120Ref> for Module<NTT120Ref>

Source§

fn ckks_conjugate_tmp_bytes_default<C, K>( &self, ct_infos: &C, key_infos: &K, ) -> usize
where C: GLWEInfos, K: GGLWEInfos, Self: GLWEAutomorphism<BE>,

Source§

fn ckks_conjugate_into_default<Dst, Src, K>( &self, dst: &mut Dst, src: &Src, key: &K, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_conjugate_assign_default<Dst, K>( &self, dst: &mut Dst, key: &K, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

impl<BE> CKKSConjugateOps<BE> for Module<BE>
where BE: Backend + CKKSConjugateImpl<BE>, Module<BE>: GLWEAutomorphism<BE> + GLWEShift<BE>,

Source§

fn ckks_conjugate_tmp_bytes<C, K>(&self, ct_infos: &C, key_infos: &K) -> usize
where C: CKKSCtBounds, K: GGLWEInfos,

Source§

fn ckks_conjugate_into<Dst, Src, K>( &self, dst: &mut Dst, src: &Src, key: &K, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst = conj(src): takes the complex conjugate of every slot.
Source§

fn ckks_conjugate_assign<Dst, K>( &self, dst: &mut Dst, key: &K, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst = conj(dst) in-place. Metadata is unchanged.
Source§

impl CKKSCopyDefault<FFT64Ref> for Module<FFT64Ref>

Source§

fn ckks_copy_tmp_bytes_default(&self) -> usize
where Self: GLWEShift<BE>,

Source§

fn ckks_copy_default<Dst, Src>( &self, dst: &mut Dst, src: &Src, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

impl CKKSCopyDefault<NTT120Ref> for Module<NTT120Ref>

Source§

fn ckks_copy_tmp_bytes_default(&self) -> usize
where Self: GLWEShift<BE>,

Source§

fn ckks_copy_default<Dst, Src>( &self, dst: &mut Dst, src: &Src, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

impl<BE> CKKSCopyOps<BE> for Module<BE>
where BE: Backend + CKKSCopyImpl<BE>, Module<BE>: GLWECopy<BE> + GLWEShift<BE>,

Source§

fn ckks_copy_tmp_bytes(&self) -> usize

Source§

fn ckks_copy<Dst, Src>( &self, dst: &mut Dst, src: &Src, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Copies src into dst.
Source§

impl<BE> CKKSDecrypt<BE> for Module<BE>

Source§

fn ckks_decrypt_tmp_bytes<A>(&self, ct_infos: &A) -> usize
where A: CKKSCtBounds,

Source§

fn ckks_decrypt<Dpt, Dct, S>( &self, pt: &mut Dpt, ct: &Dct, sk: &S, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

impl<BE> CKKSDotProductOps<BE> for Module<BE>
where BE: Backend + CKKSAddImpl<BE>, Module<BE>: CKKSAddOps<BE> + CKKSMulOps<BE> + CKKSRescaleOps<BE> + GLWENormalize<BE> + GLWETensoring<BE>,

Source§

fn ckks_dot_product_ct_tmp_bytes<R, T>( &self, n: usize, res: &R, tsk: &T, ) -> usize
where R: CKKSCtBounds, T: GGLWEInfos,

Source§

fn ckks_dot_product_pt_vec_tmp_bytes<R, A, P>( &self, res: &R, a: &A, b: &P, ) -> usize

Source§

fn ckks_dot_product_pt_const_tmp_bytes<R, A, P>( &self, res: &R, a: &A, b: &P, ) -> usize

Source§

fn ckks_dot_product_ct<Dst, D, E, T>( &self, dst: &mut CKKSCiphertext<Dst>, a: &[&CKKSCiphertext<D>], b: &[&CKKSCiphertext<E>], tsk: &GLWETensorKeyPrepared<T, BE>, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst = Σ a[i] * b[i] over ciphertext–ciphertext pairs. Read more
Source§

fn ckks_dot_product_pt_vec<Dst, D, E>( &self, dst: &mut CKKSCiphertext<Dst>, a: &[&CKKSCiphertext<D>], b: &[&E], scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst = Σ a[i] * b[i] over ciphertext–plaintext-polynomial pairs. Read more
Source§

fn ckks_dot_product_pt_const<Dst, D, E>( &self, dst: &mut CKKSCiphertext<Dst>, a: &[&CKKSCiphertext<D>], b: &[&E], pt_coeffs: &[usize], scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst = Σ a[i] * b[i][pt_coeffs[i]] over ciphertext–scalar-constant pairs. Read more
Source§

impl<BE> CKKSEncrypt<BE> for Module<BE>

Source§

fn ckks_encrypt_sk_tmp_bytes<A>(&self, ct_infos: &A) -> usize
where A: CKKSCtBounds,

Source§

fn ckks_encrypt_sk<Dct, Dpt, S, E>( &self, ct: &mut Dct, pt: &Dpt, sk: &S, enc_infos: &E, source_xa: &mut Source, source_xe: &mut Source, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

impl CKKSEncryptionDefault<FFT64Ref> for Module<FFT64Ref>

Source§

impl CKKSEncryptionDefault<NTT120Ref> for Module<NTT120Ref>

Source§

impl CKKSImagDefault<FFT64Ref> for Module<FFT64Ref>

Source§

fn ckks_mul_i_tmp_bytes_default(&self) -> usize
where Self: GLWERotate<BE> + GLWEShift<BE>,

Source§

fn ckks_div_i_tmp_bytes_default(&self) -> usize
where Self: GLWERotate<BE> + GLWEShift<BE>,

Source§

fn ckks_mul_i_into_default<Dst, Src>( &self, dst: &mut Dst, src: &Src, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_mul_i_assign_default<Dst>( &self, dst: &mut Dst, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_div_i_into_default<Dst, Src>( &self, dst: &mut Dst, src: &Src, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_div_i_assign_default<Dst>( &self, dst: &mut Dst, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

impl CKKSImagDefault<NTT120Ref> for Module<NTT120Ref>

Source§

fn ckks_mul_i_tmp_bytes_default(&self) -> usize
where Self: GLWERotate<BE> + GLWEShift<BE>,

Source§

fn ckks_div_i_tmp_bytes_default(&self) -> usize
where Self: GLWERotate<BE> + GLWEShift<BE>,

Source§

fn ckks_mul_i_into_default<Dst, Src>( &self, dst: &mut Dst, src: &Src, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_mul_i_assign_default<Dst>( &self, dst: &mut Dst, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_div_i_into_default<Dst, Src>( &self, dst: &mut Dst, src: &Src, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_div_i_assign_default<Dst>( &self, dst: &mut Dst, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

impl<BE> CKKSImagOps<BE> for Module<BE>
where BE: Backend + CKKSImagImpl<BE>, Module<BE>: GLWECopy<BE> + GLWENegate<BE> + GLWERotate<BE> + GLWEShift<BE> + ModuleN,

Source§

fn ckks_mul_i_tmp_bytes(&self) -> usize

Source§

fn ckks_mul_i_into<Dst, Src>( &self, dst: &mut Dst, src: &Src, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst = i · src (multiply every slot by the imaginary unit).
Source§

fn ckks_mul_i_assign<Dst>( &self, dst: &mut Dst, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst = i · dst in-place. Metadata is unchanged.
Source§

fn ckks_div_i_tmp_bytes(&self) -> usize

Source§

fn ckks_div_i_into<Dst, Src>( &self, dst: &mut Dst, src: &Src, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst = src / i = −i · src (multiply every slot by −i).
Source§

fn ckks_div_i_assign<Dst>( &self, dst: &mut Dst, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst = dst / i in-place. Metadata is unchanged.
Source§

impl<BE> CKKSMaintainOps for Module<BE>
where BE: Backend<OwnedBuf = Vec<u8>> + HostBackend, Module<BE>: CKKSMaintainOpsDefault<BE> + CKKSModuleAlloc<BE>,

Source§

fn ckks_reallocate_limbs_checked( &self, ct: &mut CKKSCiphertext<Vec<u8>>, size: usize, ) -> Result<(), Error>

Reallocates the owned backing buffer to exactly size limbs. Read more
Source§

fn ckks_compact_limbs( &self, ct: &mut CKKSCiphertext<Vec<u8>>, ) -> Result<(), Error>

Shrinks an owned ciphertext buffer to the minimum limb count that still preserves its current metadata. Read more
Source§

fn ckks_compact_limbs_copy<D>( &self, ct: &CKKSCiphertext<D>, ) -> Result<CKKSCiphertext<Vec<u8>>, Error>
where D: HostDataRef,

Returns a newly allocated owned ciphertext holding a compacted copy of ct. Read more
Source§

impl<BE> CKKSModuleAlloc<BE> for Module<BE>
where BE: Backend, Module<BE>: ModuleCoreAlloc<OwnedBuf = <BE as Backend>::OwnedBuf>,

Source§

fn ckks_ciphertext_alloc_from_infos<A>( &self, infos: &A, ) -> CKKSCiphertext<<BE as Backend>::OwnedBuf>
where A: GLWEInfos,

Source§

fn ckks_ciphertext_alloc( &self, base2k: Base2K, k: TorusPrecision, ) -> CKKSCiphertext<<BE as Backend>::OwnedBuf>

Source§

fn ckks_pt_vec_alloc_from_infos<A>( &self, infos: &A, ) -> CKKSPlaintext<<BE as Backend>::OwnedBuf>
where A: GLWEInfos + CKKSInfos,

Source§

fn ckks_plaintext_alloc_from_infos<A>( &self, infos: &A, ) -> CKKSPlaintext<<BE as Backend>::OwnedBuf>
where A: LWEInfos + CKKSInfos,

Source§

fn ckks_plaintext_alloc( &self, n: Degree, base2k: Base2K, meta: CKKSMeta, ) -> CKKSPlaintext<<BE as Backend>::OwnedBuf>

Source§

fn ckks_pt_vec_alloc( &self, base2k: Base2K, meta: CKKSMeta, ) -> CKKSPlaintext<<BE as Backend>::OwnedBuf>

Source§

fn ckks_pt_coeffs_alloc( &self, coeff_count: usize, base2k: Base2K, meta: CKKSMeta, ) -> CKKSPlaintext<<BE as Backend>::OwnedBuf>

Source§

impl<BE> CKKSMulAddOps<BE> for Module<BE>
where BE: Backend, Module<BE>: CKKSAddOps<BE> + CKKSMulOps<BE> + CKKSAddOpsUnnormalized<BE>,

Source§

fn ckks_mul_add_ct_tmp_bytes<R, T>(&self, res: &R, tsk: &T) -> usize
where R: CKKSCtBounds, T: GGLWEInfos,

Source§

fn ckks_mul_add_pt_vec_tmp_bytes<R, A, P>(&self, res: &R, a: &A, b: &P) -> usize

Source§

fn ckks_mul_add_pt_const_tmp_bytes<R, A, P>( &self, res: &R, a: &A, b: &P, ) -> usize

Source§

fn ckks_mul_add_ct_into<Dst, A, B, T>( &self, dst: &mut CKKSCiphertext<Dst>, a: &CKKSCiphertext<A>, b: &CKKSCiphertext<B>, tsk: &GLWETensorKeyPrepared<T, BE>, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst += a * b using tensor-product keyswitching via tsk. Read more
Source§

fn ckks_mul_add_pt_vec_into<Dst, A, P>( &self, dst: &mut CKKSCiphertext<Dst>, a: &CKKSCiphertext<A>, pt: &P, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst += a * pt where pt is a full plaintext polynomial. Read more
Source§

fn ckks_mul_add_pt_const_into<Dst, A, P>( &self, dst: &mut CKKSCiphertext<Dst>, a: &CKKSCiphertext<A>, pt: &P, pt_coeff: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst += a * pt[pt_coeff]. Read more
Source§

fn ckks_mul_add_pt_const_into_unnormalized<Dst, A, P>( &self, dst: &mut CKKSCiphertext<Dst, Unnormalized>, a: &A, pt: &P, pt_coeff: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst += a * pt[pt_coeff] without normalizing dst. Read more
Source§

fn ckks_mul_add_pt_vec_into_unnormalized<Dst, A, P>( &self, dst: &mut CKKSCiphertext<Dst, Unnormalized>, a: &A, pt: &P, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst += a * pt without normalizing dst. Read more
Source§

impl CKKSMulDefault<FFT64Ref> for Module<FFT64Ref>

Source§

fn ckks_mul_tmp_bytes_default<R, T>(&self, res: &R, tsk: &T) -> usize
where R: GLWEInfos, T: GGLWEInfos, Self: GLWETensoring<BE>,

Source§

fn ckks_mul_into_default<Dst, A, B, T>( &self, dst: &mut Dst, a: &A, b: &B, tsk: &T, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_mul_assign_default<Dst, A, T>( &self, dst: &mut Dst, a: &A, tsk: &T, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_square_tmp_bytes_default<R, T>(&self, res: &R, tsk: &T) -> usize
where R: GLWEInfos, T: GGLWEInfos, Self: GLWETensoring<BE>,

Source§

fn ckks_square_into_default<Dst, A, T>( &self, dst: &mut Dst, a: &A, tsk: &T, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_square_assign_default<Dst, T>( &self, dst: &mut Dst, tsk: &T, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_mul_pt_vec_tmp_bytes_default<R, A>( &self, res: &R, a: &A, b: &CKKSMeta, ) -> usize
where R: GLWEInfos, A: GLWEInfos, Self: GLWEMulPlain<BE>,

Source§

fn ckks_mul_pt_const_tmp_bytes_default<R, A>( &self, res: &R, a: &A, b: &CKKSMeta, ) -> usize
where R: GLWEInfos, A: GLWEInfos, Self: GLWEMulConst<BE> + GLWERotate<BE>,

Source§

fn ckks_mul_pt_vec_into_default<Dst, A, P>( &self, dst: &mut Dst, a: &A, pt: &P, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_mul_pt_vec_assign_default<Dst, P>( &self, dst: &mut Dst, pt: &P, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_mul_pt_const_into_default<Dst, A, P>( &self, dst: &mut Dst, a: &A, pt: &P, pt_coeff: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_mul_pt_const_assign_default<Dst, P>( &self, dst: &mut Dst, cnst: &P, cnst_coeff: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

impl CKKSMulDefault<NTT120Ref> for Module<NTT120Ref>

Source§

fn ckks_mul_tmp_bytes_default<R, T>(&self, res: &R, tsk: &T) -> usize
where R: GLWEInfos, T: GGLWEInfos, Self: GLWETensoring<BE>,

Source§

fn ckks_mul_into_default<Dst, A, B, T>( &self, dst: &mut Dst, a: &A, b: &B, tsk: &T, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_mul_assign_default<Dst, A, T>( &self, dst: &mut Dst, a: &A, tsk: &T, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_square_tmp_bytes_default<R, T>(&self, res: &R, tsk: &T) -> usize
where R: GLWEInfos, T: GGLWEInfos, Self: GLWETensoring<BE>,

Source§

fn ckks_square_into_default<Dst, A, T>( &self, dst: &mut Dst, a: &A, tsk: &T, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_square_assign_default<Dst, T>( &self, dst: &mut Dst, tsk: &T, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_mul_pt_vec_tmp_bytes_default<R, A>( &self, res: &R, a: &A, b: &CKKSMeta, ) -> usize
where R: GLWEInfos, A: GLWEInfos, Self: GLWEMulPlain<BE>,

Source§

fn ckks_mul_pt_const_tmp_bytes_default<R, A>( &self, res: &R, a: &A, b: &CKKSMeta, ) -> usize
where R: GLWEInfos, A: GLWEInfos, Self: GLWEMulConst<BE> + GLWERotate<BE>,

Source§

fn ckks_mul_pt_vec_into_default<Dst, A, P>( &self, dst: &mut Dst, a: &A, pt: &P, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_mul_pt_vec_assign_default<Dst, P>( &self, dst: &mut Dst, pt: &P, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_mul_pt_const_into_default<Dst, A, P>( &self, dst: &mut Dst, a: &A, pt: &P, pt_coeff: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_mul_pt_const_assign_default<Dst, P>( &self, dst: &mut Dst, cnst: &P, cnst_coeff: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

impl<BE> CKKSMulOps<BE> for Module<BE>
where BE: Backend + CKKSMulImpl<BE>, Module<BE>: GLWEAdd<BE> + GLWECopy<BE> + GLWEMulConst<BE> + GLWEMulPlain<BE> + GLWERotate<BE> + GLWETensoring<BE> + ModuleN + ModuleCoreAlloc<OwnedBuf = <BE as Backend>::OwnedBuf> + VecZnxCopyBackend<BE>,

Source§

fn ckks_mul_tmp_bytes<R, T>(&self, res: &R, tsk: &T) -> usize
where R: CKKSCtBounds, T: GGLWEInfos,

Source§

fn ckks_square_tmp_bytes<R, T>(&self, res: &R, tsk: &T) -> usize
where R: CKKSCtBounds, T: GGLWEInfos,

Source§

fn ckks_mul_pt_vec_tmp_bytes<R, A, P>(&self, res: &R, a: &A, b: &P) -> usize

Source§

fn ckks_mul_pt_const_tmp_bytes<R, A, P>(&self, res: &R, a: &A, b: &P) -> usize

Source§

fn ckks_mul_into<Dst, A, B, T>( &self, dst: &mut Dst, a: &A, b: &B, tsk: &T, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst = a * b using tensor-product keyswitching via tsk. Read more
Source§

fn ckks_mul_assign<Dst, A, T>( &self, dst: &mut Dst, a: &A, tsk: &T, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst *= a in-place using tensor-product keyswitching via tsk.
Source§

fn ckks_square_into<Dst, A, T>( &self, dst: &mut Dst, a: &A, tsk: &T, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst = a * a (squaring) using tensor-product keyswitching. Read more
Source§

fn ckks_square_assign<Dst, T>( &self, dst: &mut Dst, tsk: &T, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst = dst * dst (squaring in-place) using tensor-product keyswitching.
Source§

fn ckks_mul_pt_vec_into<Dst, A, P>( &self, dst: &mut Dst, a: &A, pt: &P, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst = a * pt where pt is a full plaintext polynomial. Read more
Source§

fn ckks_mul_pt_vec_assign<Dst, P>( &self, dst: &mut Dst, pt: &P, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst *= pt in-place.
Source§

fn ckks_mul_pt_const_into<Dst, A, P>( &self, dst: &mut Dst, a: &A, pt: &P, pt_coeff: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst = a * pt[pt_coeff], multiplying by a single quantized constant from coefficient pt_coeff of pt. Read more
Source§

fn ckks_mul_pt_const_assign<Dst, P>( &self, dst: &mut Dst, pt: &P, pt_coeff: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst *= pt[pt_coeff] in-place.
Source§

impl<BE> CKKSMulSubOps<BE> for Module<BE>
where BE: Backend, Module<BE>: CKKSMulOps<BE> + CKKSSubOps<BE>,

Source§

fn ckks_mul_sub_ct_tmp_bytes<R, T>(&self, res: &R, tsk: &T) -> usize
where R: CKKSCtBounds, T: GGLWEInfos,

Source§

fn ckks_mul_sub_pt_vec_tmp_bytes<R, A, P>(&self, res: &R, a: &A, b: &P) -> usize

Source§

fn ckks_mul_sub_pt_const_tmp_bytes<R, A, P>( &self, res: &R, a: &A, b: &P, ) -> usize

Source§

fn ckks_mul_sub_ct_into<Dst, A, B, T>( &self, dst: &mut CKKSCiphertext<Dst>, a: &CKKSCiphertext<A>, b: &CKKSCiphertext<B>, tsk: &GLWETensorKeyPrepared<T, BE>, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst -= a * b using tensor-product keyswitching via tsk. Read more
Source§

fn ckks_mul_sub_pt_vec_into<Dst, A, P>( &self, dst: &mut CKKSCiphertext<Dst>, a: &CKKSCiphertext<A>, pt: &P, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst -= a * pt where pt is a full plaintext polynomial. Read more
Source§

fn ckks_mul_sub_pt_const_into<Dst, A, P>( &self, dst: &mut CKKSCiphertext<Dst>, a: &CKKSCiphertext<A>, pt: &P, pt_coeff: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst -= a * pt[pt_coeff]. Read more
Source§

impl CKKSNegDefault<FFT64Ref> for Module<FFT64Ref>

Source§

fn ckks_neg_tmp_bytes_default(&self) -> usize
where Self: GLWEShift<BE>,

Source§

fn ckks_neg_into_default<Dst, Src>( &self, dst: &mut Dst, src: &Src, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_neg_assign_default<Dst>(&self, dst: &mut Dst) -> Result<(), Error>
where Self: GLWENegate<BE>, Dst: GLWEToBackendMut<BE> + LWEInfos + CKKSInfos + SetCKKSInfos,

Source§

impl CKKSNegDefault<NTT120Ref> for Module<NTT120Ref>

Source§

fn ckks_neg_tmp_bytes_default(&self) -> usize
where Self: GLWEShift<BE>,

Source§

fn ckks_neg_into_default<Dst, Src>( &self, dst: &mut Dst, src: &Src, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_neg_assign_default<Dst>(&self, dst: &mut Dst) -> Result<(), Error>
where Self: GLWENegate<BE>, Dst: GLWEToBackendMut<BE> + LWEInfos + CKKSInfos + SetCKKSInfos,

Source§

impl<BE> CKKSNegOps<BE> for Module<BE>
where BE: Backend + CKKSNegImpl<BE>, Module<BE>: GLWENegate<BE> + GLWEShift<BE>,

Source§

fn ckks_neg_tmp_bytes(&self) -> usize

Source§

fn ckks_neg_into<Dst, Src>( &self, dst: &mut Dst, src: &Src, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst = -src.
Source§

fn ckks_neg_assign<Dst>(&self, dst: &mut Dst) -> Result<(), Error>

Computes dst = -dst in-place. Metadata is unchanged.
Source§

impl CKKSPlaintextDefault<FFT64Ref> for Module<FFT64Ref>

Source§

fn ckks_add_pt_vec_into_default<Dst, A>( &self, ct: &mut Dst, pt: &A, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_add_pt_const_into_default<Dst, A>( &self, ct: &mut Dst, coeff_ct: usize, pt: &A, coeff_pt: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_sub_pt_const_into_default<Dst, A>( &self, ct: &mut Dst, coeff_ct: usize, pt: &A, coeff_pt: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_sub_pt_vec_into_default<Dst, A>( &self, ct: &mut Dst, pt: &A, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_extract_pt_tmp_bytes_default(&self) -> usize

Source§

fn ckks_extract_pt_default<D, S>( &self, dst: &mut D, src: &S, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_extract_pt_with_meta_default<D, S>( &self, dst: &mut D, src: &S, src_meta: CKKSMeta, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

impl CKKSPlaintextDefault<NTT120Ref> for Module<NTT120Ref>

Source§

fn ckks_add_pt_vec_into_default<Dst, A>( &self, ct: &mut Dst, pt: &A, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_add_pt_const_into_default<Dst, A>( &self, ct: &mut Dst, coeff_ct: usize, pt: &A, coeff_pt: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_sub_pt_const_into_default<Dst, A>( &self, ct: &mut Dst, coeff_ct: usize, pt: &A, coeff_pt: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_sub_pt_vec_into_default<Dst, A>( &self, ct: &mut Dst, pt: &A, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_extract_pt_tmp_bytes_default(&self) -> usize

Source§

fn ckks_extract_pt_default<D, S>( &self, dst: &mut D, src: &S, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_extract_pt_with_meta_default<D, S>( &self, dst: &mut D, src: &S, src_meta: CKKSMeta, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

impl<BE> CKKSPlaintextVecOps<BE> for Module<BE>

Source§

fn ckks_extract_pt_tmp_bytes(&self) -> usize

Source§

fn ckks_extract_pt<D, S>( &self, dst: &mut D, src: &S, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Extracts the ZNX plaintext polynomial from src into dst.
Source§

impl CKKSPow2Default<FFT64Ref> for Module<FFT64Ref>

Source§

fn ckks_mul_pow2_tmp_bytes_default(&self) -> usize
where Self: GLWEShift<BE>,

Source§

fn ckks_div_pow2_tmp_bytes_default(&self) -> usize
where Self: GLWEShift<BE>,

Source§

fn ckks_mul_pow2_into_default<Dst, Src>( &self, dst: &mut Dst, src: &Src, bits: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_mul_pow2_assign_default<Dst>( &self, dst: &mut Dst, bits: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>
where Self: GLWEShift<BE>, Dst: GLWEToBackendMut<BE> + LWEInfos + CKKSInfos + SetCKKSInfos,

Source§

fn ckks_div_pow2_into_default<Dst, Src>( &self, dst: &mut Dst, src: &Src, bits: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_div_pow2_assign_default<Dst>( &self, dst: &mut Dst, bits: usize, ) -> Result<(), Error>

Source§

impl CKKSPow2Default<NTT120Ref> for Module<NTT120Ref>

Source§

fn ckks_mul_pow2_tmp_bytes_default(&self) -> usize
where Self: GLWEShift<BE>,

Source§

fn ckks_div_pow2_tmp_bytes_default(&self) -> usize
where Self: GLWEShift<BE>,

Source§

fn ckks_mul_pow2_into_default<Dst, Src>( &self, dst: &mut Dst, src: &Src, bits: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_mul_pow2_assign_default<Dst>( &self, dst: &mut Dst, bits: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>
where Self: GLWEShift<BE>, Dst: GLWEToBackendMut<BE> + LWEInfos + CKKSInfos + SetCKKSInfos,

Source§

fn ckks_div_pow2_into_default<Dst, Src>( &self, dst: &mut Dst, src: &Src, bits: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_div_pow2_assign_default<Dst>( &self, dst: &mut Dst, bits: usize, ) -> Result<(), Error>

Source§

impl<BE> CKKSPow2Ops<BE> for Module<BE>
where BE: Backend + CKKSPow2Impl<BE>, Module<BE>: GLWECopy<BE> + GLWEShift<BE>,

Source§

fn ckks_mul_pow2_tmp_bytes(&self) -> usize

Source§

fn ckks_mul_pow2_into<Dst, Src>( &self, dst: &mut Dst, src: &Src, bits: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst = src * 2^bits. Read more
Source§

fn ckks_mul_pow2_assign<Dst>( &self, dst: &mut Dst, bits: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst *= 2^bits in-place. Metadata is unchanged.
Source§

fn ckks_div_pow2_tmp_bytes(&self) -> usize

Source§

fn ckks_div_pow2_into<Dst, Src>( &self, dst: &mut Dst, src: &Src, bits: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst = src / 2^bits. Read more
Source§

fn ckks_div_pow2_assign<Dst>( &self, dst: &mut Dst, bits: usize, ) -> Result<(), Error>

Computes dst /= 2^bits in-place. Read more
Source§

impl<BE> CKKSRescaleOps<BE> for Module<BE>
where BE: Backend + CKKSRescaleImpl<BE>, Module<BE>: GLWEShift<BE>,

Source§

fn ckks_rescale_tmp_bytes(&self) -> usize

Returns scratch bytes required by Self::ckks_rescale_into.
Source§

fn ckks_rescale_assign<Dst>( &self, ct: &mut Dst, k: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Rescales ct in-place by k bits. Read more
Source§

fn ckks_rescale_into<Dst, Src>( &self, dst: &mut Dst, k: usize, src: &Src, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Writes a k-bit rescaled copy of src into dst. Read more
Source§

fn ckks_align_pair<A, B>( &self, a: &mut A, b: &mut B, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Equalizes the log_budget of a and b by rescaling whichever has more remaining capacity down to the other’s level. Read more
Source§

fn ckks_align_tmp_bytes(&self) -> usize

Returns scratch bytes required by Self::ckks_align_pair.
Source§

impl CKKSRotateDefault<FFT64Ref> for Module<FFT64Ref>

Source§

fn ckks_rotate_tmp_bytes_default<C, K>( &self, ct_infos: &C, key_infos: &K, ) -> usize
where C: GLWEInfos, K: GGLWEInfos, Self: GLWEAutomorphism<BE>,

Source§

fn ckks_rotate_into_default<Dst, Src, K>( &self, dst: &mut Dst, src: &Src, key: &K, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_rotate_assign_default<Dst, K>( &self, dst: &mut Dst, key: &K, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

impl CKKSRotateDefault<NTT120Ref> for Module<NTT120Ref>

Source§

fn ckks_rotate_tmp_bytes_default<C, K>( &self, ct_infos: &C, key_infos: &K, ) -> usize
where C: GLWEInfos, K: GGLWEInfos, Self: GLWEAutomorphism<BE>,

Source§

fn ckks_rotate_into_default<Dst, Src, K>( &self, dst: &mut Dst, src: &Src, key: &K, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_rotate_assign_default<Dst, K>( &self, dst: &mut Dst, key: &K, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

impl<BE> CKKSRotateOps<BE> for Module<BE>
where BE: Backend + CKKSRotateImpl<BE>, Module<BE>: GLWEAutomorphism<BE> + GLWEShift<BE>,

Source§

fn ckks_rotate_tmp_bytes<C, K>(&self, ct_infos: &C, key_infos: &K) -> usize
where C: CKKSCtBounds, K: GGLWEInfos,

Source§

fn ckks_rotate_into<Dst, Src, H, K>( &self, dst: &mut Dst, src: &Src, k: i64, keys: &H, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst = rotate(src, k): shifts all complex slots by k positions. Read more
Source§

fn ckks_rotate_assign<Dst, H, K>( &self, dst: &mut Dst, k: i64, keys: &H, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst = rotate(dst, k) in-place. Metadata is unchanged.
Source§

impl CKKSSubDefault<FFT64Ref> for Module<FFT64Ref>

Source§

fn ckks_sub_tmp_bytes_default(&self) -> usize
where Self: GLWEShift<BE> + GLWENormalize<BE> + VecZnxRshTmpBytes,

Source§

fn ckks_sub_pt_vec_tmp_bytes_default(&self) -> usize
where Self: GLWEShift<BE> + GLWENormalize<BE> + VecZnxRshTmpBytes,

Source§

fn ckks_sub_pt_const_tmp_bytes_default(&self) -> usize
where Self: GLWEShift<BE> + GLWENormalize<BE> + VecZnxRshTmpBytes,

Source§

fn ckks_sub_into_default<Dst, A, B>( &self, dst: &mut Dst, a: &A, b: &B, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_sub_into_unsafe_default<Dst, A, B>( &self, dst: &mut Dst, a: &A, b: &B, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_sub_assign_default<Dst, A>( &self, dst: &mut Dst, a: &A, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_sub_assign_unsafe_default<Dst, A>( &self, dst: &mut Dst, a: &A, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>
where Self: GLWESub<BE> + GLWEShift<BE>, Dst: GLWEToBackendMut<BE> + CKKSInfos + SetCKKSInfos, A: GLWEToBackendRef<BE> + CKKSInfos,

Source§

fn ckks_sub_one_assign_default<Dst>( &self, dst: &mut Dst, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_sub_pt_vec_into_default<Dst, A, P>( &self, dst: &mut Dst, a: &A, pt: &P, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_sub_pt_vec_into_unsafe_default<Dst, A, P>( &self, dst: &mut Dst, a: &A, pt: &P, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_sub_pt_vec_assign_default<Dst, P>( &self, dst: &mut Dst, pt: &P, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_sub_pt_vec_assign_unsafe_default<Dst, P>( &self, dst: &mut Dst, pt: &P, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_sub_pt_const_into_default<Dst, A, P>( &self, dst: &mut Dst, a: &A, dst_coeff: usize, cst: &P, const_coeff: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_sub_pt_const_into_unsafe_default<Dst, A, P>( &self, dst: &mut Dst, a: &A, dst_coeff: usize, cst: &P, const_coeff: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_sub_pt_const_assign_default<Dst, P>( &self, dst: &mut Dst, dst_coeff: usize, cst: &P, const_coeff: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_sub_pt_const_assign_unsafe_default<Dst, P>( &self, dst: &mut Dst, dst_coeff: usize, cst: &P, const_coeff: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

impl CKKSSubDefault<NTT120Ref> for Module<NTT120Ref>

Source§

fn ckks_sub_tmp_bytes_default(&self) -> usize
where Self: GLWEShift<BE> + GLWENormalize<BE> + VecZnxRshTmpBytes,

Source§

fn ckks_sub_pt_vec_tmp_bytes_default(&self) -> usize
where Self: GLWEShift<BE> + GLWENormalize<BE> + VecZnxRshTmpBytes,

Source§

fn ckks_sub_pt_const_tmp_bytes_default(&self) -> usize
where Self: GLWEShift<BE> + GLWENormalize<BE> + VecZnxRshTmpBytes,

Source§

fn ckks_sub_into_default<Dst, A, B>( &self, dst: &mut Dst, a: &A, b: &B, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_sub_into_unsafe_default<Dst, A, B>( &self, dst: &mut Dst, a: &A, b: &B, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_sub_assign_default<Dst, A>( &self, dst: &mut Dst, a: &A, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_sub_assign_unsafe_default<Dst, A>( &self, dst: &mut Dst, a: &A, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>
where Self: GLWESub<BE> + GLWEShift<BE>, Dst: GLWEToBackendMut<BE> + CKKSInfos + SetCKKSInfos, A: GLWEToBackendRef<BE> + CKKSInfos,

Source§

fn ckks_sub_one_assign_default<Dst>( &self, dst: &mut Dst, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_sub_pt_vec_into_default<Dst, A, P>( &self, dst: &mut Dst, a: &A, pt: &P, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_sub_pt_vec_into_unsafe_default<Dst, A, P>( &self, dst: &mut Dst, a: &A, pt: &P, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_sub_pt_vec_assign_default<Dst, P>( &self, dst: &mut Dst, pt: &P, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_sub_pt_vec_assign_unsafe_default<Dst, P>( &self, dst: &mut Dst, pt: &P, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_sub_pt_const_into_default<Dst, A, P>( &self, dst: &mut Dst, a: &A, dst_coeff: usize, cst: &P, const_coeff: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_sub_pt_const_into_unsafe_default<Dst, A, P>( &self, dst: &mut Dst, a: &A, dst_coeff: usize, cst: &P, const_coeff: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_sub_pt_const_assign_default<Dst, P>( &self, dst: &mut Dst, dst_coeff: usize, cst: &P, const_coeff: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_sub_pt_const_assign_unsafe_default<Dst, P>( &self, dst: &mut Dst, dst_coeff: usize, cst: &P, const_coeff: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

impl<BE> CKKSSubOps<BE> for Module<BE>
where BE: Backend + CKKSSubImpl<BE>,

Source§

fn ckks_sub_tmp_bytes(&self) -> usize

Source§

fn ckks_sub_pt_vec_tmp_bytes(&self) -> usize

Source§

fn ckks_sub_into<Dst, A, B>( &self, dst: &mut Dst, a: &A, b: &B, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst = a - b. Read more
Source§

fn ckks_sub_assign<Dst, A>( &self, dst: &mut Dst, a: &A, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst -= a in-place.
Source§

fn ckks_sub_one_assign<Dst>( &self, dst: &mut Dst, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst -= 1 in-place. Read more
Source§

fn ckks_sub_pt_vec_into<Dst, A, P>( &self, dst: &mut Dst, a: &A, pt: &P, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst = a - pt where pt is a full plaintext polynomial.
Source§

fn ckks_sub_pt_vec_assign<Dst, P>( &self, dst: &mut Dst, pt: &P, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst -= pt in-place.
Source§

fn ckks_sub_pt_const_tmp_bytes(&self) -> usize

Source§

fn ckks_sub_pt_const_into<Dst, A, P>( &self, dst: &mut Dst, a: &A, dst_coeff: usize, pt: &P, pt_coeff: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst = a - pt[pt_coeff], subtracting one quantized constant from a single coefficient slot of the ciphertext. Read more
Source§

fn ckks_sub_pt_const_assign<Dst, P>( &self, dst: &mut Dst, dst_coeff: usize, pt: &P, pt_coeff: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Computes dst -= pt[pt_coeff] in-place. Read more
Source§

impl<BE> CKKSSubOpsUnnormalized<BE> for Module<BE>
where BE: Backend + CKKSSubImpl<BE>,

Source§

fn ckks_sub_into_unnormalized<Dst, A, B>( &self, dst: &mut CKKSCiphertext<Dst, Unnormalized>, a: &A, b: &B, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_sub_assign_unnormalized<Dst, A>( &self, dst: &mut CKKSCiphertext<Dst, Unnormalized>, a: &A, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_sub_pt_vec_into_unnormalized<Dst, A, P>( &self, dst: &mut CKKSCiphertext<Dst, Unnormalized>, a: &A, pt: &P, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_sub_pt_vec_assign_unnormalized<Dst, P>( &self, dst: &mut CKKSCiphertext<Dst, Unnormalized>, pt: &P, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_sub_pt_const_into_unnormalized<Dst, A, P>( &self, dst: &mut CKKSCiphertext<Dst, Unnormalized>, a: &A, dst_coeff: usize, pt: &P, pt_coeff: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

fn ckks_sub_pt_const_assign_unnormalized<Dst, P>( &self, dst: &mut CKKSCiphertext<Dst, Unnormalized>, dst_coeff: usize, pt: &P, pt_coeff: usize, scratch: &mut ScratchArena<'_, BE>, ) -> Result<(), Error>

Source§

impl<BE> CnvPVecAlloc<BE> for Module<BE>
where BE: Backend,

Source§

fn cnv_pvec_left_alloc( &self, cols: usize, size: usize, ) -> CnvPVecL<<BE as Backend>::OwnedBuf, BE>

Source§

fn cnv_pvec_right_alloc( &self, cols: usize, size: usize, ) -> CnvPVecR<<BE as Backend>::OwnedBuf, BE>

Source§

impl<BE> CnvPVecBytesOf for Module<BE>
where BE: Backend,

Source§

impl<BE> Convolution<BE> for Module<BE>
where BE: Backend + HalConvolutionImpl<BE>,

Source§

fn cnv_prepare_left_tmp_bytes(&self, res_size: usize, a_size: usize) -> usize

Returns scratch bytes required for cnv_prepare_left.
Source§

fn cnv_prepare_left( &self, res: &mut CnvPVecL<<BE as Backend>::BufMut<'_>, BE>, a: &VecZnx<<BE as Backend>::BufRef<'_>>, mask: i64, scratch: &mut ScratchArena<'_, BE>, )

Prepares a coefficient-domain VecZnx as the left operand of a bivariate convolution.
Source§

fn cnv_prepare_right_tmp_bytes(&self, res_size: usize, a_size: usize) -> usize

Returns scratch bytes required for cnv_prepare_right.
Source§

fn cnv_prepare_right( &self, res: &mut CnvPVecR<<BE as Backend>::BufMut<'_>, BE>, a: &VecZnx<<BE as Backend>::BufRef<'_>>, mask: i64, scratch: &mut ScratchArena<'_, BE>, )

Prepares a coefficient-domain VecZnx as the right operand of a bivariate convolution.
Source§

fn cnv_apply_dft_tmp_bytes( &self, cnv_offset: usize, res_size: usize, a_size: usize, b_size: usize, ) -> usize

Returns scratch bytes required for cnv_apply_dft.
Source§

fn cnv_by_const_apply_tmp_bytes( &self, res_size: usize, cnv_offset: usize, a_size: usize, b_size: usize, ) -> usize

Returns scratch bytes required for cnv_by_const_apply.
Source§

fn cnv_by_const_apply( &self, cnv_offset: usize, res: &mut VecZnxBig<<BE as Backend>::BufMut<'_>, BE>, res_col: usize, a: &VecZnx<<BE as Backend>::BufRef<'_>>, a_col: usize, b: &VecZnx<<BE as Backend>::BufRef<'_>>, b_col: usize, b_coeff: usize, scratch: &mut ScratchArena<'_, BE>, )

Evaluates a bivariate convolution over Z[X, Y] (x) Z[Y] mod (X^N + 1) where Y = 2^-K over the selected columns and stores the result on the selected column, scaled by 2^{cnv_offset * Base2K} Read more
Source§

fn cnv_apply_dft( &self, cnv_offset: usize, res: &mut VecZnxDft<<BE as Backend>::BufMut<'_>, BE>, res_col: usize, a: &CnvPVecL<<BE as Backend>::BufRef<'_>, BE>, a_col: usize, b: &CnvPVecR<<BE as Backend>::BufRef<'_>, BE>, b_col: usize, scratch: &mut ScratchArena<'_, BE>, )

Evaluates a bivariate convolution over Z[X, Y] (x) Z[X, Y] mod (X^N + 1) where Y = 2^-K over the selected columns and stores the result on the selected column, scaled by 2^{cnv_offset * Base2K} Read more
Source§

fn cnv_pairwise_apply_dft_tmp_bytes( &self, cnv_offset: usize, res_size: usize, a_size: usize, b_size: usize, ) -> usize

Returns scratch bytes required for cnv_pairwise_apply_dft.
Source§

fn cnv_pairwise_apply_dft( &self, cnv_offset: usize, res: &mut VecZnxDft<<BE as Backend>::BufMut<'_>, BE>, res_col: usize, a: &CnvPVecL<<BE as Backend>::BufRef<'_>, BE>, b: &CnvPVecR<<BE as Backend>::BufRef<'_>, BE>, i: usize, j: usize, scratch: &mut ScratchArena<'_, BE>, )

Evaluates the bivariate pair-wise convolution res = (a[i] + a[j]) * (b[i] + b[j]). If i == j then calls Convolution::cnv_apply_dft, i.e. res = a[i] * b[i]. See Convolution::cnv_apply_dft for information about the bivariate convolution.
Source§

fn cnv_prepare_self_tmp_bytes(&self, res_size: usize, a_size: usize) -> usize

Returns scratch bytes required for cnv_prepare_self.
Source§

fn cnv_prepare_self( &self, left: &mut CnvPVecL<<BE as Backend>::BufMut<'_>, BE>, right: &mut CnvPVecR<<BE as Backend>::BufMut<'_>, BE>, a: &VecZnx<<BE as Backend>::BufRef<'_>>, mask: i64, scratch: &mut ScratchArena<'_, BE>, )

Prepares both left and right convolution operands from the same input polynomial, sharing the FFT/NTT computation. This is an optimization for self-convolution (squaring) where both operands are the same polynomial.
Source§

impl<BE> CyclotomicOrder for Module<BE>
where BE: Backend, Module<BE>: ModuleN,

Source§

fn cyclotomic_order(&self) -> i64

Returns 2N, the order of the cyclotomic polynomial X^N + 1.
Source§

impl<B> Drop for Module<B>
where B: Backend,

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
Source§

impl<BE: Backend> FFTModuleHandle<<BE as Backend>::ScalarPrep> for Module<BE>

Source§

impl<BE> GGLWECompressedEncryptSk<BE> for Module<BE>
where BE: Backend + EncryptionImpl<BE>,

Source§

fn gglwe_compressed_encrypt_sk_tmp_bytes<A>(&self, infos: &A) -> usize
where A: GGLWEInfos,

Source§

fn gglwe_compressed_encrypt_sk<R, P, S, E>( &self, res: &mut R, pt: &P, sk: &S, seed: [u8; 32], enc_infos: &E, source_xe: &mut Source, scratch: &mut ScratchArena<'_, BE>, )

Source§

impl<B> GGLWEDecompress for Module<B>

Source§

fn decompress_gglwe<R, O>(&self, res: &mut R, other: &O)

Decompresses other into res.
Source§

impl<BE> GGLWEEncryptSk<BE> for Module<BE>
where BE: Backend + EncryptionImpl<BE>,

Source§

fn gglwe_encrypt_sk_tmp_bytes<A>(&self, infos: &A) -> usize
where A: GGLWEInfos,

Source§

fn gglwe_encrypt_sk<R, P, S, E>( &self, res: &mut R, pt: &P, sk: &S, enc_infos: &E, source_xe: &mut Source, source_xa: &mut Source, scratch: &mut ScratchArena<'_, BE>, )

Source§

impl<BE> GGLWEExternalProduct<BE> for Module<BE>

Source§

fn gglwe_external_product_tmp_bytes<R, A, B>( &self, res_infos: &R, a_infos: &A, b_infos: &B, ) -> usize
where R: GGLWEInfos, A: GGLWEInfos, B: GGSWInfos,

Source§

fn gglwe_external_product<R, A, B>( &self, res: &mut R, a: &A, b: &B, key_size: usize, scratch: &mut ScratchArena<'_, BE>, )

Source§

fn gglwe_external_product_assign<R, A>( &self, res: &mut R, a: &A, key_size: usize, scratch: &mut ScratchArena<'_, BE>, )

Source§

impl<BE> GGLWEKeyswitch<BE> for Module<BE>
where BE: Backend + GGLWEKeyswitchImpl<BE>,

Source§

fn gglwe_keyswitch_tmp_bytes<R, A, K>( &self, res_infos: &R, a_infos: &A, key_infos: &K, ) -> usize
where R: GGLWEInfos, A: GGLWEInfos, K: GGLWEInfos,

Source§

fn gglwe_keyswitch<R, A, B>( &self, res: &mut R, a: &A, b: &B, key_size: usize, scratch: &mut ScratchArena<'_, BE>, )

Source§

fn gglwe_keyswitch_assign<R, A>( &self, res: &mut R, a: &A, key_size: usize, scratch: &mut ScratchArena<'_, BE>, )

Source§

impl<BE> GGLWENoise<BE> for Module<BE>

Source§

fn gglwe_noise_tmp_bytes<A>(&self, infos: &A) -> usize
where A: GGLWEInfos,

Source§

fn gglwe_noise<R, S>( &self, res: &R, res_row: usize, res_col: usize, pt_want: &ScalarZnx<&[u8]>, sk_prepared: &S, scratch: &mut ScratchArena<'_, BE>, ) -> Stats
where R: GGLWEToBackendRef<BE> + GGLWEInfos, S: GLWESecretPreparedToBackendRef<BE> + GLWEInfos, BE: HostBackend, <BE as Backend>::BufRef<'a>: for<'a> HostDataRef, <BE as Backend>::BufMut<'a>: for<'a> HostDataMut,

Source§

impl<BE> GGLWEPreparedFactory<BE> for Module<BE>

Source§

fn gglwe_prepared_alloc( &self, base2k: Base2K, k: TorusPrecision, rank_in: Rank, rank_out: Rank, dnum: Dnum, dsize: Dsize, ) -> GGLWEPrepared<<BE as Backend>::OwnedBuf, BE>

Allocates a new GGLWEPrepared with the given parameters. Read more
Source§

fn gglwe_prepared_alloc_from_infos<A>( &self, infos: &A, ) -> GGLWEPrepared<<BE as Backend>::OwnedBuf, BE>
where A: GGLWEInfos,

Allocates a new GGLWEPrepared matching the parameters of infos.
Source§

fn gglwe_prepared_bytes_of( &self, base2k: Base2K, k: TorusPrecision, rank_in: Rank, rank_out: Rank, dnum: Dnum, dsize: Dsize, ) -> usize

Returns the byte size required to store a GGLWEPrepared with the given parameters.
Source§

fn gglwe_prepared_bytes_of_from_infos<A>(&self, infos: &A) -> usize
where A: GGLWEInfos,

Returns the byte size required to store a GGLWEPrepared matching infos.
Source§

fn gglwe_prepare_tmp_bytes<A>(&self, infos: &A) -> usize
where A: GGLWEInfos,

Returns the scratch-space bytes needed by gglwe_prepare.
Source§

fn gglwe_prepare<R, O>( &self, res: &mut R, other: &O, scratch: &mut ScratchArena<'_, BE>, )

Transforms a standard [GGLWE] into the DFT domain, writing the result into res. Read more
Source§

impl<BE> GGLWEToGGSWKeyCompressedEncryptSk<BE> for Module<BE>
where BE: Backend + EncryptionImpl<BE>,

Source§

fn gglwe_to_ggsw_key_compressed_encrypt_sk_tmp_bytes<A>( &self, infos: &A, ) -> usize
where A: GGLWEInfos,

Source§

fn gglwe_to_ggsw_key_compressed_encrypt_sk<R, S, E>( &self, res: &mut R, sk: &S, seed_xa: [u8; 32], enc_infos: &E, source_xe: &mut Source, scratch: &mut ScratchArena<'_, BE>, )

Source§

impl<BE> GGLWEToGGSWKeyEncryptSk<BE> for Module<BE>
where BE: Backend + EncryptionImpl<BE>,

Source§

fn gglwe_to_ggsw_key_encrypt_sk_tmp_bytes<A>(&self, infos: &A) -> usize
where A: GGLWEInfos,

Source§

fn gglwe_to_ggsw_key_encrypt_sk<R, S, E>( &self, res: &mut R, sk: &S, enc_infos: &E, source_xe: &mut Source, source_xa: &mut Source, scratch: &mut ScratchArena<'_, BE>, )

Source§

impl<BE> GGLWEToGGSWKeyPreparedFactory<BE> for Module<BE>
where BE: Backend, Module<BE>: GGLWEPreparedFactory<BE>,

Source§

fn gglwe_to_ggsw_key_prepared_alloc_from_infos<A>( &self, infos: &A, ) -> GGLWEToGGSWKeyPrepared<<BE as Backend>::OwnedBuf, BE>
where A: GGLWEInfos,

Allocates a new GGLWEToGGSWKeyPrepared matching the parameters of infos. Read more
Source§

fn gglwe_to_ggsw_key_prepared_alloc( &self, base2k: Base2K, k: TorusPrecision, rank: Rank, dnum: Dnum, dsize: Dsize, ) -> GGLWEToGGSWKeyPrepared<<BE as Backend>::OwnedBuf, BE>

Allocates a new GGLWEToGGSWKeyPrepared with explicit parameters. Read more
Source§

fn bytes_of_gglwe_to_ggsw_from_infos<A>(&self, infos: &A) -> usize
where A: GGLWEInfos,

Returns the byte size required to store a GGLWEToGGSWKeyPrepared matching infos.
Source§

fn bytes_of_gglwe_to_ggsw( &self, base2k: Base2K, k: TorusPrecision, rank: Rank, dnum: Dnum, dsize: Dsize, ) -> usize

Returns the byte size required to store a GGLWEToGGSWKeyPrepared with explicit parameters.
Source§

fn gglwe_to_ggsw_key_prepare_tmp_bytes<A>(&self, infos: &A) -> usize
where A: GGLWEInfos,

Returns the scratch-space bytes needed by gglwe_to_ggsw_key_prepare.
Source§

fn gglwe_to_ggsw_key_prepare<R, O>( &self, res: &mut R, other: &O, scratch: &mut ScratchArena<'_, BE>, )

Transforms a standard [GGLWEToGGSWKey] into the DFT domain, writing into res. Read more
Source§

impl<BE> GGSWAutomorphism<BE> for Module<BE>
where BE: Backend + AutomorphismImpl<BE> + ConversionImpl<BE>, Module<BE>: ConversionDefault<BE>,

Source§

fn ggsw_automorphism_tmp_bytes<R, A, K, T>( &self, res_infos: &R, a_infos: &A, key_infos: &K, tsk_infos: &T, ) -> usize

Source§

fn ggsw_automorphism<R, A, K, T>( &self, res: &mut R, a: &A, key: &K, key_size: usize, tsk: &T, tsk_size: usize, scratch: &mut ScratchArena<'_, BE>, )

Source§

fn ggsw_automorphism_assign<R, K, T>( &self, res: &mut R, key: &K, key_size: usize, tsk: &T, tsk_size: usize, scratch: &mut ScratchArena<'_, BE>, )

Source§

impl<BE> GGSWCompressedEncryptSk<BE> for Module<BE>
where BE: Backend + EncryptionImpl<BE>,

Source§

fn ggsw_compressed_encrypt_sk_tmp_bytes<A>(&self, infos: &A) -> usize
where A: GGSWInfos,

Source§

fn ggsw_compressed_encrypt_sk<R, P, S, E>( &self, res: &mut R, pt: &P, sk: &S, seed_xa: [u8; 32], enc_infos: &E, source_xe: &mut Source, scratch: &mut ScratchArena<'_, BE>, )

Source§

impl<B> GGSWDecompress for Module<B>

Source§

fn decompress_ggsw<R, O>(&self, res: &mut R, other: &O)

Decompresses other into res.
Source§

impl<BE> GGSWEncryptSk<BE> for Module<BE>
where BE: Backend + EncryptionImpl<BE>,

Source§

fn ggsw_encrypt_sk_tmp_bytes<A>(&self, infos: &A) -> usize
where A: GGSWInfos,

Source§

fn ggsw_encrypt_sk<R, P, S, E>( &self, res: &mut R, pt: &P, sk: &S, enc_infos: &E, source_xe: &mut Source, source_xa: &mut Source, scratch: &mut ScratchArena<'_, BE>, )

Source§

impl<BE> GGSWExpandRows<BE> for Module<BE>
where BE: Backend + ConversionImpl<BE>, Module<BE>: ConversionDefault<BE>,

Source§

fn ggsw_expand_rows_tmp_bytes<R, A>( &self, res_infos: &R, tsk_infos: &A, ) -> usize
where R: GGSWInfos, A: GGLWEInfos,

Source§

fn ggsw_expand_row<R, T>( &self, res: &mut R, tsk: &T, tsk_size: usize, scratch: &mut ScratchArena<'_, BE>, )

Source§

impl<BE> GGSWExternalProduct<BE> for Module<BE>

Source§

fn ggsw_external_product_tmp_bytes<R, A, B>( &self, res_infos: &R, a_infos: &A, b_infos: &B, ) -> usize
where R: GGSWInfos, A: GGSWInfos, B: GGSWInfos,

Source§

fn ggsw_external_product<R, A, B>( &self, res: &mut R, a: &A, b: &B, key_size: usize, scratch: &mut ScratchArena<'_, BE>, )

Source§

fn ggsw_external_product_assign<R, A>( &self, res: &mut R, a: &A, key_size: usize, scratch: &mut ScratchArena<'_, BE>, )

Source§

impl<BE> GGSWFromGGLWE<BE> for Module<BE>
where BE: Backend + ConversionImpl<BE>, Module<BE>: ConversionDefault<BE>,

Source§

fn ggsw_from_gglwe_tmp_bytes<R, A>(&self, res_infos: &R, tsk_infos: &A) -> usize
where R: GGSWInfos, A: GGLWEInfos,

Source§

fn ggsw_from_gglwe<R, A, T>( &self, res: &mut R, a: &A, tsk: &T, tsk_size: usize, scratch: &mut ScratchArena<'_, BE>, )

Source§

impl<BE> GGSWKeyswitch<BE> for Module<BE>
where BE: Backend + GGSWKeyswitchImpl<BE>,

Source§

fn ggsw_keyswitch_tmp_bytes<R, A, K, T>( &self, res_infos: &R, a_infos: &A, key_infos: &K, tsk_infos: &T, ) -> usize

Source§

fn ggsw_keyswitch<R, A, K, T>( &self, res: &mut R, a: &A, key: &K, key_size: usize, tsk: &T, tsk_size: usize, scratch: &mut ScratchArena<'_, BE>, )

Source§

fn ggsw_keyswitch_assign<R, K, T>( &self, res: &mut R, key: &K, key_size: usize, tsk: &T, tsk_size: usize, scratch: &mut ScratchArena<'_, BE>, )

Source§

impl<BE> GGSWNoise<BE> for Module<BE>

Source§

fn ggsw_noise_tmp_bytes<A>(&self, infos: &A) -> usize
where A: GGSWInfos,

Source§

fn ggsw_noise<R, S>( &self, res: &R, res_row: usize, res_col: usize, pt_want: &ScalarZnx<&[u8]>, sk_prepared: &S, scratch: &mut ScratchArena<'_, BE>, ) -> Stats
where R: GGSWToBackendRef<BE> + GGSWInfos, S: GLWESecretPreparedToBackendRef<BE>, BE: HostBackend, <BE as Backend>::BufRef<'a>: for<'a> HostDataRef, <BE as Backend>::BufMut<'a>: for<'a> HostDataMut,

Source§

impl<B> GGSWPreparedFactory<B> for Module<B>

Source§

fn ggsw_prepared_alloc( &self, base2k: Base2K, k: TorusPrecision, dnum: Dnum, dsize: Dsize, rank: Rank, ) -> GGSWPrepared<<B as Backend>::OwnedBuf, B>

Allocates a new prepared GGSW with the given parameters.
Source§

fn ggsw_prepared_alloc_from_infos<A>( &self, infos: &A, ) -> GGSWPrepared<<B as Backend>::OwnedBuf, B>
where A: GGSWInfos,

Source§

fn ggsw_prepared_bytes_of( &self, base2k: Base2K, k: TorusPrecision, dnum: Dnum, dsize: Dsize, rank: Rank, ) -> usize

Source§

fn ggsw_prepared_bytes_of_from_infos<A>(&self, infos: &A) -> usize
where A: GGSWInfos,

Source§

fn ggsw_prepare_tmp_bytes<A>(&self, infos: &A) -> usize
where A: GGSWInfos,

Source§

fn ggsw_prepare<R, O>( &self, res: &mut R, other: &O, scratch: &mut ScratchArena<'_, B>, )

Source§

fn ggsw_zero<R>(&self, res: &mut R)

Source§

impl<BE> GGSWRotate<BE> for Module<BE>
where BE: Backend + GGSWRotateImpl<BE>, Module<BE>: GGSWRotateDefault<BE>,

Source§

fn ggsw_rotate_tmp_bytes(&self) -> usize

Source§

fn ggsw_rotate<R, A>(&self, k: i64, res: &mut R, a: &A)

Source§

fn ggsw_rotate_assign<R>( &self, k: i64, res: &mut R, scratch: &mut ScratchArena<'_, BE>, )
where R: GGSWToBackendMut<BE> + GGSWInfos,

Source§

impl<BE> GLWEAdd<BE> for Module<BE>
where BE: Backend + GLWEAddImpl<BE>, Module<BE>: GLWEAddDefault<BE>,

Source§

fn glwe_add_into<R, A, B>(&self, res: &mut R, a: &A, b: &B)
where R: GLWEToBackendMut<BE>, A: GLWEToBackendRef<BE>, B: GLWEToBackendRef<BE>,

Source§

fn glwe_add_assign<R, A>(&self, res: &mut R, a: &A)
where R: GLWEToBackendMut<BE>, A: GLWEToBackendRef<BE>,

Source§

impl<BE> GLWEAutomorphism<BE> for Module<BE>
where BE: Backend + AutomorphismImpl<BE>,

Source§

fn glwe_automorphism_tmp_bytes<R, A, K>( &self, res_infos: &R, a_infos: &A, key_infos: &K, ) -> usize
where R: GLWEInfos, A: GLWEInfos, K: GGLWEInfos,

Source§

fn glwe_automorphism<R, A, K>( &self, res: &mut R, a: &A, key: &K, key_size: usize, scratch: &mut ScratchArena<'_, BE>, )

Source§

fn glwe_automorphism_assign<R, K>( &self, res: &mut R, key: &K, key_size: usize, scratch: &mut ScratchArena<'_, BE>, )

Source§

fn glwe_automorphism_add<R, A, K>( &self, res: &mut R, a: &A, key: &K, key_size: usize, scratch: &mut ScratchArena<'_, BE>, )

Source§

fn glwe_automorphism_add_assign<R, K>( &self, res: &mut R, key: &K, key_size: usize, scratch: &mut ScratchArena<'_, BE>, )

Source§

fn glwe_automorphism_sub<R, A, K>( &self, res: &mut R, a: &A, key: &K, key_size: usize, scratch: &mut ScratchArena<'_, BE>, )

Source§

fn glwe_automorphism_sub_negate<R, A, K>( &self, res: &mut R, a: &A, key: &K, key_size: usize, scratch: &mut ScratchArena<'_, BE>, )

Source§

fn glwe_automorphism_sub_assign<R, K>( &self, res: &mut R, key: &K, key_size: usize, scratch: &mut ScratchArena<'_, BE>, )

Source§

fn glwe_automorphism_sub_negate_assign<R, K>( &self, res: &mut R, key: &K, key_size: usize, scratch: &mut ScratchArena<'_, BE>, )

Source§

impl<BE> GLWEAutomorphismKeyAutomorphism<BE> for Module<BE>
where BE: Backend + AutomorphismImpl<BE>,

Source§

impl<BE> GLWEAutomorphismKeyCompressedEncryptSk<BE> for Module<BE>
where BE: Backend + EncryptionImpl<BE>,

Source§

impl<B> GLWEAutomorphismKeyDecompress for Module<B>

Source§

impl<BE> GLWEAutomorphismKeyEncryptPk<BE> for Module<BE>
where BE: Backend + EncryptionImpl<BE>,

Source§

impl<BE> GLWEAutomorphismKeyEncryptSk<BE> for Module<BE>
where BE: Backend + EncryptionImpl<BE>,

Source§

fn glwe_automorphism_key_encrypt_sk_tmp_bytes<A>(&self, infos: &A) -> usize
where A: GGLWEInfos,

Source§

fn glwe_automorphism_key_encrypt_sk<R, S, E>( &self, res: &mut R, p: i64, sk: &S, enc_infos: &E, source_xe: &mut Source, source_xa: &mut Source, scratch: &mut ScratchArena<'_, BE>, )

Source§

impl<B> GLWEAutomorphismKeyPreparedFactory<B> for Module<B>

Source§

impl<BE> GLWECompressedEncryptSk<BE> for Module<BE>
where BE: Backend + EncryptionImpl<BE>,

Source§

fn glwe_compressed_encrypt_sk_tmp_bytes<A>(&self, infos: &A) -> usize
where A: GLWEInfos,

Source§

fn glwe_compressed_encrypt_sk<R, P, S, E>( &self, res: &mut R, pt: &P, sk: &S, seed_xa: [u8; 32], enc_infos: &E, source_xe: &mut Source, scratch: &mut ScratchArena<'_, BE>, )

Source§

impl<BE> GLWECopy<BE> for Module<BE>
where BE: Backend + GLWECopyImpl<BE>, Module<BE>: GLWECopyDefault<BE>,

Source§

fn glwe_copy<R, A>(&self, res: &mut R, a: &A)
where R: GLWEToBackendMut<BE>, A: GLWEToBackendRef<BE>,

Source§

impl<B> GLWEDecompress for Module<B>

Source§

type Backend = B

Source§

fn decompress_glwe<R, O>(&self, res: &mut R, other: &O)

Decompresses other into res by copying the body and regenerating the mask.
Source§

impl<BE> GLWEDecrypt<BE> for Module<BE>

Source§

fn glwe_decrypt_tmp_bytes<A>(&self, infos: &A) -> usize
where A: GLWEInfos,

Source§

fn glwe_decrypt<R, P, S>( &self, res: &R, pt: &mut P, sk: &S, scratch: &mut ScratchArena<'_, BE>, )

Source§

impl<BE> GLWEEncryptPk<BE> for Module<BE>
where BE: Backend + EncryptionImpl<BE>,

Source§

fn glwe_encrypt_pk_tmp_bytes<A>(&self, infos: &A) -> usize
where A: GLWEInfos,

Source§

fn glwe_encrypt_pk<R, P, K, E>( &self, res: &mut R, pt: &P, pk: &K, enc_infos: &E, source_xu: &mut Source, source_xe: &mut Source, scratch: &mut ScratchArena<'_, BE>, )

Source§

fn glwe_encrypt_zero_pk<R, K, E>( &self, res: &mut R, pk: &K, enc_infos: &E, source_xu: &mut Source, source_xe: &mut Source, scratch: &mut ScratchArena<'_, BE>, )

Source§

impl<BE> GLWEEncryptSk<BE> for Module<BE>
where BE: Backend + EncryptionImpl<BE>,

Source§

fn glwe_encrypt_sk_tmp_bytes<A>(&self, infos: &A) -> usize
where A: GLWEInfos,

Source§

fn glwe_encrypt_sk<R, P, S, E>( &self, res: &mut R, pt: &P, sk: &S, enc_infos: &E, source_xe: &mut Source, source_xa: &mut Source, scratch: &mut ScratchArena<'_, BE>, )

Source§

fn glwe_encrypt_zero_sk<R, E, S>( &self, res: &mut R, sk: &S, enc_infos: &E, source_xe: &mut Source, source_xa: &mut Source, scratch: &mut ScratchArena<'_, BE>, )

Source§

impl<BE> GLWEExpandLWE<BE> for Module<BE>
where BE: Backend + ConversionImpl<BE>, Module<BE>: ConversionDefault<BE>,

Source§

fn glwe_expand_lwe_tmp_bytes<R, A>(&self, lwe_infos: &R, a_infos: &A) -> usize
where R: LWEInfos, A: GLWEInfos,

Source§

fn glwe_expand_lwe<R, A>( &self, res: &mut [R], a: &A, scratch: &mut ScratchArena<'_, BE>, )

Source§

impl<BE> GLWEExternalProduct<BE> for Module<BE>

Source§

fn glwe_external_product_tmp_bytes<R, A, B>( &self, res_infos: &R, a_infos: &A, b_infos: &B, ) -> usize
where R: GLWEInfos, A: GLWEInfos, B: GGSWInfos,

Source§

fn glwe_external_product_assign<R, D>( &self, res: &mut R, rhs: &D, key_size: usize, scratch: &mut ScratchArena<'_, BE>, )

Source§

fn glwe_external_product<R, A, D>( &self, res: &mut R, lhs: &A, rhs: &D, key_size: usize, scratch: &mut ScratchArena<'_, BE>, )

Source§

impl<BE> GLWEExternalProductInternal<BE> for Module<BE>

Source§

fn glwe_external_product_internal_tmp_bytes<R, A, B>( &self, _res_infos: &R, a_infos: &A, b_infos: &B, ) -> usize
where R: GLWEInfos, A: GLWEInfos, B: GGSWInfos,

Source§

fn glwe_external_product_dft<'r, A, G>( &self, res_dft: &mut VecZnxDft<<BE as Backend>::BufMut<'r>, BE>, a: &A, ggsw: &G, _key_size: usize, scratch: &mut ScratchArena<'_, BE>, )

Source§

impl<BE> GLWEFromLWE<BE> for Module<BE>
where BE: Backend + ConversionImpl<BE>, Module<BE>: ConversionDefault<BE>,

Source§

fn glwe_from_lwe_tmp_bytes<R, A, K>( &self, glwe_infos: &R, lwe_infos: &A, key_infos: &K, ) -> usize
where R: GLWEInfos, A: LWEInfos, K: GGLWEInfos,

Source§

fn glwe_from_lwe<R, A, K>( &self, res: &mut R, lwe: &A, ksk: &K, key_size: usize, scratch: &mut ScratchArena<'_, BE>, )

Source§

impl<BE> GLWEKeyswitch<BE> for Module<BE>
where BE: Backend + GLWEKeyswitchImpl<BE>,

Source§

fn glwe_keyswitch_tmp_bytes<R, A, B>( &self, res_infos: &R, a_infos: &A, key_infos: &B, ) -> usize
where R: GLWEInfos, A: GLWEInfos, B: GGLWEInfos,

Source§

fn glwe_keyswitch<R, A, K>( &self, res: &mut R, a: &A, key: &K, key_size: usize, scratch: &mut ScratchArena<'_, BE>, )

Source§

fn glwe_keyswitch_assign<R, K>( &self, res: &mut R, key: &K, key_size: usize, scratch: &mut ScratchArena<'_, BE>, )

Source§

impl<BE> GLWEMulConst<BE> for Module<BE>
where BE: Backend + GLWEMulConstImpl<BE>, Module<BE>: GLWEMulConstDefault<BE>,

Source§

fn glwe_mul_const_tmp_bytes<R, A, B>(&self, res: &R, a: &A, b: &B) -> usize
where R: GLWEInfos, A: GLWEInfos, B: GLWEInfos,

Source§

fn glwe_mul_const<R, A, B>( &self, cnv_offset: usize, res: &mut R, a: &A, b: &B, b_coeff: usize, scratch: &mut ScratchArena<'_, BE>, )

Source§

fn glwe_mul_const_assign<R, B>( &self, cnv_offset: usize, res: &mut R, b: &B, b_coeff: usize, scratch: &mut ScratchArena<'_, BE>, )

Source§

impl<BE> GLWEMulPlain<BE> for Module<BE>
where BE: Backend + GLWEMulPlainImpl<BE>, Module<BE>: GLWEMulPlainDefault<BE>,

Source§

fn glwe_mul_plain_tmp_bytes<R, A, B>(&self, res: &R, a: &A, b: &B) -> usize
where R: GLWEInfos, A: GLWEInfos, B: GLWEInfos,

Source§

fn glwe_mul_plain<R, A, B>( &self, cnv_offset: usize, res: &mut R, a: &A, a_effective_k: usize, b: &B, b_effective_k: usize, scratch: &mut ScratchArena<'_, BE>, )

Source§

fn glwe_mul_plain_assign<R, A>( &self, cnv_offset: usize, res: &mut R, res_effective_k: usize, a: &A, a_effective_k: usize, scratch: &mut ScratchArena<'_, BE>, )

Source§

impl<BE> GLWEMulXpMinusOne<BE> for Module<BE>
where BE: Backend + GLWEMulXpMinusOneImpl<BE>, Module<BE>: GLWEMulXpMinusOneDefault<BE>,

Source§

fn glwe_mul_xp_minus_one<R, A>(&self, k: i64, res: &mut R, a: &A)
where R: GLWEToBackendMut<BE>, A: GLWEToBackendRef<BE>,

Source§

fn glwe_mul_xp_minus_one_assign<R>( &self, k: i64, res: &mut R, scratch: &mut ScratchArena<'_, BE>, )
where R: GLWEToBackendMut<BE>,

Source§

impl<BE> GLWENegate<BE> for Module<BE>
where BE: Backend + GLWENegateImpl<BE>, Module<BE>: GLWENegateDefault<BE>,

Source§

fn glwe_negate<R, A>(&self, res: &mut R, a: &A)
where R: GLWEToBackendMut<BE>, A: GLWEToBackendRef<BE>,

Source§

fn glwe_negate_assign<R>(&self, res: &mut R)
where R: GLWEToBackendMut<BE>,

Source§

impl<BE> GLWENoise<BE> for Module<BE>

Source§

fn glwe_noise_tmp_bytes<A>(&self, infos: &A) -> usize
where A: GLWEInfos,

Source§

fn glwe_noise<R, P, S>( &self, res: &R, pt_want: &P, sk_prepared: &S, scratch: &mut ScratchArena<'_, BE>, ) -> Stats

Source§

impl<BE> GLWENormalize<BE> for Module<BE>
where BE: Backend + GLWENormalizeImpl<BE>, Module<BE>: GLWENormalizeDefault<BE>,

Source§

fn glwe_normalize_tmp_bytes(&self) -> usize

Source§

fn glwe_normalize<R, A>( &self, res: &mut R, a: &A, scratch: &mut ScratchArena<'_, BE>, )
where R: GLWEToBackendMut<BE>, A: GLWEToBackendRef<BE>,

Source§

fn glwe_normalize_assign<R>( &self, res: &mut R, scratch: &mut ScratchArena<'_, BE>, )
where R: GLWEToBackendMut<BE>,

Source§

impl<BE> GLWEPacking<BE> for Module<BE>
where BE: Backend + GLWEPackImpl<BE>, Module<BE>: GLWEPackingDefault<BE>,

Source§

fn glwe_pack_galois_elements(&self) -> Vec<i64>

Source§

fn glwe_pack_tmp_bytes<R, K>(&self, res: &R, key: &K) -> usize
where R: GLWEInfos, K: GGLWEInfos,

Source§

fn glwe_pack<R, A, K, H>( &self, res: &mut R, a: HashMap<usize, &mut A>, log_gap_out: usize, keys: &H, key_size: usize, scratch: &mut ScratchArena<'_, BE>, )

Source§

impl<B> GLWEPreparedFactory<B> for Module<B>

Source§

fn glwe_prepared_alloc( &self, base2k: Base2K, k: TorusPrecision, rank: Rank, ) -> GLWEPrepared<<B as Backend>::OwnedBuf, B>

Allocates a new prepared GLWE with the given parameters.
Source§

fn glwe_prepared_alloc_from_infos<A>( &self, infos: &A, ) -> GLWEPrepared<<B as Backend>::OwnedBuf, B>
where A: GLWEInfos,

Source§

fn glwe_prepared_bytes_of( &self, base2k: Base2K, k: TorusPrecision, rank: Rank, ) -> usize

Source§

fn glwe_prepared_bytes_of_from_infos<A>(&self, infos: &A) -> usize
where A: GLWEInfos,

Source§

fn glwe_prepare<R, O>(&self, res: &mut R, other: &O)

Source§

impl<BE> GLWEPublicKeyGenerate<BE> for Module<BE>
where BE: Backend + EncryptionImpl<BE>,

Source§

fn glwe_public_key_generate<R, S, E>( &self, res: &mut R, sk: &S, enc_infos: &E, source_xe: &mut Source, source_xa: &mut Source, )

Source§

impl<B> GLWEPublicKeyPreparedFactory<B> for Module<B>

Source§

impl<BE> GLWERotate<BE> for Module<BE>
where BE: Backend + GLWERotateImpl<BE>, Module<BE>: GLWERotateDefault<BE>,

Source§

fn glwe_rotate_tmp_bytes(&self) -> usize

Source§

fn glwe_rotate<R, A>(&self, k: i64, res: &mut R, a: &A)
where R: GLWEToBackendMut<BE>, A: GLWEToBackendRef<BE>,

Source§

fn glwe_rotate_assign<R>( &self, k: i64, res: &mut R, scratch: &mut ScratchArena<'_, BE>, )
where R: GLWEToBackendMut<BE>,

Source§

impl<B> GLWESecretPreparedFactory<B> for Module<B>

Source§

impl<BE> GLWESecretTensorFactory<BE> for Module<BE>

Source§

impl<B> GLWESecretTensorPreparedFactory<B> for Module<B>

Source§

impl<BE> GLWEShift<BE> for Module<BE>
where BE: Backend + GLWEShiftImpl<BE>, Module<BE>: GLWEShiftDefault<BE>,

Source§

fn glwe_shift_tmp_bytes(&self) -> usize

Source§

fn glwe_rsh<R>(&self, k: usize, res: &mut R, scratch: &mut ScratchArena<'_, BE>)
where R: GLWEToBackendMut<BE>,

Source§

fn glwe_lsh_assign<R>( &self, res: &mut R, k: usize, scratch: &mut ScratchArena<'_, BE>, )
where R: GLWEToBackendMut<BE>,

Source§

fn glwe_lsh<R, A>( &self, res: &mut R, a: &A, k: usize, scratch: &mut ScratchArena<'_, BE>, )
where R: GLWEToBackendMut<BE>, A: GLWEToBackendRef<BE>,

Source§

fn glwe_lsh_add<R, A>( &self, res: &mut R, a: &A, k: usize, scratch: &mut ScratchArena<'_, BE>, )
where R: GLWEToBackendMut<BE>, A: GLWEToBackendRef<BE>,

Source§

fn glwe_lsh_sub<R, A>( &self, res: &mut R, a: &A, k: usize, scratch: &mut ScratchArena<'_, BE>, )
where R: GLWEToBackendMut<BE>, A: GLWEToBackendRef<BE>,

Source§

impl<BE> GLWESub<BE> for Module<BE>
where BE: Backend + GLWESubImpl<BE>, Module<BE>: GLWESubDefault<BE>,

Source§

fn glwe_sub<R, A, B>(&self, res: &mut R, a: &A, b: &B)
where R: GLWEToBackendMut<BE>, A: GLWEToBackendRef<BE>, B: GLWEToBackendRef<BE>,

Source§

fn glwe_sub_assign<R, A>(&self, res: &mut R, a: &A)
where R: GLWEToBackendMut<BE>, A: GLWEToBackendRef<BE>,

Source§

fn glwe_sub_negate_assign<R, A>(&self, res: &mut R, a: &A)
where R: GLWEToBackendMut<BE>, A: GLWEToBackendRef<BE>,

Source§

impl<BE> GLWESwitchingKeyCompressedEncryptSk<BE> for Module<BE>
where BE: Backend + EncryptionImpl<BE>,

Source§

impl<B> GLWESwitchingKeyDecompress for Module<B>

Source§

fn decompress_glwe_switching_key<R, O>(&self, res: &mut R, other: &O)

Decompresses other into res, copying degree metadata.
Source§

impl<BE> GLWESwitchingKeyEncryptPk<BE> for Module<BE>
where BE: Backend + EncryptionImpl<BE>,

Source§

impl<BE> GLWESwitchingKeyEncryptSk<BE> for Module<BE>
where BE: Backend + EncryptionImpl<BE>,

Source§

fn glwe_switching_key_encrypt_sk_tmp_bytes<A>(&self, infos: &A) -> usize
where A: GGLWEInfos,

Source§

fn glwe_switching_key_encrypt_sk<R, S1, S2, E>( &self, res: &mut R, sk_in: &S1, sk_out: &S2, enc_infos: &E, source_xe: &mut Source, source_xa: &mut Source, scratch: &mut ScratchArena<'_, BE>, )

Source§

impl<B> GLWESwitchingKeyPreparedFactory<B> for Module<B>

Source§

impl<BE> GLWETensorDecrypt<BE> for Module<BE>

Source§

impl<BE> GLWETensorKeyCompressedEncryptSk<BE> for Module<BE>
where BE: Backend + EncryptionImpl<BE>,

Source§

fn glwe_tensor_key_compressed_encrypt_sk_tmp_bytes<A>(&self, infos: &A) -> usize
where A: GGLWEInfos,

Source§

fn glwe_tensor_key_compressed_encrypt_sk<R, S, E>( &self, res: &mut R, sk: &S, seed_xa: [u8; 32], enc_infos: &E, source_xe: &mut Source, scratch: &mut ScratchArena<'_, BE>, )

Source§

impl<B> GLWETensorKeyDecompress for Module<B>

Source§

impl<BE> GLWETensorKeyEncryptSk<BE> for Module<BE>
where BE: Backend + EncryptionImpl<BE>,

Source§

fn glwe_tensor_key_encrypt_sk_tmp_bytes<A>(&self, infos: &A) -> usize
where A: GGLWEInfos,

Source§

fn glwe_tensor_key_encrypt_sk<R, S, E>( &self, res: &mut R, sk: &S, enc_infos: &E, source_xe: &mut Source, source_xa: &mut Source, scratch: &mut ScratchArena<'_, BE>, )

Source§

impl<B> GLWETensorKeyPreparedFactory<B> for Module<B>

Source§

fn alloc_tensor_key_prepared( &self, base2k: Base2K, k: TorusPrecision, dnum: Dnum, dsize: Dsize, rank: Rank, ) -> GLWETensorKeyPrepared<<B as Backend>::OwnedBuf, B>

Source§

fn alloc_tensor_key_prepared_from_infos<A>( &self, infos: &A, ) -> GLWETensorKeyPrepared<<B as Backend>::OwnedBuf, B>
where A: GGLWEInfos,

Source§

fn bytes_of_tensor_key_prepared( &self, base2k: Base2K, k: TorusPrecision, rank: Rank, dnum: Dnum, dsize: Dsize, ) -> usize

Source§

fn bytes_of_tensor_key_prepared_from_infos<A>(&self, infos: &A) -> usize
where A: GGLWEInfos,

Source§

fn prepare_tensor_key_tmp_bytes<A>(&self, infos: &A) -> usize
where A: GGLWEInfos,

Source§

fn prepare_tensor_key<R, O>( &self, res: &mut R, other: &O, scratch: &mut ScratchArena<'_, B>, )

Source§

impl<BE> GLWETensoring<BE> for Module<BE>
where BE: Backend + GLWETensoringImpl<BE>, Module<BE>: GLWETensoringDefault<BE>,

Source§

fn glwe_tensor_apply_tmp_bytes<R, A, B>(&self, res: &R, a: &A, b: &B) -> usize
where R: GLWEInfos, A: GLWEInfos, B: GLWEInfos,

Source§

fn glwe_tensor_square_apply_tmp_bytes<R, A>(&self, res: &R, a: &A) -> usize
where R: GLWEInfos, A: GLWEInfos,

Source§

fn glwe_tensor_apply<R, A, B>( &self, cnv_offset: usize, res: &mut R, a: &A, a_effective_k: usize, b: &B, b_effective_k: usize, scratch: &mut ScratchArena<'_, BE>, )

Source§

fn glwe_tensor_square_apply<R, A>( &self, cnv_offset: usize, res: &mut R, a: &A, a_effective_k: usize, scratch: &mut ScratchArena<'_, BE>, )

Source§

fn glwe_tensor_relinearize<R, A, T>( &self, res: &mut R, a: &A, tsk: &T, tsk_size: usize, scratch: &mut ScratchArena<'_, BE>, )

Source§

fn glwe_tensor_relinearize_tmp_bytes<R, A, B>( &self, res: &R, a: &A, tsk: &B, ) -> usize
where R: GLWEInfos, A: GLWEInfos, B: GGLWEInfos,

Source§

impl<B> GLWEToLWEKeyPreparedFactory<B> for Module<B>

Source§

impl<B> GLWEToLWESwitchingKeyDecompress for Module<B>

Source§

impl<BE> GLWEToLWESwitchingKeyEncryptSk<BE> for Module<BE>
where BE: Backend + EncryptionImpl<BE>,

Source§

fn glwe_to_lwe_key_encrypt_sk_tmp_bytes<A>(&self, infos: &A) -> usize
where A: GGLWEInfos,

Source§

fn glwe_to_lwe_key_encrypt_sk<R, S1, S2, E>( &self, res: &mut R, sk_lwe: &S1, sk_glwe: &S2, enc_infos: &E, source_xe: &mut Source, source_xa: &mut Source, scratch: &mut ScratchArena<'_, BE>, )

Source§

impl<BE> GLWETrace<BE> for Module<BE>
where BE: Backend + GLWETraceImpl<BE>, Module<BE>: GLWETraceDefault<BE>,

Source§

fn glwe_trace_galois_elements(&self) -> Vec<i64>

Source§

fn glwe_trace_tmp_bytes<R, A, K>( &self, res_infos: &R, a_infos: &A, key_infos: &K, ) -> usize
where R: GLWEInfos, A: GLWEInfos, K: GGLWEInfos,

Source§

fn glwe_trace<R, A, K, H>( &self, res: &mut R, skip: usize, a: &A, keys: &H, key_size: usize, scratch: &mut ScratchArena<'_, BE>, )

Source§

fn glwe_trace_assign<R, K, H>( &self, res: &mut R, skip: usize, keys: &H, key_size: usize, scratch: &mut ScratchArena<'_, BE>, )

Source§

impl<BE> GLWEZero<BE> for Module<BE>
where BE: Backend + GLWEZeroImpl<BE>, Module<BE>: GLWEZeroDefault<BE>,

Source§

fn glwe_zero<R>(&self, res: &mut R)
where R: GLWEToBackendMut<BE>,

Source§

impl<BE> GaloisElement for Module<BE>
where BE: Backend, Module<BE>: CyclotomicOrder,

Source§

fn galois_element(&self, generator: i64) -> i64

Returns GALOISGENERATOR^|generator| * sign(generator) mod 2N.
Source§

fn galois_element_inv(&self, gal_el: i64) -> i64

Returns the inverse of gal_el in the Galois group (Z/2NZ)*. Read more
Source§

impl<B> GetDegree for Module<B>
where B: Backend,

Source§

fn ring_degree(&self) -> Degree

Returns the ring degree N as a Degree.
Source§

impl<B> LWEDecompress for Module<B>

Source§

impl<BE> LWEDecrypt<BE> for Module<BE>

Source§

fn lwe_decrypt<R, P, S>( &self, res: &R, pt: &mut P, sk: &S, scratch: &mut ScratchArena<'_, BE>, )

Source§

fn lwe_decrypt_tmp_bytes<A>(&self, infos: &A) -> usize
where A: LWEInfos,

Source§

impl<BE> LWEEncryptSk<BE> for Module<BE>
where BE: Backend + EncryptionImpl<BE>,

Source§

fn lwe_encrypt_sk_tmp_bytes<A>(&self, infos: &A) -> usize
where A: LWEInfos,

Source§

fn lwe_encrypt_sk<R, P, S, E>( &self, res: &mut R, pt: &P, sk: &S, enc_infos: &E, source_xe: &mut Source, source_xa: &mut Source, scratch: &mut ScratchArena<'_, BE>, )

Source§

impl<BE> LWEFromGLWE<BE> for Module<BE>
where BE: Backend + ConversionImpl<BE>, Module<BE>: ConversionDefault<BE>,

Source§

fn lwe_from_glwe_tmp_bytes<R, A, K>( &self, lwe_infos: &R, glwe_infos: &A, key_infos: &K, ) -> usize
where R: LWEInfos, A: GLWEInfos, K: GGLWEInfos,

Source§

fn lwe_from_glwe<R, A, K>( &self, res: &mut R, a: &A, a_idx: usize, key: &K, key_size: usize, scratch: &mut ScratchArena<'_, BE>, )

Source§

impl<BE> LWEKeyswitch<BE> for Module<BE>
where BE: Backend + LWEKeyswitchImpl<BE>,

Source§

fn lwe_keyswitch_tmp_bytes<R, A, K>( &self, res_infos: &R, a_infos: &A, key_infos: &K, ) -> usize
where R: LWEInfos, A: LWEInfos, K: GGLWEInfos,

Source§

fn lwe_keyswitch<R, A, K>( &self, res: &mut R, a: &A, ksk: &K, key_size: usize, scratch: &mut ScratchArena<'_, BE>, )

Source§

impl<BE> LWESampleExtract<BE> for Module<BE>
where BE: Backend + ConversionImpl<BE>, Module<BE>: ConversionDefault<BE>,

Source§

fn lwe_sample_extract<R, A>(&self, res: &mut R, a: &A)

Source§

impl<B> LWESwitchingKeyDecompress for Module<B>

Source§

impl<BE> LWESwitchingKeyEncrypt<BE> for Module<BE>
where BE: Backend + EncryptionImpl<BE>,

Source§

fn lwe_switching_key_encrypt_sk_tmp_bytes<A>(&self, infos: &A) -> usize
where A: GGLWEInfos,

Source§

fn lwe_switching_key_encrypt_sk<R, S1, S2, E>( &self, res: &mut R, sk_lwe_in: &S1, sk_lwe_out: &S2, enc_infos: &E, source_xe: &mut Source, source_xa: &mut Source, scratch: &mut ScratchArena<'_, BE>, )

Source§

impl<B> LWESwitchingKeyPreparedFactory<B> for Module<B>

Source§

impl<B> LWEToGLWEKeyDecompress for Module<B>

Source§

impl<B> LWEToGLWEKeyPreparedFactory<B> for Module<B>

Source§

impl<BE> LWEToGLWESwitchingKeyEncryptSk<BE> for Module<BE>
where BE: Backend + EncryptionImpl<BE>,

Source§

fn lwe_to_glwe_key_encrypt_sk_tmp_bytes<A>(&self, infos: &A) -> usize
where A: GGLWEInfos,

Source§

fn lwe_to_glwe_key_encrypt_sk<R, S1, S2, E>( &self, res: &mut R, sk_lwe: &S1, sk_glwe: &S2, enc_infos: &E, source_xe: &mut Source, source_xa: &mut Source, scratch: &mut ScratchArena<'_, BE>, )

Source§

impl<B> MatZnxAlloc<B> for Module<B>
where B: Backend,

Source§

fn mat_znx_alloc( &self, rows: usize, cols_in: usize, cols_out: usize, size: usize, ) -> MatZnx<<B as Backend>::OwnedBuf>

Source§

impl<B> ModuleCoreAlloc for Module<B>
where B: Backend,

Source§

type OwnedBuf = <B as Backend>::OwnedBuf

Source§

fn glwe_alloc_from_infos<A>(&self, infos: &A) -> GLWE<<B as Backend>::OwnedBuf>
where A: GLWEInfos,

Source§

fn glwe_alloc( &self, base2k: Base2K, k: TorusPrecision, rank: Rank, ) -> GLWE<<B as Backend>::OwnedBuf>

Source§

fn gglwe_alloc_from_infos<A>( &self, infos: &A, ) -> GGLWE<<B as Backend>::OwnedBuf>
where A: GGLWEInfos,

Source§

fn gglwe_alloc( &self, base2k: Base2K, k: TorusPrecision, rank_in: Rank, rank_out: Rank, dnum: Dnum, dsize: Dsize, ) -> GGLWE<<B as Backend>::OwnedBuf>

Source§

fn ggsw_alloc_from_infos<A>(&self, infos: &A) -> GGSW<<B as Backend>::OwnedBuf>
where A: GGSWInfos,

Source§

fn ggsw_alloc( &self, base2k: Base2K, k: TorusPrecision, rank: Rank, dnum: Dnum, dsize: Dsize, ) -> GGSW<<B as Backend>::OwnedBuf>

Source§

fn glwe_plaintext_alloc_from_infos<A>( &self, infos: &A, ) -> GLWEPlaintext<<B as Backend>::OwnedBuf>
where A: GLWEInfos,

Source§

fn glwe_plaintext_alloc( &self, base2k: Base2K, k: TorusPrecision, ) -> GLWEPlaintext<<B as Backend>::OwnedBuf>

Source§

fn glwe_secret_alloc_from_infos<A>( &self, infos: &A, ) -> GLWESecret<<B as Backend>::OwnedBuf>
where A: GLWEInfos,

Source§

fn glwe_secret_alloc(&self, rank: Rank) -> GLWESecret<<B as Backend>::OwnedBuf>

Source§

fn glwe_secret_tensor_alloc_from_infos<A>( &self, infos: &A, ) -> GLWESecretTensor<<B as Backend>::OwnedBuf>
where A: GLWEInfos,

Source§

fn glwe_secret_tensor_alloc( &self, rank: Rank, ) -> GLWESecretTensor<<B as Backend>::OwnedBuf>

Source§

fn glwe_tensor_alloc_from_infos<A>( &self, infos: &A, ) -> GLWETensor<<B as Backend>::OwnedBuf>
where A: GLWEInfos,

Source§

fn glwe_tensor_alloc( &self, base2k: Base2K, k: TorusPrecision, rank: Rank, ) -> GLWETensor<<B as Backend>::OwnedBuf>

Source§

fn glwe_public_key_alloc_from_infos<A>( &self, infos: &A, ) -> GLWEPublicKey<<B as Backend>::OwnedBuf>
where A: GLWEInfos,

Source§

fn glwe_public_key_alloc( &self, base2k: Base2K, k: TorusPrecision, rank: Rank, ) -> GLWEPublicKey<<B as Backend>::OwnedBuf>

Source§

fn glwe_switching_key_alloc_from_infos<A>( &self, infos: &A, ) -> GLWESwitchingKey<<B as Backend>::OwnedBuf>
where A: GGLWEInfos,

Source§

fn glwe_switching_key_alloc( &self, base2k: Base2K, k: TorusPrecision, rank_in: Rank, rank_out: Rank, dnum: Dnum, dsize: Dsize, ) -> GLWESwitchingKey<<B as Backend>::OwnedBuf>

Source§

fn glwe_automorphism_key_alloc_from_infos<A>( &self, infos: &A, ) -> GLWEAutomorphismKey<<B as Backend>::OwnedBuf>
where A: GGLWEInfos,

Source§

fn glwe_automorphism_key_alloc( &self, base2k: Base2K, k: TorusPrecision, rank: Rank, dnum: Dnum, dsize: Dsize, ) -> GLWEAutomorphismKey<<B as Backend>::OwnedBuf>

Source§

fn glwe_tensor_key_alloc_from_infos<A>( &self, infos: &A, ) -> GLWETensorKey<<B as Backend>::OwnedBuf>
where A: GGLWEInfos,

Source§

fn glwe_tensor_key_alloc( &self, base2k: Base2K, k: TorusPrecision, rank: Rank, dnum: Dnum, dsize: Dsize, ) -> GLWETensorKey<<B as Backend>::OwnedBuf>

Source§

fn glwe_to_lwe_key_alloc_from_infos<A>( &self, infos: &A, ) -> GLWEToLWEKey<<B as Backend>::OwnedBuf>
where A: GGLWEInfos,

Source§

fn glwe_to_lwe_key_alloc( &self, base2k: Base2K, k: TorusPrecision, rank_in: Rank, dnum: Dnum, ) -> GLWEToLWEKey<<B as Backend>::OwnedBuf>

Source§

fn gglwe_to_ggsw_key_alloc_from_infos<A>( &self, infos: &A, ) -> GGLWEToGGSWKey<<B as Backend>::OwnedBuf>
where A: GGLWEInfos,

Source§

fn gglwe_to_ggsw_key_alloc( &self, base2k: Base2K, k: TorusPrecision, rank: Rank, dnum: Dnum, dsize: Dsize, ) -> GGLWEToGGSWKey<<B as Backend>::OwnedBuf>

Source§

fn lwe_alloc_from_infos<A>(&self, infos: &A) -> LWE<<B as Backend>::OwnedBuf>
where A: LWEInfos,

Source§

fn lwe_alloc( &self, n: Degree, base2k: Base2K, k: TorusPrecision, ) -> LWE<<B as Backend>::OwnedBuf>

Source§

fn lwe_plaintext_alloc_from_infos<A>( &self, infos: &A, ) -> LWEPlaintext<<B as Backend>::OwnedBuf>
where A: LWEInfos,

Source§

fn lwe_plaintext_alloc( &self, base2k: Base2K, k: TorusPrecision, ) -> LWEPlaintext<<B as Backend>::OwnedBuf>

Source§

fn lwe_secret_alloc(&self, n: Degree) -> LWESecret<<B as Backend>::OwnedBuf>

Source§

fn lwe_switching_key_alloc_from_infos<A>( &self, infos: &A, ) -> LWESwitchingKey<<B as Backend>::OwnedBuf>
where A: GGLWEInfos,

Source§

fn lwe_switching_key_alloc( &self, n: Degree, base2k: Base2K, k: TorusPrecision, dnum: Dnum, ) -> LWESwitchingKey<<B as Backend>::OwnedBuf>

Source§

fn lwe_to_glwe_key_alloc_from_infos<A>( &self, infos: &A, ) -> LWEToGLWEKey<<B as Backend>::OwnedBuf>
where A: GGLWEInfos,

Source§

fn lwe_to_glwe_key_alloc( &self, n: Degree, base2k: Base2K, k: TorusPrecision, rank_out: Rank, dnum: Dnum, ) -> LWEToGLWEKey<<B as Backend>::OwnedBuf>

Source§

impl<B> ModuleCoreCompressedAlloc for Module<B>
where B: Backend,

Source§

fn glwe_compressed_alloc_from_infos<A>( &self, infos: &A, ) -> GLWECompressed<Vec<u8>>
where A: GLWEInfos,

Source§

fn glwe_compressed_alloc( &self, base2k: Base2K, k: TorusPrecision, rank: Rank, ) -> GLWECompressed<Vec<u8>>

Source§

fn lwe_compressed_alloc_from_infos<A>( &self, infos: &A, ) -> LWECompressed<Vec<u8>>
where A: LWEInfos,

Source§

fn lwe_compressed_alloc( &self, base2k: Base2K, k: TorusPrecision, ) -> LWECompressed<Vec<u8>>

Source§

fn gglwe_compressed_alloc_from_infos<A>( &self, infos: &A, ) -> GGLWECompressed<Vec<u8>>
where A: GGLWEInfos,

Source§

fn gglwe_compressed_alloc( &self, base2k: Base2K, k: TorusPrecision, rank_in: Rank, rank_out: Rank, dnum: Dnum, dsize: Dsize, ) -> GGLWECompressed<Vec<u8>>

Source§

fn ggsw_compressed_alloc_from_infos<A>( &self, infos: &A, ) -> GGSWCompressed<Vec<u8>>
where A: GGSWInfos,

Source§

fn ggsw_compressed_alloc( &self, base2k: Base2K, k: TorusPrecision, rank: Rank, dnum: Dnum, dsize: Dsize, ) -> GGSWCompressed<Vec<u8>>

Source§

fn glwe_switching_key_compressed_alloc_from_infos<A>( &self, infos: &A, ) -> GLWESwitchingKeyCompressed<Vec<u8>>
where A: GGLWEInfos,

Source§

fn glwe_switching_key_compressed_alloc( &self, base2k: Base2K, k: TorusPrecision, rank_in: Rank, rank_out: Rank, dnum: Dnum, dsize: Dsize, ) -> GLWESwitchingKeyCompressed<Vec<u8>>

Source§

fn glwe_automorphism_key_compressed_alloc_from_infos<A>( &self, infos: &A, ) -> GLWEAutomorphismKeyCompressed<Vec<u8>>
where A: GGLWEInfos,

Source§

fn glwe_automorphism_key_compressed_alloc( &self, base2k: Base2K, k: TorusPrecision, rank: Rank, dnum: Dnum, dsize: Dsize, ) -> GLWEAutomorphismKeyCompressed<Vec<u8>>

Source§

fn glwe_tensor_key_compressed_alloc_from_infos<A>( &self, infos: &A, ) -> GLWETensorKeyCompressed<Vec<u8>>
where A: GGLWEInfos,

Source§

fn glwe_tensor_key_compressed_alloc( &self, base2k: Base2K, k: TorusPrecision, rank: Rank, dnum: Dnum, dsize: Dsize, ) -> GLWETensorKeyCompressed<Vec<u8>>

Source§

fn glwe_to_lwe_key_compressed_alloc_from_infos<A>( &self, infos: &A, ) -> GLWEToLWESwitchingKeyCompressed<Vec<u8>>
where A: GGLWEInfos,

Source§

fn glwe_to_lwe_key_compressed_alloc( &self, base2k: Base2K, k: TorusPrecision, rank_in: Rank, dnum: Dnum, ) -> GLWEToLWESwitchingKeyCompressed<Vec<u8>>

Source§

fn lwe_to_glwe_key_compressed_alloc_from_infos<A>( &self, infos: &A, ) -> LWEToGLWEKeyCompressed<Vec<u8>>
where A: GGLWEInfos,

Source§

fn lwe_to_glwe_key_compressed_alloc( &self, n: Degree, base2k: Base2K, k: TorusPrecision, rank_out: Rank, dnum: Dnum, ) -> LWEToGLWEKeyCompressed<Vec<u8>>

Source§

fn lwe_switching_key_compressed_alloc_from_infos<A>( &self, infos: &A, ) -> LWESwitchingKeyCompressed<Vec<u8>>
where A: GGLWEInfos,

Source§

fn lwe_switching_key_compressed_alloc( &self, n: Degree, base2k: Base2K, k: TorusPrecision, dnum: Dnum, ) -> LWESwitchingKeyCompressed<Vec<u8>>

Source§

fn gglwe_to_ggsw_key_compressed_alloc_from_infos<A>( &self, infos: &A, ) -> GGLWEToGGSWKeyCompressed<Vec<u8>>
where A: GGLWEInfos,

Source§

fn gglwe_to_ggsw_key_compressed_alloc( &self, base2k: Base2K, k: TorusPrecision, rank: Rank, dnum: Dnum, dsize: Dsize, ) -> GGLWEToGGSWKeyCompressed<Vec<u8>>

Source§

impl<BE> ModuleLogN for Module<BE>
where BE: Backend, Module<BE>: ModuleN,

Source§

fn log_n(&self) -> usize

Source§

impl<B> ModuleN for Module<B>
where B: Backend,

Source§

fn n(&self) -> usize

Source§

impl<B> ModuleNew<B> for Module<B>
where B: Backend + HalModuleImpl<B>,

Source§

fn new(n: u64) -> Module<B>

Source§

impl<To> ModuleTransfer<To> for Module<To>
where To: Backend,

Source§

fn upload_glwe<From>( &self, src: &GLWE<<From as Backend>::OwnedBuf>, ) -> GLWE<<To as Backend>::OwnedBuf>
where From: Backend, To: TransferFrom<From>,

Source§

fn download_glwe<From>( &self, src: &GLWE<<From as Backend>::OwnedBuf>, ) -> GLWE<<To as Backend>::OwnedBuf>
where From: Backend, To: TransferFrom<From>,

Source§

fn upload_lwe<From>( &self, src: &LWE<<From as Backend>::OwnedBuf>, ) -> LWE<<To as Backend>::OwnedBuf>
where From: Backend, To: TransferFrom<From>,

Source§

fn download_lwe<From>( &self, src: &LWE<<From as Backend>::OwnedBuf>, ) -> LWE<<To as Backend>::OwnedBuf>
where From: Backend, To: TransferFrom<From>,

Source§

fn upload_gglwe<From>( &self, src: &GGLWE<<From as Backend>::OwnedBuf>, ) -> GGLWE<<To as Backend>::OwnedBuf>
where From: Backend, To: TransferFrom<From>,

Source§

fn download_gglwe<From>( &self, src: &GGLWE<<From as Backend>::OwnedBuf>, ) -> GGLWE<<To as Backend>::OwnedBuf>
where From: Backend, To: TransferFrom<From>,

Source§

fn upload_ggsw<From>( &self, src: &GGSW<<From as Backend>::OwnedBuf>, ) -> GGSW<<To as Backend>::OwnedBuf>
where From: Backend, To: TransferFrom<From>,

Source§

fn download_ggsw<From>( &self, src: &GGSW<<From as Backend>::OwnedBuf>, ) -> GGSW<<To as Backend>::OwnedBuf>
where From: Backend, To: TransferFrom<From>,

Source§

fn upload_glwe_secret<From>( &self, src: &GLWESecret<<From as Backend>::OwnedBuf>, ) -> GLWESecret<<To as Backend>::OwnedBuf>
where From: Backend, To: TransferFrom<From>,

Source§

fn download_glwe_secret<From>( &self, src: &GLWESecret<<From as Backend>::OwnedBuf>, ) -> GLWESecret<<To as Backend>::OwnedBuf>
where From: Backend, To: TransferFrom<From>,

Source§

fn upload_lwe_secret<From>( &self, src: &LWESecret<<From as Backend>::OwnedBuf>, ) -> LWESecret<<To as Backend>::OwnedBuf>
where From: Backend, To: TransferFrom<From>,

Source§

fn download_lwe_secret<From>( &self, src: &LWESecret<<From as Backend>::OwnedBuf>, ) -> LWESecret<<To as Backend>::OwnedBuf>
where From: Backend, To: TransferFrom<From>,

Source§

fn upload_glwe_plaintext<From>( &self, src: &GLWEPlaintext<<From as Backend>::OwnedBuf>, ) -> GLWEPlaintext<<To as Backend>::OwnedBuf>
where From: Backend, To: TransferFrom<From>,

Source§

fn download_glwe_plaintext<From>( &self, src: &GLWEPlaintext<<From as Backend>::OwnedBuf>, ) -> GLWEPlaintext<<To as Backend>::OwnedBuf>
where From: Backend, To: TransferFrom<From>,

Source§

fn upload_lwe_plaintext<From>( &self, src: &LWEPlaintext<<From as Backend>::OwnedBuf>, ) -> LWEPlaintext<<To as Backend>::OwnedBuf>
where From: Backend, To: TransferFrom<From>,

Source§

fn download_lwe_plaintext<From>( &self, src: &LWEPlaintext<<From as Backend>::OwnedBuf>, ) -> LWEPlaintext<<To as Backend>::OwnedBuf>
where From: Backend, To: TransferFrom<From>,

Source§

impl<B> NttModuleHandle for Module<B>

Blanket impl: any Module<B> whose handle implements NttHandleProvider automatically satisfies NttModuleHandle.

Source§

fn get_ntt_table(&self) -> &NttTable<Primes30>

Precomputed forward NTT twiddle table (Primes30, size n).
Source§

fn get_intt_table(&self) -> &NttTableInv<Primes30>

Precomputed inverse NTT twiddle table (Primes30, size n).
Source§

fn get_bbc_meta(&self) -> &BbcMeta<Primes30>

Precomputed metadata for q120b × q120c lazy multiply–accumulate.
Source§

fn get_bbb_meta(&self) -> &BbbMeta<Primes30>

Precomputed metadata for q120b × q120b lazy multiply–accumulate.
Source§

impl<B> ScalarZnxAlloc<B> for Module<B>
where B: Backend,

Source§

impl<B> ScalarZnxFillBinaryBlockBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn scalar_znx_fill_binary_block_backend( &self, res: &mut ScalarZnx<<B as Backend>::BufMut<'_>>, res_col: usize, block_size: usize, seed: [u8; 32], )

Source§

impl<B> ScalarZnxFillBinaryBlockSourceBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn scalar_znx_fill_binary_block_source_backend( &self, res: &mut ScalarZnx<<B as Backend>::BufMut<'_>>, res_col: usize, block_size: usize, source: &mut Source, )

Source§

impl<B> ScalarZnxFillBinaryHwBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn scalar_znx_fill_binary_hw_backend( &self, res: &mut ScalarZnx<<B as Backend>::BufMut<'_>>, res_col: usize, hw: usize, seed: [u8; 32], )

Source§

impl<B> ScalarZnxFillBinaryHwSourceBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn scalar_znx_fill_binary_hw_source_backend( &self, res: &mut ScalarZnx<<B as Backend>::BufMut<'_>>, res_col: usize, hw: usize, source: &mut Source, )

Source§

impl<B> ScalarZnxFillBinaryProbBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn scalar_znx_fill_binary_prob_backend( &self, res: &mut ScalarZnx<<B as Backend>::BufMut<'_>>, res_col: usize, prob: f64, seed: [u8; 32], )

Source§

impl<B> ScalarZnxFillBinaryProbSourceBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn scalar_znx_fill_binary_prob_source_backend( &self, res: &mut ScalarZnx<<B as Backend>::BufMut<'_>>, res_col: usize, prob: f64, source: &mut Source, )

Source§

impl<B> ScalarZnxFillTernaryHwBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn scalar_znx_fill_ternary_hw_backend( &self, res: &mut ScalarZnx<<B as Backend>::BufMut<'_>>, res_col: usize, hw: usize, seed: [u8; 32], )

Source§

impl<B> ScalarZnxFillTernaryHwSourceBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn scalar_znx_fill_ternary_hw_source_backend( &self, res: &mut ScalarZnx<<B as Backend>::BufMut<'_>>, res_col: usize, hw: usize, source: &mut Source, )

Source§

impl<B> ScalarZnxFillTernaryProbBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn scalar_znx_fill_ternary_prob_backend( &self, res: &mut ScalarZnx<<B as Backend>::BufMut<'_>>, res_col: usize, prob: f64, seed: [u8; 32], )

Source§

impl<B> ScalarZnxFillTernaryProbSourceBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn scalar_znx_fill_ternary_prob_source_backend( &self, res: &mut ScalarZnx<<B as Backend>::BufMut<'_>>, res_col: usize, prob: f64, source: &mut Source, )

Source§

impl<B> SecretConversion<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn glwe_secret_from_lwe_secret<S>( &self, src: &S, ) -> GLWESecret<<B as Backend>::OwnedBuf>

Derives the associated rank-1 GLWESecret from a LWESecret by applying the X → X⁻¹ automorphism (k = -1). The result is the GLWE polynomial key whose ring product with a mask decrypts LWE ciphertexts produced by glwe_expand_lwe.
Source§

fn lwe_secret_from_glwe_secret<S>( &self, src: &S, ) -> LWESecret<<B as Backend>::OwnedBuf>

Derives the associated LWESecret from a GLWESecret by applying the X → X⁻¹ automorphism (k = -1) to each rank component. Read more
Source§

impl<B> SvpApplyDft<B> for Module<B>
where B: Backend + HalSvpImpl<B>,

Source§

fn svp_apply_dft( &self, res: &mut VecZnxDft<<B as Backend>::BufMut<'_>, B>, res_col: usize, a: &SvpPPol<<B as Backend>::BufRef<'_>, B>, a_col: usize, b: &VecZnx<<B as Backend>::BufRef<'_>>, b_col: usize, )

Source§

impl<B> SvpApplyDftToDft<B> for Module<B>
where B: Backend + HalSvpImpl<B>,

Source§

fn svp_apply_dft_to_dft( &self, res: &mut VecZnxDft<<B as Backend>::BufMut<'_>, B>, res_col: usize, a: &SvpPPol<<B as Backend>::BufRef<'_>, B>, a_col: usize, b: &VecZnxDft<<B as Backend>::BufRef<'_>, B>, b_col: usize, )

Source§

impl<B> SvpApplyDftToDftAssign<B> for Module<B>
where B: Backend + HalSvpImpl<B>,

Source§

fn svp_apply_dft_to_dft_assign( &self, res: &mut VecZnxDft<<B as Backend>::BufMut<'_>, B>, res_col: usize, a: &SvpPPol<<B as Backend>::BufRef<'_>, B>, a_col: usize, )

Source§

impl<B> SvpPPolAlloc<B> for Module<B>
where B: Backend,

Source§

fn svp_ppol_alloc(&self, cols: usize) -> SvpPPol<<B as Backend>::OwnedBuf, B>

Source§

impl<B> SvpPPolBytesOf for Module<B>
where B: Backend,

Source§

impl<B> SvpPPolCopyBackend<B> for Module<B>
where B: Backend + HalSvpImpl<B>,

Source§

fn svp_ppol_copy_backend( &self, res: &mut SvpPPol<<B as Backend>::BufMut<'_>, B>, res_col: usize, a: &SvpPPol<<B as Backend>::BufRef<'_>, B>, a_col: usize, )

Source§

impl<B> SvpPrepare<B> for Module<B>
where B: Backend + HalSvpImpl<B>,

Source§

fn svp_prepare( &self, res: &mut SvpPPol<<B as Backend>::BufMut<'_>, B>, res_col: usize, a: &ScalarZnx<<B as Backend>::BufRef<'_>>, a_col: usize, )

Source§

impl<B> VecZnxAddAssignBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_add_assign_backend( &self, res: &mut VecZnx<<B as Backend>::BufMut<'_>>, res_col: usize, a: &VecZnx<<B as Backend>::BufRef<'_>>, a_col: usize, )

Source§

impl<B> VecZnxAddConstAssignBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_add_const_assign_backend( &self, res: &mut VecZnx<<B as Backend>::BufMut<'_>>, res_col: usize, cnst: &VecZnx<<B as Backend>::BufRef<'_>>, cnst_col: usize, cnst_coeff: usize, res_limb: usize, res_coeff: usize, )

Source§

impl<B> VecZnxAddConstIntoBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_add_const_into_backend( &self, res: &mut VecZnx<<B as Backend>::BufMut<'_>>, res_col: usize, a: &VecZnx<<B as Backend>::BufRef<'_>>, a_col: usize, cnst: &VecZnx<<B as Backend>::BufRef<'_>>, cnst_col: usize, cnst_coeff: usize, res_limb: usize, res_coeff: usize, )

Source§

impl<B> VecZnxAddIntoBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_add_into_backend( &self, res: &mut VecZnx<<B as Backend>::BufMut<'_>>, res_col: usize, a: &VecZnx<<B as Backend>::BufRef<'_>>, a_col: usize, b: &VecZnx<<B as Backend>::BufRef<'_>>, b_col: usize, )

Adds the selected backend-native column of a to the selected backend-native column of b.
Source§

impl<B> VecZnxAddNormalBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_add_normal_backend( &self, base2k: usize, res: &mut VecZnx<<B as Backend>::BufMut<'_>>, res_col: usize, noise_infos: NoiseInfos, seed: [u8; 32], )

Adds backend-defined normal noise to the selected backend-native column using seed.
Source§

impl<B> VecZnxAddNormalSourceBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_add_normal_source_backend( &self, base2k: usize, res: &mut VecZnx<<B as Backend>::BufMut<'_>>, res_col: usize, noise_infos: NoiseInfos, source_xe: &mut Source, )

Adds a discrete normal vector scaled by 2^{-k} with the provided standard deviation and bounded to [-bound, bound].
Source§

impl<B> VecZnxAddScalarAssignBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_add_scalar_assign_backend( &self, res: &mut VecZnx<<B as Backend>::BufMut<'_>>, res_col: usize, res_limb: usize, a: &ScalarZnx<<B as Backend>::BufRef<'_>>, a_col: usize, )

Source§

impl<B> VecZnxAddScalarIntoBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_add_scalar_into_backend( &self, res: &mut VecZnx<<B as Backend>::BufMut<'_>>, res_col: usize, a: &ScalarZnx<<B as Backend>::BufRef<'_>>, a_col: usize, b: &VecZnx<<B as Backend>::BufRef<'_>>, b_col: usize, b_limb: usize, )

Source§

impl<B> VecZnxAlloc<B> for Module<B>
where B: Backend,

Source§

fn vec_znx_alloc( &self, cols: usize, size: usize, ) -> VecZnx<<B as Backend>::OwnedBuf>

Source§

fn vec_znx_alloc_with_max_size( &self, cols: usize, size: usize, max_size: usize, ) -> VecZnx<<B as Backend>::OwnedBuf>

Source§

impl<B> VecZnxAutomorphismAssignBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_automorphism_assign_backend( &self, k: i64, res: &mut VecZnx<<B as Backend>::BufMut<'_>>, res_col: usize, scratch: &mut ScratchArena<'_, B>, )

Applies the automorphism X^i -> X^ik on the selected column of a.
Source§

impl<B> VecZnxAutomorphismAssignTmpBytes for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

impl<B> VecZnxAutomorphismBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_automorphism_backend( &self, k: i64, res: &mut VecZnx<<B as Backend>::BufMut<'_>>, res_col: usize, a: &VecZnx<<B as Backend>::BufRef<'_>>, a_col: usize, )

Applies the automorphism X^i -> X^ik on the selected column of a and stores the result in res_col column of res.
Source§

impl<B> VecZnxBigAddAssign<B> for Module<B>
where B: Backend + HalVecZnxBigImpl<B>,

Source§

fn vec_znx_big_add_assign( &self, res: &mut VecZnxBig<<B as Backend>::BufMut<'_>, B>, res_col: usize, a: &VecZnxBig<<B as Backend>::BufRef<'_>, B>, a_col: usize, )

Adds a to b and stores the result on b.
Source§

impl<B> VecZnxBigAddInto<B> for Module<B>
where B: Backend + HalVecZnxBigImpl<B>,

Source§

fn vec_znx_big_add_into( &self, res: &mut VecZnxBig<<B as Backend>::BufMut<'_>, B>, res_col: usize, a: &VecZnxBig<<B as Backend>::BufRef<'_>, B>, a_col: usize, b: &VecZnxBig<<B as Backend>::BufRef<'_>, B>, b_col: usize, )

Adds a to b and stores the result on c.
Source§

impl<B> VecZnxBigAddNormal<B> for Module<B>
where B: Backend + HalVecZnxBigImpl<B>,

Source§

fn vec_znx_big_add_normal( &self, base2k: usize, res: &mut VecZnxBig<<B as Backend>::BufMut<'_>, B>, res_col: usize, noise_infos: NoiseInfos, source: &mut Source, )

Source§

impl<B> VecZnxBigAddNormalBackend<B> for Module<B>
where B: Backend + HalVecZnxBigImpl<B>,

Source§

fn vec_znx_big_add_normal_backend( &self, base2k: usize, res: &mut VecZnxBig<<B as Backend>::BufMut<'_>, B>, res_col: usize, noise_infos: NoiseInfos, seed: [u8; 32], )

Source§

impl<B> VecZnxBigAddSmallAssign<B> for Module<B>
where B: Backend + HalVecZnxBigImpl<B>,

Source§

fn vec_znx_big_add_small_assign( &self, res: &mut VecZnxBig<<B as Backend>::BufMut<'_>, B>, res_col: usize, a: &VecZnx<<B as Backend>::BufRef<'_>>, a_col: usize, )

Adds a to b and stores the result on b.
Source§

impl<B> VecZnxBigAddSmallIntoBackend<B> for Module<B>
where B: Backend + HalVecZnxBigImpl<B>,

Source§

fn vec_znx_big_add_small_into_backend( &self, res: &mut VecZnxBig<<B as Backend>::BufMut<'_>, B>, res_col: usize, a: &VecZnxBig<<B as Backend>::BufRef<'_>, B>, a_col: usize, b: &VecZnx<<B as Backend>::BufRef<'_>>, b_col: usize, )

Adds a to b and stores the result on c.
Source§

impl<B> VecZnxBigAlloc<B> for Module<B>
where B: Backend,

Source§

fn vec_znx_big_alloc( &self, cols: usize, size: usize, ) -> VecZnxBig<<B as Backend>::OwnedBuf, B>

Source§

fn vec_znx_big_alloc_n( &self, n: usize, cols: usize, size: usize, ) -> VecZnxBig<<B as Backend>::OwnedBuf, B>

Source§

impl<B> VecZnxBigAutomorphism<B> for Module<B>
where B: Backend + HalVecZnxBigImpl<B>,

Source§

fn vec_znx_big_automorphism( &self, k: i64, res: &mut VecZnxBig<<B as Backend>::BufMut<'_>, B>, res_col: usize, a: &VecZnxBig<<B as Backend>::BufRef<'_>, B>, a_col: usize, )

Applies the automorphism X^i -> X^ik on a and stores the result on b.
Source§

impl<B> VecZnxBigAutomorphismAssign<B> for Module<B>
where B: Backend + HalVecZnxBigImpl<B>,

Source§

fn vec_znx_big_automorphism_assign( &self, k: i64, a: &mut VecZnxBig<<B as Backend>::BufMut<'_>, B>, a_col: usize, scratch: &mut ScratchArena<'_, B>, )

Applies the automorphism X^i -> X^ik on a and stores the result on a.
Source§

impl<B> VecZnxBigAutomorphismAssignTmpBytes for Module<B>
where B: Backend + HalVecZnxBigImpl<B>,

Source§

impl<B> VecZnxBigBytesOf for Module<B>
where B: Backend,

Source§

fn bytes_of_vec_znx_big(&self, cols: usize, size: usize) -> usize

Source§

fn bytes_of_vec_znx_big_n(&self, n: usize, cols: usize, size: usize) -> usize

Source§

impl<B> VecZnxBigFromBytes<B> for Module<B>
where B: Backend,

Source§

fn vec_znx_big_from_bytes( &self, cols: usize, size: usize, bytes: Vec<u8>, ) -> VecZnxBig<<B as Backend>::OwnedBuf, B>

Source§

fn vec_znx_big_from_bytes_n( &self, n: usize, cols: usize, size: usize, bytes: Vec<u8>, ) -> VecZnxBig<<B as Backend>::OwnedBuf, B>

Source§

impl<B> VecZnxBigFromSmallBackend<B> for Module<B>
where B: Backend + HalVecZnxBigImpl<B>,

Source§

fn vec_znx_big_from_small_backend( &self, res: &mut VecZnxBig<<B as Backend>::BufMut<'_>, B>, res_col: usize, a: &VecZnx<<B as Backend>::BufRef<'_>>, a_col: usize, )

Source§

impl<B> VecZnxBigInnerSumBackend<B> for Module<B>
where B: Backend + HalVecZnxBigImpl<B>,

Source§

fn vec_znx_big_inner_sum_backend( &self, res: &mut VecZnxBig<<B as Backend>::BufMut<'_>, B>, res_col: usize, res_coeff: usize, a: &VecZnxBig<<B as Backend>::BufRef<'_>, B>, a_col: usize, )

Source§

impl<B> VecZnxBigNegate<B> for Module<B>
where B: Backend + HalVecZnxBigImpl<B>,

Source§

fn vec_znx_big_negate( &self, res: &mut VecZnxBig<<B as Backend>::BufMut<'_>, B>, res_col: usize, a: &VecZnxBig<<B as Backend>::BufRef<'_>, B>, a_col: usize, )

Source§

impl<B> VecZnxBigNegateAssign<B> for Module<B>
where B: Backend + HalVecZnxBigImpl<B>,

Source§

fn vec_znx_big_negate_assign( &self, a: &mut VecZnxBig<<B as Backend>::BufMut<'_>, B>, a_col: usize, )

Source§

impl<B> VecZnxBigNormalize<B> for Module<B>
where B: Backend + HalVecZnxBigImpl<B>,

Source§

fn vec_znx_big_normalize( &self, res: &mut VecZnx<<B as Backend>::BufMut<'_>>, res_base2k: usize, res_offset: i64, res_col: usize, a: &VecZnxBig<<B as Backend>::BufRef<'_>, B>, a_base2k: usize, a_col: usize, scratch: &mut ScratchArena<'_, B>, )

Source§

impl<B> VecZnxBigNormalizeTmpBytes for Module<B>
where B: Backend + HalVecZnxBigImpl<B>,

Source§

impl<B> VecZnxBigSub<B> for Module<B>
where B: Backend + HalVecZnxBigImpl<B>,

Source§

fn vec_znx_big_sub( &self, res: &mut VecZnxBig<<B as Backend>::BufMut<'_>, B>, res_col: usize, a: &VecZnxBig<<B as Backend>::BufRef<'_>, B>, a_col: usize, b: &VecZnxBig<<B as Backend>::BufRef<'_>, B>, b_col: usize, )

Subtracts a to b and stores the result on c.
Source§

impl<B> VecZnxBigSubAssign<B> for Module<B>
where B: Backend + HalVecZnxBigImpl<B>,

Source§

fn vec_znx_big_sub_assign( &self, res: &mut VecZnxBig<<B as Backend>::BufMut<'_>, B>, res_col: usize, a: &VecZnxBig<<B as Backend>::BufRef<'_>, B>, a_col: usize, )

Subtracts a from b and stores the result on b.
Source§

impl<B> VecZnxBigSubNegateAssign<B> for Module<B>
where B: Backend + HalVecZnxBigImpl<B>,

Source§

fn vec_znx_big_sub_negate_assign( &self, res: &mut VecZnxBig<<B as Backend>::BufMut<'_>, B>, res_col: usize, a: &VecZnxBig<<B as Backend>::BufRef<'_>, B>, a_col: usize, )

Subtracts b from a and stores the result on b.
Source§

impl<B> VecZnxBigSubSmallABackend<B> for Module<B>
where B: Backend + HalVecZnxBigImpl<B>,

Source§

fn vec_znx_big_sub_small_a_backend( &self, res: &mut VecZnxBig<<B as Backend>::BufMut<'_>, B>, res_col: usize, a: &VecZnx<<B as Backend>::BufRef<'_>>, a_col: usize, b: &VecZnxBig<<B as Backend>::BufRef<'_>, B>, b_col: usize, )

Subtracts b from a and stores the result on c.
Source§

impl<B> VecZnxBigSubSmallAssign<B> for Module<B>
where B: Backend + HalVecZnxBigImpl<B>,

Source§

fn vec_znx_big_sub_small_assign( &self, res: &mut VecZnxBig<<B as Backend>::BufMut<'_>, B>, res_col: usize, a: &VecZnx<<B as Backend>::BufRef<'_>>, a_col: usize, )

Subtracts a from res and stores the result on res.
Source§

impl<B> VecZnxBigSubSmallBBackend<B> for Module<B>
where B: Backend + HalVecZnxBigImpl<B>,

Source§

fn vec_znx_big_sub_small_b_backend( &self, res: &mut VecZnxBig<<B as Backend>::BufMut<'_>, B>, res_col: usize, a: &VecZnxBig<<B as Backend>::BufRef<'_>, B>, a_col: usize, b: &VecZnx<<B as Backend>::BufRef<'_>>, b_col: usize, )

Subtracts b from a and stores the result on c.
Source§

impl<B> VecZnxBigSubSmallNegateAssign<B> for Module<B>
where B: Backend + HalVecZnxBigImpl<B>,

Source§

fn vec_znx_big_sub_small_negate_assign( &self, res: &mut VecZnxBig<<B as Backend>::BufMut<'_>, B>, res_col: usize, a: &VecZnx<<B as Backend>::BufRef<'_>>, a_col: usize, )

Subtracts res from a and stores the result on res.
Source§

impl<B> VecZnxCopyBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_copy_backend( &self, res: &mut VecZnx<<B as Backend>::BufMut<'_>>, res_col: usize, a: &VecZnx<<B as Backend>::BufRef<'_>>, a_col: usize, )

Source§

impl<B> VecZnxCopyRangeBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_copy_range_backend( &self, res: &mut VecZnx<<B as Backend>::BufMut<'_>>, res_col: usize, res_limb: usize, res_offset: usize, a: &VecZnx<<B as Backend>::BufRef<'_>>, a_col: usize, a_limb: usize, a_offset: usize, len: usize, )

Source§

impl<B> VecZnxDftAddAssign<B> for Module<B>
where B: Backend + HalVecZnxDftImpl<B>,

Source§

fn vec_znx_dft_add_assign( &self, res: &mut VecZnxDft<<B as Backend>::BufMut<'_>, B>, res_col: usize, a: &VecZnxDft<<B as Backend>::BufRef<'_>, B>, a_col: usize, )

Source§

impl<B> VecZnxDftAddInto<B> for Module<B>
where B: Backend + HalVecZnxDftImpl<B>,

Source§

fn vec_znx_dft_add_into( &self, res: &mut VecZnxDft<<B as Backend>::BufMut<'_>, B>, res_col: usize, a: &VecZnxDft<<B as Backend>::BufRef<'_>, B>, a_col: usize, b: &VecZnxDft<<B as Backend>::BufRef<'_>, B>, b_col: usize, )

Source§

impl<B> VecZnxDftAddScaledAssign<B> for Module<B>
where B: Backend + HalVecZnxDftImpl<B>,

Source§

fn vec_znx_dft_add_scaled_assign( &self, res: &mut VecZnxDft<<B as Backend>::BufMut<'_>, B>, res_col: usize, a: &VecZnxDft<<B as Backend>::BufRef<'_>, B>, a_col: usize, a_scale: i64, )

Source§

impl<B> VecZnxDftAlloc<B> for Module<B>
where B: Backend,

Source§

fn vec_znx_dft_alloc( &self, cols: usize, size: usize, ) -> VecZnxDft<<B as Backend>::OwnedBuf, B>

Source§

impl<B> VecZnxDftApply<B> for Module<B>
where B: Backend + HalVecZnxDftImpl<B>,

Source§

fn vec_znx_dft_apply( &self, step: usize, offset: usize, res: &mut VecZnxDft<<B as Backend>::BufMut<'_>, B>, res_col: usize, a: &VecZnx<<B as Backend>::BufRef<'_>>, a_col: usize, )

Source§

impl<B> VecZnxDftBytesOf for Module<B>
where B: Backend,

Source§

fn bytes_of_vec_znx_dft(&self, cols: usize, size: usize) -> usize

Source§

impl<B> VecZnxDftCopy<B> for Module<B>
where B: Backend + HalVecZnxDftImpl<B>,

Source§

fn vec_znx_dft_copy( &self, step: usize, offset: usize, res: &mut VecZnxDft<<B as Backend>::BufMut<'_>, B>, res_col: usize, a: &VecZnxDft<<B as Backend>::BufRef<'_>, B>, a_col: usize, )

Source§

impl<B> VecZnxDftFromBytes<B> for Module<B>
where B: Backend,

Source§

fn vec_znx_dft_from_bytes( &self, cols: usize, size: usize, bytes: Vec<u8>, ) -> VecZnxDft<<B as Backend>::OwnedBuf, B>

Source§

impl<B> VecZnxDftSub<B> for Module<B>
where B: Backend + HalVecZnxDftImpl<B>,

Source§

fn vec_znx_dft_sub( &self, res: &mut VecZnxDft<<B as Backend>::BufMut<'_>, B>, res_col: usize, a: &VecZnxDft<<B as Backend>::BufRef<'_>, B>, a_col: usize, b: &VecZnxDft<<B as Backend>::BufRef<'_>, B>, b_col: usize, )

Source§

impl<B> VecZnxDftSubAssign<B> for Module<B>
where B: Backend + HalVecZnxDftImpl<B>,

Source§

fn vec_znx_dft_sub_assign( &self, res: &mut VecZnxDft<<B as Backend>::BufMut<'_>, B>, res_col: usize, a: &VecZnxDft<<B as Backend>::BufRef<'_>, B>, a_col: usize, )

Source§

impl<B> VecZnxDftSubNegateAssign<B> for Module<B>
where B: Backend + HalVecZnxDftImpl<B>,

Source§

fn vec_znx_dft_sub_negate_assign( &self, res: &mut VecZnxDft<<B as Backend>::BufMut<'_>, B>, res_col: usize, a: &VecZnxDft<<B as Backend>::BufRef<'_>, B>, a_col: usize, )

Source§

impl<B> VecZnxDftZero<B> for Module<B>
where B: Backend + HalVecZnxDftImpl<B>,

Source§

fn vec_znx_dft_zero( &self, res: &mut VecZnxDft<<B as Backend>::BufMut<'_>, B>, res_col: usize, )

Source§

impl<B> VecZnxExtractCoeffBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_extract_coeff_backend( &self, res: &mut VecZnx<<B as Backend>::BufMut<'_>>, res_col: usize, a: &VecZnx<<B as Backend>::BufRef<'_>>, a_col: usize, a_coeff: usize, )

Source§

impl<B> VecZnxFillNormalBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_fill_normal_backend( &self, base2k: usize, res: &mut VecZnx<<B as Backend>::BufMut<'_>>, res_col: usize, noise_infos: NoiseInfos, seed: [u8; 32], )

Fills the selected backend-native column from a backend-defined normal sampler seeded by seed.
Source§

impl<B> VecZnxFillNormalSourceBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_fill_normal_source_backend( &self, base2k: usize, res: &mut VecZnx<<B as Backend>::BufMut<'_>>, res_col: usize, noise_infos: NoiseInfos, source_xe: &mut Source, )

Source§

impl<B> VecZnxFillUniformBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_fill_uniform_backend( &self, base2k: usize, res: &mut VecZnx<<B as Backend>::BufMut<'_>>, res_col: usize, seed: [u8; 32], )

Fills the selected backend-native column from a backend-defined uniform sampler seeded by seed.
Source§

impl<B> VecZnxFillUniformSourceBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_fill_uniform_source_backend( &self, base2k: usize, res: &mut VecZnx<<B as Backend>::BufMut<'_>>, res_col: usize, source: &mut Source, )

Fills the first size size with uniform values in [-2^{base2k-1}, 2^{base2k-1}]
Source§

impl<B> VecZnxHadamardProductScalarZnxBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_hadamard_product_scalar_znx_backend( &self, res: &mut VecZnxBig<<B as Backend>::BufMut<'_>, B>, res_col: usize, a: &VecZnx<<B as Backend>::BufRef<'_>>, a_col: usize, b: &ScalarZnx<<B as Backend>::BufRef<'_>>, b_col: usize, )

Source§

impl<B> VecZnxIdftApply<B> for Module<B>
where B: Backend + HalVecZnxDftImpl<B>,

Source§

fn vec_znx_idft_apply( &self, res: &mut VecZnxBig<<B as Backend>::BufMut<'_>, B>, res_col: usize, a: &VecZnxDft<<B as Backend>::BufRef<'_>, B>, a_col: usize, scratch: &mut ScratchArena<'_, B>, )

Source§

impl<B> VecZnxIdftApplyTmpA<B> for Module<B>
where B: Backend + HalVecZnxDftImpl<B>,

Source§

fn vec_znx_idft_apply_tmpa( &self, res: &mut VecZnxBig<<B as Backend>::BufMut<'_>, B>, res_col: usize, a: &mut VecZnxDft<<B as Backend>::BufMut<'_>, B>, a_col: usize, )

Source§

impl<B> VecZnxIdftApplyTmpBytes for Module<B>
where B: Backend + HalVecZnxDftImpl<B>,

Source§

impl<B> VecZnxLshAddCoeffIntoBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_lsh_add_coeff_into_backend( &self, base2k: usize, k: usize, res: &mut VecZnx<<B as Backend>::BufMut<'_>>, res_col: usize, a: &VecZnx<<B as Backend>::BufRef<'_>>, a_col: usize, a_coeff: usize, scratch: &mut ScratchArena<'_, B>, )

Source§

impl<B> VecZnxLshAddIntoBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_lsh_add_into_backend( &self, base2k: usize, k: usize, res: &mut VecZnx<<B as Backend>::BufMut<'_>>, res_col: usize, a: &VecZnx<<B as Backend>::BufRef<'_>>, a_col: usize, scratch: &mut ScratchArena<'_, B>, )

Left shift by k bits all columns of a.
Source§

impl<B> VecZnxLshAssignBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_lsh_assign_backend( &self, base2k: usize, k: usize, a: &mut VecZnx<<B as Backend>::BufMut<'_>>, a_col: usize, scratch: &mut ScratchArena<'_, B>, )

Left shift by k bits all columns of a.
Source§

impl<B> VecZnxLshBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_lsh_backend( &self, base2k: usize, k: usize, res: &mut VecZnx<<B as Backend>::BufMut<'_>>, res_col: usize, a: &VecZnx<<B as Backend>::BufRef<'_>>, a_col: usize, scratch: &mut ScratchArena<'_, B>, )

Left shift by k bits all columns of a.
Source§

impl<B> VecZnxLshCoeffBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_lsh_coeff_backend( &self, base2k: usize, k: usize, res: &mut VecZnx<<B as Backend>::BufMut<'_>>, res_col: usize, a: &VecZnx<<B as Backend>::BufRef<'_>>, a_col: usize, a_coeff: usize, scratch: &mut ScratchArena<'_, B>, )

Source§

impl<B> VecZnxLshSubBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_lsh_sub_backend( &self, base2k: usize, k: usize, res: &mut VecZnx<<B as Backend>::BufMut<'_>>, res_col: usize, a: &VecZnx<<B as Backend>::BufRef<'_>>, a_col: usize, scratch: &mut ScratchArena<'_, B>, )

Left shift by k bits and subtract from destination.
Source§

impl<B> VecZnxLshTmpBytes for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

impl<B> VecZnxMergeRingsBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_merge_rings_backend( &self, res: &mut VecZnx<<B as Backend>::BufMut<'_>>, res_col: usize, a: &[VecZnx<<B as Backend>::BufRef<'_>>], a_col: usize, scratch: &mut ScratchArena<'_, B>, )

Merges the subrings of the selected column of a into the selected column of res. Read more
Source§

impl<B> VecZnxMergeRingsTmpBytes for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

impl<B> VecZnxMulXpMinusOneAssignBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_mul_xp_minus_one_assign_backend( &self, p: i64, res: &mut VecZnx<<B as Backend>::BufMut<'_>>, res_col: usize, scratch: &mut ScratchArena<'_, B>, )

Source§

impl<B> VecZnxMulXpMinusOneAssignTmpBytes for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

impl<B> VecZnxMulXpMinusOneBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_mul_xp_minus_one_backend( &self, p: i64, res: &mut VecZnx<<B as Backend>::BufMut<'_>>, res_col: usize, a: &VecZnx<<B as Backend>::BufRef<'_>>, a_col: usize, )

Source§

impl<B> VecZnxNegateAssignBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_negate_assign_backend( &self, a: &mut VecZnx<<B as Backend>::BufMut<'_>>, a_col: usize, )

Source§

impl<B> VecZnxNegateBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_negate_backend( &self, res: &mut VecZnx<<B as Backend>::BufMut<'_>>, res_col: usize, a: &VecZnx<<B as Backend>::BufRef<'_>>, a_col: usize, )

Source§

impl<B> VecZnxNormalize<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_normalize( &self, res: &mut VecZnx<<B as Backend>::BufMut<'_>>, res_base2k: usize, res_offset: i64, res_col: usize, a: &VecZnx<<B as Backend>::BufRef<'_>>, a_base2k: usize, a_col: usize, scratch: &mut ScratchArena<'_, B>, )

Normalizes the selected column of a and stores the result into the selected column of res.
Source§

impl<B> VecZnxNormalizeAssignBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_normalize_assign_backend( &self, base2k: usize, a: &mut VecZnx<<B as Backend>::BufMut<'_>>, a_col: usize, scratch: &mut ScratchArena<'_, B>, )

Source§

impl<B> VecZnxNormalizeCoeffAssignBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_normalize_coeff_assign_backend( &self, base2k: usize, a: &mut VecZnx<<B as Backend>::BufMut<'_>>, a_col: usize, a_coeff: usize, scratch: &mut ScratchArena<'_, B>, )

Source§

impl<B> VecZnxNormalizeCoeffBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_normalize_coeff_backend( &self, res: &mut VecZnx<<B as Backend>::BufMut<'_>>, res_base2k: usize, res_offset: i64, res_col: usize, a: &VecZnx<<B as Backend>::BufRef<'_>>, a_base2k: usize, a_col: usize, a_coeff: usize, scratch: &mut ScratchArena<'_, B>, )

Normalizes the selected coefficient of a across its limbs into a 1-coeff destination column.
Source§

impl<B> VecZnxNormalizeTmpBytes for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_normalize_tmp_bytes(&self) -> usize

Returns the minimum number of bytes necessary for normalization.
Source§

impl<B> VecZnxRotateAssignBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_rotate_assign_backend( &self, k: i64, a: &mut VecZnx<<B as Backend>::BufMut<'_>>, a_col: usize, scratch: &mut ScratchArena<'_, B>, )

Multiplies the selected column of a by X^k.
Source§

impl<B> VecZnxRotateAssignTmpBytes for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

impl<B> VecZnxRotateBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_rotate_backend( &self, k: i64, res: &mut VecZnx<<B as Backend>::BufMut<'_>>, res_col: usize, a: &VecZnx<<B as Backend>::BufRef<'_>>, a_col: usize, )

Multiplies the selected column of a by X^k and stores the result in res_col of res.
Source§

impl<B> VecZnxRshAddCoeffIntoBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_rsh_add_coeff_into_backend( &self, base2k: usize, k: usize, res: &mut VecZnx<<B as Backend>::BufMut<'_>>, res_col: usize, a: &VecZnx<<B as Backend>::BufRef<'_>>, a_col: usize, a_coeff: usize, res_coeff: usize, scratch: &mut ScratchArena<'_, B>, )

Source§

impl<B> VecZnxRshAddIntoBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_rsh_add_into_backend( &self, base2k: usize, k: usize, res: &mut VecZnx<<B as Backend>::BufMut<'_>>, res_col: usize, a: &VecZnx<<B as Backend>::BufRef<'_>>, a_col: usize, scratch: &mut ScratchArena<'_, B>, )

Right shift by k bits all columns of a.
Source§

impl<B> VecZnxRshAssignBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_rsh_assign_backend( &self, base2k: usize, k: usize, a: &mut VecZnx<<B as Backend>::BufMut<'_>>, a_col: usize, scratch: &mut ScratchArena<'_, B>, )

Right shift by k bits all columns of a.
Source§

impl<B> VecZnxRshBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_rsh_backend( &self, base2k: usize, k: usize, res: &mut VecZnx<<B as Backend>::BufMut<'_>>, res_col: usize, a: &VecZnx<<B as Backend>::BufRef<'_>>, a_col: usize, scratch: &mut ScratchArena<'_, B>, )

Right shift by k bits all columns of a.
Source§

impl<B> VecZnxRshCoeffBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_rsh_coeff_backend( &self, base2k: usize, k: usize, res: &mut VecZnx<<B as Backend>::BufMut<'_>>, res_col: usize, a: &VecZnx<<B as Backend>::BufRef<'_>>, a_col: usize, a_coeff: usize, scratch: &mut ScratchArena<'_, B>, )

Source§

impl<B> VecZnxRshSubBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_rsh_sub_backend( &self, base2k: usize, k: usize, res: &mut VecZnx<<B as Backend>::BufMut<'_>>, res_col: usize, a: &VecZnx<<B as Backend>::BufRef<'_>>, a_col: usize, scratch: &mut ScratchArena<'_, B>, )

Right shift by k bits and subtract from destination.
Source§

impl<B> VecZnxRshSubCoeffIntoBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_rsh_sub_coeff_into_backend( &self, base2k: usize, k: usize, res: &mut VecZnx<<B as Backend>::BufMut<'_>>, res_col: usize, a: &VecZnx<<B as Backend>::BufRef<'_>>, a_col: usize, a_coeff: usize, res_coeff: usize, scratch: &mut ScratchArena<'_, B>, )

Source§

impl<B> VecZnxRshTmpBytes for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

impl<B> VecZnxScalarProduct<B> for Module<B>
where B: Backend + HalVecZnxBigImpl<B>,

Source§

fn vec_znx_scalar_product( &self, res: &mut VecZnxBig<<B as Backend>::BufMut<'_>, B>, res_col: usize, a: &VecZnx<<B as Backend>::BufRef<'_>>, a_col: usize, b: &ScalarZnx<<B as Backend>::BufRef<'_>>, b_col: usize, )

Source§

impl<B> VecZnxSplitRingBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_split_ring_backend( &self, res: &mut [VecZnx<<B as Backend>::BufMut<'_>>], res_col: usize, a: &VecZnx<<B as Backend>::BufRef<'_>>, a_col: usize, scratch: &mut ScratchArena<'_, B>, )

Splits the selected columns of b into subrings and copies them them into the selected column of res. Read more
Source§

impl<B> VecZnxSplitRingTmpBytes for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

impl<B> VecZnxSubAssignBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_sub_assign_backend( &self, res: &mut VecZnx<<B as Backend>::BufMut<'_>>, res_col: usize, a: &VecZnx<<B as Backend>::BufRef<'_>>, a_col: usize, )

Source§

impl<B> VecZnxSubBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_sub_backend( &self, res: &mut VecZnx<<B as Backend>::BufMut<'_>>, res_col: usize, a: &VecZnx<<B as Backend>::BufRef<'_>>, a_col: usize, b: &VecZnx<<B as Backend>::BufRef<'_>>, b_col: usize, )

Source§

impl<B> VecZnxSubNegateAssignBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_sub_negate_assign_backend( &self, res: &mut VecZnx<<B as Backend>::BufMut<'_>>, res_col: usize, a: &VecZnx<<B as Backend>::BufRef<'_>>, a_col: usize, )

Source§

impl<B> VecZnxSubScalarAssignBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_sub_scalar_assign_backend( &self, res: &mut VecZnx<<B as Backend>::BufMut<'_>>, res_col: usize, res_limb: usize, a: &ScalarZnx<<B as Backend>::BufRef<'_>>, a_col: usize, )

Source§

impl<B> VecZnxSubScalarBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_sub_scalar_backend( &self, res: &mut VecZnx<<B as Backend>::BufMut<'_>>, res_col: usize, a: &ScalarZnx<<B as Backend>::BufRef<'_>>, a_col: usize, b: &VecZnx<<B as Backend>::BufRef<'_>>, b_col: usize, b_limb: usize, )

Source§

impl<B> VecZnxSwitchRingBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_switch_ring_backend( &self, res: &mut VecZnx<<B as Backend>::BufMut<'_>>, res_col: usize, a: &VecZnx<<B as Backend>::BufRef<'_>>, a_col: usize, )

Source§

impl<B> VecZnxZeroBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_zero_backend( &self, res: &mut VecZnx<<B as Backend>::BufMut<'_>>, res_col: usize, )

Source§

impl<B> VmpApplyDft<B> for Module<B>
where B: Backend + HalVmpImpl<B>,

Source§

fn vmp_apply_dft<R>( &self, res: &mut R, a: &VecZnx<<B as Backend>::BufRef<'_>>, b: &VmpPMat<<B as Backend>::BufRef<'_>, B>, scratch: &mut ScratchArena<'_, B>, )

Source§

impl<B> VmpApplyDftTmpBytes for Module<B>
where B: Backend + HalVmpImpl<B>,

Source§

fn vmp_apply_dft_tmp_bytes( &self, res_size: usize, a_size: usize, b_rows: usize, b_cols_in: usize, b_cols_out: usize, b_size: usize, ) -> usize

Source§

impl<B> VmpApplyDftToDft<B> for Module<B>
where B: Backend + HalVmpImpl<B>,

Source§

fn vmp_apply_dft_to_dft( &self, res: &mut VecZnxDft<<B as Backend>::BufMut<'_>, B>, a: &VecZnxDft<<B as Backend>::BufRef<'_>, B>, b: &VmpPMat<<B as Backend>::BufRef<'_>, B>, limb_offset: usize, scratch: &mut ScratchArena<'_, B>, )

Applies the vector matrix product crate::layouts::VecZnxDft x crate::layouts::VmpPMat. Read more
Source§

impl<B> VmpApplyDftToDftAccumulate<B> for Module<B>
where B: Backend + HalVmpImpl<B>,

Source§

fn vmp_apply_dft_to_dft_accumulate( &self, res: &mut VecZnxDft<<B as Backend>::BufMut<'_>, B>, a: &VecZnxDft<<B as Backend>::BufRef<'_>, B>, b: &VmpPMat<<B as Backend>::BufRef<'_>, B>, limb_offset: usize, scratch: &mut ScratchArena<'_, B>, )

Fused res += a · pmat, shifted by limb_offset limbs.
Source§

impl<B> VmpApplyDftToDftAccumulateTmpBytes for Module<B>
where B: Backend + HalVmpImpl<B>,

Source§

fn vmp_apply_dft_to_dft_accumulate_tmp_bytes( &self, res_size: usize, a_size: usize, b_rows: usize, b_cols_in: usize, b_cols_out: usize, b_size: usize, ) -> usize

Source§

impl<B> VmpApplyDftToDftTmpBytes for Module<B>
where B: Backend + HalVmpImpl<B>,

Source§

fn vmp_apply_dft_to_dft_tmp_bytes( &self, res_size: usize, a_size: usize, b_rows: usize, b_cols_in: usize, b_cols_out: usize, b_size: usize, ) -> usize

Source§

impl<B> VmpPMatAlloc<B> for Module<B>
where B: Backend,

Source§

fn vmp_pmat_alloc( &self, rows: usize, cols_in: usize, cols_out: usize, size: usize, ) -> VmpPMat<<B as Backend>::OwnedBuf, B>

Source§

impl<B> VmpPMatBytesOf for Module<B>
where B: Backend,

Source§

fn bytes_of_vmp_pmat( &self, rows: usize, cols_in: usize, cols_out: usize, size: usize, ) -> usize

Source§

impl<B> VmpPrepare<B> for Module<B>
where B: Backend + HalVmpImpl<B>,

Source§

fn vmp_prepare( &self, res: &mut VmpPMat<<B as Backend>::BufMut<'_>, B>, a: &MatZnx<<B as Backend>::BufRef<'_>>, scratch: &mut ScratchArena<'_, B>, )

Source§

impl<B> VmpPrepareTmpBytes for Module<B>
where B: Backend + HalVmpImpl<B>,

Source§

fn vmp_prepare_tmp_bytes( &self, rows: usize, cols_in: usize, cols_out: usize, size: usize, ) -> usize

Source§

impl<B> VmpZero<B> for Module<B>
where B: Backend + HalVmpImpl<B>,

Source§

fn vmp_zero(&self, res: &mut VmpPMat<<B as Backend>::BufMut<'_>, B>)

Source§

impl<B> Send for Module<B>
where B: Backend,

Source§

impl<B> Sync for Module<B>
where B: Backend,

Auto Trait Implementations§

§

impl<B> Freeze for Module<B>

§

impl<B> RefUnwindSafe for Module<B>

§

impl<B> Unpin for Module<B>
where B: Unpin,

§

impl<B> UnsafeUnpin for Module<B>

§

impl<B> UnwindSafe for Module<B>

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
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

Source§

impl<M> TestContextHostModule for M

Source§

impl<BE, M> TestContextModule<BE> for M