mirror of
https://github.com/luxfi/lattice.git
synced 2026-09-24 00:25:44 +00:00
CHANGELOG: - Update of `PrecisionStats` in `ckks/precision.go`: - precision/error stats computed as log2 of min/max/average/... - fields renamed (`MinPrecision` -> `MINLog2Prec`, `MaxPrecision` -> `MAXLog2Prec`, ...) - `rlwe.Scale` has a `.Log2()` method - Update of `mod1.Parameters` fields (made public, some removed) - Improvement of the relinearization key-generation protocol (reduce the degree of the shares) - Serialisation of bootstrapping keys - Lower noise incurred by `ModUp` - Evaluation keys can be compressed (public element `a` can be generated from a seed) - More doc formatting - Fix various bugs: - `ShallowCopy` of the CKKS bootstrapping evaluator and BFV evaluator not deep enough. - PSI example failing - Incorrect reset of pointer in uniform sampler - Error when doing inverse NTT with small degree - Mod1Evaluator changes the input ciphertext Co-authored-by: Andrea Caforio <[email protected]> Co-authored-by: Jean-Philippe Bossuat <[email protected]>
51 lines
1018 B
Go
51 lines
1018 B
Go
package rlwe
|
|
|
|
type TestParametersLiteral struct {
|
|
BaseTwoDecomposition int
|
|
Compressed bool
|
|
ParametersLiteral
|
|
}
|
|
|
|
var (
|
|
logN = 10
|
|
qi = []uint64{0x200000440001, 0x7fff80001, 0x800280001, 0x7ffd80001, 0x7ffc80001}
|
|
pj = []uint64{0x3ffffffb80001, 0x4000000800001}
|
|
|
|
// testInsecure are insecure parameters used for the sole purpose of fast testing.
|
|
testInsecure = []TestParametersLiteral{
|
|
// RNS decomposition, no Pw2 decomposition
|
|
{
|
|
BaseTwoDecomposition: 0,
|
|
|
|
ParametersLiteral: ParametersLiteral{
|
|
LogN: logN,
|
|
Q: qi,
|
|
P: pj,
|
|
NTTFlag: true,
|
|
},
|
|
},
|
|
// RNS decomposition, Pw2 decomposition
|
|
{
|
|
BaseTwoDecomposition: 16,
|
|
|
|
ParametersLiteral: ParametersLiteral{
|
|
LogN: logN,
|
|
Q: qi,
|
|
P: pj[:1],
|
|
NTTFlag: true,
|
|
},
|
|
},
|
|
// No RNS decomposition, Pw2 decomposition
|
|
{
|
|
BaseTwoDecomposition: 2,
|
|
|
|
ParametersLiteral: ParametersLiteral{
|
|
LogN: logN,
|
|
Q: qi,
|
|
P: nil,
|
|
NTTFlag: true,
|
|
},
|
|
},
|
|
}
|
|
)
|