Internet search engine Google is finalizing a deal with the National Security Agency tp investigate a recent cyberattack that may have originated in China, according to reports.

China responded with a defense of state control of the Internet. An official said online pornography, fraud and rumors were the cause and that Internet must help guide the public regarding their opinions in China.

The goal of the investigation is to defend Google, the world’s largest Internet search company, and its users from future attacks.

Under the agreement, the NSA would not be viewing user searches or e-mail accounts. Google also would not be sharing any private data with the NSA, they said.