opensc/doc/TelseCos.html

82 lines
5.8 KiB
HTML

<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">
<title>TelseCos - OpenSC - Trac</title><style type="text/css">
@import url(trac.css);
</style></head><body><div class="wikipage">
<div id="searchable"><h1>NetKey E4 cards</h1>
<p>
<img src="http://www.opensc.org/opensc/attachment/wiki/TelseCos/NetkeyE4-card.jpg?format=raw" alt="http://www.opensc.org/opensc/attachment/wiki/TelseCos/NetkeyE4-card.jpg?format=raw"></img>
</p>
<p>
Telesec is a german company that sells <a class="missing" href="/opensc/wiki/NetKey" shape="rect">NetKey?</a> E4 cards. These cards have a TCOS 2.02 operationg system and an almost PKCS<a href="/opensc/ticket/15" title="NEW : opensc 0.9.6: --with-openssl doesn't work right" shape="rect">#15*</a> compatible file-layout. OpenSC has read-only support for these kind of cards.
</p>
<p>
If OpenSC would fully support TCOS, one could erase the preformatted card and initialize the card with a PKCS<a href="/opensc/ticket/15" title="NEW : opensc 0.9.6: --with-openssl doesn't work right" shape="rect">#15*</a> filesystem. This is not possible right now. You have the same problem, if you own a blank TCOS card.
</p>
<p>
The good news are: With the help of an emulation layer OpenSC can use cards that are almost PKCS<a href="/opensc/ticket/15" title="NEW : opensc 0.9.6: --with-openssl doesn't work right" shape="rect">#15*</a> compatible. For <a class="missing" href="/opensc/wiki/NetKey" shape="rect">NetKey?</a> E4-cards such an emulation layer exists. The emulation cannot store certificates, keys or pins on the card, but you can use whatever is visible through the emulation layer.
</p>
<p>
SignTrust- and German EId-cards are also TCOS based but might have a different layout, so the <a class="missing" href="/opensc/wiki/NetKey" shape="rect">NetKey?</a> E4-emulation might not work with these cards. If you have such a card and are willing to help, please post information on the mailing list. You might also send "opensc-tool -r" output to <a class="ext-link" title="mail:pk_opensc@web.de" href="mail:pk_opensc@web.de" shape="rect">me</a>, maybe I can extend the Netkey-emulation such that other preformatted TCOS cards work as well.
</p>
<h2>NetKey E4 filesystem layout</h2>
<p>
<a class="missing" href="/opensc/wiki/NetKey" shape="rect">NetKey?</a> E4 cards contain different directories with different applications. Only one of these (i.e. directory DF01) is made visible through the <a class="missing" href="/opensc/wiki/NetKey" shape="rect">NetKey?</a> emulation layer. This directory contains 3 private keys, 3 public keys, 3 read only certificates, 6 empty certificate files, 2 local PINs and one signature-counter.
</p>
<pre class="wiki" xml:space="preserve"> pkcs15-tool -c
</pre><p>
will list all certificates. It will not list the empty certificate files. Here's the output for a new <a class="missing" href="/opensc/wiki/NetKey" shape="rect">NetKey?</a> E4 card:
</p>
<pre class="wiki" xml:space="preserve">$ pkcs15-tool -c
X.509 Certificate [Telesec Signatur Zertifikat]
Flags : 0
Authority: no
Path : DF01C000
ID : 01
X.509 Certificate [Telesec Authentifizierungs Zertifikat]
Flags : 0
Authority: no
Path : DF01C100
ID : 02
X.509 Certificate [Telesec Verschlüsselungs Zertifikat]
Flags : 0
Authority: no
Path : DF01C200
ID : 03
</pre><p>
The read-only certificates are signed by a certificate of german Telekom AG and all have the same CN. Here's some output that shows one of them:
</p>
<pre class="wiki" xml:space="preserve">$ pkcs15-tool -r 01 | openssl x509 -noout -text -certopt no_pubkey,no_sigdump
Certificate:
Data:
Version: 3 (0x2)
Serial Number: 13356238 (0xcbccce)
Signature Algorithm: ripemd160WithRSA
Issuer: C=DE, O=Deutsche Telekom AG/0.2.262.1.10.7.20=1, CN=NKS CA 21:PN
Validity
Not Before: Jan 31 08:43:51 2003 GMT
Not After : Jan 31 08:43:51 2006 GMT
Subject: C=DE/0.2.262.1.10.7.20=1, CN=NKS 03 A 02707
X509v3 extensions:
X509v3 Key Usage: critical
Digital Signature, Non Repudiation
</pre><p>
The public-keys are record-based transparent files and cannot be used for cryptographic operations. They are on the card for convenience only. OpenSC extracts the public keys from the certificates and does not use the public key files.
</p>
<h2>How do I store additional certificates into the above mentioned empty certificate-files?</h2>
<p>
You (and OpenSC) dont see the empty certificate files through the emulation layer. One consequence of this is, that you cannot store your own certificates into these files with pkcs11-tool or pkcs15-init.
</p>
<p>
You must use opensc-explorer and store the certificate directly into the right position or use netkey-tool, a small program, that I wrote exactly for that purpose.
</p>
<p>
In general (and in particular with TCOS-cards) it's a lot more complicated to create a new file on a smartcard than updating an existing one. That's the reason why there are empty certificate files on a <a class="missing" href="/opensc/wiki/NetKey" shape="rect">NetKey?</a> card. They contain 1536 0xFF-bytes and you can overwrite them with your own certificate (if your certificate has at most 1536 bytes).
</p>
<p>
netkey-tool can do other NetKey-card specific things as well. In particular it will display your initial PUK value and all certificates (including the emtpy ones, which are invisible to pkcs15-tool). As of this writing (June 2005) netkey-tool is included in the CVS-version only.
</p>
</div>
</div><div class="footer"><hr></hr><p><a href="index.html">Back to Index</a></p></div></body></html>