How iPhone activation works

Of interest to security wonks:

Activation in the iPhone works in a similar manner to windows activation (standard signature handshake).

iTunes gets three things from the phone, the DeviceID, the IMEI, and the ICCID. This is called the token and is unique to every iPhone. This token is then sent to the apple server ( via SSL. Apple uses their private key to sign the token and transmits it back to iTunes. iTunes then calls AMDeviceActivate with this signed token. The device gets the token and checks whether or not the signature matches the token. If it does, the device is activated.

{ "UniqueDeviceID" = "aabbccdd......"; "InternationalMobileEquipmentIdentity" = "1234...."; "IntegratedCircuitCardIdentity" = "1234...";}

Link here.