mirror of
https://github.com/luxfi/lattice.git
synced 2026-09-24 00:25:44 +00:00
- Update module path to github.com/luxfi/lattice/v7 - Add GPU acceleration with Metal (macOS) and CUDA backends - Enhance threshold FHE operations - Revert to vanilla Apache 2.0 license (remove tfhe) - Update Go version to 1.25.5 - Merge upstream lattigo improvements
20 lines
612 B
Go
20 lines
612 B
Go
package rlwe
|
|
|
|
import "github.com/luxfi/lattice/v7/ring"
|
|
|
|
const (
|
|
// XsUniformTernary is the standard deviation of a ternary key with uniform distribution
|
|
XsUniformTernary = 0.816496580927726 //Sqrt(2/3)
|
|
|
|
// DefaultNoise is the default standard deviation of the error
|
|
DefaultNoise = 3.2
|
|
|
|
// DefaultNoiseBound is the default bound (in number of standard deviation) of the noise bound
|
|
DefaultNoiseBound = 19.2 // 6*3.2
|
|
)
|
|
|
|
// DefaultXe is the default discrete Gaussian distribution.
|
|
var DefaultXe = ring.DiscreteGaussian{Sigma: DefaultNoise, Bound: DefaultNoiseBound}
|
|
|
|
var DefaultXs = ring.Ternary{P: 2 / 3.0}
|