In a rare public appearance amid the ongoing US surveillance controversy, the director of the National Security Agency is scheduled to speak to a conference of hackers in Las Vegas later this month.

Army General Keith Alexander, the director of the NSA and the leader of the US Cyber Command, is slated to give a keynote presentation at Black Hat, a convention that bills itself as bringing together "all facets of the infosec [information security] world – from the corporate and government sectors to academic and even underground researchers."

Alexander has been confirmed to address Black Hat since mid-May, before the Guardian and the Washington Post, relying on leaks from ex-NSA contractor Edward Snowden, revealed widespread NSA surveillance on Americans' phone records and the online habits of persons the NSA believes to be non-Americans living outside the US.

"We are honored to have General Alexander join us this year at Black Hat in Las Vegas for the first time. We couldn't have asked for a better time to welcome him," said Black Hat general manager Trey Ford.

"The security and intelligence communities have common interest in protecting international critical infrastructure and the internet at large. We both have an acute interest in defining and defending privacy."

As befits one of the US's spymasters, Alexander rarely speaks publicly, and his public appearances beyond the Beltway are rarer still. The last time Alexander did so, he sparked a controversy that got his nominal boss, director of National Intelligence James Clapper, in serious trouble.

Last year, Alexander addressed a different Las Vegas hacker conference, Def Con, and stated in response to an audience question that "the story that we have millions or hundreds of millions of dossiers on people is absolutely false".

That line piqued the interest of Senator Ron Wyden, a member of the Senate intelligence committee, who wrote to Alexander and Clapper asking for an explanation. Although Wyden only referred to it obliquely in public letters, he was concerned that Alexander's statement misleadingly concealed the extent of the surveillance activities ultimately leaked by Snowden.

A series of letters followed over the subsequent months that Wyden found insufficiently responsive, prompting him to publicly ask Clapper during a Senate hearing if the NSA collects "any type of data at all on millions or hundreds of millions of Americans".

NSA representatives for Alexander did not reply to requests for comment.

"General Alexander faces hard decisions about where privacy and security cross, a way of thinking that the security community is also very familiar with," Black Hat's Ford said. "We're elated to get a glimpse into his world and thinking during his keynote at Black Hat on July 31."

Alexander will speak two days before Def Con begins on August 2 in Las Vegas. Def Con founder Jeff Moss, known in hacking circles as the Dark Tanget, said on Wednesday night that the federal government should stay away from the convention:

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

This will give everybody time to think about how we got here, and what comes next.

The declaration is mostly symbolic as there are no measures in place to block federal government employees from attending the event.

Security expert and six-time Def Con attendee Brian Krebs said the relationship between feds and hackers has changed since the convention started 21 years ago. "The relationship has turned from one of mutual distrust to one of mutual admiration," Krebs said.

It's unclear whether the announcement will put an end to the Def Con traditional game of Spot the Fed, a lighthearted, informal contest where people attempt to identify federal agents.

Sign up for the Guardian Today

Our editors' picks for the day's top news and commentary delivered to your inbox each morning.