BOSTON — James Comey on Wednesday said encryption apps kept the FBI from accessing nearly half of the devices they were legally granted permission to search last year.

The FBI director didn’t speak about President Donald Trump or the ongoing Russia intrigue around his team during his keynote address to the Boston Conference on Cyber Security at Boston College. (“You’re stuck with me for another six and a half years,” Comey joked to cut the tension.) Instead, Comey focused on cybersecurity threats and called encryption apps like Signal, Whatsapp, and Wickr “the default” for criminals like pedophiles and terrorists.

In the last three months of 2016, Comey said the FBI received 2,800 devices to search. Thanks to encryption, almost half of them were uncrackable.

“Twelve hundred of those devices, 40 percent, we could not open by any technique,” Comey said.

The FBI famously asked Apple to help crack an iPhone used by one of the San Bernardino terrorists . Apple refused to help ( despite doing so before ) and the FBI accessed the phone using a third party.

Encryption apps rose in popularity after Edward Snowden’s disclosure of the National Security Agency’s mass collection of Americans’ communications data, known as metadata. Comey likened the spread of encryption to a room where the lights are going out.

“There was always a corner of the room that was dark to us — nation states, criminals,” he said. “What has happened to us since 2013, since Snowden, more and more of that room has become dark.”

Comey said metadata — the who, where, and when of communications but not their content — isn’t very useful to law enforcement.

“This is what I don't think people realize. Metadata is limited especially in criminal cases and proving beyond reasonable doubt with pedophiles and terrorists,” Comey said, adding metadata isn’t enough because “metadata doesn’t say much.”

Comey said the Constitution and courts are sufficient to protect Americans’ privacy because law enforcement has to provide probable cause to a judge before a warrant can be authorized.

“We want privacy and we want security. We should never have to compromise both,” he said. “The government cannot invade our privacy for any reason not reviewed in court: but it does mean that with reason, the court can invade privacy.”

Aside from fighting crime, the FBI is responsible for counterintelligence such as finding and catching foreign spies. The task has received tons of attention given investigations into Russia’s election interference and ties to President Donald Trump’s team. (Comey did not speak to Trump’s spurious claim that the feds wiretapped him during the election.)

Comey called state actors the top cybersecurity threat to the U.S., led by Russia and followed by China and North Korea. National syndicates and terrorists are far behind, he added.

"What are they after is information, access, advantage,” Comey said. “Not just about getting data but corruption of data."

Saying the “surface is too big, too ubiquitous” to prevent every attack, Comey said protecting the U.S. will happen by first reducing vulnerabilities in the private sector — from the board level on down.