The Master code is for resetting the Security code, nothing else.
The SIM pin code is the one you use to switch your phone on.
The PUK (Personal Unblocking Key) is the code you use to reset the SIM pin code.
Your memory card doesn't make any difference. Whether it's in or out of the phone.
SIM pin code:
This is a pin code that locks the sim card until you enter the correct code. This protects your account, even
if your sim is put into another handset. To reset it, you need the PUK code:
Pin Unlock Code (PUK)
If you miss keyed (or forget) your SIM PIN code, and enter the wrong one 3-5 times in a row, the sim will lock up, and you’ll need to enter the unlock code to release it. You should ask your Network Service Provider
for this code when you need it. Don’t try to guess it, because after a few wrong guesses, the SIM card will be permanently disabled.
Phone Security Code:
This locks the handset, as opposed to the sim card. You can also set some handsets to only accept a “new” sim if the phone security code is entered. To reset it, you need the Mastercode code:
Master Reset Code
Sometimes known as the Master Code, this allows you to unlock a handset if you have entered the Security Code wrongly too many times.
Which is the one that you want?
Special Code/Service Provider Lock Code:
This code is required to allow a phone locked to a particular network's SIM cards to be used with a SIM card from another network. Orange and T-mobile lock handsets in this way, though O2 and Vodafone are beginning to lock PAYG and WAP handsets. The unlock code varies from individual handset to handset.
This is not a security code, but it works like one! To help combat mobile phone thefts, the networks share a database of the IMEI (International Mobile Equipment Identity) of mobile phones that have been reported stolen. Once a phone is on this list, it will not be allowed to use any of the networks.
This can be a risk if you buy a second-hand phone, because if it has been stolen, or if an unscrupulous seller makes an insurance claim after selling, the phone you bought in good faith may be permanently disabled.
Be very careful to check the source of a second-hand phone!