-
Notifications
You must be signed in to change notification settings - Fork 15
/
default_parameters.py
41 lines (39 loc) · 1.52 KB
/
default_parameters.py
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
from .ml_dsa import ML_DSA
DEFAULT_PARAMETERS = {
"ML_DSA_44": {
"d": 13, # number of bits dropped from t
"tau": 39, # number of ±1 in c
"gamma_1": 131072, # coefficient range of y: 2^17
"gamma_2": 95232, # low order rounding range: (q-1)/88
"k": 4, # Dimensions of A = (k, l)
"l": 4, # Dimensions of A = (k, l)
"eta": 2, # Private key range
"omega": 80, # Max number of ones in hint
"c_tilde_bytes": 32,
},
"ML_DSA_65": {
"d": 13, # number of bits dropped from t
"tau": 49, # number of ±1 in c
"gamma_1": 524288, # coefficient range of y: 2^19
"gamma_2": 261888, # low order rounding range: (q-1)/32
"k": 6, # Dimensions of A = (k, l)
"l": 5, # Dimensions of A = (k, l)
"eta": 4, # Private key range
"omega": 55, # Max number of ones in hint
"c_tilde_bytes": 48,
},
"ML_DSA_87": {
"d": 13, # number of bits dropped from t
"tau": 60, # number of ±1 in c
"gamma_1": 524288, # coefficient range of y: 2^19
"gamma_2": 261888, # low order rounding range: (q-1)/32
"k": 8, # Dimensions of A = (k, l)
"l": 7, # Dimensions of A = (k, l)
"eta": 2, # Private key range
"omega": 75, # Max number of ones in hint
"c_tilde_bytes": 64,
},
}
ML_DSA_44 = ML_DSA(DEFAULT_PARAMETERS["ML_DSA_44"])
ML_DSA_65 = ML_DSA(DEFAULT_PARAMETERS["ML_DSA_65"])
ML_DSA_87 = ML_DSA(DEFAULT_PARAMETERS["ML_DSA_87"])