As far as I'm aware, a locked iOS is considered very safe. No one, who does not know the PIN cannot unlock the phone. While the PIN seems weak on the first glance (4 digits?) it is actually strong, because enough failed attempts = data is wiped. Even law enforcement was known to have troubles when the data they needed was stored on a locked iPhone.
But how does this work and is this an example of security by obscurity?
In my mental model (correct me if I'm wrong) there are the following approaches to securing a system:
- Encrypt the system with a strong key, keep the key separate from the system. In this case data cannot be extracted from the system if it remains locked; however, once the system is unlocked, it becomes vulnerable. This is the approach used by schemes such as VeraCrypt. This is not applicable to iPhone since iPhone's PIN is weak. (just a few digits)
- Keep the system physically separate from its users ('in the cloud'); only expose a terminal. Do not store data on the terminal and do not do any computations on the terminal; the terminal is only used to send users' commands to the cloud and display data from the cloud to the user. This is how various SaaS services work; but this is not applicable to iPhone again since, AFAIK, data is stored on an iPhone.
The following approach, on the other hand, is, in theory, NOT secure (however it may remain unbroken for surprising long times in practice):
- Attempt to secure a system by, essentially, bundling the secrets within the system itself. This is an application of security by obscurity and a violation of Kerckhoffs's principle. The system will only remain secure as long as it is not successfully reverse-engineered. It is very hard to successfully secure a system in this way. For example, many historical and even some contemporary anti-piracy schemes rely on this approach; but as we know, piracy flourished (and flourishes) nonetheless. For example this is why HDCP was broken - keys needed to encrypt data were stored within the devices themselves, so successful reverse-engineering of a device will allow data decryption. This is also how BitLocker works. In BitLocker, data in the hard drive is encrypted using the key stored in the motherboard. But the key can be extracted from the system, see the now-famous attack by 'stacksmashing'. Nonetheless, even though such schemes are theoretically unsound, in practice extreme obfuscation may prove prohibitive to counter-engineering efforts. For example, as far as I'm aware, extreme obfuscation is the only protection employed by the infamous Intel Management Engine. Still, as of know, this protection stands strong as IME has not been yet fully reverse-engineered and, from the POV of the end user, IME remains a black box owned by Intel that has full control over the end user's computer.
I tried Googling how does iPhone's protection work. Couldn't find any definitive answers. This apple.stackexchange.com answer claims: "In iOS8 decryption must be performed on device as it uses a devise specific number (that cannot be extracted from the device) in addition to your pin for encryption; this also prevents Apple from decrypting the device under warrant so you are protected from various three letter organizations serving baseless warrants as Apple has no more advantage in decrypting your device over anyone else." Wait, what? The key needed to decrypt the device is stored in the device itself? How, in that case, can this key not be extracted from the device, as this answer claims?
Unless I'm missing something, this places iPhones squarely in my third bullet. If a device stores the key needed to decrypt itself inside itself, then it employs security by obscurity and violates Kerchkoff's principle. This is precisely the same approach BitLocker employs. The device's only protection against decryption is if its extreme obfuscation levels frustrate reverse-engineering attempts. If so, the device remains secure. Otherwise, the key will be extracted from the device (like stacksmashing managed to do against BitLocker) and the device will be decrypted.
Is my understanding correct?
If not, then how does iPhone manage to secure itself against unauthorized unlocking?