尚未收集仓库信息。
尚未检测到更新。GitHub 发布版本后会显示在这里。
Encryption and signing key lifecycle for Go applications: envelope encryption, automatic rotation without re-encrypting stored data, and controlled retirement and destruction.
翻译准备中
取自仓库 README
正在加载完整 README。
查看完整 README ↗Encryption and signing key lifecycle for Go applications: envelope encryption, automatic rotation without re-encrypting stored data, and controlled retirement and destruction.
Status: pre-release (v0.2.0), not externally audited, and not ready for production use. The envelope format is frozen from v0.1.0. See the threat model for what it defends and where it stops.
golang.org/x/crypto.sys, err := embedded.Open(ctx, embedded.Options{
Dir: "/var/lib/myapp/keyforge",
Root: local.FileSource("/etc/keyforge/root.key"),
Purposes: map[keyforge.Purpose]embedded.PurposeOptions{"session-secrets": {}},
})
if err != nil {
return err
}
defer sys.Close()
sealed, err := sys.Client.Encrypt(ctx, "session-secrets", []byte("token-value"), []byte("user:42"))
plaintext, _, err := sys.Client.Decrypt(ctx, "session-secrets", sealed, []byte("user:42"))
Getting started covers the root key, running the lifecycle jobs and the control plane.
| Package | Role |
|---|---|
keyforge (root) | The client: Encrypt, EncryptFor, EncryptInline, Decrypt, Reencrypt |
embedded | Single-host setup from a directory and a root key |
envelope, algorithm | The ciphertext format and the algorithm registry |
provider, provider/local | Key holders, and the keyring-file provider |
registry, sqlstore | The record of keys, and its SQLite and PostgreSQL store (Ent) |
rotate, jobs | Rotation, re-wrapping, retirement, emergencies and erasure, and their scheduler |
service, cli, cmd/keyforge | The HTTP control plane and the command line over it |
The packages that touch key material import only the standard library and oscompat, a dependency-free module for operating-system differences, and a test enforces it.
MIT.