Earlier this summer, a few weeks after former NSA contractor Edward Snowden's leaked documents on the agency's surveillance practices were published, the encrypted email service provider he used, called Lavabit, shut itself down. At that time, Lavabit's founder Ladar Levison said he was shuttering his website to avoid "becom[ing] complicit in crimes against the American people," which many took to mean he was resisting further surveillance demands by the US government. It turns out we didn't know the half of it: new court documents unsealed today in the US District Court for Virginia's Eastern District, obtained by Wired, reveal that Levison fought the US government tooth-and-nail to avoid handing over the encryption keys that would allow government agents to read his customers' emails.

In the harrowing saga recounted in the newly unsealed documents, it turns out the government obtained a search warrant in July and demanded Lavabit hand over the encryption and secure-socket layer (SSL) keys to its system. The government was pursuing the emails sent by a single target, whose name has been redacted, but as Wired points out, it's highly likely that user was Snowden himself.

Rather than comply with the order outright, Levison went to court, where his attorney argued handing over the keys would put the security of Lavabit's 400,000 users' communications in jeopardy. The judge, however, was swayed with the government attorney's argument that agents would filter the communications, and so Lavabit was still required to hand over the data. Levison complied, but did so by submitting an 11-page-long document in size 4 font, which the government called "illegible." Wired quotes a newly unsealed government filing complaining about the move:

"To make use of these keys, the FBI would have to manually input all 2,560 characters, and one incorrect keystroke in this laborious process would render the FBI collection system incapable of collecting decrypted data."

Although the court later ordered Levison to make a more usable copy, his shuttering of Lavabit on August 8 threw another obstacle in the government's path. Levison is still appealing the order, and has been ordered not to discuss the details of the case, but the documents reveal that he's willing to go to great lengths to try and protect the privacy of his users.