age

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: MIT Imports: 9 Imported by: 1 module, 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 age encrypts for enbu's recipients: hybrid ML-KEM-768 + X25519 (software) and tagged hybrid ML-KEM-768 + P-256 (hardware). Classical recipients are refused, so every file stays post-quantum.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(ciphertext []byte, identities ...age.Identity) ([]byte, error)

func EncryptForPublicKeys

func EncryptForPublicKeys(plaintext []byte, publicKeys []string) ([]byte, error)

EncryptForPublicKeys encrypts plaintext for every recipient.

func ParseRecipient

func ParseRecipient(s string) (age.Recipient, error)

ParseRecipient accepts the hybrid ML-KEM-768 + X25519 and the tagged hybrid ML-KEM-768 + P-256 age encodings.

func RecipientKind

func RecipientKind(s string) string

RecipientKind names the key type of a recipient for display.

Types

type KeyPair

type KeyPair struct {
	Identity  *age.HybridIdentity
	PublicKey string
}

KeyPair is a software identity, for tests and tools.

func GenerateKeyPair

func GenerateKeyPair() (*KeyPair, error)

Jump to

Keyboard shortcuts

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