Class CryptoParametersRNS

Inheritance Relationships

Base Type

Derived Types

Class Documentation

class lbcrypto::CryptoParametersRNS : public lbcrypto::CryptoParametersRLWE<DCRTPoly>

Inheritence diagram for lbcrypto::CryptoParametersRNS:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "4" [label="lbcrypto::Serializable" tooltip="lbcrypto::Serializable"]
    "5" [label="lbcrypto::CryptoParametersBFVRNS" tooltip="lbcrypto::CryptoParametersBFVRNS"]
    "3" [label="lbcrypto::CryptoParametersBase< Element >" tooltip="lbcrypto::CryptoParametersBase< Element >"]
    "6" [label="lbcrypto::CryptoParametersBGVRNS" tooltip="lbcrypto::CryptoParametersBGVRNS"]
    "1" [label="lbcrypto::CryptoParametersRNS" tooltip="lbcrypto::CryptoParametersRNS" fillcolor="#BFBFBF"]
    "7" [label="lbcrypto::CryptoParametersCKKSRNS" tooltip="lbcrypto::CryptoParametersCKKSRNS"]
    "2" [label="lbcrypto::CryptoParametersRLWE< DCRTPoly >" tooltip="lbcrypto::CryptoParametersRLWE< DCRTPoly >"]
    "5" -> "1" [dir=forward tooltip="public-inheritance"]
    "3" -> "4" [dir=forward tooltip="public-inheritance"]
    "6" -> "1" [dir=forward tooltip="public-inheritance"]
    "1" -> "2" [dir=forward tooltip="public-inheritance"]
    "7" -> "1" [dir=forward tooltip="public-inheritance"]
    "2" -> "3" [dir=forward tooltip="public-inheritance"]
}

Collaboration diagram for lbcrypto::CryptoParametersRNS:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "6" [label="lbcrypto::BigIntegerInterface< NativeIntegerT< NativeInt > >" tooltip="lbcrypto::BigIntegerInterface< NativeIntegerT< NativeInt > >"]
    "5" [label="intnat::NativeIntegerT< NativeInt >" tooltip="intnat::NativeIntegerT< NativeInt >"]
    "4" [label="lbcrypto::Serializable" tooltip="lbcrypto::Serializable"]
    "3" [label="lbcrypto::CryptoParametersBase< Element >" tooltip="lbcrypto::CryptoParametersBase< Element >"]
    "1" [label="lbcrypto::CryptoParametersRNS" tooltip="lbcrypto::CryptoParametersRNS" fillcolor="#BFBFBF"]
    "2" [label="lbcrypto::CryptoParametersRLWE< DCRTPoly >" tooltip="lbcrypto::CryptoParametersRLWE< DCRTPoly >"]
    "5" -> "6" [dir=forward tooltip="public-inheritance"]
    "3" -> "4" [dir=forward tooltip="public-inheritance"]
    "1" -> "2" [dir=forward tooltip="public-inheritance"]
    "1" -> "5" [dir=forward tooltip="usage"]
    "2" -> "3" [dir=forward tooltip="public-inheritance"]
}

main implementation class to capture essential cryptoparameters of any LBC system. As CryptoParametersRNS is not an abstract class and we don’t want to instantiate, then we make all its constructors and the destructor protected

Subclassed by lbcrypto::CryptoParametersBFVRNS, lbcrypto::CryptoParametersBGVRNS, lbcrypto::CryptoParametersCKKSRNS

Public Functions

virtual void PrecomputeCRTTables(KeySwitchTechnique ksTech, ScalingTechnique scalTech, EncryptionTechnique encTech, MultiplicationTechnique multTech, uint32_t numPartQ, uint32_t auxBits, uint32_t extraBits) = 0

Computes all tables needed for decryption, homomorphic multiplication and key switching. Even though this is a pure virtual function and must be overriden in all derived classes, PrecomputeCRTTables() has its own implementation in the source file. It should be called from derived classes’ PrecomputeCRTTables() only and must not be called from CryptoParametersRNS::load().

Parameters
  • ksTech – the technique to use for key switching (e.g., BV or GHS).

  • scalTech – the technique to use for scaling (e.g., FLEXIBLEAUTO or FIXEDMANUAL).

  • encTech – the technique to use for encryption (STANDARD or EXTENDED).

  • multTech – the technique to use for homomorphic multiplication (e.g., HPS or BEHZ).

  • numPartQ – the number of digits (partitions of Q) for HYBRID key switching.

  • auxBits – the number of bits in the auxiliary (special) prime moduli.

  • extraBits – the number of extra bits reserved for the auxiliary modulus in HYBRID key switching.

virtual uint64_t FindAuxPrimeStep() const

Returns the step used when searching for the auxiliary (special) primes of HYBRID key switching: every auxiliary prime p is chosen such that p = 1 (mod step) so that the required roots of unity exist. The base implementation returns the ring dimension; the schemes override it (2n for BFV, lcm(2n, t) for BGV).

Returns

the modulus step for the auxiliary prime search.

inline KeySwitchTechnique GetKeySwitchTechnique() const

Method to retrieve the technique to be used for key switching.

Returns

the key switching technique.

inline ScalingTechnique GetScalingTechnique() const

Method to retrieve the technique to be used for scaling.

Returns

the scaling technique.

inline EncryptionTechnique GetEncryptionTechnique() const

Method to retrieve the technique to be used for encryption.

Returns

the encryption technique.

inline MultiplicationTechnique GetMultiplicationTechnique() const

Method to retrieve the technique to be used for homomorphic multiplication.

Returns

the multiplication technique.

inline uint32_t GetAuxBits() const

Returns the bit size of the auxiliary (special) primes P used in HYBRID key switching.

Returns

the number of bits in each auxiliary prime.

inline uint32_t GetExtraBits() const

Returns the number of extra bits reserved in the auxiliary modulus of HYBRID key switching (used by the FLEXIBLEAUTOEXT technique to lower the key switching noise).

Returns

the number of extra bits.

inline virtual const std::shared_ptr<ILDCRTParams<BigInteger>> GetParamsPK() const override

Returns the element parameters used for public/secret key generation. These are the extended basis QP when HYBRID key switching is used with proxy re-encryption enabled, the basis Qr when BFV EXTENDED encryption is used, and the ciphertext basis Q otherwise.

Returns

the CRT parameters of the key basis.

inline const std::vector<NativeInteger> &GettModqPrecon() const

Method that returns the NTL precomputions for [t]_{q_i}

Returns

the pre-computed values.

inline NativeInteger GetNegtInvModq(uint32_t l) const

Get the precomputed value [-t^{-1}]_{q_l}

Parameters

l – index of the tower q_l.

Returns

