Documentation ¶
Overview ¶
Types used by the entry server and client
Index ¶
- Constants
- func BackwardNonce(round uint32) *[24]byte
- func FillWithFakeDoubles(dest [][]byte, nonce *[24]byte, nextKeys []*[32]byte)
- func FillWithFakeIntroductions(dest [][]byte, noiseCounts []int, nonce *[24]byte, nextKeys []*[32]byte)
- func FillWithFakeSingles(dest [][]byte, nonce *[24]byte, nextKeys []*[32]byte)
- func ForwardNonce(round uint32) *[24]byte
- func InitConvoService(srv *ConvoService)
- func InitDialService(srv *DialService)
- func Intn(rand io.Reader, n int) int
- func KeyDialBucket(key *BoxKey, buckets uint32) uint32
- func NewConvoRound(client *vrpc.Client, round uint32) error
- func NewDialRound(client *vrpc.Client, round uint32) error
- func RunConvoRound(client *vrpc.Client, round uint32, onions [][]byte) ([][]byte, error)
- func RunDialRound(client *vrpc.Client, round uint32, onions [][]byte) error
- type AccessCount
- type AnnounceConvoRound
- type AnnounceDialRound
- type BadRequestError
- type BoxKey
- type BoxKeys
- type ConvoAddArgs
- type ConvoError
- type ConvoExchange
- type ConvoGetArgs
- type ConvoGetResult
- type ConvoOpenArgs
- type ConvoRequest
- type ConvoResponse
- type ConvoRound
- type ConvoService
- func (srv *ConvoService) Add(args *ConvoAddArgs, _ *struct{}) error
- func (srv *ConvoService) Close(Round uint32, _ *struct{}) error
- func (srv *ConvoService) Delete(Round uint32, _ *struct{}) error
- func (srv *ConvoService) Get(args *ConvoGetArgs, result *ConvoGetResult) error
- func (srv *ConvoService) NewRound(Round uint32, _ *struct{}) error
- func (srv *ConvoService) Open(args *ConvoOpenArgs, _ *struct{}) error
- type DeadDrop
- type DialAddArgs
- type DialBucket
- type DialBucketsArgs
- type DialBucketsResult
- type DialError
- type DialExchange
- type DialRequest
- type DialRound
- type DialService
- type Envelope
- type Introduction
- type MsgType
- type PKI
- func (pki *PKI) FirstServer() string
- func (pki *PKI) IncomingOnionOverhead(serverName string) int
- func (pki *PKI) Index(serverName string) int
- func (pki *PKI) LastServer() string
- func (pki *PKI) NextServer(serverName string) string
- func (pki *PKI) NextServerKeys(serverName string) BoxKeys
- func (pki *PKI) OutgoingOnionOverhead(serverName string) int
- func (pki *PKI) ServerKeys() BoxKeys
- type ServerInfo
- type Shuffler
Constants ¶
View Source
const ( SizeMessage = 240 // Eventually this might be dynamic, but one bucket is usually // sufficient if users don't dial very often. TotalDialBuckets = 1 DialWait = 10 * time.Second DefaultReceiveWait = 5 * time.Second DefaultServerAddr = ":2718" DefaultServerPort = "2718" )
View Source
const ( SizeEncryptedMessage = SizeMessage + box.Overhead SizeConvoExchange = int(unsafe.Sizeof(ConvoExchange{})) SizeEncryptedIntro = int(unsafe.Sizeof(Introduction{})) + onionbox.Overhead SizeDialExchange = int(unsafe.Sizeof(DialExchange{})) )
Variables ¶
This section is empty.
Functions ¶
func BackwardNonce ¶
func FillWithFakeDoubles ¶
func FillWithFakeSingles ¶
func ForwardNonce ¶
func InitConvoService ¶
func InitConvoService(srv *ConvoService)
func InitDialService ¶
func InitDialService(srv *DialService)
func KeyDialBucket ¶
func RunConvoRound ¶
Types ¶
type AccessCount ¶
type AnnounceConvoRound ¶
type AnnounceConvoRound struct {
Round uint32
}
type AnnounceDialRound ¶
type BadRequestError ¶
type BadRequestError struct {
Err string
}
func (*BadRequestError) Error ¶
func (e *BadRequestError) Error() string
type BoxKey ¶
type BoxKey [32]byte
func GenerateBoxKey ¶
func KeyFromString ¶
func (*BoxKey) MarshalJSON ¶
func (*BoxKey) UnmarshalJSON ¶
type ConvoAddArgs ¶
type ConvoError ¶
func (*ConvoError) Error ¶
func (e *ConvoError) Error() string
type ConvoExchange ¶
type ConvoExchange struct { DeadDrop DeadDrop EncryptedMessage [SizeEncryptedMessage]byte }
func (*ConvoExchange) Marshal ¶
func (e *ConvoExchange) Marshal() []byte
func (*ConvoExchange) Unmarshal ¶
func (e *ConvoExchange) Unmarshal(data []byte) error
type ConvoGetArgs ¶
type ConvoGetResult ¶
type ConvoGetResult struct {
Onions [][]byte
}
type ConvoOpenArgs ¶
type ConvoRequest ¶
type ConvoResponse ¶
type ConvoRound ¶
type ConvoRound struct {
// contains filtered or unexported fields
}
type ConvoService ¶
type ConvoService struct { Idle *sync.Mutex LaplaceMu float64 LaplaceB float64 PKI *PKI ServerName string PrivateKey *BoxKey Client *vrpc.Client LastServer bool AccessCounts chan *AccessCount // contains filtered or unexported fields }
func (*ConvoService) Add ¶
func (srv *ConvoService) Add(args *ConvoAddArgs, _ *struct{}) error
func (*ConvoService) Close ¶
func (srv *ConvoService) Close(Round uint32, _ *struct{}) error
func (*ConvoService) Delete ¶
func (srv *ConvoService) Delete(Round uint32, _ *struct{}) error
func (*ConvoService) Get ¶
func (srv *ConvoService) Get(args *ConvoGetArgs, result *ConvoGetResult) error
func (*ConvoService) NewRound ¶
func (srv *ConvoService) NewRound(Round uint32, _ *struct{}) error
func (*ConvoService) Open ¶
func (srv *ConvoService) Open(args *ConvoOpenArgs, _ *struct{}) error
type DialAddArgs ¶
type DialBucket ¶
type DialBucket struct { Round uint32 Intros [][SizeEncryptedIntro]byte }
type DialBucketsArgs ¶
type DialBucketsArgs struct {
Round uint32
}
type DialBucketsResult ¶
type DialBucketsResult struct {
Buckets [][][SizeEncryptedIntro]byte
}
type DialExchange ¶
type DialExchange struct { Bucket uint32 EncryptedIntro [SizeEncryptedIntro]byte }
func (*DialExchange) Marshal ¶
func (e *DialExchange) Marshal() []byte
func (*DialExchange) Unmarshal ¶
func (e *DialExchange) Unmarshal(data []byte) error
type DialRequest ¶
type DialService ¶
type DialService struct { Idle *sync.Mutex LaplaceMu float64 LaplaceB float64 PKI *PKI ServerName string PrivateKey *BoxKey Client *vrpc.Client LastServer bool // contains filtered or unexported fields }
func (*DialService) Add ¶
func (srv *DialService) Add(args *DialAddArgs, _ *struct{}) error
func (*DialService) Buckets ¶
func (srv *DialService) Buckets(args *DialBucketsArgs, result *DialBucketsResult) error
func (*DialService) Close ¶
func (srv *DialService) Close(Round uint32, _ *struct{}) error
func (*DialService) NewRound ¶
func (srv *DialService) NewRound(Round uint32, _ *struct{}) error
type Envelope ¶
type Envelope struct { Type MsgType Message json.RawMessage }
type Introduction ¶
func (*Introduction) Marshal ¶
func (i *Introduction) Marshal() []byte
func (*Introduction) Unmarshal ¶
func (i *Introduction) Unmarshal(data []byte) error
type PKI ¶
type PKI struct { People map[string]*BoxKey Servers map[string]*ServerInfo ServerOrder []string EntryServer string }
func (*PKI) FirstServer ¶
func (*PKI) IncomingOnionOverhead ¶
func (*PKI) LastServer ¶
func (*PKI) NextServer ¶
func (*PKI) NextServerKeys ¶
func (*PKI) OutgoingOnionOverhead ¶
func (*PKI) ServerKeys ¶
type ServerInfo ¶
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
parallelfor.go by Jelle van den Hooff
|
parallelfor.go by Jelle van den Hooff |
Click to show internal directories.
Click to hide internal directories.