Dear members of the community,
I’m currently working on a project using the OpenFHE library. I’m referring to a pre-hra-secure.cpp
file developed by someone else based on OpenFHE. The author of this file mentioned that the SetMultiHopModSize
function used in the code worked properly in version 1.2.0.
I’ve attempted to use this function in my code to set the multi-hop modulus size. However, I can’t find the definition of the SetMultiHopModSize
function in the OpenFHE library version 1.2.0 that I’m currently using. I’ve not only searched in the current version but also looked back through versions prior to 1.2.0, yet I still haven’t found this function.
I’d like to ask the community if the SetMultiHopModSize
function ever existed in the OpenFHE library. If it did, in which version was it removed, and is there an alternative function that can achieve the same functionality?
Relevant code snippet
bool run_demo_pre(void) {
// Generate parameters.
TimeVar t; // timer for tic toc
std::cout << "setting up the HRA-secure BGV PRE cryptosystem" << std::endl;
TIC(t);
double t1;
uint32_t plaintextModulus = 2; // can encode shorts
uint32_t numHops = 13;
uint32_t qmodulus = 27; // Hypothetical qmodulus value
CCParams<CryptoContextBGVRNS> parameters;
parameters.SetPlaintextModulus(plaintextModulus);
parameters.SetScalingTechnique(FIXEDMANUAL);
parameters.SetPRENumHops(numHops);
parameters.SetStatisticalSecurity(40);
parameters.SetNumAdversarialQueries(1048576);
parameters.SetRingDim(32768);
parameters.SetPREMode(NOISE_FLOODING_HRA);
parameters.SetKeySwitchTechnique(HYBRID);
parameters.SetMultiplicativeDepth(0);
// The line I added, trying to use the SetMultiHopModSize function
parameters.SetMultiHopModSize(qmodulus);
// parameters.SetNumLargeDigits(3);
// parameters.SetKeySwitchTechnique(BV);
// parameters.SetDigitSize(15);
CryptoContext<DCRTPoly> cc = GenCryptoContext(parameters);
// ... Other code ...
}
My attempts
- I used the command
grep -r "SetMultiHopModSize" .
to recursively search for the function in the local code repository, but I didn’t find its definition. - I also searched for the function in different version release tags on the GitHub repository, yet I still couldn’t find any useful information.
Environment information
- Operating system: Ubuntu 20.04
- OpenFHE library version: 1.2.0
- Compiler: g++ 9.4.0
Thank you for taking the time to read my question. I’m looking forward to your help!