The Idea

timelock.sh lets you encrypt some file today that should only be readable after a specific time (like one week from now). You can give this encrypted file to anybody and guarantee that they won't be able to decrypt it until the time you specified when performing the encryption.

The way it works is that for every minute of the next month, timelock.sh publishes a public lock (an X.509 certificate, available immediately). When that minute arrives, timelock.sh then makes the corresponding secret key accessible.

To encrypt to a future minute, you fetch that minute's certificate and run an openssl cms -encrypt (see docs) or encrypt the file on this website. The resulting encrypted file embeds which minute it's bound to, so the recipient doesn't need to know the unlock time in advance. They (or anyone) can extract it from the file once the time comes, fetch the released key, and decrypt.

Architecture

You (Browser / CLI) timelock.sh API (read-only) Key Worker (firewalled) BEFORE UNLOCK TIME 1. Fetch certificate for minute T Self-signed X.509 certificate 2. Encrypt locally AES-256-GCM + RSA-OAEP wrap ... time passes ... AT UNLOCK TIME 3. Worker decrypts and publishes private key (runs every minute) 4. Fetch private key RSA private key (PKCS#8 PEM) 5. Decrypt locally Unwrap AES key, decrypt file

Encryption Format

The browser and CLI produce the same thing: a DER-encoded CMS AuthEnvelopedData file. In OpenSSL terms, it is roughly:

openssl cms -encrypt \
  -recip cert.pem \
  -keyopt rsa_padding_mode:oaep -keyopt rsa_oaep_md:sha256 \
  -aes-256-gcm \
  -outform DER
Envelope
CMS/PKCS#7 AuthEnvelopedData, as described by RFC 5083.
File key
A fresh AES-256 key is generated for the file, then wrapped to the minute certificate with RSA-OAEP/SHA-256.
Payload
The file bytes are encrypted with AES-256-GCM, so tampering should fail during decrypt.
Unlock minute
Stored in the recipient certificate name inside the CMS structure. That is what lets the decrypt page know which released key to fetch.

The format is intentionally boring: OpenSSL can decrypt it after the key is public, and timelock.sh does not need its own file container.

Trust Model

Certificate Format

Each minute gets a self-signed X.509 certificate:

FAQ

How can I know you won't release keys early?

You can't. This is a trust-based oracle. Use at your own risk, but I will make a best effort to run this securely.

What type of encryption does this use?

It uses 2048 bit RSA encryption and x.509 certificates for the public keys. 4096 bit keys seem overkill due to the short term nature of the encryption.

How did you select these encryption standards?

I chose a standard that was OpenSSL compatible so that devs and agents can programmatically use this tool with zero dependencies.

What if the service goes down?

Encrypted data stays locked. Don't rely on timelock.sh as your only way to access critical data.

Can I encrypt to a past time?

Yes. The key is already released, so you can encrypt and immediately decrypt.

How far ahead can I encrypt?

Up to one month, about 30 days. Requests beyond the key horizon return 404.

Is my file uploaded?

No. Encryption and decryption happen entirely on your device. The server only provides keys.