General characteristics of smart cards

A smart card is a microcomputer implemented in a single silicon chip as an integrated circuit (IC), generally consisting of:
CPU (usually an 8-bit or 1B-bit RISC processor, although 32-bit processors are also available on the market);
RAM (usually 256 bytes to 2 KB in size; for Java cards, the RAM size usually varies from 4 to 8 KB, and chips with 16 KB of RAM are known on the market);
permanent ROM storage (usually 16-136 KB in size, there are cards with a ROM size of about 400 KB);
non-volatile rewritable eepr0m memory (usually 2-64 KB in size, although cards with 1 MB EEPR0M are known);
a trunk bus consisting of a control bus, data bus, and address bus;
the MMU (Memory Management Unit), which controls the access of the CPU to various memory modules of the chip;
universal asynchronous receiver Transmitter (UART) that operates through a single I/o line of the serial interface;
radio receiving and transmitting device for contactless interface;

USB-interface;
a clock frequency generator based on a quartz resonator, cryptographic coprocessors, a random number generator( RNG-Random Number Generator), a cyclic code verification sequence generator, etc.

NVM (Non-Volatile Memory) refers to non-volatile rewritable memory, which is most commonly used today as EEPR0M memory.
Enlarged photo of the chip with dimensions of 4.28 mm x 4.96 mm (21.23 mm2 area)

The zones for placing RAM (1.3 KB), ROM (32 KB), EEPR0M (16 KB), the EC02000 CPU and the ACE cryptographic coprocessor on the memory chip are allocated.
The processor interacts with other components of the chip (for example, memory modules) using the main bus. This bus is used not only for data transmission, but also for addressing devices, as well as for exchanging special service signals.
Smart cards in which the chip contains only memory modules and does not have a microprocessor are called memory cards or synchronous cards. These cards are significantly cheaper than cards with a microprocessor. Synchronous cards are widely used, for example, to pay for phone calls in street payphones, access control, fare payment in public transport systems, etc.
Memory cards are used for storing information in permanent mode (information is only read from the card) or in overwritten mode. On the contact surface of the memory card, the chip displays lines for managing the addressing of memory cells (address bus lines) and lines for reading from and writing to memory cells selected by the terminal (data bus lines). Since the card does not have a Central processor, it is not possible to support data exchange protocols for the channel and higher levels of the open system interaction model. Therefore, data exchange between the card reader and the card is managed at the physical level and is performed by the card reader.
Most often, memory cards use a synchronous data exchange mechanism, which is followed by one of the names of the card. In synchronous mode, the card reader sends only lower-level commands to the card. The commands specify the memory address and the action to be performed with the data at this address: read data or write data. In the latter case, the command also contains data that must be written to the specified address.
Some memory cards use secrets shared between the card and the terminal to improve security for data writing and data reading. The terminal must demonstrate to the card that it knows its secret in order to get permission to read or write data protected in this way.
Cards that have a Central microprocessor along with memory modules are called asynchronous or microprocessor-based (MPCs). In this book, we will only talk about microprocessor cards.
The operating system of microprocessor cards supports a file system with access to separate files, cryptographic functions that significantly improve the security of operations performed using IPC, communication protocols between the card and the reader, etc.
In General, several application programs are stored in the memory of the card to perform various application functions. For example, the card can host applications that support processing of financial transactions, identification/ authentication of the cardholder, loyalty scheme, access control, etc.
IPC applications can run under the operating system of the microprocessor (Native card), as well as under the control of special open systems, among which the Global Platform/Java Card and MULTOS should be noted first of all. Open operating systems allow you to safely download/delete an application to the card (from the card), as well as remotely change the card parameters.
The basic standard for microprocessor cards is the IS0/IEC 7816 specification. This standard defines the mechanical and electrical parameters of the IPC, file system, smart card, encoding of data items, commands, and procedures, including the procedure for application selection card communication protocols of interaction between the card terminal and so on.
In the field of financial applications for IPC, the EMV standard (latest version 4.1) is adopted, based on IS0/IEC 7816, which defines the physical parameters of IPC, data elements and commands used in financial applications, as well as cryptographic mechanisms that ensure the security of IPC operations.
The card can be contact, contactless, or combined. In the first case, the card chip is connected to an external computer using an electrical connection. Physically, this connection is made through a contact pad that provides eight separate electrical connections (in practice-
TIC most often uses five or six connections) with an external computer

The contacts used include:
VCC-contact for supplying an external operating supply voltage to the chip;
RST-a contact for sending a signal that initializes (restarts) the chip before performing a new operation;
CLK-contact for sending a clock signal used for synchronizing the operation of individual modules of the chip and organizing data exchange between the card reader and the card;
GND-contact for the ground line that provides the common electrical ground of the card reader and the chip;
I / O contact for an I / o line that provides a half-duplex communication channel between the card reader and the chip;
VPP-contact for supplying the power supply voltage used for programming the EEPR0M memory.
The top five in the contact list are required for use. The last sixth pin is considered optional, and, for example, the EMV standard does not use it at all. The VPP pin was mainly used in the first chips that needed a separate power supply for EEPROM memory programming (memory programming requires higher voltage values). Almost all modern chips are able to extract the programming voltage from the VCC power supply and do without the VPP contact.
There are IPCS that use two backup contacts to implement a data exchange channel that operates over the USB Protocol. The appearance of the contact area of such a card is shown in Fig. 2.4. This simplifies the interaction of the card with an external computer, since the connection is established through the standard USB port of the computer. The speed of data exchange between the computer and the card can reach 1.5 Mbit / s (USB v 2.0, low speed mode) and even 12 Mbit / s (USB v 2.0, full speed mode).