GPU-accelerated homomorphic blind vector recall for OpenFHE CKKS, built by integrating FIDESlib (MIT, OpenFHE-1.5.1-interoperable). It takes encrypted cosine recall over a corpus of ciphertexts from minutes per query to single-digit seconds, with results bit-exact against the CPU library and the secret key never touching the GPU.
First proving ground: the resonant_lattice blind memory store, whose encrypted vault of ~4,952
facts is scored entirely on the GPU with exact top-k parity.
| Path | Per query |
|---|---|
| CPU streaming scan | ~356 s |
| GPU, naive per-fact stream | ~81 s |
| GPU, corpus resident + batched decrypt | ~7 s (after a ~22 s one-time corpus bridge) |
5 of 5 test queries match the plaintext top-10 exactly and in order; per-id scores agree with the CPU reference to about 1e-11. A resident daemon holds the corpus on the GPU so each query sustains ~7 s.
- Integrate, do not reinvent. FIDESlib already ships optimized CUDA CKKS kernels for OpenFHE 1.5.1. The contribution here is the application layer: scoring an encrypted corpus, not the ring arithmetic.
- Foreign ciphertexts on the GPU. The low-level
FIDESlib::CKKSlayer bridges natively serialized OpenFHE ciphertexts onto the GPU (GetRawCipherText/GetOpenFHECipherText), so the existing encrypted vault loads without re-encryption. - The hot path. Homomorphic cosine = one ciphertext multiply plus a power-of-2 rotate-and-sum.
- Interactive speed. Two optimizations: keep the whole encrypted corpus resident on the GPU, and pack many scores per ciphertext (one-hot mask + accumulate) so a handful of decrypts replace one per fact.
The GPU is a faster untrusted evaluator. It receives only public material - the crypto context, the public key, and the public evaluation and rotation keys - plus the encrypted corpus and the encrypted query. The secret key and the user passphrase never go to the GPU, which never decrypts. The blind property (the store computes on ciphertext it cannot read) is preserved unchanged.
PLAN.md- vision, invariants, measured results, phases P0 through P7.src/- the native scorers:rlm_gpu_recall.cu(one-shot),rlm_gpu_recalld.cu(resident daemon), a minimalsqlite3_shim.h, and a CMake that builds both.integration/- theresonant_latticewiring:gpu_recall.py(theGPUBlindBackendadapter), demos, andREADME.mddescribing the seam and config-driven activation.
Build FIDESlib (which vendors and patches OpenFHE 1.5.1) for the target GPU architecture, then the
scorers against both installs. The scorer targets need separable compilation plus device LTO to link
FIDESlib's relocatable-device-code archive, and OpenMP at the final link (OpenFHE uses it). See
src/CMakeLists.txt.
P0 through P6 are done: bit-exact GPU parity, the real vault scored on the GPU with exact top-k, and
a config-driven resonant_lattice integration with CPU fallback. P7 (hardening/release) has the
resident daemon and config activation done; remaining are larger-than-VRAM corpus tiling and
multi-GPU, precision and security validation across OpenFHE point releases, and the public release.
MIT. See LICENSE.