keychain

package
v0.0.0-...-c2e30b8 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2021 License: NIST-PD-fallback Imports: 6 Imported by: 1

Documentation

Overview

Package keychain implements signing and verification on NDN packets.

Index

Constants

This section is empty.

Variables

View Source
var (
	ComponentKEY           = ndn.ParseNameComponent("KEY")
	ComponentSelfIssuer    = ndn.ParseNameComponent("self")
	ComponentDefaultIssuer = ndn.ParseNameComponent("ndn-dpdk.go")
)

Name components for certificate naming.

View Source
var (
	ErrKeyName  = errors.New("bad key name")
	ErrCertName = errors.New("bad certificate name")
)

Error conditions for certificate naming.

Functions

func IsCertName

func IsCertName(name ndn.Name) bool

IsCertName determines if the input is a certificate name.

func IsCertificate

func IsCertificate(data ndn.Data) bool

IsCertificate determines if the Data packet is a certificate.

func IsKeyName

func IsKeyName(name ndn.Name) bool

IsKeyName determines if the input is a key name.

func ToCertName

func ToCertName(input ndn.Name) ndn.Name

ToCertName extracts or builds certificate name from subject name, key name, or certificate name. If the input is a subject name, the keyID component is randomly generated. If the input is a subject name or key name, the issuerID is set to 'ndn-dpdk.go', and the version component is randomly generated.

func ToKeyName

func ToKeyName(input ndn.Name) ndn.Name

ToKeyName extracts or builds key name from subject name, key name, or certificate name. If the input is a subject name, the keyID component is randomly generated.

func ToSubjectName

func ToSubjectName(input ndn.Name) ndn.Name

ToSubjectName extracts subject name from subject name, key name, or certificate name.

Types

type PrivateKey

type PrivateKey interface {
	ndn.Signer
	Name() ndn.Name
}

PrivateKey represents a named private key.

type PrivateKeyKeyLocatorChanger

type PrivateKeyKeyLocatorChanger interface {
	PrivateKey

	// WithKeyLocator creates a new Signer that uses a different KeyLocator.
	// This may be used to put certificate name in KeyLocator.
	WithKeyLocator(klName ndn.Name) ndn.Signer
}

PrivateKeyKeyLocatorChanger is a PrivateKey that can change KeyLocator.

type PublicKey

type PublicKey interface {
	ndn.Verifier
	Name() ndn.Name
}

PublicKey represents a named public key.

Directories

Path Synopsis
Package eckey implements SigSha256WithEcdsa signature type.
Package eckey implements SigSha256WithEcdsa signature type.
Package rsakey implements SigSha256WithRsa signature type.
Package rsakey implements SigSha256WithRsa signature type.

Jump to

Keyboard shortcuts

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