One-time link format v1

Technical reference for onetime.ie link fragments, client-side encryption, token sizes and one-time release.

Recipient and status fragments

All binary values are canonical, unpadded base64url. A plain recipient fragment holds the version, mode, record ID, visit token, release token and encryption key. A protected fragment replaces the last two with an encrypted envelope.

The status link has its own fragment with the record ID and a status token. The status token can only read the status. It can’t release the secret.

What the client sends

Encode the message as UTF-8 and encrypt it with AES-256-GCM, using a fresh 256-bit key, a 12-byte nonce and a 16-byte tag. Generate a separate random 32-byte release token and send its SHA-256 hash, in lowercase hex, together with the encrypted record.

The Web Crypto module linked from the API docs already handles serialization, canonical encoding, fragment validation and browser compatibility.

Protected envelope

The client derives a 256-bit wrapping key with PBKDF2-HMAC-SHA-256, 600,000 iterations and a fresh 16-byte salt. AES-GCM then encrypts the 32-byte release token followed by the 32-byte message key, with its own 12-byte nonce. The additional authenticated data is the UTF-8 string v1.pass. followed by the encoded record ID.

Fragment shapes

Version 1 · field names shown in place of values
/reveal#v1.plain.<id>.<visit_token>.<release_token>.<message_key>
/reveal#v1.pass.<id>.<visit_token>.<salt>.<wrap_nonce>.<wrapped>
/status#v1.<id>.<status_token>

Record IDs and salts are 16 bytes. Visit, release and status tokens are 32 bytes each. Wrapping nonces are 12 bytes. The wrapped field includes the 16-byte authentication tag and totals 80 bytes.

Recipient pages strip the fragment from the address bar after parsing. Keep the original link available until the recipient finishes the handoff.

Fragment modes
Mode What the fragment holds
Plain recipientRecord ID, visit token, release token and message key.
Protected recipientRecord ID and visit token, plus salt, nonce and the encrypted release token and key.
Private statusRecord ID and status token.

Frequently asked questions

Should the fragment be percent-encoded?

No. Use the base64url fields and dot separators exactly as documented, directly after the #.

Does a wrong passphrase use up a protected link?

No. The client checks the envelope locally before it asks the server for anything.