If you have ever wondered how the chip inside the SIM card of your mobile phone, the credit card of your mobile phone or the electronic key of the last hotel you were in works, let us tell you that all of them are Smart Cards and have a common function. Let us tell you that they are all Smart Cards and they all have one thing in common.
What is a Smart Card?
A Smart Card is a plastic card that includes an integrated circuit inside. This integrated circuit can be a security microcontroller with or without internal memory or include only a memory chip. Every Smart Card can be connected to a dedicated reader to read its data or through contactless via a dedicated radio interface.
Smart Cards have the following utilities:
- They are used for credit or debit cards.
- SIM cards of different types in smartphones are Smart Cards.
- Personnel cards in many companies, allowing them to clock in and out.
- They are used to provide secure access to private networks.
- As a system to prevent piracy in cable and satellite TV services. Currently in extinction.
How does a Smart Card work?
Most Smart Cards are memory cards, so they do not contain an integrated microcontroller and require the reader to directly process the data included in the card, however there are variants whose integrated circuit contains a microcontroller, which in many cases replaces the classic magnetic stripe that used to be used.
The microcontroller contained in the Smart Card is no different than any other microcontroller on the market. It integrates in a single piece of hardware several KB of RAM memory, several tens of KB of ROM memory already recorded in origin and several KB of programmable ROM memory.
Depending on the type of application and the sensitivity of the data, a microcontroller may or may not be implemented, whose task is to ensure that the data in the card’s memory is not accessed illegally.
How does a Smart Card communicate?
Regardless of the type of hardware we are talking about, Smart Cards communicate using 7 different pins. These are as follows:
- VCC: Since Smart Cards do not have a power supply inside, they need the card reader to power the card. It does it through this type with a voltage +5 V DC.
- GND: Ground.
- CLOCK: The clock signal of the Smart Card, it marks the pulse at which the data is sent.
- Vp: The programming voltage, used for data manipulation.The programmable ROM data can be added, deleted, or overwritten.
- I/O: The pin through which data is transmitted to and from the Smart Card. Since it is a single pin, it is a serial interface.
- Some Smart Cards have two additional pins to communicate with an external USB interface. However, not all Smart Cards have these pins active and they are only used in specific cases.
How is the memory organized in a Smart Card?
Some Smart Cards have a microcontroller inside, so they have RAM memory so that the microcontroller can work. This memory is called Working RAM and, like conventional RAM, it depends on the card receiving power, so once the Smart Card is removed from the reader, its data will be lost forever.
Apart from the Working RAM, the Smart Cards with microcontroller contain a ROM where the operating system of the card is located. This ROM is of several kilobytes and has encoded inside it the different encryption and security algorithms that are executed by the microcontroller and that are essential for certain applications. The RAM is read-only and is built inside the Smart Card during its manufacture, so its data cannot be modified.
Inside the ROM there is an area called the secret ROM, this includes highly sensitive information, among the data that is usually stored are the following:
- The manufacturer’s unique key, which only exists for each card manufactured and will be used for encryption and decryption exercises performed by the microcontroller of the card.
- The user keys, which contain the PIN of the credit card or mobile phone. In some models of Smart Cards this data is in the programmable ROM. This makes them less secure.
- A secret code, which is used to avoid duplicates and forgery of the card.
The last memory is the programmable ROM, this is a type of ROM that can be rewritten through electrical signals. So we are dealing with an EEPROM memory. Not all Smart Card readers have the ability to manipulate the programmable ROM, but others do. For example, an ATM does have this capability, but a simple USB reader does not.
Types of Smart Card
Currently we can find two types of Smart Card being massively used by hundreds of millions of people around the world on a daily basis.
The first type of Smart Cards are those that follow the ISO 7816 standard, but they are memory cards and can contain inside a programmable ROM between 1 Kbit and 1 Mbit of information that can be programmed through an EEPROM I2C interface, of which between 3 Kbit-64 Kbits correspond to the secure segment that is not accessible by the interface. Among those that follow the ISO 7816 standard are the Smart Cards with integrated microcontroller. In this case, the information that can be stored in its programmable ROM is not usually higher than 144 KB, since it is necessary to store the information in a programmable ROM.e leave space for the microcontroller.
The third type are Contactless cards, which do not make use of ISO 7816 and usually use proprietary protocols for data transfer. These cards transmit data through an ultra-high frequency radio interface wirelessly, so they do not require connection to a card reader and do not use the pins for communication.
And finally we have those that bring integrated specialized microcontrollers for different types and have much more specific and concrete utilities. Among those that stand out are fingerprint reading systems and biometric systems for fluid analysis. So they also have applications in medicine, although these are different in appearance to the classic Smart Cards, their operation is the same.