keywheel

package
v0.0.0-...-6b33518 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2019 License: AGPL-3.0-or-later Imports: 10 Imported by: 0

Documentation

Overview

Package keywheel implements Alpenhorn's keywheel construction.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserDialTokens

type UserDialTokens struct {
	FromUsername string
	Tokens       []*[32]byte
}

type Wheel

type Wheel struct {
	// contains filtered or unexported fields
}

func (*Wheel) EraseKeys

func (w *Wheel) EraseKeys(round uint32)

func (*Wheel) Exists

func (w *Wheel) Exists(username string) bool

Exists returns true if username is in the keywheel and false otherwise.

func (*Wheel) IncomingDialTokens

func (w *Wheel) IncomingDialTokens(myUsername string, round uint32, numIntents int) []*UserDialTokens

func (*Wheel) MarshalBinary

func (w *Wheel) MarshalBinary() ([]byte, error)

func (*Wheel) OutgoingDialToken

func (w *Wheel) OutgoingDialToken(username string, round uint32, intent int) *[32]byte

func (*Wheel) Put

func (w *Wheel) Put(username string, round uint32, secret *[32]byte)

func (*Wheel) Remove

func (w *Wheel) Remove(username string)

func (*Wheel) SessionKey

func (w *Wheel) SessionKey(username string, round uint32) *[32]byte

func (*Wheel) UnmarshalBinary

func (w *Wheel) UnmarshalBinary(data []byte) error

func (*Wheel) UnsafeGet

func (w *Wheel) UnsafeGet(username string) (round uint32, secret *[32]byte)

UnsafeGet returns the internal keywheel state for a username. This is unsafe; use SessionKey, if possible.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL