| 1 |
age-inspect(1) -- inspect age(1) encrypted files |
| 2 |
==================================================== |
| 3 |
|
| 4 |
## SYNOPSIS |
| 5 |
|
| 6 |
`age-inspect` [`--json`] [<INPUT>] |
| 7 |
|
| 8 |
## DESCRIPTION |
| 9 |
|
| 10 |
`age-inspect` reads an age(1) encrypted file from <INPUT> (or standard input) |
| 11 |
and displays metadata about it without decrypting. |
| 12 |
|
| 13 |
This includes the recipient types, whether it uses post-quantum encryption, |
| 14 |
and a size breakdown of the file components. |
| 15 |
|
| 16 |
## OPTIONS |
| 17 |
|
| 18 |
* `--json`: |
| 19 |
Output machine-readable JSON instead of human-readable text. |
| 20 |
|
| 21 |
* `--version`: |
| 22 |
Print the version and exit. |
| 23 |
|
| 24 |
## JSON FORMAT |
| 25 |
|
| 26 |
When `--json` is specified, the output is a JSON object with these fields: |
| 27 |
|
| 28 |
* `version`: |
| 29 |
The age format version (e.g., `"age-encryption.org/v1"`). |
| 30 |
|
| 31 |
* `postquantum`: |
| 32 |
Whether the file uses post-quantum encryption: `"yes"`, `"no"`, or |
| 33 |
`"unknown"`. |
| 34 |
|
| 35 |
* `armor`: |
| 36 |
Boolean indicating whether the file is ASCII-armored. |
| 37 |
|
| 38 |
* `stanza_types`: |
| 39 |
Array of recipient stanza type strings (e.g., `["X25519"]` or |
| 40 |
`["mlkem768x25519"]`). |
| 41 |
|
| 42 |
* `sizes`: |
| 43 |
Object containing size information in bytes: |
| 44 |
|
| 45 |
* `header`: Size of the age header. |
| 46 |
* `armor`: Armor encoding overhead (0 if not armored). |
| 47 |
* `overhead`: Stream encryption overhead. |
| 48 |
* `min_payload`, `max_payload`: Payload size bounds (currently always matching). |
| 49 |
* `min_padding`, `max_padding`: Padding size bounds (currently always 0). |
| 50 |
|
| 51 |
The fields add up to the total size of the file. |
| 52 |
|
| 53 |
## EXAMPLES |
| 54 |
|
| 55 |
Inspect an encrypted file: |
| 56 |
|
| 57 |
$ age-inspect secrets.age |
| 58 |
secrets.age is an age file, version "age-encryption.org/v1". |
| 59 |
|
| 60 |
This file is encrypted to the following recipient types: |
| 61 |
- "mlkem768x25519" |
| 62 |
|
| 63 |
This file uses post-quantum encryption. |
| 64 |
|
| 65 |
Size breakdown (assuming it decrypts successfully): |
| 66 |
|
| 67 |
Header 1627 bytes |
| 68 |
Encryption overhead 32 bytes |
| 69 |
Payload 42 bytes |
| 70 |
------------------- |
| 71 |
Total 1701 bytes |
| 72 |
|
| 73 |
Tip: for machine-readable output, use --json. |
| 74 |
|
| 75 |
Get JSON output for scripting: |
| 76 |
|
| 77 |
$ age-inspect --json secrets.age |
| 78 |
{ |
| 79 |
"version": "age-encryption.org/v1", |
| 80 |
"postquantum": "yes", |
| 81 |
"armor": false, |
| 82 |
"stanza_types": [ |
| 83 |
"mlkem768x25519" |
| 84 |
], |
| 85 |
"sizes": { |
| 86 |
"header": 1627, |
| 87 |
"armor": 0, |
| 88 |
"overhead": 32, |
| 89 |
"min_payload": 42, |
| 90 |
"max_payload": 42, |
| 91 |
"min_padding": 0, |
| 92 |
"max_padding": 0 |
| 93 |
} |
| 94 |
} |
| 95 |
|
| 96 |
## SEE ALSO |
| 97 |
|
| 98 |
age(1), age-keygen(1) |
| 99 |
|
| 100 |
## AUTHORS |
| 101 |
|
| 102 |
Filippo Valsorda <[email protected]> |