How SIM cards work. Part one: history of the issue


Date: August 19, 2021 | Updated: August 23, 2021 | Author: Moblie-man

What could be simpler than a regular SIM card installed in our smartphone? Today, almost every person already has at least one copy of this product. And many people might have dozens of such plastic cards lying around in their desks. It would seem that in the era of frameless smartphones, wireless charging, sending Teslas into space, nothing could be simpler than a small SIM card, but in reality everything is far from so simple.

The principle of SIM cards is undeservedly considered extremely simple, although, by and large, this is a real computer, presented in such a compact form factor. Today I will try to briefly go over the modules and types of SIM cards, and perhaps you will be seriously interested in this topic.

History and market entry

The SIM format was originally defined by the European Telecommunications Standards Institute in specification number TS 11.11, which describes the physical and logical properties of a SIM card. With the development of UMTS, specification work was partially transferred to 3GPP.

The first SIM card was developed in 1991 by Munich smart card manufacturer Giesecke & Devrient, which sold the first 300 copies to Finnish wireless network operator Radiolinja.

Data

SIM cards store network information used to authenticate and identify subscribers on the network. The most important ones are ICCID, IMSI, Authentication Key (Ki), Local Area Identifier (LAI) and Operator Emergency Number.

A SIM card whose device is based on circuits also stores other operator-specific data such as the Short Message Service Center number (SMS ServiceServiceName), Service Provider Name (SPN), Service Numbers (SDN), Advanceofcharge parameters and applications with value added (VAS).

SIM cards can be supplied in varying data sizes from 8 to at least 256 KB. They all allow you to store a maximum of 250 contacts, but while the 32KB version has room for 33 mobile network codes (MNCs) or "network identifiers", the 64KB variety has room for 80 MNCs. This metric is used by network operators to store information about preferred networks and is mainly used when the SIM is not on its home network, but roaming. What does this phone SIM card device mean?

The operator who issued the SIM can use this to connect the phone to their preferred network to take advantage of the best commercial deal for the original network company. This does not mean that a phone containing this SIM can connect to a maximum of 33 or 80 networks, only that the SIM card issuer can only specify up to that many preferred networks. If the SIM is outside of these preferred networks, it will use the first or best available one.

How to find out how much memory is on an Android smartphone

If your Android smartphone sometimes slows down, this is where you can find the reason - perhaps some application is using up a lot of memory. If you don't usually use this program, then it makes sense to stop it. The example device has a total storage capacity of 8 GB. As we can see, only 3.71 GB of them are free for the user. Currently using 3.32 GB. By clicking on the “Internal storage” section, you can find out what exactly this amount of memory is occupied by.

We'll tell you how to find out what's in your phone's memory using settings, a file manager, or special programs.

ICCID

Each SIM card is identified internationally by an integrated circuit identifier (ICCID). ICCIDs are stored on SIM cards and are also engraved or printed on the case during the personalization process.

The ICCID is defined by ITU-T Recommendation E.118 as the Primary Number. Its layout is based on ISO/IEC 7812. According to E.118, the number can be up to 22 digits, including one check digit calculated using the Luhn algorithm. However, GSM Phase 1 defined the ICCID length as 10 octets (20 digits) with a specific operator structure.

International Mobile Subscriber Identity (IMSI)

SIM cards are identified within individual operator networks using a unique International Mobile Subscriber Identity (IMSI). Mobile network operators connect to mobile phone calls and exchange their SIM cards in the market using their IMSIs. Their format is as follows.

The first three digits represent the Mobile Country Code (MCC).

The next two or three digits represent the mobile network code (MNC). Three-digit MNC codes are permitted by E.212 but are primarily used in the United States and Canada.

The following digits represent the Mobile Subscriber Identification Number (MSIN). Typically this is 10 digits, but the value will be less in the case of a three-digit MNC or if national regulations specify that the total length of the IMSI must be less than 15 digits. All these numbers differ from country to country, so there may be differences in how the SIM card is designed. The circuit is standard and factory-made, the difference is only observed in the recorded information.

Cellular operator data is downloaded from the Internet

First of all, a new infrastructure must be designed and built to support data transfer to the eSIM. Its creation begins with the production of an eSIM chip, on which two files are preloaded. The first stores information about the discovery server with which the chip establishes its first connection. The second stores certificates with which the eSIM chip verifies whether the data was actually received from the discovery server.

