The nation’s top spy told Congress Tuesday he’s skeptical China will uphold its end of a deal minted Friday by Chinese President Xi Jinping and President Barack Obama not to engage in economic espionage against each other.

“Well, hope springs eternal,” Clapper told the Senate Armed Services Committee Tuesday. “I think we will have to watch what their behavior is, and it will be incumbent on the intelligence community, I think, to depict to policymakers what behavioral changes, if any, result from this agreement.”

“Are you optimistic?” chairman and Republican Arizona Sen. John McCain asked.

“No,” Clapper replied.

Jinping and Obama announced the surprise agreement Friday during the Chinese president’s state visit to the White House, where the two leaders agreed their governments would not support economic espionage against one another, and set up the framework of a dialogue mechanism between high-level officials in each country to negotiate and prosecute cyber criminals caught engaging in acts of cyber aggression.

Deputy Secretary of Defense Robert Work was on hand to defend the deal, which he said would allow the U.S. to pressure Chinese officials into prosecuting rogue Chinese hackers engaging in cyber intrusions.

“Please don’t deceive this committee as if we don’t know who’s responsible for it, that’s just very disingenuous,” McCain told Work. “There have been public reports that we’ve identified the [People’s Liberation Army] building in which these cyberattacks come from.”

McCain expressed his own skepticism of the deal, which he described as a set of “vague commitments” and “diplomatic discussions about establishing norms of behavior that are favorable to both China and Russia.”

The chairman and other lawmakers pressed Work, Clapper and Adm. Mike Rogers of U.S. Cyber Command and the National Security Agency on the need for a public policy of cyber deterrence to dissuade China from acts of cyber aggression.

RELATED: Rogers: New Phone Metadata Program Will Make NSA Slower, Less Effective

While Clapper and Rogers repeated the need for a set of established norms and responses U.S. adversaries could expect, Work advocated the Obama administration’s current reactionary policy of preparing a measured response after a breach or attack, as it did in the case of last year’s cyberattack against Sony Pictures by suspected North Korean government hackers.

“We respond in a time, manner and place of our choosing,” Work said, adding economic sanctions or counterattacks were all on the table, depending on the situation.

“That’s not a policy Secretary Work, that is an exercise in options,” McCain said. “We have not got a policy, and for you to sit there and tell me that you do, a ‘broad stroke strategy,’ frankly is not in compliance with the law.”

McCain took the opportunity to blast the administration for taking “either no action or largely symbolic responses that have zero impact on our adversaries’ behavior” other than “to reward China with diplomatic discussions.”

On the issue of criminals and terrorists “Going Dark” online as a result of private Internet service providers adopting end-to-end encryption over their communications services, lawmakers grew more vocal Tuesday in their criticism of private companies reluctance to work with government agencies on a solution to accessing targets’ data.

RELATED: The FBI is Losing the Fight Against Encryption

“We’re the first to acknowledge this is an incredibly complicated issue, with a lot of very valid perspectives” Rogers said, adding the administration doesn’t have a policy in place to deal with encryption yet. “So I still think collectively we’re trying to work through what’s the right way ahead here.”

“I have a policy position,” Florida Democratic Sen. Bill Nelson told Rogers. “The telecoms better cooperate with the United States government, or else it just magnifies the ability for the bad guys to utilize the Internet to achieve their purposes.”

The NSA and Cyber Command head confirmed encryption makes data collection under Patriot Act Section 215 and FISA Amendments Act Section 702 surveillance programs “very difficult.”

“From the perspective at Cyber Command and NSA, there’s a huge challenge for us here that we have got to deal with,” Rogers said.

Follow Giuseppe on Twitter