5 ms·
On iPhone, keys are evicted from memory when the device is locked. Apps running behind the Lock Screen can only write files to special file inboxes (this is wh
by gcr 4y ago
On iPhone, keys are evicted from memory when the device is locked. Apps running behind the Lock Screen can only write files to special file inboxes (this is why the camera lets you take pictures while locked but doesn’t display earlier pictures, for example)
You’re telling me that android keeps keys in memory for its entire uptime?
- foobarian 4y agoOf course we won’t see analogous bug fixes on the Apple side so we can’t compare too closely. Unless you worked on this codebase :-)
- klausa 4y agoThat's not exactly true. There is a data protection class that is like what you're describing, but it is not used super-widely, the one most commonly used is exactly what is being described and makes data available after first unlock. https://developer.apple.com/documentation/security/ksecattraccessibleafterfirstunlock?language=objc https://developer.apple.com/documentation/security/ksecattra...
- Twisell 4y agoMaybe but this should be limited to application data scope. What baffles me is that lock-screen is a system wide critical application and should in no way rely on this method. iOS lock screen in theory shouldn't only respond to cryptographic validation from the secure enclave.
- gcr 4y agooh huh! thanks for the correction!
- phh 4y ago> You’re telling me that android keeps keys in memory for its entire uptime? Yes. I've known that for quite some time, and yet I keep forgetting considering how stupid this feels [1] . Google provides "lockdown" button which is supposedly more secure (I think it's recommended for journalists?)... Well it doesn't evict keys either. Only eviction is to reboot. [1] It feels stupid because there had been a LOT of work to move from FDE to FBE and to allow two states of data encryption and telling apps to support both of them. Doing all this work just to be able to store incoming SMS and to display wallpaper on first lockscreen...?
- lupire 4y agoWhat do Windows/Mac/Linux do?
- lrvick 4y agoKey is in memory at all times after boot on all of those. Full disk encryption is only useful on a laptop if the device is powered down fully.
- erwincoumans 4y agoThat sounds like a security issue. Why are disk encryption keys not evicted in sleep mode? Seems like no apps should be running in sleep mode?
- lrvick 4y agoIt is a major security issue, and one of the reasons people running around with production access on laptops is insane. It is hard to fix this too, because almost no background desktop processes behave well when they are suddenly unable to write to the disk. Even if you solved that, your password manager has keys in memory, your browser has cookies in memory, etc etc.
- erwincoumans 4y agoSleep mode could suspend all activity? You could encrypt all memory before sleep? It doesn't seem unsolvable, as long as sleep (closing lid) suspends all activity. (lock with background activity is different, lets discuss the sleep case)
- lrvick 4y agoIf you fully hibernate to disk where it encrypts the memory snapshot to your FDE key, then you are good to go but that is not locking that is turning the computer off.
- erwincoumans 4y ago
- izacus 4y agoThat's not really true at all - you can of course unlock your iPhone without entering PIN for every screen lock which should give you a clue that keys for disk encryption generally aren't purged when iPhone is locked. Some keys are, but not the ones that are the issue here. I've even seen conditions where iOS devices reboot and still retain keys.
- volleygman180 4y agoCan you elaborate on those conditions? It's my understanding that this shouldn't be the case
- tinus_hn 4y agoIf you unlock the screen using Face ID the OS gets the keys from the Secure Enclave which, depending on the model, does the face recognition itself or using the normal processor in some kind of secure way. Just like if you unlock the phone using the pin code, the OS gets the key from the Secure Enclave which makes sure it’s not easy to brute force. The PIN code is not the key itself of course. The only key that sometimes gets retained at reboot is the SIM unlock.
- izacus 4y agoYes, and that's how Pixels work as well. The condition in question here is of course when the secure enclave releases the keys and mounts the storage.
- Twisell 4y agoYou can have look at this document to answer that : https://help.apple.com/pdf/security/en_US/apple-platform-security-guide.pdf https://help.apple.com/pdf/security/en_US/apple-platform-sec... From what I gather the more secured keys should be discarded 10 seconds after lock screen event. Lower security keys stay in memory to allow background activity. Encryption on ios, if i understand correctly, is on a per file basis. There is thus no "mount" event to look for and it should provide no value to use a less secured key if you do not intend to run on background because decryption is supposed to happen on the fly. PS: Also if I remember correctly pressing down the emergency sequence (holding power + volume up) discard ALL keys instantly and unlock require the passphrase as if you just rebooted. Emergency call don't need to be issued just initiated (must hold 10 sec or confirm on screen to make the actual emergency call).
- ccouzens 4y agoPresumably not all keys? If you receive a phone call while locked presumably the phone can still access the address book to display the contact name and photo? And music playing apps can presumably access their database of music to play songs whilst the phone is locked?
- acchow 4y agoCould be reading a cached copy of the contact list since it’s not very big The music playing is a different story
- bombcar 4y agoText messages (iMessages) can be displayed on lock screens. Not sure how they do that with encryption but maybe the notification is separate.
- selectodude 4y agoI think for iMessage, the actual messages are sent using APNS, so the message is in the push notification itself. Thus while you can see the message itself without unlocking, any older messages that are behind the Secure Enclave are inaccessible without keys.
- Nekhrimah 4y agoThis is correct. For example, when I connect my iPhone to my provided work wi-fi, and I get a Tinder notification. I can partially see the message on the lock screen (once Face ID authenticates), but as Tinder is blocked on the wi-fi if I want to read and respond in the app I have to pop to cellular.
- hackmiester 4y ago> If you receive a phone call while locked presumably the phone can still access the address book to display the contact name and photo? Just so you know, this is true on an iPhone, but NOT if the phone has NEVER been unlocked since reboot. If you get an SMS/call in this state, it will just show the number. It can't read the address book.
- _yb2s 4y agoDo you have any more details about how that works on iphone? It seems very hard to believe, given the complexity and diversity of background apps on iphones, some of which access huge data that would be impossible in system memory (e.g. offline GPS/navigation apps). For example, Google Photos can send the full photo library on the phone, even if large, to the cloud while the device is locked.
- anyfoo 4y agoThis should help: https://help.apple.com/pdf/security/en_US/apple-platform-security-guide.pdf https://help.apple.com/pdf/security/en_US/apple-platform-sec...
- foobiekr 4y agoThis. I actually find this incredible. I am familiar with iPhone security but not android and had naively assumed Google probably did a better job on the non-UX aspects.
- exyi 4y agoIt has to, if you want to be able to unlock the device with a fingerprint
- deleted 4y ago[deleted]
- kllrnohj 4y agoNonsense. If that was true then things like backups and cloud sync couldn't happen when the device is locked. But of course they do, meaning the keys are still sitting there freely accessed by the CPU, along with all the data on disk. Your camera example is not at all convincing of anything special going on, since that's also the camera behavior of other OS's (like Android) that don't purge the keys. That's far more easily implemented as just a basic app policy than some security system that yanks the file system out from underneath running processes.