How it works

timelock.dev is a thin interface to tlock, a timelock encryption scheme built on the drand distributed randomness beacon. Nobody holds a key you need to trust us with, and nobody can open your message early, including us.

The idea in four steps

  1. drand is a network run by the League of Entropy, a group of independent organizations. Every 3 seconds it publishes a round: a threshold BLS signature over the round number. No single member can produce it alone.
  2. That signature doubles as a private key in an identity-based encryption scheme (Boneh–Franklin on the BLS12-381 curve), where the "identity" is the round number. Anyone can encrypt to a future round using only the network's public key.
  3. Your message is encrypted with a random key using age (ChaCha20-Poly1305), and that key is encrypted to the target round. The output is a normal age file with a tlock recipient line: -> tlock <round> <chain hash>.
  4. When the round arrives, drand publishes its signature. Anyone holding the ciphertext can fetch it, recover the key and read the message.

The construction is described in tlock: Practical Timelock Encryption from Threshold BLS (Gailly, Melissaris and Romailler, 2023). This site uses the drand team's tlock-js. Its output is interchangeable with tlock (Go) and tlock-rs / dee (Rust).

The network: drand quicknet

Chain hash52db9ba70e0cc0f6eaf7803dd07447a1f5477735fd3f661792ba94600c84e971
Public key83cf0f2896adee7eb8b5f01fcad3912212c437e0073e911fb90022d3e760183c8c4b450b6a0a6c3ac6a5776a2d1064510d1fec758c921cc22b0e17e63aaf4bcb5ed66304de9cf809bd274ca73bab4af5a6e9c76a4bc09e76eae8991ef5ece45a
Schemebls-unchained-g1-rfc9380 (unchained, signatures on G1, RFC 9380 hashing)
Period3 seconds
Genesis2023-08-23 15:09:27 UTC (round 1)
Relayshttps://drand.cloudflare.com, https://api.drand.sh, https://api2.drand.sh, https://api3.drand.sh

Round r is published at genesis + (r − 1) × 3 s. The chain parameters above are built into the site and API, and every signature fetched from a relay is verified against the public key. A relay can delay or withhold a round, but it can't forge one.

Client-side vs server-side: who sees what

Website (browser)JSON API / original endpointsLocal CLI
Where encryption runsIn your browserOn our Cloudflare WorkerOn your machine
timelock.dev sees your messageNoYes, in memory during the requestNo
timelock.dev sees the ciphertextNoYes, in memory during the requestNo
drand relays seeYour IP and the round you decryptOur Worker's request for the roundYour IP and the round
Recorded in the feedEvent type, round, time (reported by your browser)Event type, round, timeNothing

Encrypting needs no network at all: the browser has the quicknet public key built in. Decrypting fetches one public signature from a drand relay.

What we store

One row per event in a Cloudflare D1 database: encrypt or decrypt, website or API, the server time, the drand round and its unlock time. That's what the public feed shows. We don't store or log plaintext, ciphertext, IP addresses, user agents or cookies, and the site has no analytics or third-party scripts. Like any site on Cloudflare, requests pass through Cloudflare's network, which processes connection data for security and abuse prevention.

Doing it yourself

For anything important, encrypt locally. With dee (prebuilt binaries for Linux, macOS and Windows):

# once: point dee at quicknet
dee remote add quicknet https://api.drand.sh/52db9ba70e0cc0f6eaf7803dd07447a1f5477735fd3f661792ba94600c84e971

# encrypt for 30 days (also accepts a round number or a date like "2030-01-01 00:00:00")
dee crypt -a -r 30d message.txt > message.age

# decrypt once the round has passed
dee crypt --decrypt message.age

Files made this way decrypt on this site, and vice versa.

Limitations

Read these before you lock up anything that matters.

Further reading