-
Notifications
You must be signed in to change notification settings - Fork 172
/
test_params.go
49 lines (43 loc) · 991 Bytes
/
test_params.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package rlwe
type TestParametersLiteral struct {
BaseTwoDecomposition int
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,
},
},
}
)