NEW DELHI (Reuters) - India’s government asked Facebook Inc on Tuesday to help it decrypt private messages on its network, citing national security requirements in a court hearing on privacy rights on social media platforms.

FILE PHOTO: India's flag is seen through a 3D printed Facebook logo in this illustration picture, April 8, 2019. REUTERS/Dado Ruvic/Illustration/File Photo

India’s Attorney General K.K. Venugopal told the Supreme Court that it was the responsibility of social media companies to share data wherever there was a threat to national security.

“A terrorist cannot claim privacy,” Venugopal said. “For Facebook and WhatsApp to say they cannot decrypt is not acceptable.”

Facebook-owned WhatsApp, which has about 400 million users in India, allows groups of hundreds of users to exchange texts, photos and videos using end-to-end encryption, beyond the oversight of independent fact checkers or even the platform itself.

The government said in an affidavit it planned to frame new rules to govern social media “keeping in view the ever growing threats to individual rights and nation’s integrity, sovereignty, and security.”

“They can’t come into the country and say we will establish an non-decryptable system,” Venugopal said, referring to big internet platforms.

But Facebook’s lawyer Mukul Rohtagi told the court the company was not obliged to share users’ data with the Indian government.

The case went to the Supreme court after Facebook in August asked the top court to hear all cases concerning privacy and curbs on social media usage, local media reported.

WhatsApp has been trying to find ways to prevent its misuse, following concerns that the platform was being used to spread disinformation, but has said it will not dilute end-to-end encryption.

Rohtagi said local laws neither mandated companies to share data with government agencies, nor placed the onus of facilitating a process of decrypting messages on them.

“The rules say if I have the key, I could give the key. But I don’t have the key myself,” Rohtagi said, referring to Facebook or WhatsApp servers which are located outside of India.

The Supreme Court said it will now consolidate all pending cases on the issue from lower courts across the country and hear it beginning the last week of January.

Tushar Mehta, a lawyer for the government, said there was no intention to invade into personal lives of citizens, and India merely wanted to guard its citizens against extremism.

But Judge Deepak Gupta asked the government lawyers to explain why the onus of facilitating decryption should be on the social media companies. He said the law allows the government to seek help to decrypt, but does not suggest the companies do it for the government, he told Venugopal.

“Nobody prevents you from having your own system of decryption,” Gupta said.