Subject: A PKI Question: PKCS11-> PKCS12

From: "RAGHAVENDRAN H. (SSG) - CTD, Chennai." <[email-masked]>
Date: Tue, 27 Nov 2001 21:47:19 +0530

Hi List:

Sorry this may be off the list, but I thought this is the best "PKI" place
to ask this question :-)

Myself and my friend had an discussion in which he says that when I put a
private key/certificate pair into a smart card device (such as GPK 4000), it
is impossible to read the information and create a PKCS12 file (disk based)
out of it. 

I find it mighty strange. For example, I might want to swap my
certificate/key pair from one smart card to another and I might want to do
it via the PKCS12 format. 

Can anybody say whether this is possible or not?

Some of my friends say that it "may be" possible to export only the
Certificate and not the private key associated with it. I don't see sense
any of this argument.

In fact, what is the point in jailing the private key for life in a single
smart card? This argument is totally contrary to logical thinking.

Pls. guys, I'd be grateful if you could answer this question.

Regards,
Raghav

---

From: Rich Salz <[email-masked]>
Date: Tue, 27 Nov 2001 14:30:43 -0500

It completely depends on the card; some allow you to "export" private
keys, and some do not.

The reason to keep them on the card is so that they cannot be "stolen." 
If key is in software, you'll never know if someone makes a copy.  If
it's in hardware, then you know when the device is gone.
	/r$
-- 
Zolera Systems, Your Key to Online Integrity
Securing Web services: XML, SOAP, Dig-sig, Encryption
http://www.zolera.com

---

From: Mitchell Arnone <[email-masked]>
Date: Tue, 27 Nov 2001 17:47:42 -0500

It depends on the Smart Card in use.  Most Smart Cards that meet standards 
like FIPS 140-1 Level 2 will not let you export the private key ever.  This 
is necessary to support non-repudiation.  It makes total sense.

Mitch

>Pls. guys, I'd be grateful if you could answer this question.

***********************************************************
Mitchell Arnone
Senior Consultant
Technical Consulting Practice, Northeast Region
Schlumberger Network Solutions

[email-masked]
www.slb.com/nws

35 Waterview Blvd.
Suite 210
Parsippany, NJ 07054-1200
USA

Phone  +1 410-579-8691
Mobile  +1 443-838-9373

---

From: Dale Gustafson <[email-masked]>
Date: Tue, 27 Nov 2001 18:20:28 -0600

Depending on card capabilities, it may be possible to generate a key pair on a
PKCS#11 smart card.  In that case, it can be assured by card firmware that
copies of the key pair have never existed outside the card and the private key
can only be used on the card.  Such smart cards can be used to provide enhanced
protection and portability for a signature key(s) carried on them.  To do this,
the PKCS#11 application creates a "sensitive private key" token object as part
of an on-token key generation process (see C_GenerateKeyPair() in the PKCS#11
spec. if you need more detail).  This is what's done when Netscape creates a key
pair and certificate on a smart card.

Several widely popular client applications create and manage software keys which
can also be exported to a *.p12 or *.pfx file that contains a user credential
(e.g., a public-private key pair and matching x.509 certificate).  Either
variant of PKCS#12 file is protected while stored on disk/diskette using
password-based encryption.  The PKCS#12 file can be imported into a different PC
and/or into a PKCS#11 smart card using a secure application (Netscape
Communicator, for instance) or card vendor supplied utilities.  This scenario
would make the most sense whenever one needs to backup an encryption key pair
prior to installing it into a smart card.  Note that once installed in the card,
it may not be possible to read the private key from the card.  Might be what
your friend was referring to.

Other secure applications (Entrust Entelligence is a good example) do both.
Entrust creates a security profile that contains one or more encryption keys and
a single signature key.  The profile can be stored in an encrypted disk/diskette
file or on a smart card (or can even spill off the end of a card to an encrypted
file).  The encryption key pair(s) is/are injected into the card while the
signature key pair is generated "on token", providing optimum, and very
different, key management characteristics for both types of keys.  If the user's
card is lost, stolen, damaged, or the User PIN is locked, the user's security
profile can be recovered to the same card or to another card (the encryption
keys are restored from the backup facility and a new signature key is created as
part of each profile recovery event ...).

Additionally, some smart cards support an optional PKCS#11 feature that allows
the authorized card user to export selected key pairs from the card.  Specific
key pairs must be designated as "exportable" at the time they're created.
Typically, a smart card that supports key export will protect it by wrapping
(encrypting) the key pair, using an exchange key, before allowing it to be read
out of the card.

There are several different ways to do (effectively) what you want to do, but
copying cryptographic objects directly from one card to another is least likely
to be a supported method.

Hope this helps.

Dale Gustafson
Security Consultant
Future Foundation Inc.
+1 651 452-9033 office
+1 218 343-9724 mobile

---

From: "Dale Gustafson" <[email-masked]>
Date: Tue, 27 Nov 2001 18:20:28 -0600

Hope this helps.

Dale Gustafson
Security Consultant
Future Foundation Inc.
+1 651 452-9033 office
+1 218 343-9724 mobile

---

From: "Mitchell Arnone" <[email-masked]>
Date: Tue, 27 Nov 2001 17:47:42 -0500

Mitch

35 Waterview Blvd.
Suite 210

Phone  +1 410-579-8691
Mobile  +1 443-838-9373

---

From: "Rich Salz" <[email-masked]>
Date: Tue, 27 Nov 2001 14:30:43 -0500