kms

package
v0.0.0-...-8c61271 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const AriesWrapperStoreName = "kmsdb"

AriesWrapperStoreName is the store name used when creating a KMS store using kms.NewAriesProviderWrapper.

Variables

View Source
var ErrKeyNotFound = errors.New("key not found")

ErrKeyNotFound is an error type that a KMS expects from the Store.Get method if no key stored under the given key ID could be found.

Functions

func NewAriesProviderWrapper

func NewAriesProviderWrapper(provider storage.Provider) (kms.Store, error)

NewAriesProviderWrapper returns an implementation of the kms.Store interface that wraps an Aries provider implementation, allowing it to be used with a KMS.

Types

type CryptoBox

type CryptoBox interface {
	// Easy seals a payload with a provided nonce
	Easy(payload, nonce, theirPub []byte, myKID string) ([]byte, error)
	// EashOpen unseals a cipherText sealed with Easy, where the nonce is provided
	EasyOpen(cipherText, nonce, theirPub, myPub []byte) ([]byte, error)
	// Seal seals a payload using the equivalent logic of libsodium box_seal
	Seal(payload, theirEncPub []byte, randSource io.Reader) ([]byte, error)
	// SealOpen decrypts a payload encrypted with Seal
	SealOpen(cipherText, myPub []byte) ([]byte, error)
}

CryptoBox is a libsodium crypto service used by legacy authcrypt packer. TODO remove this service when legacy packer is retired from the framework.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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