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 759 forks source link

Troubles accessing actual ciphertext (attribute "parts") from helib::Ctxt #475

Open lutonelli opened 2 years ago

lutonelli commented 2 years ago

I'd like to access directly to the numbers composing the ciphertext Ctxt, but reading the documentation I can't seem to find anything that can help me.

I have an object Ctxt containing the ciphertext of a vector representing an image; I understand that the real ciphertext is stored in the attribute "parts" of the object, but there is no getter method to access this attribute.

I need these numbers in order to create a torch::Tensor and train a neural network, obviously there is no direct method to convert an object of type helib::Ctxt to a torch::Tensor.

What am I missing? Thanks in advance for the help.