π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Add docs for Paste and 2of3
Manav Rathi0dfc338e8c0f
diff --git a/docs/docs/2of3/faq.md b/docs/docs/2of3/faq.mdnew file mode 100644index 0000000000..6bef934d28--- /dev/null+++ b/docs/docs/2of3/faq.md@@ -0,0 +1,198 @@+---+title: 2of3 FAQ+description: Common questions about splitting secrets, storing cards, recovery, privacy, and edge cases+---++# 2of3 FAQ++Answers to common questions about splitting secrets, storing cards, and recovery. If your question is not here, browse [Getting started](/2of3/getting-started) or [How it works](/2of3/how-it-works), or write to [[email protected]](mailto:[email protected]).++## Basics++### What is 2of3, exactly? {#2of3-what-is}++2of3 turns one secret into three recovery cards. Any two cards can bring the secret back. One card by itself is not enough.++It is a web app at [2of3.ente.com](https://2of3.ente.com). There is no account, nothing to install, and your secret never leaves your browser.++### When is 2of3 useful? {#2of3-when-useful}++Use it for something important that feels risky to keep in one place: an Ente recovery key, a password manager master password, a wallet recovery phrase, a full-disk encryption key, a break-glass production credential, or another recovery code you do not want to lose.++If a secret would be a disaster to lose _and_ a disaster to leak, 2of3 is the right shape of tool. Learn more in the [intro](/2of3/).++### Why not just keep the secret in one note? {#2of3-why-not-one-note}++A single note is a single point of failure. If that one place is lost, stolen, or forgotten, recovery becomes hard. If it falls into the wrong hands, the damage is done.++2of3 lets you spread the risk without making recovery too difficult. Three copies in three places means losing one place is no longer fatal, and the "any two" threshold means an attacker who finds one card still has nothing usable.++### Why "2-of-3" specifically and not some other split? {#2of3-why-two-three}++Three places is concrete and memorable. Requiring two cards means losing one place is not a disaster. Requiring all three would make recovery too fragile (one fire ends everything). Requiring only one would not improve on a single note at all.++2of3 is built around exactly the 2-of-3 case so that the UI, the cards, the recovery flow, and the explanations can all be specific and friction-free. If you need a general k-of-n scheme for a research or engineering project, look at SLIP-0039 or a Shamir library instead.++## Storage++### Where should the three cards go? {#2of3-where-to-store}++Keep the three cards in different safe places. Home, a safe, a trusted family member, a desk drawer at work, a document locker, or a safe-deposit box are all reasonable. The important part is separation.++A common spread is:++- One with your important documents (passport, will, deeds).+- One physically separate from your home: work, a safe-deposit box, or another building.+- One with a trusted person: a spouse, an adult child, an executor, or a long-time friend.++Mix formats freely: a printed card in one place, a downloaded PNG on a USB stick in another, and the text code in a sealed note for the third is a fine combination. Learn more in [Getting started](/2of3/getting-started#store-the-cards-in-different-places).++### Should I print, download, or both? {#2of3-print-or-download}++Either is fine. Printed cards are easy to store offline and survive things that damage hard drives. Downloaded images are easier to duplicate carefully (a backup of a backup, on a USB stick in a safe). Many people will want both (a printed copy and a saved PNG of the same card stored in two different places) so a single fire or disk failure does not take out an entire card.++### Can I store two cards in the same place "just to be safe"? {#2of3-two-in-one-place}++No. Two cards together is the whole secret. The protection comes from physical separation, not from the format the cards are in. If you keep two cards in the same drawer, that drawer now contains your secret in full.++If you want extra safety against a single card being damaged, keep duplicates of the _same_ card in places that are already paired with that card's location. For example: a printed copy of Card 1 in your safe and a PNG of Card 1 on a USB stick in the same safe is fine, because the safe was already going to hold Card 1's worth of information.++### Should I label the cards with what they unlock? {#2of3-label-cards}++A short hint is helpful, especially for cards intended for an executor or a future you who has forgotten the context. Consider attaching a sticky note or envelope that says what the secret is for (so the finder knows whether to act on it), where the other two cards are likely to be (so they have somewhere to start), and a reminder that any two of the three are enough.++Avoid writing the secret itself on the same card, of course. That defeats the point.++## Recovery++### Do I need all three cards to recover? {#2of3-need-all-three}++No. Any two are enough. The third card is there so one missing card does not lock you out.++### How do I recover later? {#2of3-how-to-recover}++Open 2of3 at [2of3.ente.com](https://2of3.ente.com), or use the offline recovery HTML file you downloaded with the cards. In the **Recover** section, upload any two card images (PNGs, JPGs, or phone photos of printed cards), or paste their text codes. Click **Recover secret** and the original secret appears on the page.++The full walkthrough lives in [Getting started](/2of3/getting-started#recover-the-secret).++### Can I recover from a photo of a printed card? {#2of3-recover-from-photo}++Yes. 2of3's QR reader tries several crops automatically, so a phone photo with the whole card in frame usually decodes on the first try. If a particular photo does not decode, take another with even lighting, no glare on the QR, and the whole card clearly in frame, or try a tighter crop on the QR.++The same forgiveness applies when recovering from the [offline recovery file](/2of3/how-it-works#offline-recovery-file).++### Should I test recovery before storing the cards? {#2of3-test-first}++Yes. Before you put the cards away, try recovering the secret once using two of the cards you just made. It is the quickest way to catch a bad print, a saving mistake, or a card from the wrong set. Ideally, try all three possible pairs (1+2, 1+3, 2+3) so you know every card is good.++### One of my cards is damaged. Am I locked out? {#2of3-card-damaged}++Not by itself. The whole point of 2of3 is that any two of the three cards are enough. If one card is damaged, the other two still recover the secret.++If two cards are damaged or lost at the same time, you are down to one share, which by itself cannot reconstruct the secret. At that point, treat the secret as effectively gone and rotate it (generate a fresh secret and a fresh set of cards) if you can.++### The recovery flow says "These two cards are from different sets". {#2of3-different-sets}++The two cards you uploaded were generated from different secrets, so their **IDs do not match**. Each set of three cards shares one ID (shown as something like `ID A1B2C3D4`). Both cards being combined must have the same ID.++If you have a stash of old and new cards, look at the ID on each card and group them. Only combine cards that share an ID.++### The recovery flow says "Use two different cards from the same set". {#2of3-duplicate-cards}++The two cards you uploaded share the same card number. You probably uploaded the same card twice (for example, the printed card and its saved PNG). Recovery needs two _different_ card numbers from the same set: 1 and 2, 1 and 3, or 2 and 3.++### The recovery flow says "These shares did not reconstruct a valid secret". {#2of3-bad-reconstruct}++Both cards parsed fine but combined into bytes that did not match the checksum stored on each card. This usually means at least one card has been corrupted: a misread QR, a transcribed text code with a typo, or a faint print where the decoder picked up wrong bits.++Try a different pair of cards. With three cards in a set there are three possible pairs (1+2, 1+3, 2+3); if exactly one card is bad, two of those three pairs will still recover the secret.++### Can a chat app eating my link or text break recovery? {#2of3-chat-mangling}++If you share a card by sending the text code through a chat app that wraps lines, adds invisible characters, or auto-formats text, the recipient may end up with a mangled code. 2of3 ignores ordinary whitespace and line breaks, so a wrapped code is fine, but if a chat app turned characters into "smart quotes" or stripped the `2of3-` prefix, the code will not parse.++Safer options are to share the **PNG image** of the card (which travels well through most channels), the original PNG file as an attachment, or the code through an end-to-end-encrypted channel that does not modify the message body.++## Privacy and trust++### Does this send my secret to Ente? {#2of3-sends-to-ente}++No. Your secret is split and recovered in your browser. There is no account, no sign-in, and nothing about your secret leaves the page. The downloaded offline recovery file also works fully offline.++### Can one card alone reveal my secret? {#2of3-one-card-leak}++No. A single card is mathematically harmless on its own. It looks like random data because that is what it is: the secret XOR-ed with a uniformly random byte (per byte). Knowing one card gives the same information about the original secret as knowing zero cards: none.++You need any two of the three before the secret can be reconstructed.++### What if 2of3.ente.com is gone in 10 years? {#2of3-site-gone}++Recovery still works. When you click **Download all cards**, 2of3 also downloads a file called `2of3-recovery.html`, a fully offline copy of the recovery flow. Open that file in any browser, drop in any two cards, and recover.++2of3 is also [open source](https://github.com/ente-io/ente), and the [share format](/2of3/how-it-works#share-format) is documented, so even if both Ente and the offline file were gone, someone with the cards could write their own recovery tool from the format description.++### What information does Ente collect when I use 2of3? {#2of3-collected-info}++Nothing about your secret or your cards. 2of3 has no account, no sign-in, and no server-side processing of any card data. The site itself is hosted like any other page on `ente.com`, which means standard server-side request logs (an IP address connected to fetch the page) exist for the page load, but the secret you type and the cards you generate are processed entirely on your device.++### Is 2of3 open source? {#2of3-open-source}++Yes. 2of3 is part of [Ente's open source repository](https://github.com/ente-io/ente). The Shamir implementation, the share format, the QR encoder, and the offline recovery file generator are all there to read.++## How it works++### Walk me through the math. {#2of3-the-math}++2of3 uses Shamir secret sharing with a (k=2, n=3) threshold. For each byte of your secret it picks a uniformly random byte _r_ and stores:++- Share 1: secret byte XOR _r_+- Share 2: secret byte XOR (r Γ 2 in GF(256))+- Share 3: secret byte XOR (r Γ 3 in GF(256))++GF(256) multiplication uses the AES polynomial (`0x11b`). Any two shares plus their share numbers (1, 2, or 3) recover the secret byte by byte; one share alone is a uniformly random byte from the attacker's point of view.++The full walkthrough lives in [How it works](/2of3/how-it-works#shamir-secret-sharing-briefly).++### What is the `ID A1B2C3D4` thing on the card? {#2of3-card-id}++The ID is a short fingerprint that identifies the set. All three cards from one secret share the same ID; cards from different secrets have different IDs. It exists so that recovery can tell "two cards from the same set" apart from "two cards that happen to look similar", and so that you can group cards by eye when you have a stash of old and new ones.++The displayed ID is the first 8 characters of the base64url-encoded 6-byte random ID embedded in the card. Learn more in [How it works](/2of3/how-it-works#share-format).++### What is the maximum secret size? {#2of3-secret-too-long}++The format supports up to 2048 bytes, but the practical limit on the website is whatever still fits as a readable QR plus four lines of printed text on a card, currently around 200 bytes of text. The byte counter under the **Secret** field shows the current limit live.++For most things people use 2of3 for (recovery keys, master passwords, wallet phrases, 2FA backup codes), the limit is more than enough. If your secret is longer, consider splitting it logically into pieces that each fit, or use 2of3 to protect a key that decrypts the long content stored separately.++### Can I edit one card and re-split? {#2of3-edit-one-card}++No. 2of3 generates a complete set of three cards from one secret in one step. There is no "edit Card 2 in place" because the math links all three cards through one random per-byte coefficient.++If the underlying secret needs to change, generate a fresh set of three cards from the new secret and replace all three old cards. Do not mix cards from different sets.++## Comparison and scope++### How is this different from a Legacy Kit or Ente's account recovery? {#2of3-vs-legacy-kit}++[Ente's Legacy](/locker/features/legacy/) is an account-level feature: trusted contacts (and Legacy Kits) can request access to your Ente account after a waiting period. It is integrated with Ente, requires a server, and is built around the lifecycle of a person's account.++2of3 is a single-purpose tool that operates on _any_ piece of text. It has no account, no server, and no concept of "your account". You can use it to back up an Ente recovery key, but you can also use it to back up a Bitcoin seed phrase, a LUKS recovery passphrase, or anything else. The trade-off: 2of3 has no time-delay protection, no notifications, and no concept of "who is the rightful owner". Anyone with two cards reconstructs the secret.++Use Legacy if you want an account-aware, time-delayed inheritance flow tied to Ente. Use 2of3 when you want a generic split-and-recover that works on any secret and survives any one place failing.++### How is this different from a password manager? {#2of3-vs-password-manager}++A password manager is for the secrets you use every day. 2of3 is for the one or two secrets a password manager itself depends on (the master password, the recovery key, the seed phrase) that you cannot store inside the password manager for obvious reasons.++The two are complements, not substitutes.++### Is 2of3 a place to store passwords? {#2of3-as-store}++No. 2of3 is a one-shot split for a single secret. There is no "vault", no listing of stored secrets, no sync, and no concept of multiple entries. If you want a place to store many secrets, use [Ente Locker](/locker/) or a password manager. Use 2of3 for the small number of underlying secrets that those tools themselves depend on.++## Related topics++- [Getting started](/2of3/getting-started): splitting, storing, testing, and recovery walkthroughs.+- [How it works](/2of3/how-it-works): Shamir secret sharing, the share format, the offline recovery file, and the QR decoder.+- [2of3 overview](/2of3/): what 2of3 is and when to use it.diff --git a/docs/docs/2of3/getting-started.md b/docs/docs/2of3/getting-started.mdnew file mode 100644index 0000000000..f1a2d3f802--- /dev/null+++ b/docs/docs/2of3/getting-started.md@@ -0,0 +1,142 @@+---+title: Getting started+description: Split a secret into 3 cards, store them safely, test recovery, and recover later+---++# Getting started++This page walks through the full lifecycle of a 2of3 set: splitting your secret, storing the three cards, testing that recovery actually works, and recovering later.++Open 2of3 at [2of3.ente.com](https://2of3.ente.com). No account, nothing to install. Everything described here happens in your browser.++## Split a secret into 3 cards++1. Open [2of3.ente.com](https://2of3.ente.com).+2. In the **Secret** field on the left, paste or type the secret you want to split. This can be a recovery key, a master password, a wallet phrase, or any short piece of text. The counter under the field shows how many bytes you have used out of the maximum.+3. Optionally edit the **Card label**. By default it shows today's date (for example, `26 May 2026`). The label is printed on each card so you can tell different sets apart later.+4. Three cards appear on the right as soon as the secret is valid. Each card shows a QR code, a card number (1, 2, or 3), and an `ID` like `A1B2C3D4`. All three cards from one secret share the same ID.++> [!IMPORTANT]+>+> Treat the three cards as a single set. Never mix cards from different sets. Recovery only works when all the cards being combined share the same ID and were generated from the same secret. If you change the secret, generate a fresh set and replace all three cards together.++### Save the cards++Each card has its own controls. From the card panel you can:++- **Print**: opens a print dialog for that single card.+- **Download**: saves the card as a PNG image (high-resolution, suitable for printing later).+- **Share**: opens the system share sheet on platforms that support it (mobile and some desktop browsers). If sharing is not available, the card is downloaded instead.+- **Copy code**: copies just the text code for that card (the string that starts with `2of3-`) so you can paste it into a note or a password manager.++For the typical case where you want all three cards plus the offline recovery file, click **Download all cards** under the secret field. This downloads four files:++- Three PNG images, one per card, named like `today-set-a1b2c3d4-card-1.png`.+- One HTML file, `2of3-recovery.html`, which is a fully offline copy of 2of3's recovery flow. Learn more in [How it works](/2of3/how-it-works#offline-recovery-file).++> [!NOTE]+>+> The maximum secret size on 2of3 is about 200 bytes of text. The exact limit is whatever still fits in a printable card. The byte counter under the **Secret** field shows the current limit. If your secret is too long to fit, see [the FAQ](/2of3/faq#2of3-secret-too-long).++## Store the cards in different places++The whole point of 2of3 is separation. Three copies in the same drawer is just one drawer.++A reasonable spread is something like:++- One card with your important documents (passport, will, deeds).+- One card somewhere physically separate: a safe at home, a desk drawer at work, or a safe-deposit box.+- One card with a trusted person: a spouse, an adult child, an executor, or a long-time friend.++The cards do not need to be all paper or all digital. Mixing is fine:++- **Printed cards** are easy to store offline and survive things that damage hard drives.+- **Downloaded PNGs** are easy to copy carefully (a backup of a backup, on a USB stick in a safe) and easy to share via end-to-end-encrypted channels.+- **Copied text codes** are easy to paste into a password manager, a sealed note, or an encrypted vault.++Many people will want both a printed copy and a saved image of the same card, in two different places, so that one fire or one disk failure does not take out an entire card.++> [!IMPORTANT]+>+> Do not store two cards in the same place. Two cards together is the whole secret. The protection comes from physical separation, not from the format.++### Label the cards so a stranger could use them++The cards already include the app's name (`2of3.ente.com`), the card number, and the ID. That is enough for someone who has heard of 2of3, but a card found years from now by someone unfamiliar may need a hint. Consider adding a sticky note or envelope that says:++- What the secret is for (so they know whether to act on it).+- Where the other two cards are likely to be (so they have somewhere to start).+- A reminder that any two of the three are enough.++If you are leaving the cards as part of an estate plan, write down which secret each set protects and which person should hold which card.++## Test recovery before you put the cards away++This is the most important step, and the easiest to skip.++Before you store the cards, scroll down to the **Recover** section on the same page and try recovering the secret with any two of the cards you just made. This catches:++- A bad print (faint or smudged QR).+- A download that got truncated.+- A card from a different set that snuck in by mistake.+- A copy-paste that dropped a character at the end of the code.++If recovery works on all three of the (any two) pairs, the set is good and you can put the cards away.++## Recover the secret++You can recover at any later time using:++- 2of3 at [2of3.ente.com](https://2of3.ente.com), in the **Recover** section, or+- The offline recovery HTML file you downloaded with the cards.++Both paths work the same way and run entirely in your browser.++1. Open 2of3.ente.com, or open `2of3-recovery.html` from wherever you stored it (double-click works on most operating systems; it opens in your default browser).+2. The recovery section has two slots: **Card A** and **Card B**. They are interchangeable.+3. For each slot, do one of the following:+ - **Upload image**: pick a saved card PNG or JPG, or a phone photo of a printed card.+ - **Drag and drop**: drop an image file directly onto the slot.+ - **Paste code**: paste the text code that starts with `2of3-` into the **Code A** or **Code B** field.+4. As soon as a slot has a valid card, the slot shows which card it is. For example: `Card 2 from ID A1B2C3D4`. Make sure both slots show the same ID.+5. Click **Recover secret**. The original secret appears in a **Recovered secret** box. Click **Copy** to copy it to your clipboard.++### Recovering from a phone photo++Photos of printed cards just work, because 2of3 tries several crops when reading the image. If your phone photo has the whole card in frame and the QR is reasonably in focus, it should decode on the first try. If it does not:++- Make sure there is even light on the card and no strong glare on the QR.+- Try a tighter crop that mostly contains the QR.+- Try a higher-resolution photo if you used a low-quality scan.++Learn more about the QR decoder in [How it works](/2of3/how-it-works#qr-decoder).++### Recovering from a text code++If you only have the text codes (for example, you copy-pasted them into a password manager), paste each code into its **Code A** or **Code B** field. The code is the long string that starts with `2of3-`. Whitespace and line breaks inside the code are ignored, so codes that wrap across multiple lines in your notes app are fine.++### What the errors mean++If something goes wrong during recovery, 2of3 explains what happened. The common ones:++- **"These two cards are from different sets. Match the ID on both cards."** The two cards you uploaded were generated from different secrets (different IDs). Check the `ID A1B2C3D4` line under each slot. Both must match. If they do not, find a card that belongs to the right set.+- **"Use two different cards from the same set."** You uploaded the same card twice, or two copies of the same card (for example, the printed card and its PNG). You need two _different_ card numbers from the same set: 1 and 2, 1 and 3, or 2 and 3.+- **"That code does not look like a 2of3 share."** The pasted text is not a 2of3 code. A real code always starts with `2of3-`.+- **"That share looks incomplete."** or **"This share was cut off."** The code is missing characters at the end. This usually means a copy-paste lost the tail of the code, or the code was wrapped and the last line was missed.+- **"These shares did not reconstruct a valid secret."** The two cards parsed fine but did not combine into the original secret. This usually means at least one card is corrupted (a misread QR, an edited text code, or a bad print). Try a different pair of cards; with three cards in a set, you have three possible pairs.+- **"Could not read that image."** or **"Could not read that QR code."** The uploaded image was not a recognizable QR. Try a clearer photo, a tighter crop, or upload the original PNG instead of a screenshot.++## Replace or rotate a set++If you need to change the underlying secret (for example, you rotated a password), treat it as a brand-new 2of3 set:++1. Generate a fresh set of three cards from the new secret.+2. Distribute the new cards to the same three places.+3. Destroy the old cards (shred the printed ones, delete the PNGs, clear the text from your notes).++Do not keep one old card "just in case". An old card combined with an old card from somewhere else still recovers the old secret, which is exactly what you stopped wanting recoverable.++## Related topics++- [How it works](/2of3/how-it-works): Shamir secret sharing, the share format, the offline recovery file, and the QR decoder.+- [FAQ](/2of3/faq): answers to common questions.diff --git a/docs/docs/2of3/how-it-works.md b/docs/docs/2of3/how-it-works.mdnew file mode 100644index 0000000000..b02c5fa2ba--- /dev/null+++ b/docs/docs/2of3/how-it-works.md@@ -0,0 +1,103 @@+---+title: How it works+description: Shamir secret sharing over GF(256), the on-card share format, the offline recovery file, and the QR decoder+---++# How it works++This page explains what is actually happening when 2of3 splits a secret into three cards and what is on each card. None of this is required reading for using 2of3. If you just want to split a secret and recover it later, [Getting started](/2of3/getting-started) is enough. This page is for the people who want to understand the math, audit the format, or build their own recovery tool from the cards.++## Shamir secret sharing, briefly++2of3 is built on **Shamir secret sharing**, a classic cryptographic scheme from 1979. The version 2of3 uses is the simplest interesting case: split a secret into three shares such that any two shares reconstruct the original, and any one share alone leaks nothing.++The intuition is a straight line through two points. Pick any line through the y-axis. The y-intercept is your "secret". The slope is a random number you throw away after using it. Now pick three different x values (say x = 1, 2, 3) and compute the corresponding y values on that line. Each (x, y) pair is one "share".++- Give someone any **one** share (one point on the line), and they can draw infinitely many lines through it. They learn nothing about the y-intercept.+- Give someone **any two** shares (two points on the line), and there is exactly one line through both. They can compute the y-intercept, which is the secret.++Doing this over ordinary numbers would leak information (large secrets give shares with predictable sizes, for example), so Shamir's scheme does the arithmetic over a finite field. 2of3 uses **GF(256)** (the finite field with 256 elements), which has the convenient property that every byte is a valid element. That lets 2of3 split a secret byte by byte, with each share being exactly the same size as the secret.++For the (k=2, n=3) scheme that 2of3 uses, the per-byte math is small enough to write out:++- For each secret byte _s_, 2of3 picks a uniformly random byte _r_.+- Share 1 stores _s_ XOR _r_.+- Share 2 stores _s_ XOR (r Γ 2 in GF(256)).+- Share 3 stores _s_ XOR (r Γ 3 in GF(256)).++GF(256) multiplication uses the standard AES polynomial (`0x11b`). Two of those three shares plus their share numbers (the "x values" 1, 2, 3) are enough to recover _s_ for every byte, which gives back the whole secret. One share, by itself, is _s_ XOR (some random byte), which is indistinguishable from random.++> [!NOTE]+>+> 2of3 specifically implements the 2-of-3 case for clarity and simplicity. If you want general-purpose k-of-n Shamir sharing for a research project, look at SLIP-0039 or similar standards. 2of3's job is to make 2-of-3 friction-free for normal people, not to be a general crypto library.++## What is on a card++Each card carries one share, encoded as a short text code (and rendered as a QR code on the same card for easy phone capture). The text code looks like this:++```+2of3-AQEA...+```++The `2of3-` prefix is there so a reader can recognize the code at a glance and so 2of3 itself can reject pasted text that is not a share with a clear error message ("That code does not look like a 2of3 share.").++Everything after the prefix is a base64url-encoded byte payload. The payload has a 14-byte header followed by the share bytes.++### Share format++Reading from the start, the payload is:++| Bytes | Field | What it means |+| ----- | ---------- | ------------------------------------------------------------------------------------------------------------------------ |+| 0 | Version | Always `1` in the current format. Future versions can use a different number to introduce a breaking change. |+| 1 | Card index | `1`, `2`, or `3`. This is the "x value" used during recovery to combine shares. |+| 2-3 | Length | A 16-bit big-endian length of the secret in bytes. Both shares in a recovery must agree on this. |+| 4-9 | Random ID | 6 bytes of `crypto.getRandomValues` output, generated fresh for each set. All three cards from one secret share this ID. |+| 10-13 | Checksum | A 32-bit checksum of the original secret bytes, computed before splitting. |+| 14+ | Share data | The share bytes themselves. The same length as the original secret. |++The ID and checksum are what let recovery be safe and helpful:++- The **random ID** is used to detect mismatched cards. If you try to combine a card from one set with a card from a different set, both cards parse fine but their IDs disagree, and 2of3 stops with "These two cards are from different sets. Match the ID on both cards." The card's UI shows the first 8 characters of the base64url-encoded ID as the human-readable fingerprint (for example, `ID A1B2C3D4`) so you can match cards by eye too.+- The **checksum** is used to detect corrupted cards. After combining, 2of3 recomputes the checksum of the recovered bytes and compares it against the checksum stored on each card. If they disagree, you get "These shares did not reconstruct a valid secret." instead of silently returning garbage. The checksum is a simple FNV-1a 32-bit hash, not a cryptographic MAC, because the ID and the share data are not secret and there is no one for an attacker to lie to. The checksum is there to catch accidents like a misread QR or a transcription error.++The maximum secret size 2of3 will accept is 2048 bytes in principle, but the practical limit is whatever still fits as a readable QR plus four lines of printed text on a card, currently about 200 bytes of text. The byte counter under the **Secret** field in the UI shows the live limit.++## Offline recovery file++When you click **Download all cards**, 2of3 includes one extra file alongside the three card PNGs: `2of3-recovery.html`. This is an offline copy of the recovery flow.++What is in it:++- A standalone HTML page with the recovery UI from 2of3.ente.com.+- The full Shamir combine logic, written out as inline JavaScript.+- A bundled QR decoder, so you can upload phone photos of printed cards and have them decoded locally.+- No network requests. No dependencies on Ente, on 2of3.ente.com, or on any CDN.++You can open this file by double-clicking it. It works in any modern browser. Recovery using this file is identical to recovery on 2of3.ente.com: drop two cards (image or text), click **Recover secret**, copy the result.++This file is the answer to the question "what happens if 2of3.ente.com is gone in 10 years?". The answer is: nothing. You open the HTML file you stored alongside your cards, and recover. Even if Ente as a company is gone, the file does not need anything from us. It is a few hundred lines of inspectable JavaScript that does exactly what 2of3.ente.com does.++> [!IMPORTANT]+>+> Treat the offline recovery file like a backup. Store at least one copy somewhere durable: on a USB stick, in a backup, or printed alongside the cards if you are storing things in a safe. The cards are the secret; the recovery file is the tool that opens them.++The file is also a verification target: because the file is self-contained plain JavaScript, you can read it, run it through static analysis, or compare it against the [open source repository](https://github.com/ente-io/ente) to convince yourself that it does what it claims. There is no remote service to trust.++## QR decoder++2of3's recovery accepts more than just cleanly cropped QR images. Phone photos of printed cards usually have the QR taking up only a portion of the frame, surrounded by the rest of the card. To handle this without asking the user to crop, the QR decoder tries several attempts on each uploaded image:++1. Decode the whole image at its full size.+2. Decode the whole image with auto-square cropping.+3. Decode three progressively tighter card-shaped crops, each cropped to roughly where the QR sits on a 2of3 card.++The first attempt that returns a valid code wins. In practice this means a casual phone photo with the whole card in frame decodes on the first or second card-shaped crop. If you have already cropped tightly to the QR, the full-image attempts succeed. The same logic ships inside the [offline recovery file](#offline-recovery-file), so the same forgiveness applies there.++If none of the attempts succeed, the recovery flow shows "Could not read that QR code." and you can try a clearer photo or paste the text code instead.++## Related topics++- [Getting started](/2of3/getting-started): splitting, storing, and recovering, with the actual UI steps.+- [FAQ](/2of3/faq): answers to common questions about safety, storage, and edge cases.+- [Source code on GitHub](https://github.com/ente-io/ente): the full 2of3 source, including the Shamir implementation and the offline recovery file generator.diff --git a/docs/docs/2of3/index.md b/docs/docs/2of3/index.mdnew file mode 100644index 0000000000..387c4be0a1--- /dev/null+++ b/docs/docs/2of3/index.md@@ -0,0 +1,89 @@+---+title: 2of3+description: Split one important secret into 3 recovery cards. Any 2 cards bring it back. One card alone reveals nothing.+---++# 2of3++2of3 turns one important secret into three recovery cards. Any two of the three cards can reconstruct the secret. A single card by itself reveals nothing.++It is a free, end-to-end private web app from Ente. Open it at [2of3.ente.com](https://2of3.ente.com). There is no account, nothing to install, and your secret never leaves your browser.++## Why 2of3 exists++Some secrets are the kind you cannot afford to lose, and also the kind you cannot afford to leak. A single note is a single point of failure: if it is lost, stolen, or forgotten, recovery becomes hard. If it is found by the wrong person, the damage is done.++2of3 lets you spread the risk without making recovery harder than it needs to be. Three copies in three places means losing one place is no longer a disaster. The "any two" threshold means an attacker who finds one card still has nothing to attack with.++This is the same idea behind safe-deposit boxes that need two keys, or backup tape rotations that survive any one site going down. 2of3 brings it to the kind of secret you can fit on a card.++## When to use it++The in-app examples are a good guide:++- **Legacy account recovery.** You want a spouse, adult child, or executor to recover something important if you are not around to explain it. One card stays with your documents, one in a safe place at home, and one with a trusted person. Any two are enough when the time comes.+- **Break-glass credentials.** A root password, a production recovery key, or the master secret behind your setup. 2of3 avoids both bad outcomes at once: one lost copy that locks you out, or one stolen copy that gives everything away.+- **Family emergency pack.** A password manager emergency kit, a wallet recovery phrase, or the one recovery code your household cannot afford to lose. Splitting it across three places means recovery stays possible even when one place fails.++Concretely, people use 2of3 for things like Ente recovery keys, password manager master passwords, crypto wallet recovery phrases, full-disk encryption keys, and 2FA backup codes that they do not want to keep in only one drawer.++## How a card works++When you enter a secret, 2of3 generates three cards in your browser. Each card carries:++- A **QR code** with the share data+- The same data printed as a short **text code** below the QR (starting with `2of3-`)+- A short **ID** (8 characters) that is shared by all three cards from the same secret+- A **Card 1 / 2 / 3** number so a reader knows which share it is++The cards from one secret all share the same ID. The ID is how recovery tells "two cards from the same set" apart from "two cards that happen to look similar". The card number lets the recovery code know which two of the three you are using.++A single card is mathematically harmless on its own. It looks like random data, because that is exactly what it is. Knowing one card gives the same information about the original secret as knowing zero cards: none. You need any two of the three before the secret can be put back together.++## What you do with the cards++Once you have generated the three cards, you can:++- **Print** each card individually (one card per page)+- **Download** each card as a PNG image+- **Share** a card via the system share sheet (mobile and supported desktop browsers)+- **Copy** just the text code for a card to paste into a note or a vault++Or you can use **Download all cards**, which downloads all three PNGs and an [offline recovery file](/2of3/how-it-works#offline-recovery-file) (an HTML file) in one click. That offline file is its own copy of 2of3's recovery flow. It works without internet, without Ente, and without 2of3.ente.com being online.++Read [Getting started](/2of3/getting-started) for the full splitting and storing walkthrough.++## How recovery works++To recover the secret, go back to [2of3.ente.com](https://2of3.ente.com) (or open the offline recovery file) and feed in **any two** cards. For each slot:++- Upload the card's image (PNG, JPG, even a phone photo of a printed card)+- Or paste the card's text code+- Or drop the file onto the slot++The recovery section reads the cards, checks that both belong to the same set, combines them, and shows the secret on the page. Everything happens locally.++You do not need to remember which card was Card 1, 2, or 3. Any two of the three work.++Read [Getting started](/2of3/getting-started#recover-the-secret) for the full recovery walkthrough, including how the photo-of-printed-card recovery handles real phone photos.++## Privacy++2of3 has nothing to send to Ente, and it sends nothing. The splitting and the recovery both happen inside your browser:++- Your secret is split into shares locally before anything is rendered.+- Card images and QR codes are built locally.+- Recovery combines shares locally; the recovered secret never leaves the page.+- There is no account, no sign-in, no analytics that touch your secret.++Because the recovery flow is also bundled into an offline HTML file you can download, even the long-term recovery path does not depend on Ente being around. Learn more in [How it works](/2of3/how-it-works).++## Source code++2of3 is part of [Ente's open source repository](https://github.com/ente-io/ente). The Shamir implementation and the offline recovery file are short and inspectable. The data format on each card is documented in [How it works](/2of3/how-it-works#share-format) so that, in principle, anyone with the cards and a few hours could write their own recovery tool.++## Get started++- [Getting started](/2of3/getting-started): splitting, storing, testing, and recovering with concrete steps.+- [How it works](/2of3/how-it-works): Shamir secret sharing explained, the share format, the offline recovery file, and the QR decoder.+- [FAQ](/2of3/faq): common questions about safety, storage, recovery, and edge cases.diff --git a/docs/docs/paste/faq.md b/docs/docs/paste/faq.mdnew file mode 100644index 0000000000..8725cdb6c7--- /dev/null+++ b/docs/docs/paste/faq.md@@ -0,0 +1,108 @@+---+title: Ente Paste FAQ+description: Common questions about Ente Paste, one-time encrypted text sharing+---++# Ente Paste FAQ++Common questions about [Ente Paste](https://paste.ente.com).++## Using Paste++### Do I need an Ente account to use Paste? {#paste-account-required}++No. Both creating and opening a paste are anonymous. Paste does not have a sign-in flow.++### How long does a paste last? {#paste-expiry}++A paste lasts until the first time it is opened, or 24 hours from creation, whichever comes first. Once consumed, the ciphertext is deleted from Ente's servers and cannot be retrieved.++### Can I open the same paste twice? {#paste-open-twice}++No. A paste is consumed the first time it is successfully opened. Reloading the page, opening the link on a second device, or sharing it onward after the first read all result in "This paste has expired or was already opened."++If you need the recipient to be able to refer back to the text, ask them to copy it once they have opened the paste, or use [Ente Locker](https://ente.com/locker) for durable storage.++### Can I edit or delete a paste after creating it? {#paste-edit-delete}++There is no edit or delete UI. The closest equivalent to delete is to open the link yourself, which consumes it. Otherwise, the paste self-destructs after 24 hours on its own.++### What is the character limit? {#paste-character-limit}++4,000 characters per paste. The counter at the bottom-left of the input shows your current count out of the limit.++### Can I paste binary data or files? {#paste-binary-files}++No. Paste is text-only. For files and durable secrets, use [Ente Locker](https://ente.com/locker).++### What if I open my own link by accident? {#paste-self-opened}++If you click the link from the create page, Ente shows an "Open One-Time Link?" confirmation with a "Copy link" option, so you can back out without consuming the paste.++If you opened it from elsewhere (for example, by clicking it in your own chat history), the paste is gone. Create a new one.++## Sharing++### How do I share the link? {#paste-share-link}++The link card has three options:++- **Copy** copies the link to your clipboard.+- **Share** opens your operating system's share sheet, falling back to copy if your browser does not support it.+- The QR icon shows a scannable QR code that encodes the full link.++Learn more in [Share the link](/paste/getting-started#share-the-link).++### Will the link show a preview in chat? {#paste-link-preview}++No, by design. If chat apps were allowed to fetch the link for a preview, they would consume the paste before the human recipient saw it. Ente Paste detects link-preview bots and returns "Paste is unavailable" to them without consuming the paste. The recipient still opens the link normally.++Learn more in [Preview-bot protection](/paste/features/security#preview-protection).++### Why does the link have a `#` in the middle? {#paste-fragment-why}++Everything after the `#` is the decryption key. Browsers do not send URL fragments to servers, so Ente cannot see the key. The decryption happens locally in the recipient's browser.++If the `#` portion is missing when the recipient opens the link, decryption is impossible and they see "Missing key in URL". The most common cause is the link getting truncated when it was shared. Copy and paste the link rather than retyping it.++## Security++### Is Paste end-to-end encrypted? {#paste-e2ee}++Yes. The text is encrypted in the sender's browser using [XChaCha20-Poly1305](https://doc.libsodium.org/secret-key_cryptography/secretstream) (via libsodium). Only the ciphertext leaves the device. Ente's servers cannot read the paste.++Learn more in [How encryption works](/paste/features/security).++### Who can read my paste? {#paste-who-can-read}++Anyone who has the full link (including the part after `#`) and, if the paste is password protected, the password. Ente cannot read pastes. The decryption key never reaches Ente's servers.++### What happens if someone intercepts the link? {#paste-intercepted-link}++A regular Paste link is the secret. Anyone with the full link can open the paste. If you are sending the link over a channel you do not fully trust, [enable password protection](/paste/getting-started#password-protection) and send the password separately. A password-protected paste cannot be opened with the link alone.++### Does password protection re-encrypt the paste? {#paste-password-encryption}++Yes. The password is used as input to [Argon2id](https://en.wikipedia.org/wiki/Argon2), a memory-hard key derivation function, alongside the link fragment. The resulting key wraps the actual paste encryption key. Without the right password, decryption fails. The ciphertext cannot be opened by the link alone.++Learn more in [Password protection](/paste/getting-started#password-protection).++### What if I forget the paste password? {#paste-forgot-password}++The paste cannot be recovered. The password is part of the decryption key and was never sent to Ente. Create a new paste with a password you can transmit reliably.++### Is Paste open source? {#paste-open-source}++Yes. The web app source lives in Ente's main monorepo on [GitHub](https://github.com/ente-io/ente), alongside Ente Photos, Auth, and Locker. The server code is also open source.++## Self-hosting++### Can I self-host Paste? {#paste-self-host}++Yes. The Paste server endpoints are part of [Museum](/self-hosting/), Ente's main backend. The web app endpoint is configured via `apps.public-paste` in `museum.yaml`. Learn more in [Configuration](/self-hosting/installation/config).++## Related topics++- [Introduction to Ente Paste](/paste/)+- [Send your first paste](/paste/getting-started)+- [How encryption works](/paste/features/security)diff --git a/docs/docs/paste/features/security.md b/docs/docs/paste/features/security.mdnew file mode 100644index 0000000000..1bf738aceb--- /dev/null+++ b/docs/docs/paste/features/security.md@@ -0,0 +1,100 @@+---+title: How encryption works+description: The cryptographic guarantees behind a one-time Ente Paste link+---++# How encryption works++A Paste link is end-to-end encrypted: the plaintext is encrypted in the sender's browser, only the ciphertext is uploaded, and only the recipient's browser ever sees the plaintext again. This page describes how that works at a level a privacy-conscious non-cryptographer can follow.++## The link format++A Paste link has two parts:++```+https://paste.ente.com/<access-token>#<key-fragment>+```++- The **access token** identifies the paste on Ente's servers. It is what the server uses to find the ciphertext.+- The **key fragment** carries the decryption key. It sits after `#`, which makes it a [URL fragment](https://en.wikipedia.org/wiki/URI_fragment). Browsers never send the fragment portion of a URL to the server, so Ente cannot see it.++For a password-protected paste, the fragment is prefixed with `p-` so the consumer page knows to prompt for a password before attempting decryption.++## Creating a paste++When you click send:++1. The browser generates a fresh 256-bit random key. This is the **paste key**, used to encrypt the text itself.+2. The text is encrypted under the paste key using libsodium's `secretstream` API, which is [XChaCha20-Poly1305](https://doc.libsodium.org/secret-key_cryptography/secretstream) authenticated encryption.+3. The browser generates a 12-character random **fragment secret** that will live in the URL.+4. A second key, the **key-encryption key**, is derived from the fragment secret using [Argon2id](https://en.wikipedia.org/wiki/Argon2) (a memory-hard password hash) with interactive-cost parameters. For password-protected pastes, the input to Argon2id combines the fragment secret with the password the sender entered, and moderate-cost parameters are used.+5. The paste key is encrypted under the key-encryption key using libsodium's `secretbox` (XSalsa20-Poly1305).+6. The browser uploads to Ente: the encrypted text, the encrypted paste key, the Argon2id salt, and the Argon2id ops/memory parameters. The plaintext text, the paste key, the fragment secret, and the password are never sent.++The server hands back an access token. The page constructs the link by concatenating the access token and the fragment secret (with a `p-` prefix if password protection is on).++## Opening a paste++When the recipient opens the link:++1. The browser parses the URL fragment. If it starts with `p-`, the page shows a password prompt and waits for input.+2. The browser asks the server for the ciphertext using the access token.+3. The browser re-runs Argon2id locally on the fragment secret (and password, if applicable) using the salt and parameters stored alongside the ciphertext. This produces the same key-encryption key as during creation.+4. The encrypted paste key is decrypted with the key-encryption key, yielding the original paste key.+5. The paste key is used to decrypt the text.+6. Ente deletes the paste from its servers.++For a wrong password, step 3 produces the wrong key-encryption key, step 4 fails the authentication tag check, and the page shows "Incorrect paste password". The ciphertext is not consumed on a failed password attempt. The recipient can try again.++## What Ente's servers store++The server only ever sees ciphertext and KDF parameters:++- The encrypted text and its `secretstream` header.+- The encrypted paste key and its nonce.+- The Argon2id salt and the ops/memory parameters used at creation time.++None of these can be turned back into plaintext without the fragment secret (and, for password-protected pastes, the password). Both live exclusively in the recipient's browser.++## One-time consumption++A Paste link is meant to be opened exactly once. This is enforced on the server, not in the browser.++Before consuming, the consumer page makes a "guard" request that asks the server to issue a short-lived, signed cookie tied to the access token and the recipient's browser. Only then does it make the actual consume request, which the server requires to carry both a custom header (`X-Paste-Consume: 1`) and the matching guard cookie. The consume call deletes the paste from the database in the same transaction that returns the ciphertext, so a paste can never be returned twice.++If the link is never opened, Ente deletes the paste 24 hours after creation.++## Preview-bot protection {#preview-protection}++Chat apps, search engines, and browsers routinely fetch URLs to generate previews or pre-warm caches. For a one-time link, an automated fetch would consume the paste before the human got a chance to read it.++Ente Paste recognizes and refuses these requests on the server side:++- Requests carrying `Purpose: prefetch`, `Sec-Purpose: prefetch`, or `Sec-Purpose: prerender` are treated as preview attempts.+- User agents containing tokens like `bot`, `crawler`, `spider`, `preview`, `slackbot`, `discordbot`, `whatsappbot`, `telegrambot`, `twitterbot`, `facebookexternalhit`, `linkedinbot`, `skypeuripreview`, or `googlebot` are treated as preview attempts.++These requests get back a generic "Paste is unavailable" response and the paste stays intact for the real recipient.++The custom `X-Paste-Consume` header is an additional layer: even a request that does not match a known preview-bot pattern cannot consume a paste unless it sends that header, which only the Paste web app does. This makes accidental consumption by a typical `curl`, `wget`, or browser-prefetch effectively impossible.++## Trust model and limits++A Paste link is as secret as the channel you send it over. Anyone who sees the full link, including the fragment, can open the paste. The threats Paste defends against are:++- A malicious or compromised Ente server: it sees only ciphertext.+- A passive network observer between the recipient and Ente: TLS protects the transport, and the URL fragment is not in the request anyway.+- Link-preview bots and crawlers fetching the link automatically.+- Long-term exposure: every paste self-destructs in 24 hours, opened or not.++The threats Paste does _not_ defend against:++- Someone forwarding the link to a third party before the recipient opens it.+- A screenshot, scrollback, or copy of the plaintext on the recipient's machine after they open it.+- A compromised browser on either side (a malicious extension, for example, could read the plaintext as it is displayed).++For pastes where the channel itself might be compromised (for example, a long-lived chat thread or an email trail), [enable password protection](/paste/getting-started#password-protection) so the link alone is not enough to open the paste.++## Related topics++- [Send your first paste](/paste/getting-started): including password protection and the QR / share options.+- [FAQ](/paste/faq)diff --git a/docs/docs/paste/getting-started.md b/docs/docs/paste/getting-started.mdnew file mode 100644index 0000000000..7329dc2cc3--- /dev/null+++ b/docs/docs/paste/getting-started.md@@ -0,0 +1,116 @@+---+title: Send your first paste+description: Walk through creating, sharing, and opening an Ente Paste link+---++# Send your first paste++This page walks through both sides of a paste: creating a link as the sender, and opening it as the recipient.++## Create a paste++1. Open [paste.ente.com](https://paste.ente.com).+2. Click into the text area and enter your text. The counter at the bottom-left of the input shows characters used out of the 4,000 limit, and turns highlighted as you near the limit.+3. (Optional) Click the lock icon next to the counter to require a password. See [Password protection](#password-protection) below.+4. Click the send button (the arrow icon at the bottom-right of the input). If password protection is on, enter the password twice in the dialog that appears, then click "Create".++Ente encrypts the text in your browser and uploads only the ciphertext. The page then shows your one-time link.++> [!NOTE]+>+> The text is encrypted locally before any network request leaves your browser. Ente's servers never see the plaintext or the decryption key.++## Password protection++A password-protected paste requires the recipient to enter a password before the text is decrypted. The password is _not_ stored on Ente's servers and is _not_ embedded in the link. It travels separately, typically over a different channel from the link itself.++This is useful when you want the link and the secret needed to read it to live in different places. For example, send the link in email and the password in Signal, or read the password aloud over the phone.++**To enable it:** click the lock icon next to the character counter before sending. The icon switches from open to closed. After clicking send, Ente prompts for a password. Enter the same password twice and click "Create".++### How it strengthens the paste++A normal paste is protected by a 12-character random key in the URL fragment. Anyone with the full link can decrypt the paste. The link _is_ the secret.++A password-protected paste splits the secret in two:++- The 12-character fragment, in the link.+- The password, sent over a separate channel.++An attacker who intercepts only the link cannot decrypt the paste; they would also need the password. To resist offline brute-force guessing, Ente runs the password through [Argon2id](https://en.wikipedia.org/wiki/Argon2), a memory-hard key derivation function, with moderate-cost parameters (256 MB memory limit). This makes large-scale password guessing expensive even with custom hardware. Learn more in [How encryption works](/paste/features/security).++### Choosing a password++- Use a password the recipient does not already know, so an attacker who compromises one of your shared accounts does not get it for free.+- Send the password over a different channel from the link.+- The password is only meaningful within the 24-hour expiry window. After that, the ciphertext is gone and the password protects nothing.++> [!NOTE]+>+> If you forget the password, the paste cannot be recovered. Ente has no way to reset it. The password is part of the decryption key and was never sent to the server.++### When to skip it++A regular Paste link is already end-to-end encrypted. Password protection adds value when you cannot fully trust the channel you are sending the link over. If you are sending the link via Signal to one person and immediately deleting the message, password protection is usually overkill. If you are pasting the link somewhere other people might see it before the intended recipient opens it (a group chat thread, a ticket comment, or an email with multiple recipients), password protection meaningfully raises the bar.++## Share the link++After you create a paste, the link card on the page offers three ways to hand the link to someone.++### Copy++Click "Copy" to put the link on your clipboard. A "Copied to clipboard." confirmation appears underneath the button and fades out after about a second.++This is the most reliable option across devices and works well for pasting the link into chat, email, or a terminal.++### Share++Click "Share" to invoke your operating system's share sheet (the same picker you get when you share a webpage from your browser). This is convenient on phones for handing the link to a specific contact in Signal, Messages, or another app.++On devices or browsers that do not implement the Web Share API, "Share" falls back to copying the link to the clipboard, with no error.++### QR code++Click the QR icon to display a scannable QR code. The QR encodes the full link, key fragment included, so a phone scanning it goes straight to the paste.++Use QR for handing a paste to someone next to you without typing or messaging. For example, transferring a credential from a laptop to a colleague's phone.++- On desktop, the QR appears as a floating card in the bottom-right corner.+- On mobile, the QR opens in a centered dialog.+- Click the QR icon again, or close the dialog, to dismiss it.++Generating the QR happens entirely in the browser. Nothing about the link, including the decryption key, leaves your device just because you displayed the code.++### The "open once" confirmation++The link on the card is also clickable, but opening it consumes the paste. To prevent accidents, clicking the link on your own create page brings up an "Open One-Time Link?" confirmation with two buttons:++- **Copy link**: copies the link to the clipboard and dismisses the dialog. Use this whenever you click the link by reflex.+- **Open Link**: actually opens the paste in a new tab and consumes it.++This confirmation only appears for the sender on the create page. Recipients following the link from elsewhere open the paste directly.++## Open a paste++When the recipient opens the link:++1. Their browser fetches the ciphertext from Ente.+2. The browser pulls the decryption key out of the URL fragment (the part after `#`) and decrypts the text locally. While this happens they see "Opening secure paste... Decrypting in your browser."+3. The decrypted text appears in a read-only text area with a "Copy" button.+4. Ente's servers delete the paste. The message "This paste has been removed from Ente servers." appears below the text.++If the paste is password protected, the recipient sees an "Enter paste password" prompt before step 1. They enter the password and click "Open paste". Decryption only succeeds with the correct password.++## What can go wrong++- **"This paste has expired or was already opened."** The link has been consumed by someone else, or the 24-hour window has elapsed. The paste cannot be recovered. Create a new one.+- **"Incorrect paste password"** (password-protected pastes only). The password did not produce the right key. The paste is _not_ consumed by a failed password attempt. Try again, or ask the sender to confirm the password.+- **"Missing key in URL" / "Invalid key in URL"** The fragment after `#` is missing or malformed. This usually means the link was truncated when it was shared. Ask the sender to resend the full link, and prefer copying and pasting it exactly rather than retyping it.+- **"Paste is unavailable"** The link is being opened by a tool that looks like a link-preview bot or crawler, or the request was not made from `paste.ente.com`. Open the link directly in a regular browser tab.++The "Create new paste" button on the error screen takes you back to the create flow.++## Related topics++- [How encryption works](/paste/features/security)+- [FAQ](/paste/faq)diff --git a/docs/docs/paste/index.md b/docs/docs/paste/index.mdnew file mode 100644index 0000000000..47dfc2a0af--- /dev/null+++ b/docs/docs/paste/index.md@@ -0,0 +1,44 @@+---+title: Ente Paste+description: Share sensitive text with one-time, end-to-end encrypted links that auto-expire after 24 hours+---++# Ente Paste++Ente Paste is a web app for sharing short sensitive text over a one-time, end-to-end encrypted link. Use it to hand someone an API key, a recovery code, a server password, a snippet, or a private note without leaving a copy lying around in chat history or email.++Open [paste.ente.com](https://paste.ente.com), type or paste your text, and share the link that appears. The first person to open the link reads the text and the paste is destroyed. If nobody opens it, it self-destructs after 24 hours.++No account is required to create or open a paste.++## How it works++1. Type your text into [paste.ente.com](https://paste.ente.com).+2. Click the send button. Ente generates a random key in your browser, encrypts the text with it, and uploads only the ciphertext.+3. Ente returns a link that combines an access token (which the server recognizes) with the encryption key, placed after a `#`.+4. Share the link.+5. When the recipient opens the link, their browser fetches the ciphertext, takes the key out of the URL fragment, and decrypts the text locally. The paste is then deleted from Ente's servers.++The key after `#` is the [URL fragment](https://en.wikipedia.org/wiki/URI_fragment). Browsers never send it to servers, so Ente only ever sees the ciphertext.++## What Paste is for++- One-off secrets: API keys, recovery codes, app passwords, signing keys+- Hand-offs between teammates: a connection string, a short config snippet+- Short instructions you do not want preserved in chat+- Anything you would otherwise paste into chat and immediately regret++If you need durable storage for the same kinds of secrets, use [Ente Locker](https://ente.com/locker) instead. Paste is for transit.++## Limits++- Up to 4,000 characters per paste.+- One open per link.+- 24 hours to live, after which the paste is deleted whether anyone read it or not.+- One sender or recipient at a time. The paste is consumed by the first successful open.++## Get started++- [Send your first paste](/paste/getting-started): walks through creating, sharing, and opening a paste, including password protection and the share / QR options.+- [How encryption works](/paste/features/security): the cryptographic guarantees behind a Paste link.+- [FAQ](/paste/faq): common questions and what to do when something goes wrong.