In the UK the process for unlocking a mobile phone (cellphone) usually involves either buying an "unlock code" from ebay which you then have to put into the phone to unlock it, or taking the phone to a back-street phone shop (where I presume they just generate the same code and enter it for you). Either way it seems to take several minutes to generate the code.
The phone does not have to be present to generate the code (just the IMEI number is needed), so the unlock process isn't reprogramming the phone itself. I first thought it was brute-forcing some kind of security key, but this doesn't seem tenable because the manufacturers could simply increase the strength of the key and render this impossible.
It seems that unlocking must be done with the manufacturers consent, but why does it take so long and why does it only seem to be available via the grey market.
What I'd really like to know is what is the technical process behind generating the unlock code. Can anyone throw any light on this?