These certificates allow the chip to authorize on the server. By purchasing a smartphone with an eSIM, the subscriber enters into an agreement for the provision of communication services and receives a code from the mobile operator, which he enters into his smartphone. Then the built-in eSIM chip establishes contact with the discovery server and sends to it the code received by the subscriber when signing the contract.

Authentication Key (Ki)

Kni is a 128-bit value used to authenticate SIM cards on the GSM mobile network (for the USIM network you still need Ki, but different parameters are required). Each SIM card stores a unique Ki assigned to it by the operator during the personalization process. This setting is also stored in a database (called an authentication center, or AuC) on the carrier's network.

How is a SIM card designed taking into account the above? It is designed to prevent Ki from being obtained through the smart card interface. Instead, the SIM card provides a "Run GSM Algorithm" feature that allows the phone to transfer data to the SIM card, which must be signed with Ki. This in theory makes the use of a SIM card mandatory if Ki cannot be removed from the SIM card or the operator wishes to disclose this option. In practice, the GSM cryptographic algorithm for calculating SRES_2 (see step 4 below) from Ki has certain vulnerabilities that could allow this value to be extracted from the SIM card and create a duplicate SIM card.

How to see the available free memory on Android

The time it takes to test depends on the number of items selected and the amount of RAM on the phone. Upon completion of testing, you will receive detailed information about the device. The application provides detailed information about the device. In order to find out the available volume using AnTuTu Benchmark, you need to do the following. After opening the application, go to the test tab.

The amount of used and free memory is displayed here (and you can view data for 3, 6, 12 hours or per day), the total amount of available memory, and its average use as a percentage.

Location Area Identification

The SIM stores network status information, which is received from the Location Area Identifier (LAI). Operator networks are divided into location areas, each of which has a unique LAI number. When the device changes location, it stores the new LAI on the SIM card and sends it back to the carrier network with the new location. If the device is running cyclically, it will retrieve data from the SIM card and search for the previous LAI. Some listening devices with a SIM card also work on this feature.

How to find out what's in your smartphone's memory

The file manager (manager) is a separate application on the phone, installed by default (there are also many analogues on Google Play). In the file manager, you can find all the folders where files are stored on your phone. It often lists the total size of each file type, just like the Storage menu. In your phone settings you can find basic information about the files that take up memory space. To do this you need:

To obtain data from a card, SIM scanners or SIM cloners . You can buy them for 150 rubles or even cheaper.

SMS messages and contacts

Most SIM cards will by default store a number of SMS messages and phonebook contacts. Contacts are stored in simple name and number pairs: entries containing multiple phone numbers and additional phone numbers are typically not stored there. Such conditions are provided by the SIM card device. Contacts can be saved to a very limited extent. For example, when a user tries to copy such entries to a SIM card, the phone's software splits them into multiple entries, discarding any information that is not a phone number.

The number of saved contacts and messages depends on the SIM card. Early models will only store five messages and 20 contacts, while modern SIM cards can typically store more than 250 items.

What does a SIM card consist of?

This is one of the types of processor cards. It is needed to identify the user and confirm his right to receive services. This is a portable medium for the contract.

The working electronic component is enclosed in a durable, thin PVC case, the size of which has gradually decreased with the development of technology - to save space inside the smartphone. The size of the electronic module remains virtually the same.

On the outside of the electronic module there is a metal plate with contacts. The number of contacts and their design are not the same from different manufacturers. Through these contacts, power is supplied to the working components of the SIM card, control commands are issued, and data is input and output.

Attention!

Metal contacts deteriorate and oxidize under the influence of sebum, so it is advisable not to touch them with your hands. If the cause of problems with the card is clogged contacts, you can carefully clean them with an eraser and wipe them with alcohol.

The internal structure is a computer in miniature. The similarity lies in the set of functional elements and operating principle.

The main elements of a SIM card:

  • CPU;
  • RAM;
  • permanent memory - the operating system is stored here;
  • memory with a file system for storing user information;
  • data input and output controller.

However, a person will not be able to directly use this computer. It lacks interface elements. The processor and memory are accessed using a mobile phone. Power for the memory units, processor and clock generator is also provided by its battery.

Mini-SIM

