Skip to content

fix ZO sampling bug#6

Merged
juny2400 merged 6 commits intomainfrom
fix-sampling-bug
Mar 20, 2026
Merged

fix ZO sampling bug#6
juny2400 merged 6 commits intomainfrom
fix-sampling-bug

Conversation

@juny2400
Copy link
Copy Markdown
Contributor

@juny2400 juny2400 commented Mar 20, 2026

Related Issue #5

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes the ZO (zero/one) sampling path in EncryptorT::sampleZO, which is used during encryption/key generation to populate the vx_buffer_ polynomial(s) prior to NTT.

Changes:

  • Adjusts where RNG output is stored/read from in sampleZO to avoid clobbering sampled bits while extracting them.
  • Modifies the sampling loop bounds and adds special handling for the final coefficient.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Encryptor.cpp Outdated
Comment thread src/Encryptor.cpp Outdated
Comment thread src/Encryptor.cpp Outdated
@juny2400 juny2400 requested a review from a team March 20, 2026 07:01
@juny2400 juny2400 merged commit fcba007 into main Mar 20, 2026
4 checks passed
@juny2400 juny2400 deleted the fix-sampling-bug branch March 20, 2026 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants