Module 3 · Lesson 3.2

Inside a smart card

A tiny computer: chip, operating system, applications and secure storage.

  • 4-minute video
  • 6-minute read
  • Builds on lessons 1.8 and 3.1

A smart card’s chip is smaller than a fingernail, but it’s a complete computer: processor, memory, operating system and programs. It has no screen, no keyboard and no battery.

A computer in a card

Take a typical passive microprocessor access card, like the dual-interface card shown below. Under its gold contact plate sits a chip with the same parts as any computer, sized for a card. (A contactless-only card has no contact plate: its chip is embedded in the card body.)

  • A processor that runs the card’s operating system and applications.
  • A cryptographic engine that speeds up the heavy math of public key operations, such as signing with ECC or RSA.
  • A random number generator, which lesson 1.8 showed is essential for keys and fresh challenges.
  • Memory of three kinds: program memory for the operating system, a small working memory that’s lost when power stops, and non-volatile storage for keys, certificates and data that must survive without power.
  • Interfaces to the contact plate, the antenna, or both.

There’s no battery. The card runs only while a reader powers it, through the contacts or through the reader’s radio field, which lesson 3.3 covers.

Inside a smart card On the left, a smart card with a gold contact plate and an antenna coil in the card body. The chip sits under the contact plate. On the right, an enlarged view of the chip: a processor that runs the card operating system, a cryptographic engine for fast key math, a random number generator, working memory that is lost at power-off, program memory holding the operating system and applications, and secure storage for keys, certificates and the PIN. Interfaces connect the chip to the contacts and the antenna. The card has no battery; the reader supplies power. The cardContact plate, antennacoil, and a chipunder the plateTHE CHIPProcessorruns the card OSCrypto enginefast key mathRandom generatorfresh keys, challengesWorking memoryRAM, lost at power-offProgram memoryOS and applicationsSecure storagekeys, certificates, PINInterfaces to the contacts and the antennaNo battery: the reader supplies the power
A smart card is a complete, tiny computer. Its secure storage holds keys that the card uses but never reveals.

Operating system and applications

The card’s operating system manages memory and files, handles communication with the reader and enforces access rules. Many modern cards are multi-application platforms: they can hold several separate applications, sometimes called applets, such as a PIV application and a building’s own access application. The card’s runtime enforces access rules between applications’ security contexts, so one application can’t read another’s keys, although authorized applications can share designated services.

A reader chooses which application to talk to by its application identifier, as lesson 3.4 shows. Loading or removing applications is itself protected: it requires privileges granted under the card’s management policy, usually held by the issuer or an application provider it authorizes.

Secure storage

The point of the chip is that the card enforces its own rules. Keys are kept in secure storage. A PIV authentication private key, for example, is generated on the card, and the card prevents its export. A key used to decrypt data may instead be imported, and an authorized recovery copy may exist outside the card. The card decides when a key may be used: for example, only after the correct PIN. It counts wrong PIN attempts and blocks the PIN when the limit is reached. A computer or reader connected to the card can ask, but it can’t bypass these rules.

Try it: crack a PIN by its timing

This simulated chip holds a secret 4-digit PIN. Your goal: find it using only how long each wrong guess takes to reject. The leaky check compares digits from the left and stops at the first wrong one, so a guess with more correct leading digits takes longer. Change the first digit until the time goes up, then move on to the next digit. The times are simulated units, not measurements.

Comparison method

    A real card also limits wrong tries, so this attack needs a chip without a working retry limit, or a counter that can be dodged, for example by cutting the power mid-check.

    Tamper resistance

    Because the secrets are inside, attackers with laboratory equipment target the chip itself:

    • Physical probing: removing layers of the chip to read memory or tap internal signals.
    • Side channels: measuring power consumption, electromagnetic emissions or timing while the chip works with a key, then inferring the key from tiny variations. The demo above shows the idea with timing.
    • Fault injection: disturbing the chip with voltage or clock glitches, or a focused laser, so it skips a check or makes a revealing mistake.

    A secure chip may use shielding, sensors, protected memory and side-channel countermeasures, such as algorithms whose timing and power use don’t depend on secret values. Whatever the design, its PIN retry limit must stay effective across resets, so cutting the power mid-check can’t give a free try. These are implementation choices, and you can’t inspect them yourself, so independent evaluation matters: chips are commonly evaluated under Common Criteria, and cryptographic modules are validated against FIPS 140-3. Each evaluation covers a specific configuration, so check the product’s evaluated configuration for the protections it actually provides.

    Go deeperOptional technical detail for readers who want more

    Tamper resistance in practice

    Common techniques include scrambling the internal layout, covering the circuitry with active metal meshes that detect cutting or probing, and sensors for abnormal voltage, clock frequency, temperature and light that reset the chip or erase sensitive data. Some chips encrypt memory contents and internal buses, so that reading them directly reveals little. Which of these a particular chip uses is a design choice, documented in its evaluation.

    Side-channel attacks

    Timing attacks exploit operations whose duration depends on secret data, like the leaky comparison in the demo. On a real card, the PIN retry limit also stops an attacker from making many guesses. Power analysis, published in the late 1990s, records the chip’s power consumption over many operations and uses statistics to recover the key. Countermeasures include constant-time code, masking (randomly splitting secret values so that power use doesn’t correlate with them), random delays and noise.

    Evaluation and certification

    Common Criteria evaluations test a product against a security target, often based on a protection profile for smart-card chips, with penetration testing against attackers of high capability for the strongest ratings. FIPS 140-3 validates cryptographic modules at four levels. Both look at the specific chip, software and configuration evaluated, so check that the certificate matches the product you buy.

    Sources

    Draft lesson, awaiting technical review · Last updated 21 November 2026

    Search

    Press / to search from any page