A mini-SIM (or 2FF) card has the same contact arrangement as a full-size SIM card and usually comes in a full-size adapter with connectors attached to it. This scheme allows it to be used both in a device that requires a full-size card, and in a device that requires a mini-SIM card (after breaking the connecting elements). Since the full-size SIM card is no longer used, some vendors refer to this form factor as a standard or regular SIM card.

SIM Tool Dark Edition

We know that many people like to use Android apps in dark mode, so we have included SIM Tool Dark Edition. The application is identical to SIM Tool Manager; Only the theme is different.

We're not sure why the developer couldn't combine both themes into one app, but who are we to judge?

Download: SIM Tool Dark Edition (free)

Micro-SIM

A micro-SIM (or 3FF) card has a similar thickness and pin layout, but is distinguished by a reduced length and width.

The micro-SIM format was introduced by the European Telecommunications Standards Institute (ETSI) for installation in devices too small for a mini-SIM card. The form factor was mentioned in the 3GPP SMG9 UMTS working group, which is the standards-setting body for GSM SIM cards, in December 1998, and subsequently agreed upon in late 2003.

Micro-SIM was designed for backward compatibility. The main problem was the contact area of ​​the chip. Maintaining the same contact area allows the micro SIM to be compatible with previous, larger SIM card readers through the use of plastic cutouts. The device has also been designed to operate at the same speed (5 MHz) as the previous version. The identical pin sizes and positions have led to numerous tutorials and YouTube videos detailing how to cut a mini-SIM card to micro-SIM size. However, such actions at home sometimes lead to the fact that the SIM card does not correspond to the device or becomes completely unusable.

How SIM cards work. Part one: history of the issue

The familiar SIM card, which is so easy to move from one phone to another, did not appear at all simultaneously with the birth of the mobile phone as such. The first mobile phones worked in “tethered” communication standards: subscription parameters were written directly into the memory of the mobile terminal. Moreover, in the oldest analog standards like NMT-450 - even without protection: if desired, you could copy the recording to another telephone set and create a clone of it, talk at the expense of the owner or receive calls addressed to him.

A little later, a security solution appeared - the so-called SIS code: an 18-digit number, unique for each device and hardwired into a special processor. SIS codes were distributed centrally between manufacturers, so there could not be two devices with the same code. The same processor also stored a seven-digit RID code, which was transmitted to the base station when registering on the network.

Treasure SIM card: how to lose everything by losing just your phone - https://t.co/ElKB4U1unJ

— Kaspersky Lab (@Kaspersky_ru) November 17, 2014

From there, a randomly generated number came in return, and the SIS processor, based on this number and its unique SIS response, had to generate a key, based on the correctness of which authorization took place.

The short length of both the keys and the generated numbers was quite sufficient in those days (we are talking about 1994), although the system was later hacked. However, three years earlier, the GSM digital standard appeared, in which a similar, but more robust authorization system was initially implemented, and the standard itself became “untethered”.

5G cellular networks: how they will work, why they are needed and when they will be available - https://t.co/27iaXMktJE pic.twitter.com/wnkjiuaos9

— Kaspersky Lab (@Kaspersky_ru) May 22, 2015

That is, the authorization functions were assigned not to the device itself, but to an external processor built into a smart card, which was called SIM (Subscriber Identity Module). Subscriber subscription data is no longer dependent on the device itself - it has become possible to use any device, changing them as often as desired.

A SIM card is essentially an ISO 7816 smart card and is not particularly different from other contact chip cards - for example, bank or payphone cards. The first “SIM cards” had exactly the same size, which is what telecom operators’ starter packages still remind us of today: simply the miniaturization of phones very quickly led to the fact that full-size cards (1FF) no longer fit inside the devices, so they came up with an easily breakable module (mini-SIM or 2FF), which contains the chip and pads, but much less unnecessary plastic.

Despite further miniaturization (micro-SIM - 3FF, and then nano-SIM - 4FF), the shape and location of the contact pads, as well as the principles of operation of the built-in chips have remained unchanged for almost 25 years, and large plastic “blanks” are still are issued so that even a subscriber with a very old phone can use the services - this is the standard.

Typically, many older devices will not be able to read a modern SIM card, even if it is full-size. The fact is that previously, a voltage of 5 V was used everywhere to power the processor of a SIM card, but now 3 V is used. And for the sake of economy, many manufacturers produce SIM cards that support only one voltage, and not two - in an old five-volt cell phone SIM card power protection will simply work and the processor will not work.

