Update herodb/instructions/age_usage.md

This commit is contained in:
2025-08-22 14:02:58 +00:00
parent b9987a027b
commit 4bedf71c2d

View File

@@ -43,6 +43,7 @@ redis-cli -p PORT AGE DECRYPTNAME app1 <ciphertext_b64>
## Stateless AGE (ephemeral) ## Stateless AGE (ephemeral)
Characteristics Characteristics
- No serverside storage of keys. - No serverside storage of keys.
- You pass the actual key material with every call. - You pass the actual key material with every call.
- Not listable via AGE LIST. - Not listable via AGE LIST.
@@ -55,21 +56,25 @@ Commands and examples
# Generate an ephemeral encryption keypair # Generate an ephemeral encryption keypair
redis-cli -p PORT AGE GENENC redis-cli -p PORT AGE GENENC
# Example output (abridged): # Example output (abridged):
# 1) "age1qz..." # recipient (public) # 1) "age1qz..." # recipient (public key) = can be used by others e.g. to verify what I sign
# 2) "AGE-SECRET-KEY-1..." # identity (secret) # 2) "AGE-SECRET-KEY-1..." # identity (secret) = is like my private, cannot lose this one
# Encrypt with the recipient # Encrypt with the recipient public key
redis-cli -p PORT AGE ENCRYPT "age1qz..." "hello world" redis-cli -p PORT AGE ENCRYPT "age1qz..." "hello world"
# → returns bulk string payload: base64 ciphertext
# Decrypt with the identity (secret) # → returns bulk string payload: base64 ciphertext (encrypted content)
# Decrypt with the identity (secret) in other words your private key
redis-cli -p PORT AGE DECRYPT "AGE-SECRET-KEY-1..." "<ciphertext_b64>" redis-cli -p PORT AGE DECRYPT "AGE-SECRET-KEY-1..." "<ciphertext_b64>"
# → "hello world" # → "hello world"
``` ```
2) Ephemeral signing keys 2) Ephemeral signing keys
> ? is this same as my private key
```bash ```bash
# Generate an ephemeral signing keypair # Generate an ephemeral signing keypair
redis-cli -p PORT AGE GENSIGN redis-cli -p PORT AGE GENSIGN
# Example output: # Example output: