Yahoo will add encryption to all its products by spring 2014, chief Marissa Mayer has announced, in a bid to tackle users’ privacy fears in the wake of reports that the National Security Agency had accessed the tech firm's data centres.

In a blogpost on Monday, Mayer said: “We’ve worked hard over the years to earn our users’ trust and we fight hard to preserve it. As you know, there have been a number of reports over the last six months about the US government secretly accessing user data without the knowledge of tech companies, including Yahoo.

“I want to reiterate what we have said in the past: Yahoo has never given access to our data centers to the NSA or to any other government agency. Ever. There is nothing more important to us than protecting our users’ privacy.”

Mayer’s move comes after the Washington Post reported last month that the NSA had broken into the main communications links that connect Yahoo and Google data centres around the world.

According to documents obtained from former NSA contractor Edward Snowden and interviews with officials, the NSA, in partnership with its British counterpart GCHQ, has been copying large amounts of data as it flows across fibre-optic cables that carry information between the companies’ worldwide data centres.

After the story broke, Yahoo said government attempts to circumvent its online security systems offered “substantial potential for abuse”. Eric Schmidt, Google’s executive chairman, called the news “really outrageous”.

Yahoo recently announced it was beefing up security on its email service by introducing https (SSL – Secure Sockets Layer) encryption with a 2048-bit key across its network by 8 January 2014.

The company said it would now:

Encrypt all information that moves between its data centers by the end of the first quarter of 2014;

Offer users an option to encrypt all data flow to/from Yahoo by the end of Q1 2014;

Work closely with international partners to ensure that Yahoo co-branded mail accounts are https-enabled.

Google too is racing to encrypt its data. Executives at the tech giant refer to an “arms race” with US authorities and others who want unauthorised access to its users’ data. Executives say the company has been improving and extending its encryption of data since the Snowden stories first broke, doubling the length of its digital keys and implementing new measures to detect fraudulent attempts to access its information.

Similar moves to add greater encryption and other security measures are under way at Apple, Facebook and Microsoft. All the tech giants feel that their reputations have been damaged by the Snowden leaks and insist that they never hand over information to the NSA without a legal order.

The tech firms are currently lobbying to be allowed to make more disclosures about the number of NSA orders they receive. Currently those orders are dealt with under the Foreign Intelligence Surveillance Act and the companies are gagged from disclosing details.