Commit fa4f692f authored by Yuriy Polyakov's avatar Yuriy Polyakov
Browse files

Added expception handling for BFV parameter autogeneration

parent ee559783
......@@ -326,6 +326,9 @@ bool LPAlgorithmParamsGenBFV<Element>::ParamsGen(shared_ptr<LPCryptoParameters<E
if (ceil(log2(q))+1 > 125)
PALISADE_THROW( lbcrypto::math_error, "BFV cannot autogenerate parameters for this case, please use BFVrns instead.");
typename Element::Integer qPrime = FirstPrime<typename Element::Integer>(ceil(log2(q))+1, 2*n);
typename Element::Integer rootOfUnity = RootOfUnity<typename Element::Integer>(2 * n, qPrime);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment