View full-text article in PMC Entropy (Basel). 2023 Mar 4;25(3):454. doi: 10.3390/e25030454 Search in PMC Search in PubMed View in NLM Catalog Add to search Copyright and License information © 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/). PMC Copyright notice Algorithm 1 GaussianSampler Input: Lattice Λ basis B, standard deviation σ, center c∈ZN Output: Vector v sampled in DΛ,σ,c 1:vn←0 2:cn←c 3:for i=n,n−1,⋯,1 do 4: ci′←〈ci,bi˜〉/‖bi˜‖2 5: σi′←‖bi˜‖ 6: zi←SampleZ(ci′,σi′) 7: ci−1←ci−zibi 8: vi−1←vi−zibi 9:end for 10:return v0