OpenCard Framework 1.2 Programmer's Guide - OpenSCDP
OpenCard Framework 1.2 Programmer's Guide - OpenSCDP
OpenCard Framework 1.2 Programmer's Guide - OpenSCDP
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Working with credentials<br />
Apart from simply improving the readability of applications, symbolic path names<br />
imply an additional redirection when referencing files in the card. This redirection<br />
can be used by card issuers to their advantage by letting them allocate ISO-based<br />
file IDs independently of the application logical file structure. The net benefit to<br />
application programmers is that the application becomes more portable by being<br />
independent of the details of file reference usage.<br />
At the start of a smart-card aware application, the card-external application and<br />
the card-resident application usually engage in a procedure to establish a trusted<br />
relationship prior to exchanging any sensitive information. This procedure may<br />
involve one or more of the following measures:<br />
1. The card-external application authenticates itself to the card-resident<br />
application. In smart card parlance, this is called External Authentication.<br />
2. The card-resident application authenticates itself to the card-external<br />
application. In smart card parlance, this is called Internal Authentication.<br />
3. The cardholder authenticates him or herself to the card. In smart card parlance,<br />
this is called Cardholder Verification (CHV).<br />
Steps 1 and 2 combined are sometimes called mutual authentication.<br />
Mutual authentication typically relies on a challenge-response protocol involving<br />
the computation of a response to a challenge using some cryptographic keys<br />
shared between challenger and responder. Cardholder verification typically relies<br />
on the cardholder proving his identity by revealing a shared secret (such as a<br />
password or PIN code) or by presenting a biometric characteristic such as a finger<br />
print or retina pattern scan. The card-resident application usually occupies a<br />
directory (DF) and all the files underneath it. 14<br />
Accordingly, granting access to an application can be equated with granting access<br />
to a directory. Access conditions to files in the file system of a smart card are<br />
typically defined during layout specification (see also “Developing applications<br />
using <strong>OpenCard</strong> <strong>Framework</strong>” on page 2.) 15 To abstract from file-system oriented<br />
cards, we call this a security domain. The access conditions for internal<br />
authentication rely on cryptographic key(s) stored in the card as part of the<br />
card-resident application, while the access condition for external authentication<br />
relies on cryptographic key(s) provided by the card-external application. For access<br />
conditions involving CHV, see “Performing cardholder verification” on page 39.<br />
The cryptographic algorithms used in the computations of access conditions can<br />
vary between different types of smart cards. Accordingly, in situations where a<br />
card-external application has to interact with card-resident applications protected<br />
via different cryptographic mechanisms, the card-external application must be able<br />
to provide cryptographic keys for all these mechanisms.<br />
Now what does this all mean to application programmers? It means that they must<br />
have a way to make available in their (card-external) application proper credentials<br />
(most often cryptographic keys or certificates) that fit the access conditions of the<br />
files which the given application is supposed to interact with.<br />
14. In the case of JAVACARDs, the model will be somewhat different, but the essence of what is said here remains valid.<br />
15. This may be different in the case of emerging multi-function smart cards whose operating system allows for the post-issuance<br />
deployment of applications.<br />
Chapter 5. Advanced programming with OCF 37