Parliaments, tech leaders and privacy activists are scrambling to respond to revelations about NSA and GCHQ surveillance

Revelations about the extent of the surveillance programmes undertaken by the NSA and GCHQ – as well as their efforts to undermine online security and encryption – have provoked fierce reaction around the world, sparking technical innovations, legal challenges, and moves towards political reform.

Leading technology firms including Google, Apple, Microsoft and Yahoo have been working to rebuild users' trust after the disclosure that the NSA can access information on their servers. For Google, this has involved announcing efforts to increase the encryption used for data travelling between the company's data centres, which the Washington Post revealed was being accessed by the NSA, as well as joining legal calls for the release of more government information at users' request.

Other technology startups have taken more drastic action. Lavabit, a secure email provider reportedly used by Edward Snowden, the NSA whistleblower, shut down after the government requested a back door into its systems. Another company, Silent Circle, closed its email service shortly afterwards.

Such efforts have prompted new companies and services to step into the breach. One project, named Mailpile, crowdsourced more than $160,000 of funding to build encrypted mail software and keep data storage away from US servers.

Other projects working towards similar ends have felt the increase in interest: one storage service, SpiderOak, based on "zero-knowledge privacy" said download figures immediately spiked.

Even the federal National Institute of Standards and Technology, which sets required security and encryption levels, has announced a full review of its standards in an effort to restore industry trust following concerns the NSA had manipulated the institute's guidance.

The continuing transparency lawsuits from Google and other Silicon Valley companies are not the only legal challenges faced by the NSA and GCHQ. Following the release of a secret court order against Verizon revealing the collection of Americans' phone records, two civil society groups initiated freedom of information lawsuits asking for further details.

Those actions, launched by the Electronic Frontier Foundation and Electronic Privacy Information Center, led to the declassification and release of hundreds of pages of secret court rulings governing the collection of US domestic phone records under section 215 of the Patriot Act – including circumstances under which the court had found parts of the NSA programme unconstitutional.

The NSA's UK counterpart GCHQ faces even greater challenges under British and European human rights law. Advocacy group Privacy International has launched actions with the UK's investigatory powers tribunal and with the Organisation for Economic Co-operation and Development against both GCHQ and seven telecoms companies working with it.

Concurrently, a coalition of digital rights, privacy, and freedom of expression groups – Open Rights Group, English PEN and Big Brother Watch – has begun a challenge at the European court of human rights, funded through public donations.

Internal GCHQ documents showed the agency feared exactly that kind of legal scrutiny should the scope of its surveillance programmes became public, as the result of what it characterised as a "damaging public debate".

Bulk surveillance programmes also face political reform efforts as well as legal challenges. The diplomatic fallout of revelations about NSA and GCHQ spying on foreign allies sparked proposals to increase data protection in the European parliament.

Even in Britain, where the political reaction had been comparatively muted, parliament debated the limits of GCHQ surveillance for three hours, with MPs from all three main parties advocating reform of the agency's oversight.

However, the most significant calls for political reform have been in the US. Following the narrow defeat of an amendment that would have cut funding to an NSA programme tracking the phone records of Americans, Barack Obama himself proposed a modest reform package.

Speaking at an August press conference, Obama pledged to re-examine parts of the Patriot Act, launch an NSA transparency website, add a privacy advocate to the foreign intelligence surveillance court (which oversees NSA programmes) and launch an independent review into the NSA – though within days this was scorned, as it emerged that body would report to Obama's director for national intelligence.

The most significant political reform efforts to date, though, come not from Obama, but from the House of Representatives, where two bills reforming the NSA are under consideration. One is backed by the chair of the Senate intelligence committee, Dianne Feinstein, a staunch NSA defender who nonetheless expressed concerns the agency had gone too far in the monitoring of allied leaders' phones.

Another, led by long-time NSA critic and Republican house member Justin Amash, with bipartisan backing, has attracted more support from bodies concerned by NSA surveillance, who believe it contains more substantive checks and balances on the agency.

Both bills are believed to have a realistic chance of becoming law. One essentially codifies and reinforces the NSA's efforts to date; the other moves to put some restrictions on its programmes. Which will win out with lawmakers – and the public – remains an open question.