The Canadian agency responsible for electronic surveillance played a substantial role in the NSA's efforts to crack encrypted data on the internet, according to documents obtained by the New York Times.

Communications Security Establishment Canada — which is responsible for foreign electronic surveillance but is speculated to be spying on Canadians as well — handed over control of an international encryption standard to the NSA, allowing the agency build a “backdoor” to decrypt data, the Times reports.

The information is part of the massive trove of previously secret NSA data leaked to the press earlier this year by Edward Snowden.

The Times and the Guardian reported last week that the NSA has managed to crack most of the encryptions used to transfer information securely over the internet, and has worked to keep that fact a secret, presumably so that web users continue to use the compromised encryptions.

Internet encryptions are used to secure sensitive data on the internet, such as emails and bank transactions, and are used in consumer products such as Bluetooth devices and the BlackBerry Messenger network, to name a few examples.

Encryptions work in part by using random number generators to insert unpredictable numbers into the encrypted data. That way, spies tapping in won’t be able to decipher the code used to encrypt the data.

But according to the Times report, the NSA created one of those random number generators, known as the Dual EC DRBG standard, in order to create a "backdoor" for the NSA to decrypt data.

Half a decade ago, Canada’s CSEC was in charge of the standards process for the International Organization for Standardization. In order to get its preferred encryption code made a worldwide standard, the NSA "finessed" CSEC into handing over control of the standards process, the Times reports.

After some behind-the-scenes finessing with the head of the Canadian national delegation and with [CSEC], the stage was set for NSA to submit a rewrite of the draft,” an NSA memo obtained by the Times stated. “Eventually, NSA became the sole editor.”

Once that hurdle was overcome, "the road to developing this standard was smooth," the NSA memo states.

Evidence is building that CSEC itself is involved in mass, warrantless surveillance of Canadians.

According to news reports earlier this year, then-Defence Minister Peter MacKay signed a ministerial directive in 2011 allowing the re-start of a CSEC program that scours phone and internet data trails, including those of Canadians.

Even if the CSEC is not spying on Canadians, its partner organizations are capable of doing that for them.

The CSEC is part of a network of electronic spying organizations that has existed since the 1940s, known as ECHELON or the “Five Eyes.” Besides Canada, it includes the U.S, Britain, Australia and New Zealand.

Many analysts believe the network acts as a way of getting around laws that prevent countries from spying on its own citizens, by having partner countries do the spying.

For instance, it has been alleged that the CSEC spied on participants at the G20 meeting in London in 2009 on behalf of the U.S. and Britain.

