mirror of
https://github.com/go-sigma/sigma.git
synced 2026-10-29 00:34:37 +08:00
Encrypt/Decrypt are AES-CTR without a MAC, so a stored ciphertext can be altered without detection. The only current caller derives a per-build key from the builder and runner IDs, which is fine for the short-lived build environment but cannot be used for values that outlive a process. Add Seal/Open on top of AES-256-GCM (base64(nonce|ciphertext|tag)) next to the existing helpers instead of changing them: the builder image still decrypts the CTR format with crypt.Decrypt. The key is derived with sha256 like Encrypt, so operators only deal with one key convention. Verification: - go test -tags "netgo,timetzdata,exclude_graphdriver_btrfs,containers_image_openpgp" ./pkg/utils/crypt/...