In each of these cases, American officials insist, when speaking off the record, that the United States was never acting on behalf of specific American companies. But the government does not deny it routinely spies to advance American economic advantage, which is part of its broad definition of how it protects American national security. In short, the officials say, while the N.S.A. cannot spy on Airbus and give the results to Boeing, it is free to spy on European or Asian trade negotiators and use the results to help American trade officials — and, by extension, the American industries and workers they are trying to bolster.

Now, every one of the examples of N.S.A. spying on corporations around the world is becoming Exhibit A in China’s argument that by indicting five members of the People’s Liberation Army, the Obama administration is giving new meaning to capitalistic hypocrisy. In the Chinese view, the United States has designed its own system of rules about what constitutes “legal” spying and what is illegal.

That definition, the Chinese contend, is intended to benefit an American economy built around the sanctity of intellectual property belonging to private firms. And, in their mind, it is also designed to give the N.S.A. the broadest possible rights to intercept phone calls or email messages of state-owned companies from China to Saudi Arabia, or even private firms that are involved in activities the United States considers vital to its national security, with no regard to local laws. The N.S.A. says it observes American law around the globe, but admits that local laws are no obstacle to its operations.

“China demands that the U.S. give it a clear explanation of its cybertheft, bugging and monitoring activities, and immediately stop such activity,” the Chinese Defense Ministry said in a statement released on Tuesday. It was part of a broad Chinese effort to equate what China’s Unit 61398 does — the cyberwar operation named in the indictment of five unit members that was announced Monday — with what the N.S.A. does.

Petrobras is a case in point. In the American view, Brazilian energy policy is made inside the state-run company, which is indistinguishable from the government. Thus, under the same rationale that the United States intercepted the phone calls of the country’s president, Dilma Rousseff, it had the authority, as a collector of foreign intelligence, to delve inside the company. Ms. Rousseff, denouncing the N.S.A. at the United Nations last September, said that the agency’s activities amounted to “a breach of international law and an affront” to Brazil’s sovereignty.