Struct DCRTPolyInterface::CRTBasisExtensionPrecomputations

Nested Relationships

This struct is a nested type of Template Class DCRTPolyInterface.

Struct Documentation

struct lbcrypto::DCRTPolyInterface::CRTBasisExtensionPrecomputations

Precomputed constants for FastExpandCRTBasisPloverQ, the switch of an element from its current basis (with product Q) to the extended basis {Q_l, P_l} used by the BFV HPSPOVERQ multiplication variants, with {Q_l} = {q_1,…,q_l} and {P_l} = {p_1,…,p_k}.

Public Functions

inline CRTBasisExtensionPrecomputations(const std::shared_ptr<Params> &paramsQlPl0, const std::shared_ptr<Params> &paramsPl0, const std::shared_ptr<Params> &paramsQl0, const std::vector<NativeInteger> &mPlQHatInvModq0, const std::vector<NativeInteger> &mPlQHatInvModqPrecon0, const std::vector<std::vector<NativeInteger>> &qInvModp0, const std::vector<DoubleNativeInt> &modpBarrettMu0, const std::vector<NativeInteger> &PlHatInvModp0, const std::vector<NativeInteger> &PlHatInvModpPrecon0, const std::vector<std::vector<NativeInteger>> &PlHatModq0, const std::vector<std::vector<NativeInteger>> &alphaPlModq0, const std::vector<DoubleNativeInt> &modqBarrettMu0, const std::vector<double> &pInv0)

Constructs the precomputation set from its components.

Parameters
  • paramsQlPl0 – element parameters of the extended basis {Q_l, P_l}.

  • paramsPl0 – element parameters of the basis {P_l}.

  • paramsQl0 – element parameters of the basis {Q_l}.

  • mPlQHatInvModq0 – precomputed values for [-P_l*(Q/q_i)^{-1}]_{q_i}.

  • mPlQHatInvModqPrecon0 – NTL-specific precomputations for mPlQHatInvModq0.

  • qInvModp0 – precomputed values for [q_i^{-1}]_{p_j}.

  • modpBarrettMu0 – 128-bit Barrett reduction precomputed values for p_j.

  • PlHatInvModp0 – precomputed values for [(P_l/p_j)^{-1}]_{p_j}.

  • PlHatInvModpPrecon0 – NTL-specific precomputations for PlHatInvModp0.

  • PlHatModq0 – precomputed values for [P_l/p_j]_{q_i}.

  • alphaPlModq0 – precomputed values for [alpha*P_l]_{q_i}.

  • modqBarrettMu0 – 128-bit Barrett reduction precomputed values for q_i.

  • pInv0 – precomputed values for 1/p_j.

Public Members

std::shared_ptr<Params> paramsQlPl

element parameters of the extended basis {Q_l, P_l}

std::shared_ptr<Params> paramsPl

element parameters of the basis {P_l}

std::shared_ptr<Params> paramsQl

element parameters of the basis {Q_l}

std::vector<NativeInteger> mPlQHatInvModq

precomputed values for [-P_l*(Q/q_i)^{-1}]_{q_i}

std::vector<NativeInteger> mPlQHatInvModqPrecon

NTL-specific precomputations for mPlQHatInvModq

std::vector<std::vector<NativeInteger>> qInvModp

precomputed values for [q_i^{-1}]_{p_j}

std::vector<DoubleNativeInt> modpBarrettMu

128-bit Barrett reduction precomputed values for p_j

std::vector<NativeInteger> PlHatInvModp

precomputed values for [(P_l/p_j)^{-1}]_{p_j}

std::vector<NativeInteger> PlHatInvModpPrecon

NTL-specific precomputations for PlHatInvModp

std::vector<std::vector<NativeInteger>> PlHatModq

precomputed values for [P_l/p_j]_{q_i}

std::vector<std::vector<NativeInteger>> alphaPlModq

precomputed values for [alpha*P_l]_{q_i}

std::vector<DoubleNativeInt> modqBarrettMu

128-bit Barrett reduction precomputed values for q_i

std::vector<double> pInv

precomputed values for 1/p_j