storagekey

package
v0.1.0-rc.50 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: BSD-3-Clause Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package storagekey encrypts recoverable secrets stored by control.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Keyring

type Keyring struct {
	// contains filtered or unexported fields
}

Keyring holds the current storage key and an optional previous key used only while ciphertext is being re-encrypted.

func New

func New(current, previous string) (*Keyring, error)

func (*Keyring) CurrentID

func (k *Keyring) CurrentID() string

func (*Keyring) IPPolicyKey

func (k *Keyring) IPPolicyKey(keyID, purpose string) ([32]byte, error)

IPPolicyKey derives a purpose-specific verifier without exposing the storage key.

func (*Keyring) Open

func (k *Keyring) Open(keyID, context string, ciphertext []byte) ([]byte, bool, error)

Open decrypts ciphertext and reports whether it used the previous key.

func (*Keyring) PreviousID

func (k *Keyring) PreviousID() string

func (*Keyring) Seal

func (k *Keyring) Seal(context string, plaintext []byte) ([]byte, error)

Jump to

Keyboard shortcuts

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