Recently there was a reminder what happens when you lose your smartphone and how curious and even even criminal we can be if given the chance and feeling that we are not being observed.
Of course the study was self selecting for bad behavior: Honest people tend not touch others people property so the people picking it up tend to be either more curious or more circumspect. But this is important to keep in mind: The typical person picking up a lost phone is nosier and/or less honest, so your chances are worse to get it back.
The problem however is the cavalier attitude to security that all phone makers share. If you set a pass code, there should not be any bugs that would allow you to break it, short of disassembling the phone chip.
And making the phone safe would not be that difficult to do, if you are willing to adopt your processor for this:
- All user data is encrypted, and only decrypted once you have entered your pin code. This includes all startup data: You need to have entered your pin code once in order to have access to more than a basic phone.
- The boot loader is tightly coupled to the processor, and will only start the OS if it passes a cryptographic test to its authenticity. This is to ensure that you do not get a key logger injected, and allow people to access your pass code this way.
- To prevent attacks with boot loader errors, but still provide a seamless experience with upgrades, we could ask for the pin code before the installation, and then allow automatic decryption for only a short period of time.
The trick here is to keep the pin code / encryption keys stored safely on the processor, with a separate clock domain for handling timed safety exceptions. And to prevent leaking the keys themselves should be inaccessible from the processor, and only a limited interface to encryption function should be there:
- Activate( passcode) for data kept unlocked from the first entry after a power up, with the chip reset automatically deactivating everything again
- Prepare( pass code), Select( local key), Dismiss( lock delay) for access to data that should only be available during a session
- ChangeCode( old pass code, new pass code) to allow changing the pass code
- WipeSystem( pass code) – remove pass code and generate new key
- BootModeWipe(), BootFinished() – emergency wipe only available during boot.
- ConfigureFailureResponse( …) – sets allowed failed attempts, and timeout schedule, as well if boot mode wipe should be supported.
- KeepActive( passcode, timeout) – allows the passcode to survive for a time across reboots for convenience, and also unlocks hardware protection that allow you to modify the OS.
where a separate domain will guard the access to the key, with its own timer and failed attempt counter to ensure that we will not be able to manipulate time in an attempt to break the encryption.