Elizebeth S. Friedman, 88, a government cryptanalyst and consultant for nearly 40 years and a pioneer in the field of cryptanalysis, the science of code-breaking, died of arteriosclerosis Friday at the Abbott Manor Nursing Home in Plainfield, N.J.

The widow of Col. William Friedman, one of the world's leading code breakers, who headed the pre-World War II government team that broke the highest level Japanese diplomatic cipher system, the "Purple Code," Mrs. Friedman was in charge of cryptography for the Treasury Department for a number of years.

She and her husband, whom she married in 1917, became experts in cryptanalysis while working as literary code breakers at Col. George Fabyan's Riverbank Laboratories in Geneva, Ill., during World War I. Their early work there established a 45-year interest in the controversy based on the theory that Francis Bacon wrote the works credited to William Shakespeare. In 1957, the couple, then retired from their government careers, jointly wrote a book in which they argued on the basis of scientific analysis that there are no cryptographic clues in Shakespeare's works.

Their later work at the laboratories included decoding messages for government agencies and training others in cryptography, a relatively unknown science before World War I.

Mrs. Friedman saw service with the Navy and old War departments before transferring to the Treasury Department in 1924, where she was in charge of deciphering work for all agencies of the department. Most of her career there, however, was concerned with smuggling operations. She served as a government witness in numerous cases and was a star witness for the U.S. Coast Guard in the 1933 New Orleans trial of the Consolidated Exporters Co., considered the Prohibition era's largest and most powerful bootlegging ring.

In the late 1930s, Mrs. Friedman testified for the Crown in Vancouver, B.C., where her findings in solving a Chinese code aided in the conviction of Chinese opium smugglers and gun runners, which led to the breakup of a huge smuggling ring.

She retired in 1945 and then served as a consultant for the International Monetary Fund for a number of years and established the IMF's communications security system.

Mrs. Friedman was born in Huntington, Ind., and earned a bachelor's degree in English from Hillsdale College in Michigan. She received an honorary law degree from Hillsdale College in 1938.

After her husband's death in 1969, she compiled a bibliography of his works, considered the largest unclassified collection of cryptography and cryptanalysis in the world. The collection was donated to the George C. Marshall Research Library in Lexington, Va., in 1971.

Mrs. Friedman, a Washington resident from 1921 until 1977, was the author of newspaper articles and numerous technical papers in her field. She had lived in California and New Jersey since leaving here.

Survivors include a son, John, of North Plainfield, N.J.; a daughter, Barbara Atchison, of Berkely, Calif., and six grandchildren.