-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.go
62 lines (50 loc) · 2.4 KB
/
config.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
50
51
52
53
54
55
56
57
58
59
60
61
62
package main
import "time"
// EpochBrick is the smallest building
// block for durations in epochs.
const EpochBrick = 5 * time.Second
// RoundTime specifies the per-mix
// duration of accepting messages.
const RoundTime = 20 * time.Second
// BatchSizeVariance defines the maximum
// amount of messages added additionally
// to half of the number of messages in
// a pool to append to the outgoing pool.
const BatchSizeVariance = 30
// NumCascades defines the number of
// distinct cascades that make up the
// cascades matrix.
const NumCascades = 3
// LenCascade defines the number of mixes
// required to form one mix cascade.
const LenCascade = 7
// MsgLength defines the number of bytes
// the content of each conversation message
// will take up in space.
const MsgLength = 256
// MsgExitOverhead defines the number of
// additional bytes for a conversation
// message to be processed by the exit
// mix and send to the final recipient.
const MsgExitOverhead = 104
// MsgCascadeOverhead defines the number
// of bytes of overhead each mix layer
// adds to the original message for
// proper processing.
const MsgCascadeOverhead = 104
// ClientsWaitBetweenMsgsSuccess defines
// the amount of time clients will sleep
// before attempting to send a subsequent
// message to the entry mix after the
// current attempt was successful.
const ClientsWaitBetweenMsgsSuccess = 3 * (RoundTime / 4)
// ClientsWaitBetweenMsgsRetry defines
// the amount of time clients will sleep
// before attempting to send a subsequent
// message to the entry mix after the
// current attempt was unsuccessful.
const ClientsWaitBetweenMsgsRetry = RoundTime / 8
// Msg is the conversation message that
// is sent between participants of the
// mix-net infrastructure.
const Msg = "All human beings are born free and equal in dignity and rights. They are endowed with reason and conscience and should act towards one another in a spirit of brotherhood. Everyone is entitled to all the rights and freedoms set forth in this Declaration, without distinction of any kind, such as race, colour, sex, language, religion, political or other opinion, national or social origin, property, birth or other status. Furthermore, no distinction shall be made on the basis of the political, jurisdictional or international status of the country or territory to which a person belongs, whether it be independent, trust, non-self-governing or under any other limitation of sovereignty."