Skip to content

ezgh keys re-encrypt

Move a ciphertext to another key, without showing its plaintext.

Updated View as Markdown
ezgh keys re-encrypt <key> [--file path] [--context key=value]... [--new-context key=value]... [flags]

Open a ciphertext read from stdin or --file, and seal it under <key> with --new-context. The plaintext is never shown. It needs decrypt on the key that sealed it, and encrypt on <key>.

Part of ezgh keys.

Examples

ezgh keys re-encrypt kms_… --context tenant=acme --new-context tenant=acme < old.enc > new.enc

Flags

Flag Type Default Description
--context string, repeatable encryption context; opening it needs the same one, key=value; repeat for more
--context-file string encryption context; opening it needs the same one, from a file holding a JSON object of strings
--file string read the ciphertext from this file instead of stdin
--new-context string, repeatable encryption context to seal under, key=value; repeat for more
--new-context-file string encryption context to seal under, from a file holding a JSON object of strings

This command also takes the global flags.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close