smart card [email protected] [email protected] department of computer science national...

68
Smart Card 李李李 [email protected] 李李李 [email protected] Department of Computer Science National Chiao Tung University

Upload: hunter-drewes

Post on 29-Mar-2015

235 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Smart Card

李開振 [email protected] 許家碩 [email protected]

Department of Computer ScienceNational Chiao Tung University

Page 2: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Outline 1/2 Introductions ( 許家碩 )

History, Application area, Standardization Types of Cards ( 許家碩 )

Embossed cards, magnetic-stripe cards, Smart Card, Optical Memory Card

Physical and Electrical properties ( 許家碩 ) Smart Card Operation System ( 李開振 , 許家碩 )

Design, files management, sequential control, Open platform

Smart Card Data Transmission ( 李開振 , 許家碩 ) Data transmission Protocols, message structure (APDU)

Page 3: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Outline 2/2 Smart Card Commands ( 李開振 ) Security Techniques ( 李開振 ) The Smart Card Life Cycle ( 李開振 )

The five phases of the Smart Card life Cycle Smart Card in Payment Systems ( 李開振 )

Payment transactions, Prepaid Memory Card, Electronic Purses

Smart Card in Telecommunications ( 李開振 ) GSM, UMTS, Wireless Identification Module, Pub

lic Card Phones

Page 4: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Introductions

Page 5: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Introductions - History 1950s - The proliferation of plastic

cards started in the USA 1970s - It possible to integrate data

storage and processing logic on a single silicon chip

1974 - Roland Moreno registered his smart card patents in France

1984 - The French PTT (postal and telecommunications services agency) successfully carried out a field trial with telephone cards

Page 6: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Application area

Memory Card

Page 7: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Application area

Microprocessor cards

Page 8: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Application area

Contactless cards

Page 9: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Standardization

ISO TC68/SC6 ISO/IEC JTC1/SC17 ISO/IEC 7816 GSM 11.11

European Telecommunications Standards Institute (ETSI)

Page 10: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Types of Cards

Page 11: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Types of Cards

Embossed Card Magnetic-stripe cards Smart Card

Page 12: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Types of Cards - Embossed Card

Page 13: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Type of Cards - Magnetic-stripe

cards

Page 14: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Type of Cards - Smart Card

Page 15: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Smart Card Microcontrollers processor address and data buses three types of memory

(RAM, ROM and EEPROM) Input/Output

Page 16: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Smart Card - Memory

Page 17: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Smart Card - Microprocessor

Page 18: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Smart Card - Contactless smart card

Page 19: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Types of card - Optical Memory

Card

ISO/IEC 11 693 and 11 694

Page 20: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Physical and Electrical properties

Page 21: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Physical properties Physical properties - ID1:

external rectangle: width: 85.72 mm, height: 54.03 mm

internal rectangle: width: 85.46 mm, height: 53.92 mm

Page 22: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Physical properties

ID000: external rectangle: width: 25.10 mm,

height: 15.10 mm internal rectangle: width: 24.90 mm,

height: 14.90 mm

Page 23: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Physical properties ID00:

external rectangle: width: 66.10 mm, height: 33.10 mm

internal rectangle: width: 65.90 mm, height: 32.90 mm

Page 24: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Smart Card Operation System

Page 25: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Smart Card Operation System The primary tasks of a smart card

operating system Transferring data to and from the smart

card Controlling the execution of commands Managing files Managing and executing cryptographic

algorithms Managing and executing program code.

Page 26: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Smart Card OS - I/O

I/O manager

Protocol state machine

Send block

Send byte

Send bit Receive bit

Receive byte

Receive block

HardwareData flow

Page 27: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Smart Card OS – Commands processing

Page 28: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Smart Card OS - Filesystem Master File (MF)

The root directory of the filesystem Dedicated File (DF)

directory files Elementary File (EF)

hold the actual user data

Page 29: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Smart Card OS - FilesystemMF

EF

EF

DF

DF

DF

EF

EF

...

...

......

Page 30: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Filesystem - EF file structure Transparent file structure

Transparent file structure is often referred to as a binary structure.

Byte number0 1 2 3 4 5 …………………………. n

OffsetData

Page 31: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Filesystem - EF file structure

Linear Fixed file structure data structure is based on chaining fixed-length

records Byte number0 1 2 3 4 5 n

RecordNumber

1234

m

Page 32: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Filesystem - EF file structure

Linear variable file structure each record can have an individually defined

lengthByte number0 1 2 3 4 5 n

RecordNumber

1234

m

Page 33: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Smart Card Data Transmission

Page 34: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Smart Card Data Transmission

Answer to Reset (ATR)

Page 35: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Data transmission Structure of a character for data transmissi

on

31 2 4 5 6 7 8

Start bit Parity bit

high

lowt

Page 36: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Data transmission conventions

31 2 4 5 6 7 8

