On Wed, Jan 18, 2012 at 11:30:36PM -0800, Frank Cusack wrote:
> On Wed, Jan 18, 2012 at 11:04 PM, Christian Hohnstaedt <
> christ...@hohnstaedt.de> wrote:
> 
> > On Wed, Jan 18, 2012 at 04:20:05PM -0800, Frank Cusack wrote:
> > > In a CSR, how is it proven that the key resides on a smart card (and is
> > not
> > > exportable)?  In my understanding, the CSR is signed by the private key
> > of
> > > the (to be) cert itself.  Thus that signature only proves that the
> > > requester actually possesses the private half, not that the private key
> > > resides on a smart card.
> > >
> > > Looking at the cryptoflex command set, I don't see anything there that
> > > would add something to the CSR asserting that the key was generated
> > > on-card.  Same for ISO 7816-8, but I could easily be missing something.
> >
> > You're probably missing the fact that noone stops the owner of a
> > software key to add the same information to the CSR.
> >
> 
> Not if there's an APDU that adds that information as part of the operation,
> and the key used in that operation cannot be used except for CSR generation.
> 
> For example, if I had some key/cert on the card (and I know it can only
> exist on the card -- this might happen before it is shipped to me or in
> bulk secure provisioning on site)

The problem is, that nobody can distinguish the public key of a smart
card from a software key.
That means, there must be a secret on the card that is known by the CA.
Therefore the CA operator needs prior access to the cards.

If the CA operator has prior access to the cards,
a simple solution could be to
extract the public key and probably store it in a hashed way in some
sort of database.
For every incoming CSR the CA searches for the public key hash in its
database. No additional APDU or secret required.

> that is not able to be used for anything
> externally.  ie, you cannot encrypt,decrypt,sign or verify any external
> data with this key/cert.  But when you ask for a CSR, there's actually a
> CSR APDU -- not a software generation of CSR then asking the card to sign
> the CSR.  You pass the relevant attributes to be included in the CSR, and
> the card itself adds some signed data as a CSR attribute which the CA can

The question is: What shall the the signed data be ?

> verify.  There is no way for the user to add that signed data to a software
> CSR because the key used to sign that data is not available to the user.

That is what i doubt.
Anything that can be signed by the card can be signed by a software key,
too.

Cheers

        Christian
_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to