Cryptography – the science of creating codes – conjures up images of World War II military spies, mysterious religious sects,The Da Vinci Code and other tales of intrigue.

Underlying these true and fictional stories about secret messages are mathematical formulas that Alice Silverberg finds equally intriguing.

The mathematics and computer science professor specializes in number theory and cryptography. She helps people safeguard information, not by tapping out secret messages on a decoder ring, but by designing efficient and secure cryptosystems and using mathematics to better understand them.

Cryptography is an ancient science. Julius Caesar communicated to his generals using a secret code. Each letter in his plain-text message was replaced by a letter three positions down the alphabet, which became known as the Caesar cipher.

This form of cryptography, which relied on two parties creating a secret key – in this case, “shifting by 3” – before sharing information, continued to evolve through modern times, aided in the early 20th century by elaborate mechanical devices. Among the most notorious was the Enigma machine, used by the German military, which used rotors to continually change the substitution alphabet.

With the digital age came a new form of cryptography based on complex computations. In the mid-1980s, mathematicians discovered a branch of number theory called elliptic curves that could be used to encrypt messages. That’s when Silverberg – who was already studying elliptic curves – developed an interest.

Such study results in complex mathematical puzzles and hard-to-crack codes that make it possible to keep eavesdroppers from listening to others’ cell phone conversations or capturing their credit card information over the Internet. Anyone who shops safely online on a secure site can thank number theorists.

While Silverberg’s interest in codes is academic, she’s not immune to the allure of hidden messages. She spent several months as a consultant to the TV show “Numb3rs,” which features the crime-solving abilities of an FBI agent and his brother, a mathematical genius. For one episode, Silverberg was asked to come up with math equations the producers could reproduce on a blackboard. She sent them formulas embedded with some text: CEILIDH – the acronym for a cryptosystem she created with a colleague, as well as the name of her late cat.

“My cat’s name flashed across the screen and was seen by more than 12 million viewers,” she says.

Silverberg agreed to the “Numb3rs” job for several reasons: She wanted the cryptography to be “more correct and less silly,” she wanted to improve the depiction of female scientists, and she wanted to make the mathematics – and mathematicians – more credible.

“We replaced jargon that made us cringe a lot with jargon that made us cringe a little,” she says.

Silverberg, who earned her doctorate in mathematics from Princeton University, prefers the real-life intrigue of mathematics to television fiction.

“Studying number theory is like solving a puzzle. There are many questions you want to answer,” she says. “You want to understand numbers, because they’re a key to describing mathematics, the world, the universe.”

Numbers also are key to protecting people’s identities as they explore the brave new world of the Internet. Thanks to mathematicians like Silverberg, they’re keeping our secrets.