Repository navigation
Fix key and metadata state handling - #1348
Merged
Merged
Conversation
dsuponitskiy
commented
Sep 24, 2026
Collaborator
- preserve key tags through evaluation-key copy and move operations
- add explicit move semantics to key base classes
- initialize encryption and decryption result fields
- preserve derived metadata when cloning by key
- complete RingGSW parameter equality checks
- correct the LWE switching-key serialized name
- add regression coverage for the fixes
- preserve key tags through evaluation-key copy and move operations - add explicit move semantics to key base classes - initialize encryption and decryption result fields - preserve derived metadata when cloning by key - complete RingGSW parameter equality checks - correct the LWE switching-key serialized name - add regression coverage for the fixes
LWE ciphertexts did not serialize their plaintext modulus, so inputs encrypted with p=6 or p=8 came back with the default of 4. Multi-input gates took their output encoding from that tag, and OR3, AND4 and OR4 then decrypted wrongly after a round trip. Serialize and compare the modulus, and take it from the gate rather than from the first input, which also covers copies. Ciphertext archives written before this change do not load.
- operator=(uint64_t) and operator=(const PolyType&) now set the element's format to match its towers - CloneWithNoise samples the noise as coefficients and converts to the requested format, instead of ignoring it and labelling the samples with the element's current format - SwitchModulusAtIndex updates a copy of the parameters rather than the object shared with other elements, which it also left stale - AddILElementOne's error names EVALUATION, the format it requires - document that the PolyType and PolyLargeType conversions need COEFFICIENT input
pascoec
force-pushed
the
1344-code-issues
branch
from
September 25, 2026 18:49
8e6365f to
7fabd1c
Compare
pascoec
approved these changes
Sep 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.