This really isn't difficult to do:
- loader A stores a (PubKey,NextLoader) and has the ability to blank (via actual blanking or deletion of an encryption key) the entire device.
- loader A provides a new-key(PubKey,NextLoader) method which blanks the remainder of the device.
- Loader A also provides a update-loader(NextLoader) method that doesn't, but also doesn't update the PubKey. Before accepting the new NextLoader, it verifies it against the stored pub key.
Could also allow things like updating the PubKey if the update is signed by the previous PubKey
Spec presumes only access is via the loader A api, PubKey would really need to be stored somewhere safe (HSM, TPM, etc) to discourage direct hardware access.
Probably also could use the PubKey to encrypt the NextLoader.
New phones ship either:
- without a pubkey or next-loader, and require initial provisioning to do anything (fairly inconvenient)
- ship with a flag set that prevents updating the loader, ie: requires updating the key (less secure, probably need to specify further how this occurs to avoid the security hazard from un-updated phones from being too great).