Preparing your design workspace

Loading the problem and your latest saved attempt…

Design a Read-Once Secret Sharing Service

Design a secure service that creates independent secret-sharing URLs and allows exactly one successful redemption per share under concurrency.

Problem statement

For this exercise, assume an authenticated creator submits a password or other small secret and receives two independent high-entropy capabilities: a recipient URL that may reveal the secret once, and a creator-only status token that can report whether that share is unread, consumed, or expired without revealing the secret.

Every create request produces a distinct share even when different users submit identical secret bytes or one user shares the same secret separately with several recipients.

The first valid redemption for one share atomically changes it from unread to consumed and receives the plaintext; concurrent or later attempts receive only a consumed result. If the winning response is lost after consumption, the service preserves at-most-once disclosure and does not reveal the secret again.

Shares expire after 24 hours. Secret ciphertext must be deleted within one minute after consumption or expiry, while non-secret status metadata may remain for 30 days.

Exclude recipient identity verification, password-manager features, file attachments, message delivery, secret rotation, and recovery of consumed or expired plaintext.

What to build

  1. An authenticated creator can create an independent expiring share for a small secret and receive separate redemption and status capabilities.
  2. Exactly one valid redemption attempt for a share can receive its plaintext, even when requests race or retry.
  3. The creator can use a separate status capability to learn whether one share is unread, consumed, or expired without retrieving the secret.

At scalePractice assumption

  • Create up to 10 million independent shares per day, with peaks of 5,000 creates and 10,000 redemption attempts per second.
  • Secrets are at most 16 KiB, unread shares expire after 24 hours, and create, status, and redemption requests should complete within 300 milliseconds at p95 when healthy.
  • One share's plaintext is disclosed by at most one successful response; a lost winning response is not recoverable through retry.
  • Ciphertext is encrypted with per-share key material, never appears in application logs or caches, and is deleted within one minute after consumption or expiry; non-secret lifecycle metadata is retained for 30 days.