VANCOUVER – Edward Snowden made a surprise onstage appearance at TED earlier this week, and today the NSA responded. Deputy Director Rick Ledgett spoke to the audience of elite techies via a remote connection that was, ironically, much spottier than Snowden's connection via meeting bot.

>'This is not NSA running off and doing its own things. President Madison would have been proud' – NSA Deputy Director Rick Ledgett

Not surprisingly, Ledgett condemned Snowden's actions. He called the former NSA contractor "arrogant" and said his revelations of secret NSA programs endangered the safety of U.S. citizens and allies by giving bad guys a heads-up. "He put people's lives at risk...in the long run," Ledgett said. And he said the characterization of Snowden as a whistleblower hurts "legitimate whistleblowing."

"It's bad to expose operations and capabilities in a way that allows the people we're all working against – the generally recognized bad guys – to counter those," Ledgett said.

But when TED organizer Chris Anderson asked Ledgett whether he would consider backing any kind of amnesty for Snowden, he stopped short of saying no. "Not presupposing any outcome, there is always room for discussion," Ledgett said.

Not that Snowden should take this as a sign that it's safe to come home. Just as Snowden himself has been on the public-relations march lately – he appeared at SXSW the week before taking the stage at TED on Tuesday – the NSA has its own marketing campaign to wage. Especially considering the tech-heavy audience at TED, which through a show of hands Tuesday seemed to back Snowden as a hero, Ledgett couldn't have called for Snowden's head without alienating the people whose support the NSA needs.

The Political Risk of Condemning Snowden —————————————-

Still, the softness of his answer – despite the supposed desire of American spies to kill Snowden – suggests that Snowden's fate is far from certain. On the one hand, the U.S. government could never be seen to condone or excuse the leaking of any classified information, much less the massive cache purloined by Snowden. But the prospect of turning Snowden into a martyr makes any campaign to lock him up for life politically risky. As Snowden himself pointed out at TED the other day, the issues he's raised around surveillance and privacy don't break down tidily along partisan lines.

The difficulty of solving the complex political equation Snowden represents was on full display in Ledgett's suggestion that striking some kind of deal wasn't out of the question. "There is a strong tradition in American jurisprudence of having discussions with people who have been charged with crimes if it benefits the government," Ledgett said. "There's always room for that kind of discussion."

Larry Page Versus the NSA ————————-

Yesterday on stage at TED, Google CEO Larry Page complained that the NSA's programs put his company in the position of having to protect users from the U.S. government. "It's tremendously disappointing that the government secretly did all this stuff and didn't tell us." Today, Ledgett took pains to argue that the NSA's programs were not only effective but legal. He acknowledged that compelling companies to release data to the intelligence agency put tech companies in a "tough position." But he said every branch of government approved of the NSA's efforts multiple times – an example of checks and balances working as they should.

"This is not NSA running off and doing its own things," Ledgett said. "President Madison would have been proud."

Of course, as Ledgett made clear, Snowden's legal fate is a decision that's ultimately up to the Department of Justice. In the meantime, his agency faces the challenge of persuading the American public – and the world – that we all can trust the agency to respect the privacy of citizens. Maybe they've started with Snowden. "We didn't realize he was going to show up there," Ledgett quipped to Anderson. "So kudos to you guys for arranging a nice surprise like that."