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.11k stars 760 forks source link

How to use the method "replicateOneBlock" in "relicate.cpp" #367

Open siaaron045 opened 4 years ago

siaaron045 commented 4 years ago

I want to use this method "relicateOneBlock" ,but I do not know how to use it and I can't read the notes. Suppose I want to let this Ctxt ctxt [1 0 0 0 0 2 0 0 0 0 3 0 0 0 0 4] transform to [1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4]. How should I set parms? -------replicateOneBlock(const EncryptedArray& ea, Ctxt& ctxt, long pos, long blockSize, long d) Thank you.