When the United States National Security Agency's code-breaking supercomputer TRANSLTR encounters a new and complex code— Digital Fortress —that it cannot break, Commander Trevor Strathmore calls in head cryptographer Susan Fletcher to crack it. She discovers that it was written by Ensei Tankado, a former NSA employee who became displeased with the NSA's intrusion into people's private lives. If the NSA doesn't reveal TRANSLTR to thepublic, Tankado intends to auction the code's algorithm on his website and have his partner, "North Dakota", release it for free if he dies, essentially holding the NSA hostage. The agency is determined to stop Digital Fortress from becoming a threat to national security.
When Tankado does indeed die in Seville, of what appears to be a heart attack, Strathmore asks David Becker (Susan's fiancé) to travel to Seville and recover a ring that Tankado was wearing when he died. The ring is suspected to have the code that unlocks Digital Fortress. However, Becker soon discovers that Tankado gave the ring away just before his death. Each person he questions in the search for the ring is murdered by Hulohot, a mysterious deaf assassin.
Meanwhile, telephone calls between North Dakota and Tokugen Numataka (chairman of the Japanese computer company Numatech) reveal that North Dakota hired Hulohot to kill Tankado in order to gain access to the passcode on his ring and speed up the release of the algorithm. At the NSA, Fletcher's investigation leads her to believe that Greg Hale, a fellow NSA employee, is North Dakota. Phil Chartrukian, an NSA technician who is unaware of the Digital Fortress code breaking failure and believes Digital Fortress to be a virus, conducts his own investigation into whether Strathmore allowed Digital Fortress to bypass Gauntlet (NSA's virus/worm filter). However, Chartrukian is murdered by being pushed off the catwalk in the sub-levels of TRANSLTR by an unknown assailant. Since Hale and Strathmore were both in the sub-levels, Fletcher assumes that Hale is the killer; however, Hale claims that he witnessed Strathmore killing Chartrukian. Chartrukian's fall also damages TRANSLTR's cooling system.
Hale holds Fletcher and Strathmore hostage to prevent himself from being arrested for the murder. It is then that Hale explains that the e-mail he supposedly received from Tankado was actually in his inbox because he was snooping on Strathmore, who was also watching Tankado's e-mail account. After the encounter, Hale's name is cleared when Fletcher discovers through a tracer that North Dakota and Ensei Tankado are actually the same person, as "NDAKOTA" is an anagram of "Tankado". Strathmore exposes himself when he fatally shoots Hale, and arranges it to appear as a suicide. Susan later discovers through Strathmore's pager that he is the one who hired Hulohot. Becker later kills Hulohot in a violent confrontation.
Chapters told from Strathmore's perspective reveal his motives. By hiring Hulohot to kill Tankado, having Becker recover his ring, and at the same time arranging for Hulohot to kill him, would facilitate a romantic relationship with Fletcher, regaining his lost honor, and enable him to unlock Digital Fortress. By making phone calls to Numataka posing as North Dakota, he thought he could partner with Numatech to make a Digital Fortress chip equipped with his own backdoor Trojan so that the NSA could spy on every computer equipped with these chips. However, Strathmore was unaware that Digital Fortress is actually a computer worm once unlocked, "eating away" at the NSA databank's security and allowing "any third-grader with a modem" to look at government secrets. When TRANSLTR overheats, Strathmore commits suicide by standing next to the machine as it explodes.
The worm eventually gets into the database, but soon after David Becker figures out the password (3, the difference between the Hiroshima nuclear bomb, Isotope 235, and the Nagasaki nuclear bomb, isotope 238, a reference to the nuclear bombs that killed Tankado's mother and left him crippled), and is able to terminate the worm before hackers can get any significant data. The NSA allows Becker to return to the United States, reuniting him with Fletcher. In the epilogue, it is revealed that Numataka is Ensei Tankado's father. Numataka left Tankado the day he was born since Tankado was a deformed child.