Smart Card Command LibraryCS497 Project PresentationGuide: Dr. Rajat MoonaHitesh KhandelwalDepartment of Computer Science, IIT Kanpur Smart cards Smart cards are electronic card Dedicated processor and memory on a chip So data can be stored and compuation can be made Hence needs an Operation system too. The OS provides: A standard way of interchanging information An interpretation of the commands and data. Security mechanisms Optionally may have Crypto-coprocessors (implementing 3DES, AES, RSA, etc on chip) Cards must interface to a computer or terminal through a standard card reader SCOSTA Standard Based on ISO 7816-4, -8, and -9 Removes ambiguities in ISO 7816 Has support for symmetric key cryptography (3DES algorithm) and internal and external authentication. Encryption/decryption and crypto checksum computation and verification using 3DES are also supported. Command library Need a middleware to absract the interchange of information and performing crypt operations. Removing replication of code in different smart card based application Increasing structuring, modularity and modifiability of applications Reduce the time and cost of developing smart card based applications To promote a standard specification (compliant with SCOSTA, ISO 7816) Overview Compliant with the ISO 7816 and SCOSTA standards Provides easy-to-use wrapper functions which facilitates easy and quick way of performing a sequence of ...
Can handle getting data using GET RESPONSE command if needed.
Implementation Design
Expanded
Compact
Password
Key
FCP
SE
CRT
DO
ISOFile
Reader
ISODO
APDU
ISOSecurity
SMContext
Crypto
Programming smart cards
Applications communicate with the card interface devices, often called Smart Card “Readers”
PC/SC API is the most commonly used interface for programming applications
Specification for SmartCard integration in PC environment. Provides a platform(Readers) and vendor neutral way to write applications. It can keep track of installed readers OCF (Open Card Framework)
Uses PC/SC API on MS-Windows. Used for developing JAVA applications with smart cards.
Performs Match between Inserted Cards and Requested Interfaces
Controls Multi-Application Access
Resource Locking
Using PCSC
Applications need to connect to the Resource Mgr.
SCardEstablishContext function. SCardReleaseContext function (to release context) Choose your IFD and connect.
SCardListReaders to list out available readers. SCardConnect to connect to the chosen reader. After Powering up the ICC, ATR (Answer to Reset) is to be looked at.
SCardStatus function. Communication can then take place between IFD and Applications using PC/SC API.
SCardTransmit function.
CmdLib::Reader class
Maintains Connection to PC/SC resource manager, list of readers available
current reader, active protocol, handle to connected reader Reader