A Yahoo executive has publicly challenged the National Security Agency (NSA) over encryption "backdoors".
Alex Stamos pressed NSA director Adm Mike Rogers on whether the access to encrypted data requested by the US authorities should also be granted to the Russian and Chinese governments.
Adm Rogers insisted an agreement could be reached "within a framework".
The tense exchange came after many top tech figures refused to attend a White House cybersecurity summit this month.
"If we're going to build defects, backdoors or golden master keys for the US government, do you believe we should do so... for the Chinese government, the Russian government, the Saudi Arabian government, the Israeli government, the French government?" asked Mr Stamos, Yahoo's chief information security officer.
After initially dodging the question, Adm Rogers - who took over as director of the NSA last year - responded: "I think that we're lying that this isn't technically feasible.
"Now, it needs to be done within a framework. I'm the first to acknowledge that."
According to a transcript provided by the Just Security website, he argued that he did not want the FBI and NSA to unilaterally decide what access they should have, but insisted an agreement was achievable.
Pressed on whether he thought that access should also be granted to other nations' governments, Adm Rogers said: "I think we can work our way through this."
Mr Stamos responded: "I'm sure the Chinese and Russians are going to have the same opinion."
The exchange took place before delegates at a cybersecurity conference hosted by the New America Foundation on Monday.
There has been an increasingly tense relationship between the US authorities and Silicon Valley since information was leaked by NSA whistleblower Edward Snowden.
Encryption of user data has subsequently become increasingly popular and, in some cases, the companies hand over the keys to users, making it difficult to break.
But the White House has asked tech firms to share more data with law enforcement agencies. And the US authorities want them to build in vulnerabilities that they would be able to exploit.
The rift was illustrated when, earlier this month, senior Google, Yahoo and Facebook executives turned down invitations to a White House cybersecurity summit at Stanford University.
Tim Cook, of Apple, was one of the few top tech bosses to appear.
Adm Rogers told the conference on Monday that the NSA needed a way to access data if it was believed that a device was "being used for criminal, or in my case, foreign intelligence or national security issues".
But he acknowledged that there were legitimate concerns to be addressed before a "legal framework" could be established.