尚未收集儲存庫資訊。
尚未偵測到更新。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.