The GetExistingEvalAutomorphismKeyIndices(...) method in src/pke/lib/cryptocontext.cpp adds extra index with value of zero to the vector of key indices from the KeyMap.
It happens because the vector first is set to specific size with all values set to default value of 0:
std::vector<uint32_t> indices(keyMap.size());
and then existing indices in the map are push_back(...)'ed to it.
As a result, the vector of indices has 0s inside which are not present in the original map, and thus have no actual key behind them (an empty PolyImpl is created later).
As a result, there is a segfault due to a null pointer dereference in CompressEvalKeys(...) function in demo-logistic.cpp: CompressEvalKeys(...).
The
GetExistingEvalAutomorphismKeyIndices(...)
method in src/pke/lib/cryptocontext.cpp adds extra index with value of zero to the vector of key indices from the KeyMap.It happens because the vector first is set to specific size with all values set to default value of 0:
std::vector<uint32_t> indices(keyMap.size());
and then existing indices in the map arepush_back(...)
'ed to it.As a result, the vector of indices has 0s inside which are not present in the original map, and thus have no actual key behind them (an empty PolyImpl is created later).
As a result, there is a segfault due to a null pointer dereference in
CompressEvalKeys(...)
function in demo-logistic.cpp: CompressEvalKeys(...).