Technically, there are two kinds of secret message systems. One kind is a code, in which an entire word or phrase is replaced by another word, a series of letters, or a string of numbers, known as a “code group.” A code may be used for secrecy, but also for brevity and truncation. Shorthand is a code in precisely this way and so, often, is modern-day texting. Common phrases, even long ones, can be compressed into short code groups, making messages faster and—when using cable, as many people did in the early decades of the twentieth century—cheaper to send. Saving money has always been important to governments, so the compression advantage is a big deal. Cable companies typically charged by the word, so the fact that stock phrases like “your request of last month has been approved” could be boiled down to a code group, as could the names of places or people or units, meant governments could save a good bit of money when sending telegrams. In the War Department’s “general address and signature” code that was employed in 1925, for example, the word “cavalry” was HUNUG, “Pursuit Squadron” was LYLIV, “Bombardment Squadron” was BEBAX, “Wagon Company” was DIGUF, “U.S. Naval Academy” was HOFOW, and “Fourth Division Air Service” was BABAZ. (Texting uses codes, like OMG and IMO, for much the same reason: brevity and, at times, concealment.) The best code is one in which code groups are randomly assigned, with no rhyme or reason that an enemy can discern. Codes are compiled and kept in codebooks, not unlike dictionaries, where the encoder can look up the word or phrase and the corresponding group that stands for it. But even random codes have an obvious vulnerability: Constant repetitious use of the same code groups in messages enables code breakers to tease out their meaning from context or position.
The other type of system is called a cipher, in which a single letter—or number—is replaced by another single letter or number. Ciphers can be created by scrambling letters, which is called transposition—turning the word “brain,” for example, into “nirab.” Or a cipher can be achieved by replacing individual units with other units, a method called substitution: By substituting X for b, T for r, V for a, O for i, and P for n, for example, brain becomes “XTVOP.” For centuries, ciphers were created by hand, often by those clever Renaissance men who would line alphabets up against one another and create boxes and tables that gave a way to substitute one letter for another. But when radio and telegraph came along, messages could be sent much, much faster than a wigwag flag could do. Machines were needed that could encipher rapidly; and, because it became easier to spot simple patterns when so many messages were being sent and intercepted, more complicated ciphers were needed. People can make complex ciphers, but people make mistakes. Machines are less likely to do so. These machines created an early form of what would later be called encryption, which meant that people who broke them might be described as an early version of what would later be called hackers.
And that’s what Agnes Meyer was. She hacked the nut jobs, broke enemy devices and machines that inventors were peddling to the U.S. Navy, uncovering their flaws and weaknesses. The proffered inventions included a supposedly invulnerable machine invented by Edward Hebern, a fly-by-night character who at one point had been imprisoned for horse thievery. Agnes easily broke an “unbreakable” message Hebern had put in a public advertisement. Impressed, Hebern lured Agnes away to help him develop a better one, a job she might have accepted because she was getting discouraged by her slim chances for promotion as a female civilian in a male military service. As it happened, Elizebeth Friedman was temporarily brought in by the Navy to substitute during Agnes’s absence, establishing a rivalry between the two women. Elizebeth (who tended to downplay her own talents while touting those of her husband) scorned what she saw as Agnes’s overweening ambition and her lack of loyalty to public service. She saw Agnes as “a person who thought only of furthering herself” and scoffed that she had “fallen for” the offer from Hebern. (Nothing if not frank, Elizebeth also thought Meyer’s Navy boss, Laurance Safford, was a “nut.”) In 1924, Hebern marketed his improved machine back to the Navy. William Friedman, summoned in to test it, managed to break it.
This cemented the rivalry. Agnes soon quit Hebern and returned to her civilian Navy post, and from then on, Agnes despised William Friedman. Part of her resentment stemmed from competitive instincts common among people who rely on their wits for a living (rivalry between code breakers is not unlike that in many university academic departments), but part stemmed from the fact that William Friedman was treated better by the Army than she was by the Navy.
“Friedman was always two, three [pay] grades ahead of her, and I think that her feeling that that was sexist was probably true,” said Captain Thomas Dyer, a Navy cryptanalyst who was trained by Agnes. Dyer described her as “absolutely brilliant” and ventured that she “was fully” the equal of Friedman.
The group of people at this time who understood codes and ciphers made up a very small universe—interdependent, claustrophobic, jealous. Everybody knew everybody and had an opinion about what everyone else was (or was not) capable of. Like so many others, Agnes Meyer had done a stint at Riverbank; in 1920 George Fabyan wrote a complimentary letter to the Navy Department, saying, “We were very favorably impressed with the young lady,” and adding that he’d be delighted to hire her if at any point the Navy wanted to release her. She also sojourned briefly with Herbert Yardley. In her own civilian post, Agnes would go on to train virtually all of the major male naval code breakers who became famous for their World War II exploits. “She not only trained most of the leading naval cryptanalysts of World War II,” wrote one intelligence officer, Edwin Layton, “but they were all agreed that none exceeded her gifted accomplishments.” Though she did not get any public credit, she laid much of the groundwork that made their exploits possible. She also helped design the Navy’s first ciphering machine, a feat for which she and her co-designer later were awarded $15,000 by Congress. She married a Washington lawyer, Michael Driscoll; like the Friedmans, the Driscolls were a two-career couple a half century before two-career couples were a thing.
By the 1920s the American Navy was beginning to harbor its own code-breaking ambitions, sensing in Japan a future naval adversary. Japan had defeated Russia in 1905 and it clearly wanted to build a Pacific fleet to rival or surpass America’s; and, lacking the natural resources such as oil, iron, and rubber it needed to become a dominant world power, it seemed bound to go looking for those resources elsewhere in the Pacific region, threatening U.S. territories including Guam and the Philippines. And so U.S. Navy ships began intercepting Japanese messages and building more Pacific intercept stations. In New York City, in 1923, naval intelligence officers surreptitiously raided the office of the Japanese consul general, where they rifled a steamer trunk, found a 1918 naval codebook, stole it, photographed each page, put the book back, and sent the pages to Washington. All of which ended up in the competent hands of Agnes Meyer Driscoll.