In the five years since Apple (AAPL) launched the iPhone, the popular device has gone from a malicious hacker’s dream to law enforcement’s worst nightmare. As recounted by the Massachusetts Institute of Technology’s Technology Review blog, a Justice Department official recently took the stage at the DFRWS computer forensics conference in Washington, D.C. and told attendees that the beefed up security in iOS is now so good that it has become a nightmare for law enforcement.

“I can tell you from the Department of Justice perspective, if that drive is encrypted, you’re done,” Ovie Carroll, director of the cyber-crime lab for the CCIPS division of the Department of Justice, said earlier this month during his presentation at DFRWS. “When conducting criminal investigations, if you pull the power on a drive that is whole-disk encrypted you have lost any chance of recovering that data.”

While Apple’s use of sophisticated cryptography is the biggest obstacle law enforcement and hackers face, Technology Review points out that it’s not the only one. Apple’s requirement that apps are “sandboxed,” or isolated from protected parts of the OS, eliminated a wide range of exploits that were possible with earlier versions of iOS. Even the iPhone’s more secure PIN code protection poses a serious barrier for those looking to gain access to an iPhone.

“There are a lot of issues when it comes to extracting data from iOS devices,” Amber Schroader, CEO of forensic software developer Paraben, told Technology Review. “We have had many civil cases we have not been able to process … for discovery because of encryption blocking us.”

Read