homenc / HElib

HElib is an open-source software library that implements homomorphic encryption. It supports the BGV scheme with bootstrapping and the Approximate Number CKKS scheme. HElib also includes optimizations for efficient homomorphic evaluation, focusing on effective use of ciphertext packing techniques and on the Gentry-Halevi-Smart optimizations.
https://homenc.github.io/HElib
Other
3.15k stars 761 forks source link

Malloc Error while running BGV_binary_arithmetic.cpp from the examples folder #435

Open Frequently opened 3 years ago

Frequently commented 3 years ago

Hey Guys,

I was trying different parameters on the existing BGV_binary_arithmetic.cpp ( it is one of the examples which comes along with the Helib package) and I got a malloc error. I am using Ubuntu 20.04.1 LTS & It has 128 GB of RAM ( sufficient to run the computation)

The parameter chosen were:

image

Here is the screenshot of the error:

image

Can you please help me solve this?

shaih commented 3 years ago

Note that this parameter setting is invalid, as mvec must be a factorization of m. (Not necessarily prime factorization, but the entries in mvec must multiply to m). Similarly gens must generate Zm*/(p) and ords must be their order.