A modern smartphone is a full-fledged computer. A very dangerous computer. Let's tell you why https://t.co/2uibZkeLc6 pic.twitter.com/ILw4G8eQHl

— Kaspersky Lab (@Kaspersky_ru) November 15, 2015

Already at the production stage, the IMSI (International Mobile Subscriber Identity) for the specific operator ordering the module, as well as the 128-bit Ki key (Key Identification, “individual user authentication key”) are recorded in the permanent memory of the SIM card already at the production stage. . To put it roughly, this is the subscriber’s login and password, tightly hardwired into the hardware of the SIM card.

The correspondence between the IMSI of a specific subscriber's account and his telephone number is stored in the operator's database called HLR (Home Location Register, “subscriber information database”). This data is copied into a temporary VLR (Visitor Location Register) database in each specific network segment in which the subscriber is located at a certain point in time.

2 billion compromised #Gemalto SIM cards - a nightmare or nonsense? https://t.co/9gRdY9Sb0Z pic.twitter.com/IdnjjrwRwn

— Kaspersky Lab (@Kaspersky_ru) March 10, 2015

Authorization is very simple: upon registration, the VLR sends a 128-bit random number (RAND) to the subscriber’s phone, from which, based on the Ki key, the SIM card processor calculates a 32-bit SRES response using the A3 algorithm, which is sent back to the VLR. If the answer matches the expected one, then registration occurs on the network.

According to another algorithm, A8, also based on RAND and Ki, another temporary key is calculated - Kc. And based on this key, the third algorithm, A5, encrypts the data transmitted over the air.

By default, encryption is always enabled, but in some cases (for example, at the request of the FSB during special operations) it can be turned off - then conversations take place without encryption and are easily intercepted from the air. On old phones, at this moment an open lock is displayed on the display; on modern smartphones, except BlackBerry, there is complete silence about this.

Is it easy to hack a cellular network? I would like to believe that it is difficult, but in reality... https://t.co/9sS01xS55j pic.twitter.com/aXIznfpXNL

— Kaspersky Lab (@Kaspersky_ru) November 23, 2015

By the way, there is an attack for listening to telephone conversations over the air - using a device called IMSI Catcher. It emulates the base station where phones are registered and relays all signals to a real BS.

In this case, the entire authorization process occurs as usual (key hacking is not required), but the “fake” base station gives the device a command to work without encryption, accordingly, the call without encryption passes through it and is listened to without the knowledge of the operator.

It is interesting that such a vulnerability is not a “bug” of the standard at all, but the very “feature” incorporated at the development stage at the request of the intelligence services so that they could implement Man-In-The-Middle attacks during operational investigations. events.

Nano-SIM

The nano-SIM (or 4FF) card was introduced on October 11, 2012, when mobile service providers in various countries began shipping it for phones that supported the format. The Nano-SIM measures 12.3 x 8.8 x 0.67 mm and reduces the previous format to just the contact area while maintaining existing features. A small rim of insulating material is left around the contact area to prevent short circuits. The Nano-SIM is 0.67mm thick compared to its predecessors' 0.76mm. 4FF cards can be placed in adapters for use with devices designed for 2FF or 3FF SIM cards and made thinner to do so, but many phone companies do not recommend this.

The iPhone 5, released in September 2012, was the first device to use activated nano SIM cards, followed by other phones.

The upcoming new generation of SIM cards is called e-SIM or eSIM (embeddedSIM), which is a non-replaceable built-in chip in a SON-8 package - soldered directly onto the circuit board. It will have M2M and remote SIM capabilities.

Slot installation

If there was a new slot, installation would not be a problem, but since the legs of the original slot were also damaged, I had to tinker with them too.

To begin with, I removed the remnants of the legs from the board, filled the soldering areas with soldering flux, and began soldering. I soldered with a regular 40-watt soldering iron, although it is better to solder such parts with a soldering station. I started by gluing and soldering the slot body, then the legs themselves. The short ends of the slot legs did not reach the place where they were soldered, and it was necessary to extend the legs with a thin copper wire. I had to solder each leg, trying not to touch the already soldered one, and they are at a very close distance (not a task for the faint of heart). Finally, I wiped with alcohol all the places where there were flux residues.

Rating
( 2 ratings, average 5 out of 5 )
Did you like the article? Share with friends:
For any suggestions regarding the site: [email protected]
Для любых предложений по сайту: [email protected]