The Law Commission said it “met extensively with and sought the views of government departments, lawyers, human rights NGOs and the media,” a claim rejected by campaigners.

Commenting on the opposition claims, a spokesman for Prime Minister Theresa May said: “I’ve seen the way this has been reported and it is fundamentally wrong.

“It is not, never has been and never will be the policy of the government to restrict the freedom of investigative journalism or public whistleblowing.

“One of the points of this review is to consider whether more safeguards are required to protect public sector whistleblowers and journalists,” the spokesman said.

Spokespeople and anonymous sources from groups including Liberty, Public Concern at Work and the Guardian newspaper said they had met with lawyers but had not been told that those meetings were part of an official consultation.

They expressed surprise that they had appeared in the Commission’s new report when in some cases the meeting had been billed as a “general chat.”

Jim Killock, head of the Open Rights Group, said despite claims to the contrary his group has not taken part in a consultation.

He said the lawyers “had nine months to actually talk to journalists and civil liberty organizations, and find out what the consequences of their suggestions might be, and in actual fact they’ve managed to talk to no one. But they’ve listed us all as having being consulted in the paper anyway.

“This is a full-frontal attack, recommending criminalizing even examining secret services’ material. The intention is to stop the public from ever knowing that any secret agency has ever broken the law,” he said.

The targets of such legislation are likely to be the Guardian newspaper and former NSA whistleblower Edward Snowden, Killock added.

According to its own 2015 report, the Law Commission believes that current UK whistleblowing laws badly need to be updated.

“In the digital age, the volume of information that can be disclosed without authorization is much greater than when the Official Secrets Act 1989 was originally drafted,” the Commission said.

“It could be argued that this means that the ability to cause damage to the national interest and the risk of such damage occurring has also increased.”

In the same report the Commission said the current two-year sentence for whistleblowing is inadequate and spoke favorably of the 14-year sentence available in Canadian courts.

“We are currently conducting an open public consultation on the protection of official data, including the Official Secrets Acts,” the Commission told the Guardian.

“We are seeking views on how the law could meet 21st-century challenges while also ensuring people don’t inadvertently commit serious offenses. Our provisional proposals make a number of suggestions to improve the current laws around the protection of official data, and we welcome views.”