quarkslab / NFLlib

NTT-based Fast Lattice library
MIT License
167 stars 52 forks source link

Fully reduce sampled ternary vectors. #56

Open dfaranha opened 2 years ago

dfaranha commented 2 years ago

This patch fully reduces sampled ternary vectors, to prevent a residue modulo p_i from being assigned (p_i + 1) after sampling. I needed this to have proper norm checks that relied on all residues being fully reduced, so I'm sending it upstream.