the pre-computed value.

inline NativeInteger GetNegtInvModqPrecon(uint32_t l) const

Method that returns the NTL precomputions for [-t^{-1}]_{q_l}

Parameters

l – index of the tower q_l.

Returns

the pre-computed value.

inline const std::vector<NativeInteger> &GetqlInvModq(size_t i) const

Gets the precomputed table of [q_i^{-1}]_{q_j}

Parameters

i – index of the tower q_i being dropped.

Returns

the precomputed table

inline const std::vector<NativeInteger> &GetqlInvModqPrecon(size_t i) const

Gets the NTL precomputions for [q_i^{-1}]_{q_j}

Parameters

i – index of the tower q_i being dropped.

Returns

the precomputed table

inline const std::shared_ptr<ILDCRTParams<BigInteger>> GetParamsQP() const

Gets Q*P CRT basis Q*P = {q_1,…,q_l,p_1,…,p_k} Used in Hybrid key switch generation

Returns

the precomputed CRT params

inline uint32_t GetNumPartQ() const

Method that returns the number of digits. Used in Hybrid key switch generation

Returns

the number of digits.

inline const std::vector<NativeInteger> &GetPModq() const

Gets the precomputed table of [P]_{q_i} Used in Hybrid key switch generation.

Returns

the precomputed table

inline const std::shared_ptr<ILDCRTParams<BigInteger>> GetParamsP() const

Gets the Auxiliary CRT basis {P} = {p_1,…,p_k} Used in Hybrid key switching

Returns

the parameters CRT params

inline const std::shared_ptr<ILDCRTParams<BigInteger>> GetParamsQlHybrid(uint32_t sizeQl) const

Gets params for the first sizeQl towers of Q, used in HYBRID KeySwitchDown and returns a cached entry.

Parameters

sizeQl – number of Q towers to include (1 to GetElementParams()->GetParams().size()).

Returns

shared_ptr to ILDCRTParams for the first sizeQl Q moduli.

inline uint32_t GetNumPerPartQ() const

Method that returns the number of towers within every digit. This is the alpha parameter from the paper (see documentation for KeySwitchHHybrid). Used in Hybrid key switching

Returns

the number of towers per digit.

inline uint32_t GetNumberOfQPartitions() const

Method that returns the number of partitions. Used in Hybrid key switching

Returns

the number of partitions.

inline const std::shared_ptr<ILDCRTParams<BigInteger>> &GetParamsPartQ(uint32_t part) const

Method that returns the element parameters corresponding to partitions {Q_j} of Q. Used in Hybrid key switching

Parameters

part – index of the partition (digit).

Returns

the pre-computed values.

inline const std::shared_ptr<ILDCRTParams<BigInteger>> &GetParamsComplPartQ(uint32_t numTowers, uint32_t digit) const

Method that returns the element parameters corresponding to the complementary basis of a single digit j, i.e., the basis consisting of all other digits plus the special primes.

Parameters
  • numTowers – number of towers in the ciphertext minus 1 (the table is indexed by sizeQl - 1).

  • digit – is the index of the digit we want to get the complementary partition from.

Returns

the partitions.

inline const std::vector<NativeInteger> &GetPartQlHatInvModq(uint32_t part, uint32_t sublvl) const

Method that returns the precomputed values for QHat^-1 mod qj within a partition of towers, used in HYBRID.

Parameters
  • part – index of the partition (digit).

  • sublvl – number of towers in the partition minus 1.

Returns

the pre-computed values.

inline const std::vector<NativeInteger> &GetPartQlHatInvModqPrecon(uint32_t part, uint32_t sublvl) const

NTL precomputations getter for QHat^-1 mod qj within a partition of towers, used in HYBRID.

Parameters
  • part – index of the partition (digit).

  • sublvl – number of towers in the partition minus 1.

Returns

the pre-computed values.

inline const std::vector<std::vector<NativeInteger>> &GetPartQlHatModp(uint32_t lvl, uint32_t part) const

Getter for the table containing [PartQHat]_{p_j}, used in HYBRID.

Parameters
  • lvl – number of towers in the ciphertext minus 1.

  • part – index of the partition (digit).

Returns

the pre-computed values.

inline const std::vector<DoubleNativeInt> &GetmodComplPartqBarrettMu(uint32_t lvl, uint32_t part) const

Barrett multiplication precomputations getter for the complementary partition basis, used in HYBRID.

Parameters
  • lvl – number of towers in the ciphertext minus 1.

  • part – index of the partition (digit).

Returns

the pre-computed values.

inline const std::vector<NativeInteger> &GetPInvModq() const

Gets the precomputed table of [P^{-1}]_{q_i} Used in GHS key switching

See more in “A full RNS variant of approximate homomorphic

encryption” by Cheon, et. al. Section 4.

Returns

the precomputed table

inline const std::vector<NativeInteger> &GetPInvModqPrecon() const

Gets the NTL precomputions for [P^{-1}]_{q_i} Used for speeding up GHS key switching.

Returns

the precomputed table

inline const std::vector<NativeInteger> &GetPHatInvModp() const

Get the precomputed table of [(P/p_j)^{-1}]_{p_j} Used in GHS key switching.

See more in “A full RNS variant of approximate homomorphic

encryption” by Cheon, et. al. Section 4.

Returns

the precomputed table

inline const std::vector<NativeInteger> &GetPHatInvModpPrecon() const

Get the NTL precomputions for [(P/p_j)^{-1}]_{p_j}

Returns

the precomputed table

inline const std::vector<std::vector<NativeInteger>> &GetPHatModq() const

Gets the precomputed table of [P/p_j]_{q_i} Used in GHS key switching.

See more in “A full RNS variant of approximate homomorphic

encryption” by Cheon, et. al. Section 4.

Returns

the precomputed table

inline const std::vector<DoubleNativeInt> &GetModqBarrettMu() const

Gets the Barrett modulo reduction precomputation for q_i

Returns

the precomputed table

inline const std::vector<NativeInteger> &GettInvModq() const

Method that returns the precomputed values for [t^(-1)]_{q_i} Used in ModulusSwitching.

Returns

the pre-computed values.

inline const std::vector<NativeInteger> &GettInvModqPrecon() const

Method that returns the NTL precomputions for [t^{-1}]_{q_i}

Returns

the pre-computed values.

inline const std::vector<NativeInteger> &GettInvModp() const

Method that returns the precomputed values for [t^(-1)]_{p_j} Used in KeySwitching.

Returns

the pre-computed values.

inline const std::vector<NativeInteger> &GettInvModpPrecon() const

Method that returns the NTL precomputions for [t^{-1}]_{p_j}

Returns

the pre-computed values.

