Defence Minister Peter MacKay approved a secret electronic eavesdropping program that scours global telephone records and Internet data trails – including those of Canadians – for patterns of suspicious activity.

Mr. MacKay signed a ministerial directive formally renewing the government's "metadata" surveillance program on Nov. 21, 2011, according to records obtained by The Globe and Mail. The program had been placed on a lengthy hiatus, according to the documents, after a federal watchdog agency raised concerns that it could lead to warrantless surveillance of Canadians.

There is little public information about the program, which is the subject of Access to Information requests that have returned hundreds of pages of records, with many passages blacked out on grounds of national security.

Story continues below advertisement

It was first explicitly approved in a secret decree signed in 2005 by Bill Graham, defence minister in Paul Martin's Liberal government.

It is illegal for most Western espionage agencies to spy on their citizens without judicial authorization. But rising fears about foreign terrorist networks, coupled with the explosion of digital communications, have shifted the mandates of secretive electronic-eavesdropping agencies that were created by military bureaucracies to spy on Soviet states during the Cold War.

The Canadian surveillance program is operated by the Communications Security Establishment Canada (CSEC), an arm of the Department of National Defence.

In recent days, disclosures of secret surveillance programs operated by the U.S. National Security Agency have set off a storm of debate. Leaked documents and accounts have described an NSA project known as PRISM that allegedly gives the agency access to data from nine U.S. Internet companies including Google and Facebook. Another leaked document describes the existence of a government program that collects the "telephony metadata" surrounding millions of phone calls placed by Americans every day, without anyone listening to the actual conversations.

In Canada, a similar sensibility – though not the same sweep – appears to have also taken root. "Metadata is information associated with a telecommunication … And not a communication," reads a PowerPoint briefing sent to Mr. MacKay in 2011. "Current privacy protection measures are adequate," officials said, as they sought renewal of the Canadian metadata program.

CSEC and the NSA take pains to distinguish between the contents of a communication (which is out of bounds legally, if it involves a citizen) and the surrounding metadata (which is considered in play).

Mining metadata may never reveal what is said. But phone records, Internet Protocol addresses, and other data trails can reveal who knows whom, and how well. Authorities who suck up signals on a vast scale can use the metadata to create pictures of social networks, even terrorist cells, if they armed with enough raw computing power to sift through gigantic pools of data.

Story continues below advertisement

In Canada, a regime of ministerial directives – decrees not scrutinized by Parliament – have authorized the broad surveillance programs. How the data is obtained has not been disclosed in the documents obtained by The Globe or in comments from CSEC.

Officials do say that CSEC "incidentally" intercepts Canadian communications, but takes pain to purge or "anonymize" such data after it is obtained. Beyond that, "metadata is used to isolate and identify foreign communications, as CSEC is prohibited by law from directing its activities at Canadians," wrote spokesman Ryan Foreman in an e-mail to The Globe.

CSEC is subject to oversight by a watchdog agency known as the Office of the CSE Commissioner, which has given broad approval to the metadata-mining program.

Five years ago, however, Justice Charles Gonthier, a retired Supreme Court judge, raised questions about the practice, according to government records released to The Globe.

Could CSEC, he asked, be wrongly passing along information to partner agencies, such as the RCMP or CSIS? While raw intelligence is sometimes allowed to pass between these agencies, Justice Gonthier's broad concern was that CSEC's metadata-mining efforts could be used as an end run around lawful warrants.

He wrote in a 2008 memo that ironing out such rules was important, since they set up "the legal requirement (e.g. ministerial authorization vs. a court warrant) in cases where activities may be 'directed at' a Canadian."

Story continues below advertisement

CSEC suspended its metadata-mining program for more than a year in 2008. The documents show that Mr. MacKay signed a new ministerial directive in 2011 to continue the surveillance under new rules – and also authorized other espionage programs, some of which have been completely censored from the Access to Information documents obtained by The Globe.