A canary trap is a way to catch a leaker by giving each person a slightly different copy of the same document. If a copy leaks, its exact wording shows whose it was. The trick is also called a barium meal test. It gives a strong hint about the source, not proof of who shared it.
Where the name comes from
Tom Clancy coined the term in his 1987 novel Patriot Games. According to Wikipedia's canary trap article, he did not invent the technique. In the novel, the analyst Jack Ryan prepares numbered copies of a document, each with different versions of its summary paragraphs, and makes them dramatic enough that a reporter is likely to quote them. Wikipedia dates the novel to 1987.
The older name is the barium meal test. Wikipedia says intelligence agencies have used it for many years under that name, and that former MI5 officer Peter Wright wrote about it in his memoir. A barium meal is the contrast drink given before a medical X-ray, so the doctor can see where it travels. Code and Dagger makes the same comparison: a marker in the information makes its path visible.
How reworded copies identify a leaker
The method has three steps.
- Make every copy different. Change something small in each version: a word, a comma, a figure, an extra detail. Former FBI agent Joe Navarro, quoted by Code and Dagger, describes a comma instead of a semicolon or a deliberately misspelled word.
- Keep a record. Write down who got which version.
- Match the leak. When text appears where it should not, compare it with your record. The version that matches names the copy.
Here is a tiny example. Three people each get one version of this sentence:
- Asha: "Kindly do not share these five figures until Friday."
- Ben: "Kindly don't share these 5 figures until Friday."
- Dev: "Please do not share these 5 figures until Friday."
If the leaked line reads "please do not share these 5 figures until friday", it matches Dev's copy. Each choice between two wordings doubles the number of possible copies. Make a few such choices across a long text and there are enough combinations to give dozens of people their own copy.
The idea also works outside documents. In 2019, Coleen Rooney posted fake Instagram stories that only one account could see. When they appeared in a tabloid, she named that account publicly, as Wikipedia's article describes. The dispute became the libel trial known as the Wagatha Christie case. A match is the start of a conversation, not the end of one.
Honest limits
A canary trap is good at one thing and weak at several others.
- It identifies a copy, not a person. A phone gets lost, a screen gets shown to a friend, a login gets shared. The copy that leaked may not be the reader who leaked it.
- Heavy rewording defeats it. If the leaker retypes the text in their own words, the markers are gone.
- Mixing copies confuses it. If two readers compare notes and merge their versions, the result can point at the wrong person or at nobody.
- Obvious differences give it away. If readers spot that their copies differ, they know there is a trap. Subtle changes work better.
- It stops nothing. It does not prevent copying. It only helps you work out where a copy came from afterwards.
Code and Dagger also notes that a former White House official could not say whether one reported use of the trick had ever worked. Treat it as a deterrent and a clue.
How NO SUS Canary does it
Doing this by hand for more than a few people is tedious and error-prone. NO SUS Canary automates it.
- One link, many copies. You write or paste text in the NO SUS app, turn on Traceable copies and share a single link. Canary makes up to 100 slightly reworded copies behind it. For now, it works for text only.
- Word twins and an invisible marker. It swaps pairs such as "don't" and "do not", "five" and "5", and "until" and "till", and adds an invisible marker.
- Readers need no account. They open the link in a browser, type a name and read their own copy. You see each name and when it opened.
- Checking a leak. Paste the leaked text into Canary, or pick a screenshot in the Android app, and it shows whose copy it matches. The check runs on your own device, so if you clear the data on that phone or browser, that note can no longer be checked.
The honest limits above apply in full. A match is a strong hint, not proof. Names are whatever each reader typed, and nothing checks that they are real. Canary does not stop screenshots or photos of a screen.
The step-by-step version, with an example and what Canary receipts are, is on our page about how to find who leaked a document. If your document is a PDF and you want a visible name stamped on every page instead, read how to watermark a PDF before sharing. For why deleting a message rarely removes every copy, see do disappearing messages really disappear.