inline double GetScalingFactorReal(uint32_t l = 0) const

Method to retrieve the scaling factor of level l. For FIXEDMANUAL scaling technique method always returns 2^p, where p corresponds to plaintext modulus

Parameters

l – For FLEXIBLEAUTO and COMPOSITESCALING scaling techniques the level whose scaling factor we want to learn. Levels start from 0 (no scaling done - all towers) and go up to K-1, where K is the number of towers supported.

Returns

the scaling factor.

inline double GetScalingFactorRealBig(uint32_t l = 0) const

Method to retrieve the scaling factor of a ciphertext of noise scale degree 2 at level l, i.e., the product of the scaling factors of the two multiplied operands (used for CKKS FLEXIBLEAUTO, FLEXIBLEAUTOEXT and COMPOSITESCALING). For the other scaling techniques it returns the square of the fixed scaling factor 2^p.

Parameters

l – the level (levels start from 0 with all towers present); if l is beyond the precomputed table, the fixed scaling factor is returned.

Returns

the scaling factor of a degree-2 ciphertext.

inline double GetModReduceFactor(uint32_t l = 0) const

Method to retrieve the modulus to be dropped of level l. For FIXEDMANUAL rescaling technique method always returns 2^p, where p corresponds to plaintext modulus

Parameters

l – index of modulus to be dropped for FLEXIBLEAUTO and COMPOSITESCALING scaling techniques

Returns

the precomputed table

inline uint32_t GetCompositeDegree() const

Returns the composite scaling degree d. Its values is determined at runtime based on input scaling factor and architecture register size (e.g., 32 bits, 48 bits, 64 bits). This parameter is only relevant when using the CKKS scheme with the COMPOSITESCALING scaling techniques.

Returns

the composite degree value for COMPOSITESCALING scaling technique

inline uint32_t GetRegisterWordSize() const

Returns the architecture register word size (e.g., 32 bits, 48 bits, 64 bits). Used to determine the size of prime moduli in the CKKS scheme on composite scaling mode (COMPOSITESCALINGAUTO).

Returns

the register word size for COMPOSITESCALING scaling technique

inline NativeInteger GetNegQModt(uint32_t i = 0) const

Gets the precomputed value [-Q_l]_t, where Q_l is the ciphertext modulus with the last i towers dropped. Used in BFV encryption and plaintext addition to scale the plaintext by Q_l/t.

Parameters

i – number of RNS limbs dropped from the full modulus Q (0 for a fresh full-modulus ciphertext).

Returns

the precomputed value.

inline NativeInteger GetNegQModtPrecon(uint32_t i = 0) const

Gets the NTL precomputation for [-Q_l]_t.

Parameters

i – number of RNS limbs dropped from the full modulus Q (0 for a fresh full-modulus ciphertext).

Returns

the precomputed value.

inline NativeInteger GetNegQrModt() const

Gets the precomputed value [-Q*r]_t used in BFV encryption in EXTENDED mode, where r is the extra prime.

Returns

the precomputed value.

inline NativeInteger GetNegQrModtPrecon() const

Gets the NTL precomputation for [-Q*r]_t used in BFV encryption in EXTENDED mode.

Returns

the precomputed value.

inline const std::vector<NativeInteger> &GettInvModqr() const

Method that returns the precomputed values for [t^(-1)]_{a} where a is from {q_i} U r Used in ModulusSwitching.

Returns

the pre-computed values.

inline const std::shared_ptr<ILDCRTParams<BigInteger>> GetParamsQl(uint32_t l = 0) const

Gets the CRT basis {Q_l} = {q_0,…,q_l} used in BFV homomorphic multiplication. For HPS only index 0 (the full basis Q) is available.

Parameters

l – index of the leveled parameter set (number of towers in Q_l minus 1; used in HPSPOVERQLEVELED).

Returns

the precomputed CRT params.

inline const std::vector<double> &GetQlQHatInvModqDivqFrac(uint32_t l) const

Gets the precomputed fractional parts {[Q_l*(Q/q_j)^{-1}]_{q_j}/q_j} for the moduli q_j of Q that are not in Q_l. Used to scale a polynomial from basis Q down to Q_l in HPSPOVERQLEVELED.

Parameters

l – index of the leveled parameter set (number of towers in Q_l minus 1).

Returns

the precomputed table.

inline const std::vector<std::vector<NativeInteger>> &GetQlQHatInvModqDivqModq(uint32_t l) const

Gets the precomputed table of [floor(Q_l*(Q/q_j)^{-1}/q_j)]_{q_i} for q_i in Q_l and q_j in Q (the last entry of each row corresponds to q_j = q_i). Used to scale a polynomial from basis Q down to Q_l in HPSPOVERQLEVELED.

Parameters

l – index of the leveled parameter set (number of towers in Q_l minus 1).

Returns

the precomputed table.

inline const std::shared_ptr<ILDCRTParams<BigInteger>> GetParamsRl(uint32_t l = 0) const

Gets the Auxiliary CRT basis {R} = {r_1,…,r_k} used in homomorphic multiplication

Parameters

l – index of the leveled parameter set (number of towers in Q_l minus 1; used in HPSPOVERQLEVELED).

Returns

the precomputed CRT params

inline const std::shared_ptr<ILDCRTParams<BigInteger>> GetParamsQlRl(uint32_t l = 0) const

Gets the Auxiliary expanded CRT basis {S} = {Q*R} = {{q_i},{r_k}} used in homomorphic multiplication

Parameters

l – index of the leveled parameter set (number of towers in Q_l minus 1; used in HPSPOVERQLEVELED).

Returns

the precomputed CRT params

inline const std::vector<NativeInteger> &GetQlHatInvModq(uint32_t l = 0) const

Gets the precomputed table of [(Q_l/q_i)^{-1}]_{q_i}

Parameters

l – index of the leveled parameter set (number of towers in Q_l minus 1; used in HPSPOVERQLEVELED).

Returns

the precomputed table

inline const std::vector<NativeInteger> &GetQlHatInvModqPrecon(uint32_t l = 0) const

Gets the NTL precomputations for [(Q_l/q_i)^{-1}]_{q_i}

Parameters

l – index of the leveled parameter set (number of towers in Q_l minus 1; used in HPSPOVERQLEVELED).

Returns

the precomputed table

inline const std::vector<std::vector<NativeInteger>> &GetQlHatModr(uint32_t l = 0) const

Gets the precomputed table of [Q_l/q_i]_{r_k}

Parameters

l – index of the leveled parameter set (number of towers in Q_l minus 1; used in HPSPOVERQLEVELED).

Returns

the precomputed table

inline const std::vector<std::vector<NativeInteger>> &GetalphaQlModr(uint32_t l = 0) const

