Intelligence analysts work to decipher coded Japanese messages at the headquarters of the Army cryptanalysis service in Arlington, Va., in 1944. (ASSOCIATED PRESS)

Elaine Showalter is the author, most recently, of “The Civil Wars of Julia Ward Howe: A Biography.”

In the past few years, forgotten women of science, from the genteel astronomers who classified the stars at the Harvard Observatory in the 1890s to the African American mathematicians who staffed NASA in the 1960s, have been rescued and celebrated. If you cheered the recovery of these remarkable pioneers, you will love reading about the women recruited by the Army and the Navy during World War II and trained in secret programs to break Japanese and German military codes. In “Code Girls,” journalist Liza Mundy tells the irresistible tale of the female cryptographers who learned to crack these diabolically difficult systems. Being chosen for this mission changed the lives of more than 10,000 young American women, took them out of their familiar surroundings and prescribed destinies, and offered them a thrilling opportunity to do urgent war work at the nation’s center.

But they took vows of secrecy, and this vast enterprise has been hidden for almost 70 years. In her research to uncover it, Mundy examined collections in the National Archives in College Park, Md., found dozens of recently declassified and archived oral histories, and tracked down 20 surviving code girls, centering on the intrepid Dot Braden Bruce, a Randolph-Macon Woman’s College graduate and high school teacher from Virginia, who is still a firecracker at 96. Mundy skillfully interweaves the history of the war and the evolution of modern military intelligence with the daily lives of the women who were racing to decipher the messages of the enemy, while dealing with bureaucratic rivalries, administrative sexism, romance and heartbreak on the home front.

After Pearl Harbor, the military decided to build up its small intelligence operation by bringing female college graduates to Washington and teaching them cryptanalysis, codes and ciphers. The Army and the Navy competed with each other to find and recruit the most talented. In 1942, only about 4 percent of American women had graduated from a four-year college. The elite Seven Sister colleges had their finest hour as the Navy tapped their presidents, deans and faculty to identify top students in mathematics, science and languages. Bryn Mawr President Katherine E. McBride noted that the war was creating unprecedented opportunities for highly educated women: “There is a new situation for women here, a demand that has never existed for them before.”

“Code Girls,” by Liza Mundy (Hachette )

Once they were settled in their hastily adapted dormitories in Washington and Arlington, Va., the recruits ran early computers, built libraries, translated documents and formed teams to solve the elaborate, ever-changing codes of the Japanese navy. The water-transport codes, which came from the merchant ships going around the Pacific to supply troops, were particularly useful. In 1944, the code-breakers intercepted 30,000 water-transport messages a month, a deluge of numbers that they miraculously managed to solve through an intensive search for patterns and some “golden” guesses. That information enabled the Navy to pinpoint and sink almost every supply ship heading to the Philippines or the South Pacific. Before D-Day, the teams participated in the effort to give the Germans false information and fake radio traffic about the site of the Allied landing.

Initially the women came to Washington as civilians, but in May 1942, the Army accepted them into military service with the WACs — the Women’s Auxiliary Corps. The Navy took longer to set up a women’s reserve; indeed, as Virginia Gildersleeve, dean of Barnard College, recalled, some of the older officers believed that “admitting women into the Navy would break up homes and amount to a step backward in civilization.” But the Navy got a boost when an English professor from Barnard christened its female auxiliary the WAVES: Women Accepted for Volunteer Emergency Service. The president of Wellesley became its first commander, and the French-American couturier Mainbocher was brought in to design its dashingly fitted uniform, which, some felt, was “the most flattering piece of clothing they ever owned.” The Navy’s female code-breakers had the opportunity to become commissioned officers; they went to boot camp at Smith, Mount Holyoke and Hunter; cut their hair short; and were subject to harsh naval discipline. But they loved the pride and camaraderie, and in a year there were 4,000 code-breakers at the WAVES Barracks D across New Mexico Avenue, working three shifts a day, marching and singing “I don’t need a man to give me sympathy/ Why I needed it before is a mystery.”

Not everything was triumphant. A cohort of code girls was still seen by some military administrators as extra secretaries, cute mascots or natural drudges. The code-breaker Ann Caracristi remembered that “it was generally believed that women were good at doing tedious work, and . . . the initial stages of cryptanalysis were very tedious, indeed.” Moreover, women were subject to stricter sexual and social punishment than their brothers and boyfriends. Lesbianism, abortion, pregnancy — even for married women — meant discharge. And after the war, women were expected to give up their jobs, go home and start having babies again. A few code girls went on to high positions at the National Security Agency, but as a cohort, their postwar job opportunities and their chances for further education under the GI Bill were mixed at best.

Still, they cherished their experience. Ann White reflected that “never in my life since have I felt as challenged as during that period. . . . When the needs of society and the needs of an individual come together, we were fulfilled.”

We owe Mundy gratitude for rescuing these hidden figures from obscurity. Even more valuable is her challenge to the myth of the eccentric, inspired, solitary male genius, like Alan Turing. As Mundy demonstrates, code-breaking in World War II “was a gigantic team effort,” and “genius itself is often a collective phenomenon.” Codes were broken by the patient labor of groups of people “trading pieces of things they have learned and noticed and collected.” I suspect there are more stories of hidden figures waiting to be told. But in writing this book, Mundy has broken some of the codes that kept them hidden for so long.

Code Girls
The Untold Story of the American Women Code Breakers of World War II

By Liza Mundy

Hachette. 416 pp. $28