<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>edwi.nl/og &#187; token</title>
	<atom:link href="http://edwi.nl/og/tag/token/feed/" rel="self" type="application/rss+xml" />
	<link>http://edwi.nl/og</link>
	<description>Edwin Woudt's weblog</description>
	<lastBuildDate>Sat, 18 Apr 2009 00:15:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Old stuff: Using PGP with an USB smartcard token</title>
		<link>http://edwi.nl/og/2009/04/01/old-stuff-using-pgp-with-an-usb-smartcard-token/</link>
		<comments>http://edwi.nl/og/2009/04/01/old-stuff-using-pgp-with-an-usb-smartcard-token/#comments</comments>
		<pubDate>Wed, 01 Apr 2009 18:04:37 +0000</pubDate>
		<dc:creator>edwin</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[epass]]></category>
		<category><![CDATA[openfortress]]></category>
		<category><![CDATA[pgp]]></category>
		<category><![CDATA[pki]]></category>
		<category><![CDATA[token]]></category>

		<guid isPermaLink="false">http://edwi.nl/og/?p=227</guid>
		<description><![CDATA[Note: this is a re-post of an old tutorial I did in 2004. I currently do not use this set-up anymore, but am saving it here for posterity
This document details how to use PGP on Windows with a USB smartcard token, specifically the ePass2000 network token. 
The token used for this tutorial was kindly provided [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://edwi.nl/og/uploads/2009/04/epass-pgp-120x120.png" alt="epass-pgp-120x120" title="epass-pgp-120x120" width="120" height="120" class="alignleft size-full wp-image-247"  style="border: 1px solid #dddddd; margin-bottom: 12px; margin-right: 20px;"/><em>Note: this is a re-post of an old tutorial I did in 2004. I currently do not use this set-up anymore, but am saving it here for posterity</em></p>
<p>This document details how to use <a href="http://www.pgp.com/">PGP</a> on Windows with a USB smartcard token, specifically the <a href="http://www.ftsafe.com/products/viewproduct.php?p=epass2k">ePass2000</a> network token. </p>
<p>The token used for this tutorial was kindly provided by <a href="http://openfortress.nl/">OpenFortress</a>, a technology provider specialized in applications of digital signatures.</p>
<h3>Why?</h3>
<p>The token makes it much easier for the user: no need to remember long passphrases. Just put the token into an USB slot and type in a small pincode of 4 to 8 characters. By making it easier for the user, security is improved: people will not need to write down their passphrases or use very short and insecure passwords.</p>
<p>The same token can be used for multiple applications. There is enough memory on the smartcard to store multiple keys and due to the standard pkcs#11 and microsoft cryptoapi interfaces almost any application supporting smartcards works just fine with the ePass2000. Examples for desktops are: logging on to a Windows Domain Server (supported by Windows 2000, XP and 2003), and from OpenFortress a <a href="http://openfortress.nl/product/shaman/">solution</a>for SSH logins (a Linux version is finished, a Windows prototype is available).</p>
<h3>Why not?</h3>
<p>If you lose or damage your token: you lose your private key and any data encrypted to it. Because the key is generated inside the token and cannot leave it, it is not possible to make a backup of the private key.</p>
<p>Also, the token only supports 1024 bit RSA, which according to some is inadequate. Tokens supporting 2048 bits are however already entering the market. And in any case, a 1024 bit Verisign RSA root key still secures online banking for millions of people, so why worry? </p>
<h3>How does it work?</h3>
<p>In short, the USB token internally is a combination of a smartcard reader and a smartcard in one package, which can be connected to a USB port. An application can then talk to the smartcard and ask it to do some cryptographic operation, like signing or decrypting some data. Of course the token will only execute this operation when supplied with the correct pin code.</p>
<p>When a keypair is generated on the token, the private key never leaves the token. Therefore, all private key operations need to be done by the token itself.</p>
<p>For efficiency reasons, PGP (as any other application using public key cryptography) does not encrypt or sign all data with a public key primitive. For encryption, all data is encrypted to a secret random symmetric key. This symmetric key is then encrypted to a public key. For decryption, PGP just sends the encrypted symmetric key to the token for decryption and after retrieving the secret symmetric key, all data is decrypted without using the token. That way, even if the encrypted file is for example one gigabyte in size, only a few hundred bytes are exchanged on the relatively slow usb link, while still maintaining the same security. For signatures a similar procedure is used: the signature is done over a hash or message digest of the full message</p>
<h3>PGP on a token</h3>
<p>In the final section of this document, we will detail how to configure PGP for token usage.<br />
<span id="more-227"></span></p>
<h4>Requirements</h4>
<p>In order to use &#8216;PGP on a token&#8217;, you need:</p>
<ul>
<li>An <a href="http://www.ftsafe.com/products/viewproduct.php?p=epass2k">ePass2000</a> cryptographic token, obviously</li>
<li><a href="http://www.pgp.com/">PGP 8</a>, any paid-for version. The freeware version <b>will not work</b>.</li>
</ul>
<p>It it also assumed that the token has been formatted and that the drivers for<br />
the token are installed.</p>
<h4>Configuration of PGP</h4>
<p>First of all, open the PGPKeys application and go to the advanced tab of the options dialog.</p>
<p><img src="http://edwi.nl/og/uploads/2009/04/epass-pgp-edit.png" alt="epass-pgp-edit" title="epass-pgp-edit" width="575" height="281" class="alignnone size-full wp-image-232" /><br />
<img src="http://edwi.nl/og/uploads/2009/04/epass-pgp-options.png" alt="epass-pgp-options" title="epass-pgp-options" width="508" height="461" class="alignnone size-full wp-image-236" /></p>
<p>Go to the Smart Card Support drop down box and select Other.<br />
<img src="http://edwi.nl/og/uploads/2009/04/epass-pgp-dll.png" alt="epass-pgp-dll" title="epass-pgp-dll" width="369" height="124" class="alignnone size-full wp-image-230" /></p>
<p>Enter the location of the ePass pkcs#11 dynamic link library, which is by default installed in c:\windows\system32\ep2pk11.dll. Click close twice and your PGP is ready to use the token.</p>
<h4>Generating a key on the token</h4>
<p><img src="http://edwi.nl/og/uploads/2009/04/epass-pgp-newkey.png" alt="epass-pgp-newkey" title="epass-pgp-newkey" width="575" height="281" class="alignnone size-full wp-image-235" /></p>
<p>First, open the new key creation wizard.<br />
<img src="http://edwi.nl/og/uploads/2009/04/epass-pgp-wizard.png" alt="epass-pgp-wizard" title="epass-pgp-wizard" width="503" height="388" class="alignnone size-full wp-image-239" /></p>
<p>Click on Expert<br />
<img src="http://edwi.nl/og/uploads/2009/04/epass-pgp-expert.png" alt="epass-pgp-expert" title="epass-pgp-expert" width="503" height="388" class="alignnone size-full wp-image-233" /></p>
<p>Enter the required name and e-mail address and select the &#8216;Generate key on Smart Card&#8217; checkbox.<br />
<img src="http://edwi.nl/og/uploads/2009/04/epass-pgp-done.png" alt="epass-pgp-done" title="epass-pgp-done" width="503" height="388" class="alignnone size-full wp-image-231" /></p>
<p>After waiting for about 30 seconds, the key has been generated on the smart card and you are ready to use it.</p>
<h4>Using it</h4>
<p>Use PGP normally as you would do when the private key is in the private key file on your hard disk. When asked to enter the passphrase, enter the pin code of the token instead.</p>
<p>PGP will automatically detect when the token is taken out of the USB port and put back in. Below are two screenshots showing the difference in PGPKeys: in the first the token is in the USB port, in the second it has been removed, showing that PGP at that point only knows about the public key.<br />
<img src="http://edwi.nl/og/uploads/2009/04/epass-pgp-in.png" alt="epass-pgp-in" title="epass-pgp-in" width="575" height="298" class="alignnone size-full wp-image-234" /><br />
<img src="http://edwi.nl/og/uploads/2009/04/epass-pgp-out.png" alt="epass-pgp-out" title="epass-pgp-out" width="575" height="298" class="alignnone size-full wp-image-237" /></p>
]]></content:encoded>
			<wfw:commentRss>http://edwi.nl/og/2009/04/01/old-stuff-using-pgp-with-an-usb-smartcard-token/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
