From https://grapheneos.org/faq#encryption:
The OS stores a high entropy random value as the Weaver token on the secure element (Titan M on Pixels) and uses it as another input for key derivation. The Weaver token is stored alongside a Weaver key derived by the OS from the password token. In order to retrieve the Weaver token, the secure element requires the correct Weaver key. [...] Weaver also provides reliable wiping of data since the secure element can reliably wipe a Weaver slot. Deleting a profile will wipe the corresponding Weaver slot and a factory reset of the device wipes all of the Weaver slots.
I found no informtion on Android developer website related to this, GrapheneOS website is the only one that even talks about reliable wiping of data.
GrapheneOS No, a factory reset will securely wipe all the data and metadata. Your misunderstanding is that you believe the hardware integration involves storing an encryption key in the secure element. That's not how it works.
Could you clarify how reliable wiping of metadata is done?
As I understand your response, there isn't a weaver token for the metadata encryption key (device encryption key)? In that case I wonder how reliable wiping of metadata is implemented, as TRIM operations to the flash memory are not considered reliable wiping, so there must exist some kind of value or token that is part of the key derivation process that is stored on some securely erasable memory for reliable wiping of metadata to be possible.
Or you mean a weaver token is being used for the device encryption key too? You are just marking at my simplified description of the encryption key itself being stored in the secure element? In that case I wonder what the conditions are for the secure element to release that weaver token. For credential-based encryption keys, a hash of the credentials needs to be supplied for the weaver token to be released. For the device encryption key, is it enough to supply a well-known or empty value to release the weaver token? Or is it conditioned on a successful verified boot against an authenticated CPU, as it is (supposedly) implemented in some other operating systems?
I hope you feel you can take the time to explain this, as my understanding of how the disk encryption layer of Android and GrapheneOS works is obviously lacking, and there doesn't really seem to be any documentation or other reliable information on the web about this. I just want to be able to understand what level of privacy against local attackers I really have in various scenarios. It might matter quite a bit to me in my threat model.