google / google/heir

Support encoding short tensors into BGV ciphertexts of restricted dimension

Open
#645 3 comments 0 reactions 0 assignees View on GitHub
dialect: bgv dialect: openfhe good first issue
Dominant language
MLIR
Stars
906
Forks
171
Avg merge
4d 12h
Merged PRs (30d)
32

Description

OpenFHE's MakePackedPlaintext will zero-pad to the ring degree N, and this breaks the rotate-and-reduce trick, so instead in the simple_sum_test.cpp test harness, I manually repeat the coefficients cyclically until it fills the whole ciphertext. I'd like to add this to the compilation pipeline and the encode helper, and it suggests a bunch more work to do if we have an input cleartext tensor that is not divisible by the OpenFHE's ring degree (rotate-and-reduce tricks won't work in that case, or will have to be tweaked to account for the true underlying ring degree).

So this breaks down into two pieces:

- Support auto-generating the cyclic repetition code in the add-client-interface helper
- Determine how to handle inputs that are not divisible by the RLWE tensor size used by a backend (this dips into issues with parameter selection)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.