Secure Boot and Code Signing
You'll learn how iOS prevents unauthorized code from running by establishing a hardware-rooted chain of trust from power-on through application launch.
What Is Secure Boot?
Secure Boot is like a chain of security checkpoints from the moment your iPhone powers on until your app launches. Each stage verifies the next stage's digital signature before allowing it to execute. Think of it as a building with multiple locked doors — you can't proceed to the next room until the current guard verifies your credentials.
On iOS, this chain starts in the Boot ROM (immutable code burned into the processor during manufacturing). When you power on, the Boot ROM verifies Apple's Low-Level Bootloader (LLB), which verifies iBoot, which verifies the kernel, which verifies kernel extensions. Every link in this chain is cryptographically signed by Apple.
Code Signing Requirements
iOS enforces mandatory code signing — every executable page of memory must be signed by Apple or a developer with an Apple-issued certificate. No exceptions.
When you compile an iOS app, Xcode signs it with your Developer Certificate. This signature is embedded in the app bundle and covers every executable code page. At runtime, the kernel verifies these signatures before allowing code execution.
Provisioning Profiles
Provisioning profiles act as permission slips that link your app, your certificate, and authorized devices together. They specify:
- Which App IDs can run
- Which devices (by UDID) are authorized
- What entitlements (special capabilities like push notifications) are granted
- The signing identity used
Development profiles enable testing on specific devices. App Store profiles allow distribution through Apple's curated marketplace, where Apple's review process adds another verification layer.
Key Takeaway: iOS secure boot and code signing create an unbroken chain of trust from hardware to application, ensuring only Apple-approved and developer-signed code executes — a fundamental defense against malware and unauthorized system modifications.