Earlier this year, the U.S. government accused China's military of running a massive cyberspying campaign to steal business secrets from American companies.
"We've made it very clear to China and some other state actors that, you know, we expect them to follow international norms and abide by international rules," President Obama told ABC News in March.
Last week, Edward Snowden, the former National Security Agency contractor who leaked details of the agency's surveillance programs, told Hong Kong's South China Morning Post newspaper that the NSA had hacked civilian computers in the Chinese territory and the mainland over a period of four years. After months of criticism from the U.S., China's government finally had a weapon of its own.
"It's Christmas in June in Beijing and Snowden is Santa Claus," says Bill Bishop, who writes Sinocism, a popular daily news digest on China. "If you look at the reactions of the Chinese government over the last few months or a year, specifically to all the allegations of hacking coming out of China, China will say, 'We're a victim, too. We are one of, if not the biggest victim of hacking in the world.' So, now, these revelations come out and they can say, 'See? We were telling the truth.'"
There is a distinction in the hacking allegations. China's government is accused of mass spying on U.S. companies for economic advantage. The U.S. is accused of hoovering up huge amounts of private information at home and abroad for what it says is an effort to find terrorists. China's state-run media has glossed over that nuance, and gone for the jugular.
Bishop cites two recent cartoons here.
"One depicted the Statue of Liberty, but her shadow was a secret agent with several eavesdropping devices," he says. "And another was a rat dressed as the Statue of Liberty, pulling off the cover of a computer and the cover was a Chinese flag."
Patrick Xu, an associate professor at Communication University of China in Beijing, says the U.S. has "damaged its reputation."
In a column for the government news portal China.org, he compared Snowden to Watergate reporters Bob Woodward and Carl Bernstein and said China should grant him asylum. Xu says speeches by American officials criticizing China for Internet prying now ring hollow.
"It turns out this was a rather big lie," he says.
How much all of this resonates with ordinary Chinese is questionable. On Sina Weibo, China's equivalent of Twitter, Snowden did not even make Tuesday top 10 topics. No. 1 was a Chinese movie star who recently put on a lot of weight. And when NPR spoke to 13 people in Shanghai on Tuesday, only three had even heard of Snowden.
One was a doctor who only gave his English name, "John," because he thinks the topic is sensitive to the government.
John thought Snowden was gutsy.
"At least he let the public know potential security risks," he said, speaking in Chinese. "Our privacy can be easily exposed by others. It feels like you are stripped naked."
John, who was sipping coffee at a Burger King, said the NSA revelations didn't change his view of the U.S. He thinks most countries do the same thing. John lives in far western China where ethnic Uighur people are at odds with the government in Beijing.
"I am from Xinjiang and we experienced big ethnic riots in 2009," he says. "Lots of information was blocked. The Internet was cut off" for 10 months.
As Chinese state media has criticized the U.S., Chinese officials have kept quiet.
Joseph Cheng, a political science professor at City University of Hong Kong, says that's smart.
"Now, that China has enjoyed this accidental publicity coup, certainly China has no intention to further embarrass the Obama administration, which may well lead to a deterioration in the bilateral relationship," he says.
The two countries held a presidential summit earlier this month in California to improve ties. Right now, it serves neither side to make them worse.