Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions bip-0085.mediawiki
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,42 @@ INPUT:
OUTPUT
* DERIVED ENTROPY=492db4698cf3b73a5a24998aa3e9d7fa96275d85724a91e71aa2d645442f878555d078fd1f1f67e368976f04137b1f7a0d19232136ca50c44614af72b5582a5c

====<code>age</code> file encryption keys====

A 32-byte HEX-application output at <code>m/83696968'/128169'/32'/{index}'</code> is a
cryptographically random value usable directly as the secret key of an
[https://age-encryption.org/v1 age] file-encryption identity. age has two identity flavours;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[https://age-encryption.org/v1 age] file-encryption identity. age has two identity flavours;
[https://age-encryption.org/v1 age] file-encryption identity. age has two identity flavors.

both encode this 32-byte seed, and the matching recipient (public key) is derived from it:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
both encode this 32-byte seed, and the matching recipient (public key) is derived from it:
Both encode a 32-byte seed. The matching recipient (public key) is derived from the seed as follows:


{| class="wikitable"
! Flavour !! Role !! HRP !! Bech32-encoded payload
|-
| classic (X25519) || identity || <code>AGE-SECRET-KEY-</code> || the 32-byte seed
|-
| classic (X25519) || recipient || <code>age</code> || <code>X25519(seed, G)</code>, 32 bytes
|-
| post-quantum (X-Wing) || identity || <code>AGE-SECRET-KEY-PQ-</code> || the same 32-byte seed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's be careful here. i think in all cases we want to say "32-byte seed" because in C2SP age we read:

This recipient type is secure against future cryptographically-relevant quantum computers, so the same file SHOULD NOT be encrypted to both this recipent type and to other non-quantum-resistant recipient types.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact please clarify non-reuse across flavors in one sentence below the table.

|-
| post-quantum (X-Wing) || recipient || <code>age1pq</code> || X-Wing encapsulation key, 1216 bytes
|}

Every string above is Bech32 (BIP-173) of the form <code>HRP || "1" || encode(payload) || checksum</code>.

@akarve akarve Aug 10, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically Bech32 maxes out at 90 characters and that exception is eliminated? Shouldn't we say "Each string uses the Bech32 character set for the encoded payload, but is not limited in length." or something like that?

<code>G</code> is the Curve25519 base point, so <code>X25519(seed, G)</code> is the classic
recipient's public key. For the post-quantum flavour (age v1.3.0+), X-Wing SHAKE256-expands the
seed into its ML-KEM-768 and X25519 components, and the recipient encodes the resulting
1216-byte X-Wing encapsulation key.

INPUT:
* MASTER BIP32 ROOT KEY: xprv9s21ZrQH143K2LBWUUQRFXhucrQqBpKdRRxNVq2zBqsx8HVqFk2uYo8kmbaLLHRdqtQpUm98uKfu3vca1LqdGhUtyoFnCNkfmXRyPXLjbKb
* PATH: m/83696968'/128169'/32'/0'

OUTPUT:
* DERIVED ENTROPY=ea3ceb0b02ee8e587779c63f4b7b3a21e950a213f1ec53cab608d13e8796e6dc
* DERIVED AGE IDENTITY (classic)=AGE-SECRET-KEY-1AG7WKZCZA689SAMECCL5K7E6Y854PGSN78K98J4KPRGNAPUKUMWQWNNT4U
* DERIVED AGE RECIPIENT (classic)=age1m0hhzxelxsxnxm4ennvdpk75j8s7mn5w4tt3e4ntug5qx256wslqmdz8e9
* DERIVED AGE IDENTITY (PQ)=AGE-SECRET-KEY-PQ-1AG7WKZCZA689SAMECCL5K7E6Y854PGSN78K98J4KPRGNAPUKUMWQ5AN2M5
* DERIVED AGE RECIPIENT (PQ) SHA-256 (of the 1959-char bech32 string, no trailing newline)=855bd04ee0cd6cfdf5717fb946d859824a79fbbdf6304dadcc11dbb91abe0df6

===PWD BASE64===
Application number: 707764'

Expand Down