"The whole reason I came here was to ask you to help make it better," Alexander said during his keynote address at the Black Hat cybersecurity convention in Las Vegas. "If you disagree with what we're doing, you should help make it better."

Alexander's comments come nearly two months after Edward Snowden, a former employee at a government contractor, leaked the NSA's sweeping system for monitoring emails, photos, search histories and other data from major American Internet companies. The program, known as "Prism," is aimed at gathering data on foreign intelligence targets.

Alexander outlined details of the Prism program, the terrorist threats thwarted because of it, and a look into the techniques the NSA uses to collect user data.

The Black Hat audience of security analysts, hackers and some of the brightest minds in the security business -- many of whom the government call on for national security -- had decidedly mixed opinions of the speech.

"For the most part people were really receptive," said a security researcher who goes by the name Moxie Marlinspike. "It seemed like he was putting more emphasis on justifying their actions than denying their actions."

Some were impressed the NSA official even showed up in light of recent revelations.

"I thought it was cool that he came here," said security consultant Larry Biggs.

DefCon, a conference devoted to the hacker culture that comes on the heels of Black Hat, uninvited the NSA this year. Government representatives often attend the conferences to recruit top security personnel, but DefCon's organizers didn't feel like it was appropriate to have them around this year.

"When it comes to sharing and socializing with feds, recent revelations have made many in the community uncomfortable about the relationship," DefCon and Black Hat founder Jeff Moss wrote. "Therefore, I think it would be best for everyone involved if the feds call a 'time-out' and not attend DefCon this year."

Yet Alexander fired back on Wednesday, arguing that the government's spying program has made the nation more secure. When asked if the NSA leaks had impacted national security, Alexander said the damage done to the U.S. is both significant and irreversible.

"Will we have the success over the next 10 years that we had over the last?" he mused, addressing the 54 terrorist plots that had been thwarted by NSA techniques. "I think it's worth considering if those attacks were successfully executed what would those mean to our civil liberties."