keywrap

package module
v0.0.0-...-d7158a3 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2015 License: BSD-2-Clause Imports: 0 Imported by: 0

Documentation

Overview

Keywrap algorithms are a class of symmetric encryption algorithms designed to encapsulate (encrypt) cryptographic key material. The algorithms are not limited to key material and input data is therefore referred to as keydata.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterWrapAlgorithm

func RegisterWrapAlgorithm(a WrapAlgorithm, builder func(key []byte) (KeyWrapper, error))

register a builder function which can create a wrap algorithm implementation must be called from the init method in implementation packages

Types

type KeyWrapper

type KeyWrapper interface {
	// Wraps the given keydata with the given key
	Wrap(keydata []byte) (ciphertext []byte, err error)

	// Unwraps the given ciphertext with the given key back to keydata
	Unwrap(ciphertext []byte) (keydata []byte, err error)
}

KeyWrapper is the interface implemented by an object that can wrap keydata.

type WrapAlgorithm

type WrapAlgorithm uint

Identifies a particular key wrap algorithm which is implemented in another package

const (
	RFC3394 WrapAlgorithm = iota // import github.com/bas-vk/keywrap/rfc3394

)

func (WrapAlgorithm) New

func (a WrapAlgorithm) New(key []byte) (KeyWrapper, error)

create a wrap algorithm implementation

Directories

Path Synopsis
The rfc3394 package is an implementation of the key wrapping algorithm as described in RFC 3393.
The rfc3394 package is an implementation of the key wrapping algorithm as described in RFC 3393.

Jump to

Keyboard shortcuts

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