Gets the precomputed table of [alpha*Q_l]_{r_k}

Parameters

l – index of the leveled parameter set (number of towers in Q_l minus 1; used in HPSPOVERQLEVELED).

Returns

the precomputed table

inline const std::vector<NativeInteger> &GetmNegRlQHatInvModq(uint32_t l = 0) const

Gets the precomputed table of [-R_l*(Q/q_i)^{-1}]_{q_i} used for the fast basis extension from Q to R_l (HPSPOVERQ and HPSPOVERQLEVELED).

Parameters

l – index of the leveled parameter set (number of towers in R_l minus 1).

Returns

the precomputed table.

inline const std::vector<NativeInteger> &GetmNegRlQHatInvModqPrecon(uint32_t l = 0) const

Gets the NTL precomputations for [-R_l*(Q/q_i)^{-1}]_{q_i}.

Parameters

l – index of the leveled parameter set (number of towers in R_l minus 1).

Returns

the precomputed table.

inline const std::vector<NativeInteger> &GetmNegRlQlHatInvModq(uint32_t l = 0) const

Gets the precomputed table of [-R_l*(Q_l/q_i)^{-1}]_{q_i} used for the fast basis extension from Q_l to R_l when the ciphertext has already been compressed to Q_l (HPSPOVERQ and HPSPOVERQLEVELED).

Parameters

l – index of the leveled parameter set (number of towers in Q_l and R_l minus 1).

Returns

the precomputed table.

inline const std::vector<NativeInteger> &GetmNegRlQlHatInvModqPrecon(uint32_t l = 0) const

Gets the NTL precomputations for [-R_l*(Q_l/q_i)^{-1}]_{q_i}.

Parameters

l – index of the leveled parameter set (number of towers in Q_l and R_l minus 1).

Returns

the precomputed table.

inline const std::vector<std::vector<NativeInteger>> &GetqInvModr() const

Gets the precomputed table of [q_i^{-1}]_{r_j} (indexed as [i][j]) used for the fast basis extension from Q to R in BFV homomorphic multiplication.

Returns

the precomputed table.

inline const std::vector<DoubleNativeInt> &GetModrBarrettMu() const

Gets the Barrett modulo reduction precomputations for r_k

Returns

the precomputed table

inline const std::vector<double> &GetqInv() const

Gets the precomputed table of 1./q_i

Returns

the precomputed table

inline const std::vector<double> &GettRSHatInvModsDivsFrac() const

For S = QR Gets the precomputed table of frac{[t*R*(S/s_m)^{-1}]_{s_m}/s_m}

Returns

the precomputed table

inline const std::vector<std::vector<NativeInteger>> &GettRSHatInvModsDivsModr() const

For S = QR Gets the precomputed table of [floor{t*R*(S/s_m)^{-1}/s_m}]_{r_k}

Returns

the precomputed table

inline const std::vector<NativeInteger> &GetRlHatInvModr(uint32_t l = 0) const

Gets the precomputed table of [(R_l/r_k)^{-1}]_{r_k}

Parameters

l – index of the leveled parameter set (number of towers in Q_l minus 1; used in HPSPOVERQLEVELED).

Returns

the precomputed table

inline const std::vector<NativeInteger> &GetRlHatInvModrPrecon(uint32_t l = 0) const

Gets the NTL precomputation for [(R_l/r_k)^{-1}]_{r_k}

Parameters

l – index of the leveled parameter set (number of towers in Q_l minus 1; used in HPSPOVERQLEVELED).

Returns

the precomputed table

inline const std::vector<std::vector<NativeInteger>> &GetRlHatModq(uint32_t l = 0) const

Gets the precomputed table of [R_l/r_k]_{q_i}

Parameters

l – index of the leveled parameter set (number of towers in Q_l minus 1; used in HPSPOVERQLEVELED).

Returns

the precomputed table

inline const std::vector<std::vector<NativeInteger>> &GetalphaRlModq(uint32_t l = 0) const

Gets the precomputed table of [alpha*R_l]_{q_i}

Parameters

l – index of the leveled parameter set (number of towers in Q_l minus 1; used in HPSPOVERQLEVELED).

Returns

the precomputed table

inline const std::vector<double> &GettQlSlHatInvModsDivsFrac(uint32_t l) const

For S_l = Q_l*R_l, gets the precomputed fractional parts {[t*Q_l*(S_l/r_j)^{-1}]_{r_j}/r_j} used to scale the product by t/R_l and round it back to basis Q_l (HPS, HPSPOVERQ and HPSPOVERQLEVELED).

Parameters

l – index of the leveled parameter set (number of towers in Q_l minus 1; only 0 for HPS).

Returns

the precomputed table.

inline const std::vector<std::vector<NativeInteger>> &GettQlSlHatInvModsDivsModq(uint32_t l) const

For S_l = Q_l*R_l, gets the precomputed table of [floor(t*Q_l*(S_l/s_m)^{-1}/s_m)]_{q_i} (the last entry of each row corresponds to s_m = q_i) used to scale the product by t/R_l and round it back to basis Q_l.

Parameters

l – index of the leveled parameter set (number of towers in Q_l minus 1; only 0 for HPS).

Returns

the precomputed table.

inline const std::vector<NativeInteger> &GetQlHatModq(uint32_t l) const

Gets the precomputed table of [Q/Q_l]_{q_i} for q_i in Q_l, used to expand a polynomial from basis Q_l back to the full basis Q in HPSPOVERQLEVELED.

Parameters

l – index of the leveled parameter set (number of towers in Q_l minus 1).

Returns

the precomputed table.

inline const std::vector<NativeInteger> &GetQlHatModqPrecon(uint32_t l) const

Gets the NTL precomputations for [Q/Q_l]_{q_i}.

Parameters

l – index of the leveled parameter set (number of towers in Q_l minus 1).

Returns

the precomputed table.

inline const std::vector<double> &GetrInv() const

Gets the precomputed table of 1./r_k

Returns

the precomputed table

inline const std::vector<double> &GettQHatInvModqDivqFrac() const

Gets the precomputed table of frac{t*{Q/q_i}^{-1}/q_i}

Returns

the precomputed table

inline const std::vector<double> &GettQHatInvModqBDivqFrac() const

