PC/SC and CCID - Top PC-linked Smart Card Reader...
Transcript of PC/SC and CCID - Top PC-linked Smart Card Reader...
PC/SC and CCID
PC/SC Reader
Standard CCID Smart Floppy
Smart Keyboard
Plug-in Card Reader
DualKey
Contactless Card and SIM
Sized Contact Card ReaderPCMCIA
Prior to PC/SC
No standardization on reader communication protocols
No standardization on application APIs
Application locked to vendor-specific drivers & readers
Expensive readers, few smart card applications
PC/SC Smart Card Readers
Workgroup formed in 1996 Microsoft, with major card and computer vendors as founding members
Addresses need for PC – Smart Card Reader interoperability
Can have multiple readers and different interfaces (eg. PCMCIA, RS232, USB, etc.)
Applications and vendors are neutral
Defines how a smart card reader interfaces to the OS & how an application interfaces with the OS to interact with the smart card reader and smart card
The application is not locked to any vendor’s reader
Does not define the smart card reader communication protocol
Reader’s vendor must supply the PC/SC driver
ICC - Aware ApplicationICC - Aware ApplicationICC - Aware Application
Drivers
Smart Card Readers
Smart Cards
PC/SC IFD Handler Interface
PC/SC RM Interface
PC/SC Service ProviderReference Interfaces
ICC - Aware ApplicationICC - Aware ApplicationICC - Aware ApplicationICC - Aware ApplicationICC - Aware ApplicationICC - Aware Application
Resource ManagerMicrosoft Resource Manager
Service Providers
Service Providers
Service Provider
Service Providers
Service Providers
Service Provider
IFDHandler
IFDHandler
IFDHandler
IFD IFD IFD
ICC ICC ICC
IFDHandler
IFDHandler
IFDHandler
IFD IFD IFD
ICC ICC ICC
PC/SC
CCID
The CCID Protocol is defined by the USB consortium.
The CCID driver is available from: Microsoft for Win 2K, XP and Win Server 2003
Linux, Mac
The CCID PC/SC driver is built into Windows Vista onwards.
PC/SC API
SCardEstablishContext
GetOpenCardName() / SCardUIDlgSelectCard()
SCardConnect()
SCardListCards()
SCardListReaders()
SCardGetStatusChange()
SCardIntroduceCardType()
SCardStatus()
SCardTransmit()
SCardReconnect()
SCardLocateCards()
SCardReleaseContext
SCardDisconnect()
This is the content
of ConsoleApp.cpp
ReturnCode = connectToCard(DlgStruct->hSCardContext,
DlgStruct->lpstrRdr,
SCARD_SHARE_SHARED,
SCARD_PROTOCOL_T0,
&(DlgStruct->hCardHandle),
&(DlgStruct->dwActiveProtocol));
if(ReturCode != SCARD_S_SUCCESS)
printf("Failed connection to the card0X%0X.\n",ReturnCode);
Questions?