Documentation ¶
Index ¶
- Variables
- func ForwardMessageLength(idx int, messageLength int) int
- func PubKey(masterKey string) [32]byte
- type MixnetClient
- type MixnetClientConfig
- type MixnetServer
- func (ms *MixnetServer) Receive(req *pb.PutOnionsRequest) error
- func (ms *MixnetServer) Run(listenAddr string) error
- func (ms *MixnetServer) ServeConfig(rw http.ResponseWriter, req *http.Request)
- func (ms *MixnetServer) ServePubkey(rw http.ResponseWriter, req *http.Request)
- func (ms *MixnetServer) ServeReceive(rw http.ResponseWriter, req *http.Request)
- type MixnetServerConfig
- type OTPChecker
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAlreadyBound = errors.New("this OTP has already been used on a different phone")
View Source
var ErrBadOTP = errors.New("the OTP is invalid")
Functions ¶
func ForwardMessageLength ¶
Types ¶
type MixnetClient ¶
type MixnetClient struct {
// contains filtered or unexported fields
}
func NewMixnetClient ¶
func NewMixnetClient(conf *MixnetClientConfig) *MixnetClient
func (*MixnetClient) SendMessage ¶
func (mc *MixnetClient) SendMessage(msg []byte) error
type MixnetClientConfig ¶
type MixnetClientConfig struct { Addr string PubKeys [][32]byte // reverse indexed! MessageLength int }
func MakeClientConfig ¶
func MakeClientConfig(sc *MixnetServerConfig) (*MixnetClientConfig, error)
type MixnetServer ¶
type MixnetServer struct { PushHandler func([][]byte) error // contains filtered or unexported fields }
MixnetServer represents a nonfinal server in the mixnet chain
func NewMixnetServer ¶
func NewMixnetServer(conf *MixnetServerConfig, idx int, masterKey string) *MixnetServer
func (*MixnetServer) Receive ¶
func (ms *MixnetServer) Receive(req *pb.PutOnionsRequest) error
func (*MixnetServer) Run ¶
func (ms *MixnetServer) Run(listenAddr string) error
func (*MixnetServer) ServeConfig ¶
func (ms *MixnetServer) ServeConfig(rw http.ResponseWriter, req *http.Request)
func (*MixnetServer) ServePubkey ¶
func (ms *MixnetServer) ServePubkey(rw http.ResponseWriter, req *http.Request)
func (*MixnetServer) ServeReceive ¶
func (ms *MixnetServer) ServeReceive(rw http.ResponseWriter, req *http.Request)
type MixnetServerConfig ¶
type MixnetServerConfig struct { Addrs []string OutputAddr string OtpCheck string MinBatchSize int `json:"min_batch_size"` MessageLength int `json:"message_length"` MaxBufferedMessages int `json:"max_buffered_messages"` }
func (MixnetServerConfig) InputMessageLength ¶
func (msc MixnetServerConfig) InputMessageLength(idx int) int
func (MixnetServerConfig) NextAddr ¶
func (msc MixnetServerConfig) NextAddr(idx int) string
type OTPChecker ¶
type OTPChecker struct {
// contains filtered or unexported fields
}
func NewOTPChecker ¶
func NewOTPChecker(baseUrl string) *OTPChecker
Click to show internal directories.
Click to hide internal directories.