The limitations of Android N Encryption
blog.cryptographyengineering.com
blog.cryptographyengineering.com
As far as being able to remove the keys while the phone is locked --- I can't comment on future product directions, but it's fair to say that the people working on the upper layers of the Android security system aren't idiots, and the limitations of what was landed in the Android N release was known to them. It is no worse than what we had in older versions of Android (with FDE, we were using dm-crypt, and the keys were living in the kernel as well), and while it doesn't help improve security with respect to the "evil maid" attack, it does significantly improve the user experience.
I agree that there is certainly room to improve, and note that future changes will require applications to make changes in how they access files, which does make it a much trickier change to introduce into the ecosystem without breaking backwards compatibility with existing applications.
As far as why different keys are being used for different profiles --- this makes it much easier to securely remove a corporate, "work" profile from a phone without needing to do a secure erase on the entire flash device --- either because an employee is leaving their existing employer and there is corp data on a BYOD phone/tablet, or because the phone has been lost, and corporate security policy about how quickly corp data should be zapped from the phone might be different from what the user might want to exercise when they have temporarily misplaced the phone. (e.g., you might have a different tradeoff of losing unbacked-up data from your personal files versus their getting compromised while you hope that someone turns in your phone to lost+found than your company's security policies might require.)
[1] https://backchannel.com/an-exclusive-look-at-how-ai-and-mach...
Now that google is manufacturing devices I expect them to begin following Apple's example. Avoid garbage like TrustZone and do it right.
1. https://www.apple.com/business/docs/iOS_Security_Guide.pdf
https://www.google.com/amp/www.slashgear.com/android-soc-sec...
Protecting a few secrets is a bit different from a Quasi-hypervisor environment that could be used to implement such a scheme.
http://bits-please.blogspot.com/2016/05/qsee-privilege-escal...
It's much harder to get these things right (e.g. you want your fancy sync and notifications to work even if the phone is locked, etc.) thus I suspect that most apps would just use the Protected Until First User Authentication class and that's about it. Is there any way to confirm or refute that?
https://github.com/patcon/darkmatter
Unfortunately, the wiki was one of the most interesting parts, as I remember, and that wasn't preserved.
Disclaimer: Goes without saying, but VERY stale code, and light-years behind the current project.
EDIT: some interesting things I remember from the wiki: triggers to losing a wifi or bluetooth signal (so that actions could be triggered if phone was placed in a faraday bag and lost touch with a paired bluetooth device or mobile hotspot or whatever), trigger for when temperature dropped (so actions could be triggered if someone tried to pull a cold boot attack)
Which kind of sucks, because I don't want to spend eight trillion dollars on a phone, but...
I can say the competition has gotten good enough that it's only obviously worse when you look a bit closer than a quick glance at owner sentiment and specs. That's the best I can say. And those are the handful of stand-out devices—the overwhelming bulk is still trash.
So: Apple's stumbled really hard, but the competition's still basically a whole different product category, so I guess I'll just wait and see what things look like in 2017 :-/
This bug was triggered by using Google Drive while the internal storage was basically full. The day after that the phone got stolen, so I couldn't take a closer look. :(
Here's an email from Paul Crowley to me. Paul is one of the devs on this code: https://twitter.com/ciphergoth/status/801220048622714880?lan...
Not really sure what else I can offer you.
It's only when multiple steps are taken that a method of prevention is even remotely reliable.