The sharp exchange of words was the latest signal of the growing dispute between Washington and Silicon Valley over new end-to-end encryption technologies which started to gain considerable prominence in the wake of the Edward Snowden leaks about the NSA.
In one example of the new security technologies, the latest operating systems for Apple and Google smartphones include strong encryption that the companies themselves cannot break. For many industry executives and privacy experts, these types of encryption are likely to be the best defence for customers against their data being hacked.
However, senior US officials have warned that the growing use of encryption could make it harder for law enforcement to solve homicides or find victims of child exploitation. "The post-Snowden pendulum has swung too far in one direction," FBI director James Comey said last year.
Mr Stamos was questioning the contention of Mr Comey and some other officials that the US authorities should have the technical means of getting access to user information if they have a warrant or another legal authority.
More from the Financial Times:
Cyber criminals target trading algorithms
US official launches cyber security group
Russian cyber suspect heads to US court
"If we are going to build defects or golden master keys for the US government, what do you believe we should do for the Chinese government, the Russian government, the Saudi Arabian government, the Israeli government, the French government?" he challenged Admiral Rogers. "Which of those countries should we give backdoors to?"
Admiral Rogers said he thought there was a way for the industry and law enforcement to "work our way through it".
"You don't want the FBI and you don't want the NSA unilaterally deciding what are we going to access and what are we not going to access? That shouldn't be for us. I just believe that this is achievable." He said security risks were going up, while trust in the authorities was declining, which was "a terrible place for us to be as a country".
Mr Stamos said that any attempt to build backdoors into encryption systems would be "like drilling a hole in the windshield". Admiral Rogers responded: "I've got a lot of world-class cryptographers at the National Security Agency."
The tension over encryption was evident at a summit ten days ago at Stanford University held by the White House to discuss cyber security with industry, which was led by President Barack Obama. While Apple chief executive Tim Cook spoke at the event, the heads of a number of other major technology companies declined to attend.