1
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:html="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4
</title><style type="text/css">
6
</style></head><body><div id="content" class="wiki">
7
<div class="wikipage searchable">
9
<h1 id="Overview">Overview</h1>
11
So you want to use a smart card with some application? Here is a small introductions on the parts you need.
14
</li><li>Smart card library
16
</li><li>Driver for your smart card reader
18
OpenSC is a smart card library. It also comes with tools to manage your smart cards.
20
<h2 id="ApplicationInterface">Application Interface</h2>
22
Applications need to use the smart card library using some interface. Unfortunatly there
23
are several different interfaces. PKCS#11 is a standard interface available on all operating
24
systems. OpenSC implements this interface as smart card library, and Applications such as Mozilla,
25
Firefox and Thunderbird implement it as applications. Thus you can use these applications with
26
OpenSC on all platforms.
29
Native Windows applications often use the Crypto API interface. OpenSC does not implement
30
the matching interface - CSP - but with the help of an additional software it does. See
31
<a class="wiki" href="WindowsCSP.html" shape="rect">WindowsCSP</a> for details. The advantage of Crypto API/CSP is that applications
32
do not need special code to use smart cards, all applications gain that feature automaticaly.
35
Native Mac OS X applications also have a special interface called CDSA or CSP. See
36
<a class="wiki" href="AppleCSP.html" shape="rect">AppleCSP</a> for details. At this moment OpenSC does not support that interface
37
and also there is no bridge to do so. But you can still use applications on Mac OS X
38
that implement the PKCS#11 interface like Mozilla, Firefox or Thunderbird.
41
Under Linux, BSD, Solaris and under Unix PKCS#11 is the preferred interface for all
45
Some Open Source applications use the non standardized native OpenSC interface directly.
46
These days we promote PKCS#11 as interface, but for the time being these applications
47
also work well with OpenSC.
49
<h2 id="DriverInterface">Driver Interface</h2>
51
Windows implements the PC/SC standard. That means OpenSC will use the PCSC interface to talk
52
to the middleware, and the middleware will use drivers in "IfdHandler" format to talk to the
53
hardware. Nearly all vendors of smart card readers ship such drivers, or the driver is even
54
included in Windows, so there shouldn't be any issue. OpenSC will be able to talk to your
58
Windows NT/2000/XP and newer include the PC/SC middleware. For older versions you need to install
59
an addon package from Microsoft first.
62
Apple/Mac OS X also implements the PC/SC standard, same situation as Windows, except few
63
vendors ship drivers for Mac OS X, but most smart card readers will work with the generic
64
driver included in Mac OS X. OpenSC will talk to the reader using the PC/SC Middleware
65
and thus be able to talk to your smart card just fine.
68
Apple includes a modified copy of pcsc-lite, an open source implementation of the PC/SC
69
standard. Most of the time you will be fine, but in some cases it is necessary to install
70
an updated version of pcsc-lite, for example if you have a smart card reader with a pinpad
71
and would like to use that capability.
74
On Linux you might want to use the open source project <a href="http://www.opensc-project.org/openct/" shape="rect">OpenCT</a>
75
for smart card drivers. It implements support for many drivers at the same time, is still
76
small and lean, and OpenSC can use it directly without the need for any middleware.
77
Many OpenSC developers also work on OpenCT so this combination is best tested. Most Linux
78
distributions include the latest version of OpenCT.
81
On Linux you can also use pcsc-lite and drivers in ifdhandler format. Many distributions
82
include pcsc-lite and some open source drivers, and some vendors also offer binary drivers
83
for Linux in ifdhandler format.
86
Solaris situation is like Linux, except Sun has some special stuff for their Sunray
87
terminals that contain smart card readers. You can use <a href="http://www.opensc-project.org/openct/" shape="rect">OpenCT</a>
88
with those terminals; source contains a solaris/ subdirectory with a README files and
89
additional files to make using OpenCT on solaris easy. OpenCT hides the differences,
90
so OpenSC works on Solaris well, just like on other plattforms.
93
There is also a very old interface called CT-API which was developed many years ago while
94
people were using DOS. It only works well if you have a single application with a single
95
user on your system. It is still being used for specialised machines like ticket point of
96
sales, but usualy not used with modern multi-user, multi-application computers. OpenSC
97
can use drivers in CT-API format directly, without any middleware, on all operating sytems.
99
<h2 id="Smartcardsupport">Smart card support</h2>
101
Basicaly you can get smart card in two states: either blank or initialized.
104
For blank cards OpenSC has code to initialize the card in PKCS#15 format.
107
You can't change initialized cards at all, or only with the software that
108
was used to initialize it. But you can use the card with OpenSC if OpenSC
109
knows the format. So the format has either to be PKCS#15 (very few
110
softwares implement that standard, however), or maybe the format was published
111
and OpenSC contains an emulation for that format.
114
Check the list on the main page to see if your card is supported. Also
115
check the page itself, as some cards have not been tested for a while,
116
or only some members of a card family are supported.
119
Also if you want to buy blank cards and initialize them yourself,
120
make sure you buy really blank cards. Many vendors have also a
121
half initialized version, and those can be only changed with the
122
vendor software, and the result is not compatible with OpenSC unless
123
OpenSC has an emulation code. Even then OpenSC can only offer you to
124
use the card, but not to alter it.
127
As a general rule OpenSC only supports cards with a filesystem and
128
cryptographic functions (RSA). That excludes nearly all Java Cards,
129
as they usually don't have a filesystem. Please check the
130
<a class="ext-link" href="http://www.musclecard.com/" shape="rect"><span class="icon">Musclecard</span></a> project - they offer
131
open source software for using many different Java Cards.
137
</div><div class="footer"><hr></hr><p><a href="index.html">Back to Index</a></p></div></body></html>