When log2(q_i) >= 45 bits, B = floor[2^{ceil{log2(q_i)/2}} Gets the precomputed table of frac{t*{Q/q_i}^{-1}*B/q_i}

Returns

the precomputed table

inline const std::vector<NativeInteger> &GettQHatInvModqDivqModt() const

Gets the precomputed table of [floor{t*{Q/q_i}^{-1}/q_i}]_t

Returns

the precomputed table

inline const std::vector<NativeInteger> &GettQHatInvModqDivqModtPrecon() const

Gets the NTL precomputations for [floor{t*{Q/q_i}^{-1}/q_i}]_t

Returns

the precomputed table

inline const std::vector<NativeInteger> &GettQHatInvModqBDivqModt() const

When log2(q_i) >= 45 bits, B = floor[2^{ceil{log2(q_i)/2}} Gets the precomputed table of [floor{t*{Q/q_i}^{-1}*B/q_i}]_t

Returns

the precomputed table

inline const std::vector<NativeInteger> &GettQHatInvModqBDivqModtPrecon() const

When log2(q_i) >= 45 bits, B = floor[2^{ceil{log2(q_i)/2}} Gets the NTL precomputations for [floor{t*{Q/q_i}^{-1}*B/q_i}]_t

Returns

the precomputed table

inline NativeInteger GetScalingFactorInt(uint32_t l) const

Method to retrieve the BGV scaling factor (modulo the plaintext modulus t) of a ciphertext of noise scale degree 1 at level l. For FLEXIBLEAUTO and FLEXIBLEAUTOEXT the value is read from the precomputed table; for the other scaling techniques the fixed value 1 is returned.

Parameters

l – the level (levels start from 0 with all towers present); if l is beyond the precomputed table, the fixed scaling factor is returned.

Returns

the scaling factor modulo t.

inline NativeInteger GetScalingFactorIntBig(uint32_t l) const

Method to retrieve the BGV scaling factor (modulo t) of a ciphertext of noise scale degree 2 at level l, i.e., the product of the scaling factors of the two multiplied operands (FLEXIBLEAUTO and FLEXIBLEAUTOEXT). For the other scaling techniques the fixed value 1 is returned.

Parameters

l – the level (levels start from 0 with all towers present); if l is beyond the precomputed table, the fixed scaling factor is returned.

Returns

the scaling factor modulo t.

inline NativeInteger GetModReduceFactorInt(uint32_t l = 0) const

Method to retrieve [q_l]_t, the factor by which the BGV scaling factor is divided when tower q_l is dropped by modulus switching (FLEXIBLEAUTO and FLEXIBLEAUTOEXT). For the other scaling techniques the fixed value 1 is returned.

Parameters

l – index of the tower q_l being dropped.

Returns

the modulus reduction factor modulo t.

inline const std::vector<NativeInteger> &GetrInvModq() const

Gets the precomputed table of [r^{-1}]_{q_i}

Returns

the precomputed table

inline const std::shared_ptr<ILDCRTParams<BigInteger>> GetParamsQr() const

Gets the Auxiliary CRT basis {Qr} = {Q U r} used in BFV encryption in mode EXTENDED

Returns

the precomputed CRT params

inline const std::shared_ptr<ILDCRTParams<BigInteger>> GetParamsQBsk() const

Gets the Auxiliary CRT basis {Bsk} = {B U msk} used in homomorphic multiplication

Returns

the precomputed CRT params

inline const std::vector<NativeInteger> &GetModuliQ() const

Gets the precomputed table of q_i

Returns

the precomputed table

inline const std::vector<NativeInteger> &GetModuliBsk() const

Gets the precomputed table of bsk_j

Returns

the precomputed table

inline const std::vector<DoubleNativeInt> &GetModbskBarrettMu() const

Gets the Barrett modulo reduction precomputation for bsk_j

Returns

the precomputed table

inline const std::vector<NativeInteger> GetmtildeQHatInvModq() const

Gets the precomputed table of [mtilde*(Q/q_i)^{-1}]_{q_i}

Returns

the precomputed table

inline const std::vector<NativeInteger> &GetmtildeQHatInvModqPrecon() const

Gets the NTL precomputations for [mtilde*(Q/q_i)^{-1}]_{q_i}

Returns

the precomputed table

inline const std::vector<std::vector<NativeInteger>> &GetQHatModbsk() const

Gets the precomputed table of [Q/q_i]_{bsk_j}

Returns

the precomputed table

inline const std::vector<std::vector<NativeInteger>> &GetqInvModbsk() const

Gets the precomputed table of [(q_i)^{-1}]_{bsk_j}

Returns

the precomputed table

inline const std::vector<uint64_t> &GetQHatModmtilde() const

Gets the precomputed table of [Q/q_i]_{mtilde}

Returns

the precomputed table

inline const std::vector<NativeInteger> &GetQModbsk() const

Gets the precomputed table of [Q]_{bsk_j}

Returns

the precomputed table

inline const std::vector<NativeInteger> &GetQModbskPrecon() const

Gets the NTL precomputations for [Q]_{bsk_j}

Returns

the precomputed table

inline uint64_t GetNegQInvModmtilde() const

Gets the precomputed [-Q^{-1}]_{mtilde}

Returns

the precomputed value

inline const std::vector<NativeInteger> &GetmtildeInvModbsk() const

Gets the precomputed table of [mtilde^{-1}]_{bsk_j}

Returns

the precomputed table

inline const std::vector<NativeInteger> &GetmtildeInvModbskPrecon() const

Gets the NTL precomputations for [mtilde^{-1}]_{bsk_j}

Returns

the precomputed table

inline const std::vector<NativeInteger> &GettQHatInvModq() const

Gets the precomputed table of [t*(Q/q_i)^{-1}]_{q_i}

Returns

the precomputed table

inline const std::vector<NativeInteger> &GettQHatInvModqPrecon() const

Gets the NTL precomputations for [t*(Q/q_i)^{-1}]_{q_i}

Returns

the precomputed table

inline const std::vector<NativeInteger> &GettgammaQHatInvModq() const

Gets the precomputed table of [t*gamma*(Q/q_i)^(-1)]_{q_i}

Returns

the precomputed table

inline const std::vector<NativeInteger> &GettgammaQHatInvModqPrecon() const

Gets the NTL precomputations for [t*gamma*(Q/q_i)^(-1)]_{q_i}

Returns

the precomputed table

inline const std::vector<NativeInteger> &GettQInvModbsk() const

Gets the precomputed table of [t/Q]_{bsk_j}

Returns

the precomputed table

inline const std::vector<NativeInteger> &GettQInvModbskPrecon() const

Gets the NTL precomputations for [t/Q]_{bsk_j}

Returns

the precomputed table

inline const std::vector<NativeInteger> &GetBHatInvModb() const

Gets the precomputed table of [(B/b_j)^{-1}]_{b_j}

Returns

the precomputed table

inline const std::vector<NativeInteger> &GetBHatInvModbPrecon() const

Gets the NTL precomputations for [(B/b_j)^{-1}]_{b_j}

Returns

the precomputed table

inline const std::vector<NativeInteger> &GetBHatModmsk() const

Gets the precomputed table of [B/b_j]_{msk}

Returns

the precomputed table

inline NativeInteger GetBInvModmsk() const

Gets the precomputed [B^{-1}]_msk

Returns

the precomputed value

inline NativeInteger GetBInvModmskPrecon() const

Gets the NTL precomputions for [B^{-1}]_msk

Returns

the precomputed value

inline const std::vector<std::vector<NativeInteger>> &GetBHatModq() const

Gets the precomputed table of [B/b_j]_{q_i}

Returns

the precomputed table

inline const std::vector<NativeInteger> &GetBModq() const

Gets the precomputed table of [B]_{q_i}

Returns

the precomputed table

inline const std::vector<NativeInteger> &GetBModqPrecon() const

Gets the NTL precomputions for [B]_{q_i}

Returns

the precomputed table

inline uint32_t Getgamma() const

Gets auxiliary modulus gamma

Returns

gamma

inline NativeInteger Gettgamma() const

Gets t*gamma where t - plaintext modulus, gamma - auxiliary modulus

Returns

t*gamma

inline const std::vector<NativeInteger> &GetNegInvqModtgamma() const

Gets the precomputed table of [-(q_i)^{-1}]_{t*gamma}

Returns

the precomputed table

inline const std::vector<NativeInteger> &GetNegInvqModtgammaPrecon() const

Gets the NTL precomputations for [-(q_i)^{-1}]_{t*gamma}

Returns

the precomputed table

inline const std::vector<NativeInteger> &GetMultipartyQHatInvModqAtIndex(uint32_t l) const

Gets the precomputed table of [*(Q/q_i/q_0)^{-1}]_{q_i}

Parameters

l – index of the leveled parameter set (number of towers in the ciphertext minus 2).

Returns

the precomputed table

inline const std::vector<NativeInteger> &GetMultipartyQHatInvModqPreconAtIndex(uint32_t l) const

Gets the NTL precomputations for [*(Q/q_i/q_0)^{-1}]_{q_i}

Parameters

l – index of the leveled parameter set (number of towers in the ciphertext minus 2).

Returns

the precomputed table

inline const std::vector<std::vector<NativeInteger>> &GetMultipartyQHatModq0AtIndex(uint32_t l) const

Gets the precomputed table of [Q/q_i/q_0]_{q_0}

Parameters

l – index of the leveled parameter set (number of towers in the ciphertext minus 2).

Returns

the precomputed table

inline const std::vector<std::vector<NativeInteger>> &GetMultipartyAlphaQModq0AtIndex(uint32_t l) const

Gets the precomputed table of [alpha*Q/q_0]_{q_0} for 0 <= alpha <= 1

Parameters

l – index of the leveled parameter set (number of towers in the ciphertext minus 2).

Returns

the precomputed table

inline const std::vector<DoubleNativeInt> &GetMultipartyModq0BarrettMu() const

Gets the Barrett modulo reduction precomputation for q_0

Returns

the precomputed table

inline const std::vector<double> &GetMultipartyQInv() const

Gets the precomputed table of frac{1/q_i}

Returns

the precomputed table

inline CompressionLevel GetMPIntBootCiphertextCompressionLevel() const

Gets the Multi-Party Interactive Bootstrapping Ciphertext Compression Level

Returns

m_MPIntBootCiphertextCompressionLevel

inline CKKSDataType GetCKKSDataType() const

Method to retrieve the CKKS data type.

Returns

the CKKS data type.

template<class Archive>
inline void save(Archive &ar, std::uint32_t const version) const
template<class Archive>
inline void load(Archive &ar, std::uint32_t const version)
inline virtual std::string SerializedObjectName() const override

Returns the name identifying the derived class in serialized form; every serializable class provides it.

Returns

the serialized object name

Public Static Functions

static std::pair<double, uint32_t> EstimateLogP(uint32_t numPartQ, double firstModulusSize, double dcrtBits, double extraModulusSize, uint32_t numPrimes, uint32_t auxBits, ScalingTechnique scalTech, bool addOne = false, bool isNoiseFloodingMultiparty = false, uint32_t compositeDegree = 1)

Estimates the extra modulus bitsize needed for hybrid key switching (used for finding the minimum secure ring dimension).

Parameters
  • numPartQ – number of digits in hybrid key switching

  • firstModulusSize – bit size of first modulus

  • dcrtBits – bit size for other moduli

  • extraModulusSize – bit size for extra modulus in FLEXIBLEAUTOEXT (CKKS and BGV only)

  • numPrimes – number of moduli witout extraModulus

  • auxBits – size of auxiliar moduli used for hybrid key switching

  • scalTech – scaling technique

  • addOne – should an extra bit be added (for CKKS and BGV)

  • isNoiseFloodingMultiparty – whether threshold FHE uses noise flooding multiparty mode (BGV and BFV)

  • compositeDegree – composite degree (for CKKS only)

Returns

log2 of the modulus and number of RNS limbs.

static inline constexpr double EstimateMultipartyFloodingLogQ()

Estimates the extra modulus bitsize needed for threshold FHE noise flooding (only for BGV and BFV)

Returns

number of extra bits needed for noise flooding

static inline uint32_t SerializedVersion()

Protected Functions

inline CryptoParametersRNS()
inline CryptoParametersRNS(const CryptoParametersRNS &rhs)
inline CryptoParametersRNS(std::shared_ptr<ParmType> params, const PlaintextModulus &plaintextModulus, float distributionParameter, float assuranceMeasure, SecurityLevel securityLevel, uint32_t digitSize, SecretKeyDist secretKeyDist, int maxRelinSkDeg = 2, KeySwitchTechnique ksTech = BV, ScalingTechnique scalTech = FIXEDMANUAL, EncryptionTechnique encTech = STANDARD, MultiplicationTechnique multTech = HPS, MultipartyMode multipartyMode = FIXED_NOISE_MULTIPARTY, ExecutionMode executionMode = EXEC_EVALUATION, DecryptionNoiseMode decryptionNoiseMode = FIXED_NOISE_DECRYPT, CompressionLevel mPIntBootCiphertextCompressionLevel = CompressionLevel::SLACK)

Constructor that initializes values. Note that it is possible to set parameters in a way that is overall infeasible for actual use. There are fewer degrees of freedom than parameters provided. Typically one chooses the basic noise, assurance and security parameters as the typical community-accepted values, then chooses the plaintext modulus and depth as needed. The element parameters should then be choosen to provide correctness and security. In some cases we would need to operate over already encrypted/provided ciphertext and the depth needs to be pre-computed for initial settings.

Parameters
  • params – element parameters.

  • plaintextModulus – plaintext modulus.

  • distributionParameter – noise distribution parameter.

  • assuranceMeasure – assurance level.

  • securityLevel – security level.

  • digitSize – the size of the relinearization window.

  • secretKeyDist – sets the secretKeyDist of operation: GAUSSIAN or UNIFORM_TERNARY

  • maxRelinSkDeg – the maximum power of secret key for which the relinearization key is generated

  • ksTech – key switching method

  • scalTech – scaling method

  • encTech – encryption method

  • multTech – multiplication method

  • multipartyMode – security mode for multiparty decryption

  • executionMode – execution mode for CKKS noise flooding

  • decryptionNoiseMode – decryption noise mode for CKKS noise flooding

  • mPIntBootCiphertextCompressionLevel – compression level of the ciphertexts used in multi-party interactive bootstrapping

inline CryptoParametersRNS(std::shared_ptr<ParmType> params, EncodingParams encodingParams, float distributionParameter, float assuranceMeasure, SecurityLevel securityLevel, uint32_t digitSize, SecretKeyDist secretKeyDist, int maxRelinSkDeg = 2, KeySwitchTechnique ksTech = BV, ScalingTechnique scalTech = FIXEDMANUAL, EncryptionTechnique encTech = STANDARD, MultiplicationTechnique multTech = HPS, ProxyReEncryptionMode PREMode = INDCPA, MultipartyMode multipartyMode = FIXED_NOISE_MULTIPARTY, ExecutionMode executionMode = EXEC_EVALUATION, DecryptionNoiseMode decryptionNoiseMode = FIXED_NOISE_DECRYPT, PlaintextModulus noiseScale = 1, uint32_t statisticalSecurity = 30, uint32_t numAdversarialQueries = 1, uint32_t thresholdNumOfParties = 1, CompressionLevel mPIntBootCiphertextCompressionLevel = CompressionLevel::SLACK, uint32_t compositeDegree = BASE_NUM_LEVELS_TO_DROP, uint32_t registerWordSize = NATIVEINT, CKKSDataType ckksDataType = REAL)

Constructor that initializes all RNS crypto parameters from explicit encoding parameters. In addition to the RLWE parameters it stores the RNS-specific techniques (key switching, scaling, encryption, multiplication), the threshold-FHE and noise-flooding settings, and the CKKS composite scaling settings.

Parameters
  • params – element parameters (the DCRT modulus chain).

  • encodingParams – encoding parameters (plaintext modulus, batch size).

  • distributionParameter – standard deviation of the error distribution.

  • assuranceMeasure – assurance measure (the number of standard deviations used for noise bounds).

  • securityLevel – security level from the homomorphic encryption standard.

  • digitSize – the size of the digit (relinearization window) for BV key switching.

  • secretKeyDist – secret key distribution: GAUSSIAN, UNIFORM_TERNARY or SPARSE_TERNARY.

  • maxRelinSkDeg – the maximum power of the secret key for which a relinearization key is generated.

  • ksTech – key switching technique (BV or HYBRID).

  • scalTech – scaling (rescaling/modulus switching) technique.

  • encTech – encryption technique (STANDARD or EXTENDED; EXTENDED is BFV-specific).

  • multTech – BFV homomorphic multiplication technique (HPS, BEHZ, HPSPOVERQ or HPSPOVERQLEVELED).

  • PREMode – security mode for proxy re-encryption.

  • multipartyMode – security mode for multiparty (threshold) decryption.

  • executionMode – execution mode for CKKS noise flooding (EXEC_EVALUATION or EXEC_NOISE_ESTIMATION).

  • decryptionNoiseMode – decryption noise mode for CKKS noise flooding.

  • noiseScale – multiplier applied to the fresh encryption noise (1 for BFV/CKKS, the plaintext modulus for BGV).

  • statisticalSecurity – statistical security parameter (in bits) for CKKS noise flooding.

  • numAdversarialQueries – number of adversarial decryption queries assumed for CKKS noise flooding.

  • thresholdNumOfParties – number of parties in a threshold-FHE application (bounds the joint secret key).

  • mPIntBootCiphertextCompressionLevel – compression level of the ciphertexts used in multi-party interactive bootstrapping (SLACK or COMPACT).

  • compositeDegree – composite scaling degree d for the CKKS COMPOSITESCALING techniques (1 otherwise).

  • registerWordSize – register word size in bits (32, 48 or 64) used to size the primes in CKKS composite scaling mode.

  • ckksDataType – CKKS data type (REAL or COMPLEX).

~CryptoParametersRNS() override = default
inline bool CompareTo(const CryptoParametersBase<DCRTPoly> &rhs) const override

CompareTo() is a method to compare two CryptoParametersRNS objects. It is called by CryptoParametersBase::operator==()

Parameters

rhs – - the other CryptoParametersRNS object to compare to.

Returns

whether the two CryptoParametersRNS objects are equivalent.

inline virtual void PrintParameters(std::ostream &os) const override

Prints the RLWE parameters to the given output stream.

Parameters

os – the output stream.

Protected Attributes

KeySwitchTechnique m_ksTechnique
ScalingTechnique m_scalTechnique
EncryptionTechnique m_encTechnique
MultiplicationTechnique m_multTechnique
uint32_t m_auxBits = 0
uint32_t m_extraBits = 0
std::vector<NativeInteger> m_tModqPrecon
std::vector<NativeInteger> m_negtInvModq
std::vector<NativeInteger> m_negtInvModqPrecon
std::vector<std::vector<NativeInteger>> m_qlInvModq
std::vector<std::vector<NativeInteger>> m_qlInvModqPrecon
std::shared_ptr<ILDCRTParams<BigInteger>> m_paramsQP
std::vector<std::shared_ptr<ILDCRTParams<BigInteger>>> m_paramsQlHybrid
uint32_t m_numPartQ = 0
std::vector<NativeInteger> m_PModq
std::shared_ptr<ILDCRTParams<BigInteger>> m_paramsP
uint32_t m_numPerPartQ = 0
std::vector<std::shared_ptr<ILDCRTParams<BigInteger>>> m_paramsPartQ
std::vector<std::vector<std::shared_ptr<ILDCRTParams<BigInteger>>>> m_paramsComplPartQ
std::vector<std::vector<std::vector<NativeInteger>>> m_PartQlHatInvModq
std::vector<std::vector<std::vector<NativeInteger>>> m_PartQlHatInvModqPrecon
std::vector<std::vector<std::vector<std::vector<NativeInteger>>>> m_PartQlHatModp
std::vector<std::vector<std::vector<DoubleNativeInt>>> m_modComplPartqBarrettMu
std::vector<NativeInteger> m_PInvModq
std::vector<NativeInteger> m_PInvModqPrecon
std::vector<NativeInteger> m_PHatInvModp
std::vector<NativeInteger> m_PHatInvModpPrecon
std::vector<std::vector<NativeInteger>> m_PHatModq
std::vector<DoubleNativeInt> m_modqBarrettMu
std::vector<NativeInteger> m_tInvModp
std::vector<NativeInteger> m_tInvModpPrecon
std::vector<double> m_scalingFactorsReal
std::vector<double> m_scalingFactorsRealBig
std::vector<double> m_dmoduliQ
double m_approxSF = 0
uint32_t m_compositeDegree = BASE_NUM_LEVELS_TO_DROP
uint32_t m_registerWordSize = NATIVEINT
std::vector<NativeInteger> m_scalingFactorsInt
std::vector<NativeInteger> m_scalingFactorsIntBig
std::vector<NativeInteger> m_qModt
NativeInteger m_fixedSF = NativeInteger(1)
std::vector<NativeInteger> m_negQModt
std::vector<NativeInteger> m_negQModtPrecon
std::vector<NativeInteger> m_tInvModq
std::vector<NativeInteger> m_tInvModqPrecon
std::vector<NativeInteger> m_tInvModqr
std::shared_ptr<ILDCRTParams<BigInteger>> m_paramsQr
NativeInteger m_negQrModt
NativeInteger m_negQrModtPrecon
std::vector<NativeInteger> m_rInvModq
std::vector<double> m_tQHatInvModqDivqFrac
std::vector<double> m_tQHatInvModqBDivqFrac
std::vector<NativeInteger> m_tQHatInvModqDivqModt
std::vector<NativeInteger> m_tQHatInvModqDivqModtPrecon
std::vector<NativeInteger> m_tQHatInvModqBDivqModt
std::vector<NativeInteger> m_tQHatInvModqBDivqModtPrecon
std::vector<std::shared_ptr<ILDCRTParams<BigInteger>>> m_paramsQl
std::vector<std::vector<double>> m_QlQHatInvModqDivqFrac
std::vector<std::vector<std::vector<NativeInteger>>> m_QlQHatInvModqDivqModq
std::vector<std::shared_ptr<ILDCRTParams<BigInteger>>> m_paramsRl
std::vector<std::shared_ptr<ILDCRTParams<BigInteger>>> m_paramsQlRl
std::vector<std::vector<NativeInteger>> m_QlHatInvModq
std::vector<std::vector<NativeInteger>> m_QlHatInvModqPrecon
std::vector<std::vector<std::vector<NativeInteger>>> m_QlHatModr
std::vector<std::vector<std::vector<NativeInteger>>> m_alphaQlModr
std::vector<DoubleNativeInt> m_modrBarrettMu
std::vector<double> m_qInv
std::vector<double> m_tRSHatInvModsDivsFrac
std::vector<std::vector<NativeInteger>> m_tRSHatInvModsDivsModr
std::vector<std::vector<NativeInteger>> m_RlHatInvModr
std::vector<std::vector<NativeInteger>> m_RlHatInvModrPrecon
std::vector<std::vector<std::vector<NativeInteger>>> m_RlHatModq
std::vector<std::vector<std::vector<NativeInteger>>> m_alphaRlModq
std::vector<double> m_rInv
std::vector<std::vector<NativeInteger>> m_negRlQHatInvModq
std::vector<std::vector<NativeInteger>> m_negRlQHatInvModqPrecon
std::vector<std::vector<NativeInteger>> m_negRlQlHatInvModq
std::vector<std::vector<NativeInteger>> m_negRlQlHatInvModqPrecon
std::vector<std::vector<NativeInteger>> m_qInvModr
std::vector<std::vector<NativeInteger>> m_QlHatModq
std::vector<std::vector<NativeInteger>> m_QlHatModqPrecon
std::vector<std::vector<double>> m_tQlSlHatInvModsDivsFrac
std::vector<std::vector<std::vector<NativeInteger>>> m_tQlSlHatInvModsDivsModq
std::shared_ptr<ILDCRTParams<BigInteger>> m_paramsQBsk
uint32_t m_numq = 0
uint32_t m_numb = 0
NativeInteger m_mtilde = NativeInteger(BasicInteger(1) << 16)
NativeInteger m_msk
std::vector<NativeInteger> m_moduliQ
std::vector<NativeInteger> m_moduliB
std::vector<NativeInteger> m_rootsBsk
std::vector<NativeInteger> m_moduliBsk
std::vector<DoubleNativeInt> m_modbskBarrettMu
std::vector<NativeInteger> m_mtildeQHatInvModq
std::vector<NativeInteger> m_mtildeQHatInvModqPrecon
std::vector<std::vector<NativeInteger>> m_QHatModbsk
std::vector<std::vector<NativeInteger>> m_qInvModbsk
std::vector<uint64_t> m_QHatModmtilde
std::vector<NativeInteger> m_QModbsk
std::vector<NativeInteger> m_QModbskPrecon
uint64_t m_negQInvModmtilde = 0
std::vector<NativeInteger> m_mtildeInvModbsk
std::vector<NativeInteger> m_mtildeInvModbskPrecon
std::vector<NativeInteger> m_tQHatInvModq
std::vector<NativeInteger> m_tQHatInvModqPrecon
std::vector<NativeInteger> m_tgammaQHatInvModq
std::vector<NativeInteger> m_tgammaQHatInvModqPrecon
std::vector<NativeInteger> m_tQInvModbsk
std::vector<NativeInteger> m_tQInvModbskPrecon
std::vector<NativeInteger> m_BHatInvModb
std::vector<NativeInteger> m_BHatInvModbPrecon
std::vector<NativeInteger> m_BHatModmsk
NativeInteger m_BInvModmsk
NativeInteger m_BInvModmskPrecon
std::vector<std::vector<NativeInteger>> m_BHatModq
std::vector<NativeInteger> m_BModq
std::vector<NativeInteger> m_BModqPrecon
uint32_t m_gamma = 1 << 26
NativeInteger m_tgamma
std::vector<NativeInteger> m_negInvqModtgamma
std::vector<NativeInteger> m_negInvqModtgammaPrecon
std::vector<std::vector<NativeInteger>> m_multipartyQHatInvModq
std::vector<std::vector<NativeInteger>> m_multipartyQHatInvModqPrecon
std::vector<std::vector<std::vector<NativeInteger>>> m_multipartyQHatModq0
std::vector<std::vector<std::vector<NativeInteger>>> m_multipartyAlphaQModq0
std::vector<DoubleNativeInt> m_multipartyModq0BarrettMu
std::vector<double> m_multipartyQInv
CompressionLevel m_MPIntBootCiphertextCompressionLevel
CKKSDataType m_ckksDataType