protocol

package
v0.0.0-...-092914e Latest Latest
Warning

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

Go to latest
Published: May 8, 2020 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KnownDerivations = make(map[string]Derivation)

KnownDerivations maps the derivation names to their implementations.

Functions

func DeriveLvl1

func DeriveLvl1(meta drkey.Lvl1Meta, sv drkey.SV) (drkey.Lvl1Key, error)

DeriveLvl1 constructs a new level 1 DRKey.

Types

type Delegated

type Delegated struct{}

Delegated implements the level 2 drkey derivation from level 1, without DS. It relies on the Standard implementation to derive the DS from the level 1 key.

func (Delegated) DeriveLvl2

func (p Delegated) DeriveLvl2(meta drkey.Lvl2Meta, key drkey.Lvl1Key) (drkey.Lvl2Key, error)

DeriveLvl2 derives the level 2 DRKey without passing through a delegation secret.

func (Delegated) DeriveLvl2FromDS

func (p Delegated) DeriveLvl2FromDS(meta drkey.Lvl2Meta, ds drkey.DelegationSecret) (
	drkey.Lvl2Key, error)

DeriveLvl2FromDS will derive the level 2 key from a delegation secret.

type DelegatedDerivation

type DelegatedDerivation interface {
	Derivation
	DeriveLvl2FromDS(meta drkey.Lvl2Meta, ds drkey.DelegationSecret) (drkey.Lvl2Key, error)
}

DelegatedDerivation extends a Derivation with a derivation from a DS.

type Derivation

type Derivation interface {
	Name() string
	DeriveLvl2(meta drkey.Lvl2Meta, key drkey.Lvl1Key) (drkey.Lvl2Key, error)
}

Derivation specifies the interface to implement for a derivation method.

type Standard

type Standard struct{}

Standard implements the level 2 drkey derivation from level 1, without DS.

func (Standard) DeriveLvl2

func (p Standard) DeriveLvl2(meta drkey.Lvl2Meta, key drkey.Lvl1Key) (drkey.Lvl2Key, error)

DeriveLvl2 derives the level 2 DRKey without passing through a delegation secret.

Jump to

Keyboard shortcuts

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