Documentation
¶
Index ¶
- func Decrypt(ciphertext []byte, identities ...age.Identity) ([]byte, error)
- func EncryptForPublicKeys(plaintext []byte, publicKeys []string) ([]byte, error)
- func Fingerprint(pubKey string) string
- func IsPostQuantum(s string) bool
- func ParseRecipient(s string) (age.Recipient, error)
- func PostQuantum(recipients []string) bool
- func RecipientKind(s string) string
- type HybridKeyPair
- type KeyPair
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncryptForPublicKeys ¶
EncryptForPublicKeys encrypts plaintext for every recipient. When every recipient is post-quantum, age keeps the file post-quantum: a classical recipient cannot be added to it. A mixed set is encrypted as classical, because one classical stanza is enough to recover the file key; see PostQuantum.
func Fingerprint ¶
func IsPostQuantum ¶
IsPostQuantum reports whether s is a hybrid recipient whose stanza stays confidential against a quantum computer.
func ParseRecipient ¶
ParseRecipient accepts the standard X25519, tagged P-256, hybrid ML-KEM-768 + X25519 and tagged hybrid ML-KEM-768 + P-256 age encodings.
func PostQuantum ¶
PostQuantum reports whether a file encrypted for recipients would be post-quantum: every recipient must be, since any classical stanza unwraps the same file key.
func RecipientKind ¶
RecipientKind names the key type of a recipient for display.
Types ¶
type HybridKeyPair ¶
type HybridKeyPair struct {
Identity *age.HybridIdentity
PublicKey string
}
func GenerateHybridKeyPair ¶
func GenerateHybridKeyPair() (*HybridKeyPair, error)
GenerateHybridKeyPair generates an ML-KEM-768 + X25519 (X-Wing) identity.
type KeyPair ¶
type KeyPair struct {
Identity *age.X25519Identity
PublicKey string
}