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
Click to show internal directories.
Click to hide internal directories.