drkeyutil

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultEpochDuration is the default duration for the drkey SecretValue and derived keys
	DefaultEpochDuration = 24 * time.Hour
	EnvVarEpochDuration  = "SCION_TESTING_DRKEY_EPOCH_DURATION"
	// DefaultAcceptanceWindow is the time width for accepting incoming packets. The
	// acceptance window is then computed as:
	// aw := [T-a, T+a)
	// where aw:= acceptance window, T := time instant and a := aw/2
	DefaultAcceptanceWindow = 5 * time.Minute
	EnvVarAcceptanceWindow  = "SCION_TESTING_ACCEPTANCE_WINDOW"
)

Variables

This section is empty.

Functions

func LoadAcceptanceWindow

func LoadAcceptanceWindow() time.Duration

func LoadEpochDuration

func LoadEpochDuration() time.Duration

Types

type FakeProvider

type FakeProvider struct {
	EpochDuration    time.Duration
	AcceptanceWindow time.Duration
}

func (*FakeProvider) GetASHostKey

func (p *FakeProvider) GetASHostKey(
	validTime time.Time,
	_ addr.IA,
	_ addr.Host,
) (drkey.ASHostKey, error)

func (*FakeProvider) GetKeyWithinAcceptanceWindow

func (p *FakeProvider) GetKeyWithinAcceptanceWindow(
	t time.Time,
	timestamp uint64,
	dstIA addr.IA,
	dstAddr addr.Host,
) (drkey.ASHostKey, error)

Jump to

Keyboard shortcuts

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