RadarFound by OpenFHE Radar· 4 follow

Fix BFV packed encoding when t - 1 > q_0/2

Nov 30 find · published Nov 24
GHGitHub · openfheorg/openfhe-development · 1 min readRead original
BFV scheme fixGitHub pull requestOpenFHE development

Pull request #1427 fixes BFV PackedEncoding that caused wrong decryption in every slot when plaintext modulus t - 1 exceeds half the first RNS limb modulus q_0. PackedEncoding::Encode stores packed coefficients in the first limb and fills other limbs using a centred modulus switch, which interprets values above floor(q_0/2) as negative. For t - 1 > floor(q_0/2), the limbs represent different integers, breaking encryption, addition and multiplication with plaintexts. This is reachable with small ScalingModSize like 21. The fix fills each limb with x mod q_j instead, preserving correctness for all parameter ranges. Unit tests verify the fix with t = 1179649 and t = 2752513.

21ScalingModSize triggering bug
1179649Test plaintext modulus

Comments

Sign in to join the conversation.

More from this batch

OpenFHE recognized as community reference standardX · @vedangvatsaGPU-accelerated CKKS bootstrapping webinar December 1openfhe.discourse.groupReject BFV plaintext moduli of 2^37 and above for BEHZGitHub · openfheorg/openfhe-developmentInclude HYBRID digit term in BGV noise estimateGitHub · openfheorg/openfhe-developmentThrow for non-relinearized ciphertexts in relinearizing opsGitHub · openfheorg/openfhe-developmentEncrypted medical inference and training with CKKS, BGV, BFV on OpenFHE 1.6.1GitHub
OpenFHE RadarEverything around OpenFHE: releases, notable GitHub issues and pull requests, papers and benchmarks that use it, applications built on it, talks, workshops and events, and what its maintainers and community are working on.