Loading Slideshow...
  • Vladimir Putin, President Of Russia

    <a href="http://www.washingtonpost.com/blogs/worldviews/wp/2013/06/13/vladimir-putin-defends-the-u-s-on-spying-programs-drones-and-occupy-wall-street/" target="_blank">Russian President Vladimir Putin called</a> the massive U.S. surveillance programs, revealed last week by former NSA contractor Edward Snowden, “generally practicable” and “the way a civilized society should go about fighting terrorism.” <em>Russian President Vladimir Putin listens during a meeting with prosecutor general Yuri Chaika, not pictured, at the Novo-Ogaryovo residence outside Moscow on Tuesday, July 9, 2013. (AP Photo/RIA Novosti, Alexei Nikolsky, Presidential Press Service)</em>

  • William Hague, Foreign Secretary Of The United Kingdom

    <a href="http://www.bbc.co.uk/news/uk-politics-22839090" target="_blank">In a statement to Parliament</a>, Hague said the UK's information-sharing relationship with the U.S. was "essential to the security of the country" and had "saved many lives." <em>British Foreign Secretary William Hague speaks at the Ronald Reagan Presidential Library on Tuesday, June 25, 2013 in Simi Valley, Calif. (AP Photo/Chris Carlson)</em>

  • Martin Schulz, President Of The European Parliament

    "I am deeply worried and shocked about the allegations," <a href="http://www.cnn.com/2013/06/30/world/europe/eu-nsa" target="_blank">European Parliament President Martin Schulz said in a statement.</a> "If the allegations prove to be true, it would be an extremely serious matter which will have a severe impact on EU-U.S. relations. On behalf of the European Parliament, I demand full clarification and require further information speedily from the U.S. authorities with regard to these allegations." <em>Martin Schulz, President of the European Parliament, delivers a speech during the funeral ceremony of former Hungarian Prime Minister Gyula Horn at the Fiumei cemetery in Budapest on July 8, 2013. (PETER KOHALMI/AFP/Getty Images)</em>

  • Sabine Leutheusser-Schnarrenberger, German Justice Minister

    <a href="http://www.cnn.com/2013/06/30/world/europe/eu-nsa" target="_blank">German Justice Minister Sabine Leutheusser-Schnarrenberger </a>"said if the accusations were true, it was reminiscent of the Cold War," ministry spokesman Anders Mertzlufft said, adding that the minister "has asked for an immediate explanation from the United States." <em>German Justice Minister Sabine Leutheusser-Schnarrenberger arrives for the weekly German federal Cabinet meeting on July 10, 2013 in Berlin, Germany. (Photo by Adam Berry/Getty Images)</em>

  • Laurent Fabius, French Foreign Minister

    <a href="http://www.cnn.com/2013/06/30/world/europe/eu-nsa" target="_blank">French Foreign Minister Laurent Fabius called for a swift explanation from American authorities.</a> "These acts, if they are confirmed, would be absolutely unacceptable," he said in a statement. <em>French Foreign Minister Laurent Fabius speaks to journalists upon arrival for the Donor Conference for Development in Mali, in Brussels, Wednesday, May 15, 2013. (AP Photo/Yves Logghe)</em>

  • Cristina Fernandez, President Of Argentina

    "A shiver ran down my back when I learned that they are spying on all of us," <a href="http://www.reuters.com/article/2013/07/11/us-usa-security-latinamerica-idUSBRE96A0G520130711" target="_blank">Argentine President Cristina Fernandez said in a speech on July 9.</a> <em>Argentine President Cristina Fernandez de Kirchner speaks to the press upon her arrival for a meeting with other leftist Latin American leaders called after Bolivia's President Evo Morales plane was rerouted in Europe amid suspicions US fugitive Edward Snowden was aboard, in the Bolivian central city of Cochabamba, on July 4, 2013. (JORGE BERNAL/AFP/Getty Images)</em>

  • Ollanta Humala, President Of Peru

    "We are against these kinds of espionage activities,"<a href="http://www.reuters.com/article/2013/07/11/us-usa-security-latinamerica-idUSBRE96A0G520130711" target="_blank">Peruvian President Ollanta Humala said in a televised interview</a>. "It would be good for (Peru's) Congress to look with concern at privacy issues related to personal information." <em>Peruvian President Ollanta Humala talks to the assistants to the ceremony of signature of a loan to Peru aiming to improve Ministry of Education systems the to assess student learning and to monitor pedagogical practices in regulating basic education signed by at the presidential Palace in Lima, Peru, on July 1, 2013 (CRIS BOURONCLE/AFP/Getty Images)</em>

  • Gilberto Carvalho, Top Aide To Brazilian President Dilma Rousseff

    <a href="http://www.reuters.com/article/2013/07/11/us-usa-security-latinamerica-idUSBRE96A0G520130711" target="_blank">Gilberto Carvalho, a top aide to President Dilma Rousseff, said</a> a "very hard" response to the United States was needed. "If we lower our heads, they will trample all over us tomorrow," he said. <em>Gilberto Carvalho, chief minister of the general secretariat of the presidency, talks about the protests across the country during a meeting marking World Youth Day at the presidential palace in Brasilia, Brazil, Friday, June 21, 2013. (AP Photo/Eraldo Peres)</em>