The milk of figs, cows and nuts; lemon juice, orange juice and onion juice; saliva, urine, blood, vinegar, aspirin and laxatives: the list of substances from which invisible ink can be concocted is long and sometimes gross, and as strong a testament as could be imagined to the strength of our intertwined desires for communication and privacy. Why else would someone bother not only to squeeze the juices from a dormouse’s corpse, but also to write a foul-smelling letter with them?

In Prisoners, Lovers, and Spies: The Story of Invisible Ink From Herodotus to al-Qaeda (Yale; $27.50), espionage historian Kristie Macrakis discusses invisible ink (or “sympathetic ink,” as the French call it) within the broader history of steganography, or secret writing: of scrolls stuffed in rabbit bellies, messages inscribed on pig bladders, letters written on silk and stuffed in the messenger’s rectum. Like cryptography, its kissing cousin, steganography arose from war (two other driving forces, Macrakis says, are imprisonment and love). When the Greek tyrant Histiaeus wanted to incite a revolt against the Persian Empire, he had the call to arms tattooed on the scalp of a slave. After the hair grew back, the slave was sent on his mission; no Persians thought to inspect his scalp, so the message made it through. Mary, Queen of Scots, wrote her plans for revolution in cipher and with disappearing ink made from alum. American insurrectionists used invisible ink to strike a military alliance with France; John Jay, the future first chief justice of the United States, personally applied the reagent that made the messages “stand confessed.”

During World War I, invisible ink flowed from more pens than ever before as rival war machines cooked up increasingly complicated formulas. One French recipe required the application of four distinct reagents in sequence. Despite such advances, many spies continued to rely on low-tech ink, like lemon juice. In these cases, the challenge wasn’t revealing the writing, but rather determining which of the normal-looking letters was laced with secrets. In Britain, invisible-ink detection was folded into a pre-existing postal surveillance program that came to span the globe, with massive letter-reading offices in imperial outposts like Bermuda. Most of the letter examiners were women, who were thought to have a “sixth sense” for the logic of espionage detection, according to which “a letter that said absolutely nothing should be considered suspicious.”

An academic history of invisible ink is dangerously fertile ground for faux insights, in which secret writing stands again and again as a trope for, say, the communication anxieties of the modern age. Macrakis avoids this dead end. Her prose may be dry, but it is not arid; and the more absurd the invisible-ink arms race gets—with innovations in detection spurring new ones in concealment—the more amusing her style becomes. During World War I, we learn, a British intelligence officer decided that the finest invisible ink available was semen. “Obviously,” Macrakis writes, “the best way to produce semen at the office was through masturbation.” The brilliant officer’s name was Mansfield Cumming.

During World War II, invisible ink was superseded by the microdot, which allowed massive amounts of text to be hidden in a small amount of space, visible only to those who knew where to look. Microdots were concealed not just in the punctuation of seemingly normal letters, but also “on a fingernail or under a toenail, in tie linings, cuffs and collars, in jacket linings, on shoulder pads, and in seams, in suitcase locks, clasps, handles, and linings, on frames or lenses of glasses, under stones in jewelry, inside book bindings and gummed flaps of envelopes.” J. Edgar Hoover was obsessed with microdots; they fit his preferred conception of America’s enemies as sinister masters of deceit, lurking among us and scheming our doom. In 1941, some dots intercepted by the FBI contained technical information about the naval base at Pearl Harbor, but no one took action; Hoover was apparently more enamored of the medium than the message.

After the United States entered World War II, President Roosevelt created an Office of Censorship dedicated to ferreting out hidden messages. Previously, anything approaching British-style postal surveillance had been unthinkable; now the British system became the model. Despite the growing eminence of the microdot, vast amounts of resources were devoted to secret-ink development and detection. Throughout the war, some 15,000 Americans worked as mail openers, telephone eavesdroppers and media censors; by 1945, the government employed 560 individuals as secret-ink lab personnel.

Today, digital communications have relegated old-fashioned invisible ink to children’s chemistry sets and magic kits (in an appendix, Macrakis provides some formulas you can cook up in your own kitchen). Aside from kids and magicians, the only users of ink steganography these days are people whose circumstances restrict their access to digital technology. As recently as 1997, the Aryan Brotherhood used messages written in urine and citrus to orchestrate the murder of two prisoners. These exceptions aside, zeros and ones are the new lemon juice. In 2011, forensic experts in Germany were able to confirm the hypothesis, first floated a decade earlier in a USA Today article, that Al Qaeda was hiding attack plans in pornographic pictures posted online, embedding messages in the image display code. If the entire Internet is a potential drop zone for terrorists, then the solution—at least according to the odd logic of secret writing—is clear. No mail center in Bermuda can possibly get the job done; best to collect everything, all the time.