How to encrypt a file to a post-quantum key.

AgePony 3.0 added post-quantum recipients. Generate one identity, share the age1pq string, and the files you encrypt to it stay closed even against an attacker who stores the ciphertext now and brings a quantum computer to it later.

~3 minutes iOS / Android AgePony 3.0 or later
// at a glance
  1. Identities, Generate, pick Post-quantum
  2. Share the age1pq recipient
  3. Open Encrypt, pick the file
  4. Choose the post-quantum recipient
  5. Encrypt and send the .age file
Prerequisites
  • AgePony 3.0 or later (current release is 3.1.0)
  • On iOS, iOS 18.6 or later
  • The file you want to encrypt
// step 01

Generate a post-quantum identity.

Open Identities, tap Generate, and pick Post-quantum as the key type. AgePony creates the keypair on-device, exactly like a classical age identity. The secret half never leaves the phone.

// step 02

Share the age1pq recipient.

The public half starts with age1pq and runs to about 1,950 characters. That length is normal for a post-quantum public key, and like any recipient it is safe to share. Typing it out is not realistic, so use the QR code or the copy button. Anyone who wants to send you a file needs this string and nothing else.

// step 03

Open Encrypt and pick the file.

Start the Encrypt flow and choose the file. Nothing about file selection changes for post-quantum work.

// step 04

Choose the post-quantum recipient.

Select your age1pq recipient, or paste in someone else's. One thing to know: a post-quantum recipient cannot be combined with a classical one on the same file. If two people need the same file and only one has a post-quantum key, encrypt the file twice, once per key type.

// step 05

Encrypt and share.

AgePony writes a normal .age file. To open it, the recipient needs age CLI 1.3 or newer, or AgePony 3.0 or later. Older age builds do not understand the post-quantum stanza and will decline the file rather than guess, so check what the other side runs before you send.

Verify it worked.

  • The identity list shows the new key marked Post-quantum.
  • The recipient string begins with age1pq.
  • A test file encrypted to it decrypts with the matching identity in AgePony.
  • On a desktop, age 1.3 or newer decrypts the same file with the exported identity.

Common questions.

Why is the recipient string so long?

A post-quantum recipient carries a lattice-based public key, so it runs to roughly 1,950 characters instead of the 62 of a classical age1 recipient. It is still just a public key and still safe to share.

Can I add a classical recipient too?

No. A post-quantum recipient cannot be combined with a classical one on the same file. Encrypt twice if two people need the file on different key types.

What does the recipient need to open it?

age CLI 1.3 or newer, or AgePony 3.0 or later. Older age builds do not recognise the post-quantum stanza and will refuse the file.

Is this worth doing today?

It is worth doing for anything that must stay secret for years. Traffic captured now can be stored and attacked later, so long-lived secrets are the ones that benefit.

Next steps.

Get AgePony

Free file encryption for iOS and Android. No accounts, no tracking, no servers.