PALISADE Lattice Crypto Library  1.11.9
A lattice crypto library for software engineers by software engineers.
Static Public Member Functions | List of all members
lbcrypto::LatticeGaussSampUtility< Element > Class Template Reference

Utility class containing operations needed for lattice sampling; Sources: https://eprint.iacr.org/2017/844.pdf and https://eprint.iacr.org/2017/308.pdf This construction is based on the hardness of Ring-LWE problem. More...

#include <dgsampling.h>

Static Public Member Functions

static void GaussSampGq (const Element &u, double stddev, size_t k, const typename Element::Integer &q, int64_t base, typename Element::DggType &dgg, Matrix< int64_t > *z)
 
static void GaussSampGqArbBase (const Element &u, double stddev, size_t k, const typename Element::Integer &q, int64_t base, typename Element::DggType &dgg, Matrix< int64_t > *z)
 
static void ZSampleSigma2x2 (const Field2n &a, const Field2n &b, const Field2n &d, const Matrix< Field2n > &c, const typename Element::DggType &dgg, shared_ptr< Matrix< int64_t >> p)
 
static void SampleMat (const Matrix< Field2n > &A, const Matrix< Field2n > &B, const Matrix< Field2n > &D, const Matrix< Field2n > &C, const typename Element::DggType &dgg, shared_ptr< Matrix< int64_t >> p)
 
static shared_ptr< Matrix< int64_t > > ZSampleF (const Field2n &f, const Field2n &c, const typename Element::DggType &dgg, size_t n)
 

Detailed Description

template<class Element>
class lbcrypto::LatticeGaussSampUtility< Element >

Utility class containing operations needed for lattice sampling; Sources: https://eprint.iacr.org/2017/844.pdf and https://eprint.iacr.org/2017/308.pdf This construction is based on the hardness of Ring-LWE problem.

Member Function Documentation

◆ GaussSampGq()

template<class Element >
void lbcrypto::LatticeGaussSampUtility< Element >::GaussSampGq ( const Element &  u,
double  stddev,
size_t  k,
const typename Element::Integer &  q,
int64_t  base,
typename Element::DggType &  dgg,
Matrix< int64_t > *  z 
)
static

Gaussian sampling from lattice for gagdet matrix G, syndrome u, and arbitrary modulus q Discrete sampling variant As described in Figure 2 of https://eprint.iacr.org/2017/308.pdf

Parameters
usyndrome (a polynomial)
sttdevstandard deviation
knumber of components in the gadget vector
qinteger modulus
basebase of gadget matrix
dggdiscrete Gaussian generator
*za set of k sampled polynomials corresponding to the gadget matrix G; represented as Z^(k x n)

◆ GaussSampGqArbBase()

template<class Element >
void lbcrypto::LatticeGaussSampUtility< Element >::GaussSampGqArbBase ( const Element &  u,
double  stddev,
size_t  k,
const typename Element::Integer &  q,
int64_t  base,
typename Element::DggType &  dgg,
Matrix< int64_t > *  z 
)
static

Gaussian sampling from lattice for gagdet matrix G, syndrome u, and arbitrary modulus q Continuous sampling variant As described in Algorithm 3 of https://eprint.iacr.org/2017/844.pdf

Parameters
usyndrome (a polynomial)
sttdevstandard deviation
knumber of components in the gadget vector
qinteger modulus
basebase of gadget matrix
dggdiscrete Gaussian generator
*za set of k sampled polynomials corresponding to the gadget matrix G; represented as Z^(k x n)

◆ SampleMat()

template<class Element >
void lbcrypto::LatticeGaussSampUtility< Element >::SampleMat ( const Matrix< Field2n > &  A,
const Matrix< Field2n > &  B,
const Matrix< Field2n > &  D,
const Matrix< Field2n > &  C,
const typename Element::DggType &  dgg,
shared_ptr< Matrix< int64_t >>  p 
)
static

Subroutine used by SamplePertSquareMat as described in "Implementing Token-Based Obfuscation under (Ring) LWE"

Parameters
Aa matrix of field elements in DFT format
Ba matrix of field elements in DFT format
Da matrix of field elements in DFT format
Ca matrix of field elements in Coefficient format
dggdiscrete Gaussian generator
*pnon-spherical perturbation matrix; output of the function

◆ ZSampleF()

template<class Element >
shared_ptr< Matrix< int64_t > > lbcrypto::LatticeGaussSampUtility< Element >::ZSampleF ( const Field2n f,
const Field2n c,
const typename Element::DggType &  dgg,
size_t  n 
)
static

Subroutine used by ZSampleSigma2x2 as described Algorithm 4 in https://eprint.iacr.org/2017/844.pdf

Parameters
ffield element in Coefficient format
cfield element in Coefficient format
dggdiscrete Gaussian generator
nring dimension used for rejection sampling

◆ ZSampleSigma2x2()

template<class Element >
void lbcrypto::LatticeGaussSampUtility< Element >::ZSampleSigma2x2 ( const Field2n a,
const Field2n b,
const Field2n d,
const Matrix< Field2n > &  c,
const typename Element::DggType &  dgg,
shared_ptr< Matrix< int64_t >>  p 
)
static

Subroutine used by ZSampleSigmaP as described Algorithm 4 in https://eprint.iacr.org/2017/844.pdf

Parameters
afield element in DFT format
bfield element in DFT format
dfield element in DFT format
ca vector of field elements in Coefficient format
dggdiscrete Gaussian generator
pnon-spherical perturbation vector; output of the function

The documentation for this class was generated from the following files: