seryu9 Funny as it may sound, I thought I heard it from the GrapheneOS account in a reply to you in the first thread you brought this topic up. I might be misremembering though. That thread seems to be gone now.
I don't remember anything like that being mentioned. Since the tracking of occupied and free space on the file system works on block level, maybe 4 kiB blocks as you say, technically, the exact file size in bytes could be encrypted. I have just not heard of that actually being done. And I actually faintly recall being able to see the exact file sizes when I was poking around on a userdebug build, even if the file names and file data was still encrypted and inaccessible in plaintext. I don't think the exact file sizes in bytes are credential encrypted at all.
seryu9 This is probably speculative in nature, but how rare do you think it would be for an exploit to exist that could bypass the device encryption at this point?
No idea. I don't even know how device encryption is actually implemented, ie how the encryption key is actually derived. I have tried to get some answers from GrapheneOS team about this, but haven't got any. And Google documentation about device encryption doesn't seem to mention this as far as I can see.
I assumed device encryption was implemented using an encryption key released by the secure element (Titan chip) upon successfully attested boot by pre-authenticated CPU. This is usually how device encryption is implemented in other contexts. But GrapheneOS team told me that the secure element is not involved at all, but that it still is implemented in another secure way, but didn't go into any details of what that would be.
If it were the secure element chip, an adversary would need to break the security of that chip, or the pre-authenticated CPU, which would be pretty hard. Google's Titan chips seems to be able to withstand all attacks for several years after initial device release. But since that apparently isn't how it is implemented, I don't know.
I would love for GrapheneOS team to tell me how it is implemented, or someone else to link to any actual documentation about where the root of trust for the device encryption is. But it seems even the GrapheneOS team feels making the metadata credential encrypted too is the way to go. For my own threat model, I am assuming device encryption is effectively no encryption at all, until I have got an actual technical explanation of how it is implemented, and why it provides security.
grayway2 I don't remember the video but a mobile device forensic analyst explained that with each new android version it was more and more complicated to retrieve deleted data to the point that a physical extraction was useless to get deleted stuff from the phone because of how encryption is implemented. Something about each files having an unique encryption key that was overwritten after the correspondent file was deleted.
seryu9 Very interesting. Let me know if you happen to stumble upon the video again.
Yeah, I would also be very interested in this. Securely erasing things from flash storage is usually not easy to do, although technically it could be implemented, at some performance overhead and extra wear, by the SSD itself. All I know is that all file specific encryption keys are only stored on the SSD, in the filesystem data, not in any by-me-known securely erasable storage, so if it is implemented in a secure way, it is in the SSD itself.