Technology and security are strongly related. Crackers find sophisticated ways to get at supposedly secure data on cards => Manufacturers have to come up with more sophisticated locks and keys on cards => Crackers come up with better techniques to bypass these ... thus forming an infinite improvement loop, with both sides driving each other to use and invent better technology.
There are four different aspects of the Smart Card security:
A Smart Card and a Card Accepting Device (CAD) communicate via means of small data packets called APDUs (Application Protocol Data Units). The following characteristics of this interaction make it harder for third parties to attack the system successfully:
However, every external device communicating with the card makes it more vulnerable to attack via the communication link.

The Smart Card and the CAD use an mutual active authentication protocol to identify each other. The card generates a random number and sends it to the CAD, which encrypt the number with a shared encryption key before returning it to the card. The card then compares the returned result with its own encryption. The pair may then perform the operation in reverse.
Once communication is established, each message between the pair is verified through a message authentication code. This is a number that is calculated based on the data itself, an encryption key, and a random number. If data has been altered (for any reason, including transmission errors) message must be retransmitted. Alternatively, if the chip has sufficient memory and processing power, the data can be verified through a digital signature.
The most common encryption methods are symmetric DES (Data Encryption Standard), 3DES (triple DES) and public key RSA (Rivest-Shamir-Adleman's algorithm), allowing up 56, 168, and 1024 bit long keys, respectively. Unfortunately, these keys are not unbreakable, as explained by Ross Anderson and Markus Kuhn in their book `Design Principles for Tamper-Resistant Smart Card Processors'. The pair managed to crack the Dallas DS5002FP Secure Microcontroller, described at the time by one European signals intelligence agency as the most secure processor available on general sale. They used brute force methods on a PC enhanced with a couple of hundred dollars of extra hardware!
Cards and CADs communicate via a special instruction set. For example, the Schlumberger Reflex 60 instruction set contains:
| 0x60 | Gets reader type and activate reader |
| 0x61 | Sets reader with ICC communication parameters |
| 0x62 | Turns card power ON |
| 0x63 | Turns card power OFF |
| 0x64 | Sends RESET signal to card |
| 0x65 | Gets reader-card status |
| 0x66 | Sends one byte to reader |
| 0x67 | Sends data block to reader |
| 0x68 | Makes reader resend last data block |
| 0x69 | Gets reader capabilities |
| 0x6A | Deactivate reader |
| 0x6B | Activate reader-dependent features |
| 0x6C-0x6F | Reserved |
All data and passwords on a card are stored in the EEPROM and can be erased or modified by an unusual voltage supply. Therefore
some security processors implemented sensors for environmental changes. However, since it is difficult to find the right level of sensitivity and there
is a voltage fluctuation when the power is supplied to the card, this method
is not widely used. Other successful attacks methods include heating the
controller to a high temperature or focusing the UV light on the EEPROM,
thus removing the security lock. Invasive physical attacks are the most
destructive when the card is cut and processor removed. Then the layout of the chip can be reverse
engineered.

Differential
Power Analysis (DPA), is a statistical attack on a cryptographic algorithm
which compares an hypothesis with a measured outcome and is often capable of extracting an encryption key from a smart card or other
computing device. Simple Power Analysis (SPA), the direct analysis of
the recorded power data to determine actions and data, is also useful.
Data on Smart Cards is organized into a tree hierarchy. This has one master file (MF or root) which contains several
elementary files (EF) and several dedicated files (DF). DFs and MF correspond
to directories and EFs correspond to files, analogous to the hierarchy
in any common OS for PCs. However, these two hierarchies differ in that
DFs can also contain data. DF's, EF's and MF's header contains security
attributes resembling user rights associated with a file/directory in
a common OS. Any application can traverse
the file tree, but it can only move to a node if it has the appropriate rights.
If the PIN is blocked, the attribute of every file is changed to require CHV1. After the unblocking PIN is presented, the file attributes are returned to normal, the counter for the PIN is set back to its maximal value and the counter for the unblocking PIN is decremented. If the latter counter reaches zero, it cannot be used for unblocking the PIN any more. This provides additional security for the card.