Class StdLatticeParm
Defined in File stdlatticeparms.h
Page Contents
Class Documentation
-
class lbcrypto::StdLatticeParm
One row of the Homomorphic Encryption Standard parameter tables: for a secret key distribution, a ring dimension, and a security level, the largest supported bit size of the ciphertext modulus. The rows are stored in a static table and indexed by (distribution, security level), then by ring dimension (FindMaxQ) or by modulus bit size (FindRingDim).
Public Functions
-
inline StdLatticeParm(DistributionType distType, uint32_t ringDim, SecurityLevel minSecLev, uint32_t maxLogQ)
Constructs one table row.
- Parameters
distType – secret key distribution
ringDim – ring dimension
minSecLev – security level the row is certified for
maxLogQ – largest supported bit size of the ciphertext modulus
-
inline DistributionType getDistType() const
-
inline uint32_t getRingDim() const
-
inline SecurityLevel getMinSecLev() const
-
inline uint32_t getMaxLogQ() const
Public Static Functions
-
static inline void initializeLookups()
Builds the lookup maps (by ring dimension and by modulus bit size) from the static table of rows. Called on first use by FindMaxQ and FindRingDim.
-
static inline uint32_t FindMaxQ(DistributionType distType, SecurityLevel minSecLev, uint32_t ringDim)
Looks up the largest supported ciphertext modulus bit size for a ring dimension.
- Parameters
distType – secret key distribution
minSecLev – required security level
ringDim – ring dimension
- Returns
the maximum log2 of the ciphertext modulus, or 0 if the table has no row for this ring dimension
-
static inline uint32_t FindRingDim(DistributionType distType, SecurityLevel minSecLev, uint32_t curLogQ)
Finds the smallest tabulated ring dimension whose maximum modulus bit size is at least curLogQ.
- Parameters
distType – secret key distribution
minSecLev – required security level
curLogQ – log2 of the ciphertext modulus
- Returns
the ring dimension, or twice the largest tabulated ring dimension if curLogQ exceeds every table row
-
inline StdLatticeParm(DistributionType distType, uint32_t ringDim, SecurityLevel minSecLev, uint32_t maxLogQ)