There are two types of SIM cards are there, Native Cards and Java Cards. To generate a byte code in a Native card we can use Wireless Markup Language (WML). Java cards will run Java Scripts and are high cost.
There are two unique parameters for a SIM. Known as IMSI (International Mobile Subscriber Identity) and ICCID (Integrated Circuit Card Identifier).
IMSI (15 digits)
A unique identification associated with all GSM, UMTS and LTE network mobile phone users. It is stored as a 64 bit field in the SIM. It is also used for acquiring other details of the mobile in the HLR or as locally copied in the VLR. The first 3 digits are the Mobile Country Code (MCC), and is followed by the Mobile Network Code (MNC). The remaining digits are the Mobile Subscription Identification Number (MSIN).We use IMSI for location updates, for charging, etc. And IMSI is a network internal parameter. So we need to hide it from external parties to avoid any fraud. To access that another key is required (known as ADM).
ICCID (19 digits)
Each SIM is internationally identified by its ICCID. First two digits named as Major industry identifier (MII), 89 for telecommunication purposes. Other digit representation is given in the image below. Last 12 digits will be defined by the mobile operator in a way they wanted. For example Etisalat included SIM manufactured vendor (1 digit), date of manufacture, serial number and a random number. We can provide a format to the vendor and they will produce SIM cards according to that format.Other important parameters
• MSISDN - Mobile Station International Subscriber Directory Number (the telephone number to the SIM card)• Ki – Authentication key
• KC - Ciphering key
• PIN - Personal Identification Number
• PUK - Personal Unblocking Code
• ADM Code – To view encrypted details of the SIM
Why MSISDN not unique to a SIM card? If you lose your SIM card you can obtain another SIM card with same MSISDN. In such situation we can remove existing mapping of IMSI, ICCID with MSISDN and redefine a new ICCID for the MSISDN. This is not possible if MSISDN is unique for a SIM.
When a mobile communicates with the Base Station the data will be encrypted using KC as a security measure. That will make it difficult for others to listen to the calls, etc.