GrapheneOS Protections Against Data Extraction from Locked Devices
GrapheneOS Protections Against Data Extraction from Locked Devices
GrapheneOS employs a defense-in-depth strategy to protect user data from extraction, leveraging hardware-backed security features of Google Pixel devices and hardening the Android 17 base. The system is designed to ensure that data remains encrypted and inaccessible even when the device is in the hands of a sophisticated attacker.
Hardware-Backed Rate Limiting and Insider Attack Resistance
Secure elements on supported Pixel devices implement strict rate limiting for authentication attempts. This prevents brute-force attacks on the device PIN or password. Following the Android 16 QPR2 specifications, rate limiting ramps up delays between attempts: 4 hours after 10 failed attempts and 41 days after 15 failed attempts, with a total limit of 20 attempts.
To prevent government coercion of manufacturers to create "backdoors" via firmware updates, the secure element features "insider attack resistance." This requires the Owner user to successfully authenticate before the secure element firmware can be updated, ensuring that a valid signing key and a higher version number are not sufficient to update the firmware and remove rate limits.
State-Based Data Protection: BFU vs. AFU
Data protection levels vary significantly based on the device state: Before First Unlock (BFU) and After First Unlock (AFU).
Before First Unlock (BFU)
In the BFU state, the device has not yet been entered the correct PIN/password after a boot. Encryption keys are not yet in memory, keys cannot be extracted, and the data is most secure. GrapheneOS enhances this state by implementing a locked device auto-reboot timer (introduced in June 2021). This timer, which can be set between 10 minutes and 72 hours (defaulting to 18 hours), automatically returns the device to the BFU state by zeroing memory during the OS teardown and boot process.
After First Unlock (AFU)
In the AFU state, the device has been unlocked once after boot, and encryption keys reside in RAM. While GrapheneOS provides hardened memory allocators and hardware memory tagging (MTE) to protect against exploits that could be used to extract keys from RAM, the BFU state is fundamentally more secure.
Advanced Authentication and Entropy
To enable high-entropy passwords without sacrificing usability, GrapheneOS introduces several enhancements:
- Extended Password Length: The character limit for passwords is increased from 16 to 128 characters, allowing for the use of long diceware passphrases.
- 2nd Factor Fingerprint PIN: An optional feature that allows a user to use a strong passphrase for BFU and a short PIN combined with a fingerprint for AFU convenience. This reduces fingerprint attempts from 20 to 5, and failure to enter the 2nd factor PIN counts toward this limit.
Physical Access Protections
GrapheneOS protects against physical attack vectors by blocking new USB connections at both the software and hardware levels by default while the device is locked. USB data is disabled as soon as there are no active USB connections, preventing the use of USB-based extraction tools.
Emergency Data Destruction: The Duress PIN
GrapheneOS provides a "duress PIN/password" feature that immediately wipes the device when entered in any OS prompt for the current profile's PIN or password. This feature works across all profiles, including secondary users and Private Spaces.
While this is a powerful tool for extreme situations, it is noted that using a duress PIN in a legal or border search context can have legal consequences. Community discussion highlights that some users prefer to wipe devices preventively before travel to avoid the risk of prosecution for destroying evidence.
Future Hardware Support
Currently, GrapheneOS is exclusively supported on Google Pixel devices due to their specific hardware security features. However, a partnership with Motorola Mobility and Qualcomm is expected to bring GrapheneOS support to other hardware by 2027.