hebench / reference-palisade-backend

The PALISADE-CPU backend is a Reference backend engine for HEBench which is a shared library that implements the required functions specified in either the hebench::APIBridge or hebench::cpp wrapper. It is intended only as a reference on how to implement a PALISADE backend for HEBench and it is not fully optimized for performance.
Apache License 2.0
6 stars 2 forks source link

PALISADE EvalSum Error Thrown When Running DotProductBFV when n > slot_count / 2 #14

Closed kylanerace closed 2 years ago

kylanerace commented 2 years ago
Version Information (Put N/A for Not Applicable) Software Version(s)
Linux Ubuntu 20.04.1
Git 2.25.1
CMake 3.13.3
Compiler (GCC, Clang, etc.) gcc 9.3.0-17
GLIBC (ldd) 2.31-0ubuntu9
Doxygen N/A
HEBench Frontend v0.6.0-beta*
HEBench API Bridge v0.5.1-beta
Reference Backend dev (2775191)

*Version not released yet. Commit is (ee84413)

Describe the bug
When running dot-product with a large input (n > slot_count / 2), EvalSum fails to find an EvalKey for an index ("Could not find an EvalKey for index 1"). Can be fixed by passing the slot count instead of 'n' to EvalSum. Initial thought is that since EvalSum does an accumulate, the entirety of ciphertext needs to be "usable" as far as BFV is concerned (issue doesn't seem to appear in CKKS even with max slots used).

To Reproduce
Steps to reproduce the behavior:

  1. Build & Install default reference backend
  2. Generate a config file with --dump
  3. Remove the unnecessary benchmarks not being tested (DotProductBFV)
  4. Set input to 4097+

Expected behavior
The expectation is that the DotProductBFV should allow an 'n' up to the slot_count.

Screenshots
N/A

Additional context
N/A