Logic 1

Logic 1

31 2 4 5 6 7 8

Logic 0

Logic 1

high

high

low

low

(a)

(b)

t

t

(a) direct convention, (b) inverse convention

Page 37: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Data transmission Protocols

Protocol Meaning

T=0 Asynchronous, half-duplex, byte oriented [ISO-7816-3]

T=1 Asynchronous, half-duplex, block oriented [ISO-7816-3]

T=2 Asynchronous, full-duplex, block oriented [ISO-10536]

T=3 Full duplex; not yet specified

T=4 Asynchronous, half-duplex, byte oriented, extension of T=0, not yet specified

T=5…T=13

Reserved for future use, not yet specified

T=14 For national use, not standardized by ISO

T=15 Reserved for future use, not yet specified

Page 38: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Message structure (APDU)

Structure of the command APDU

Page 39: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Message structure (APDU)

Structure of the response APDU

Page 40: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Class Application

0X Standard commands compliant with ISO/IEC 7816-4/7/8

80 Electronic purses compliant with EN 1546-3

8X Application-specific and company-specific commands (private use)

8X Credit cards with chips, compliant with EMV

A0 GSM mobile telecommunication system compliant with GSM 11.11

Page 41: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Smart Card Commands

Page 42: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Smart Card Commands

Case Command data Expected response data

1 No data No data

2 No data Data

3 Data No data

4 Data Data

Page 43: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Smart Card Commands

File selection Command Read and Write Command Search Command File Manipulation Commands Identification Commands Authentication Commands File management Commands

Page 44: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Security Techniques

Page 45: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Security Techniques User Identification

Symmetric unilateral Authentication Asymmetric unilateral Authentication Symmetric mutual Authentication

Smart Security Attacks at the social level Attacks at the physical level Attacks at the logical level

Page 46: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

User Identification 1/3

Page 47: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

User Identification 2/3

Page 48: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

User Identification 3/3

Page 49: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Attacks on smart cards 1/2 Attacks at the social level

attacks that are primarily directed against people that work with smart cards

can only partially be countered by technical measures

Attacks at the physical level it is necessary to obtain physical access to

the smart card microcontroller hardware can be static or dynamic

Page 50: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Attacks on smart cards 2/2

Attacks at the logical level most known successful attacks on

smart cards arise from pure mental reflection or

computation classical cryptanalysis , known faults

in smart card operating systems and Trojan horses in the smart card application.

Page 51: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Power Analysis Attacks Simple Power Analysis (SPA) is power

analysis based on single power generated by an algorithm run on a smart card.

Differential Power Analysis (DPA) is a technique where power traces are combined in a statistical manner to obtain information about the algorithm running on the smart card.

Page 52: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Square and Multiply algorithms

Page 53: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

DPA trace with power reference

Page 54: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Detached power apply

Page 55: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

The Smart Card Life Cycle

Page 56: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

The Smart Card Life Cycle 1/3

Phase 1: Production of the chip and the smart card Designing the chip Generating the smart card operating

system Fabricating the chips and modules Producing the card body Embedding the module in the card body

Page 57: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

The Smart Card Life Cycle 2/3

Phase 2: Card preparation Completing the smart operating system

Phase 3: Application preparation Initializing the applications(s) Personalizing the applications(s), both vi

sually and electrically

Page 58: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

The Smart Card Life Cycle 3/3

Phase 4: Card usage Activating the applications Deactivating the applications

Phase 5: Termination of card usage Deactivating the applications Deactivating the card

Page 59: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Smart Card in Telecommunications

Page 60: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

The GSM System

The subscriber identity module (SIM) Security

Subscriber identification SIM authentication Data encryption

Page 61: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

The GSM System Data storage

Dialing numbers Short messages Mobile telephone settings Subscriber information SIM characterization

Managing services and supplementary applications

Subscriber administration

Page 62: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

SIM in the GSM System

Page 63: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

File system in SIM 1/2

Page 64: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

File system in SIM 2/2

Page 65: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

The UMTS System Third generation of mobile telecommunicat

ions system - Universal Mobile Telecommunication System (UMTS)

Universal Subscriber Identity Module (USIM)

UMTS security builds on the security of GSM UMTS uses mutual authentication

Page 66: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Important Standards for USIM

Standard Title

TS 21.111 USIM and IC card requirements

TS 31.102 Characteristics of the USIM Application

TS 31.110 Numbering system for the telecommunication IC card application

TS 31.111 USIM Application Toolkit (USAT)

TS 31.121 USIM Application Test Specification

TS 31.122 USIM Conformance Test Specification

TS 102.221 Physical and Logical Characteristics

TS 102.222 Administrative Commands

Page 67: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

UMTS Authentication

Page 68: Smart Card seinlin.cs95g@nctu.edu.tw kyo-haha@yahoo.com.tw Department of Computer Science National Chiao Tung University

Thank You!