[Openswan Users] Smartcard-Auth

Andreas Steffen andreas.steffen at strongsec.net
Mon Oct 25 17:46:22 CEST 2004


Hi Dirk,

I have personally tried Smartcard-based authentication with the
following cards:

- Schlumberger Cryptoflex 8k   (opensc-0.7.0 or newer)
- Aladdin eToken Pro 32k       (opensc-0.8.1 or newer)
- Rainbow Ikey 3000            (opensc-0.9.2 required)

With the Schlumberger Cryptoflex e-gate 32k I experience intermittent
USB timing problems which means that I cannot use the token reliably.

The Gemplus GPK has the problem that it requires CKM_SHA1_RSA_PKCS
padding. This mode which is e.g. required by a X.509 certificate signature,
embeds the SHA-1 hash into an ASN.1 DigestInfo structure. This
structure is then padded according to PKCS#1 and subsequently encrypted
with the private key located on the Smartcard.
.
Unfortunately RFC 2409 Internet Key Exchange Protocol (IKE) explicitly
specifies a raw PKCS#11 padding:

5.1 IKE Phase 1 Authenticated With Signatures

    ...
    Since the hash algorithm used is already known there is no need to
    encode its OID into the signature. In addition, there is no binding
    between the OIDs used for RSA signatures in PKCS #1 and those used in
    this document. Therefore, RSA signatures MUST be encoded as a private
    key encryption in PKCS #1 format and not as a signature in PKCS #1
    format (which includes the OID of the hash algorithm).

Thus switching to CKM_SHA1_RSA_PKCS or CKM_MD5_RSA_PKCS would break
interoperability with most IKE implementations (including *swan).

Regards

Andreas

Dirk grosse Osterhues wrote:

> Hi,
> 
> I've got a question regarding authentication via smartcards. I've got a 
> working setup here with x509-auth and wanted to integrate 
> smartcard-auth. Because I use a Gemplus GPK 16k-card I didn't get it to 
> work. Nils Larsch gave me the hint that there is a problem with the 
> support for that card:
> 
>  > the problem is (based on my understanding of the gpk manual) that gpk
>  > cards don't really support CKM_RSA_PKCS as required by the freeswan
>  > patch (I think it might be possible that the gpk cards accept the
>  > input in this case, as it's actually CKM_SHA1_RSA_PKCS, but that
>  > would make the opensc signing process more complex) => it would be
>  > better if the patch would only require CKM_SHA1_RSA_PKCS as this
>  > really only needed.
> 
> So my question is: who got it running? Is there someone who can tell 
> which card really works with openswan? Maybe this is also interesting 
> for the rest of users.
> 
> Thanks in advance, Dirk.
> _______________________________________________
> Users mailing list
> Users at openswan.org
> http://lists.openswan.org/mailman/listinfo/users


-- 
=======================================================================
Andreas Steffen                   e-mail: andreas.steffen at strongsec.com
strongSec GmbH                    home:   http://www.strongsec.com
Alter Zürichweg 20                phone:  +41 1 730 80 64
CH-8952 Schlieren (Switzerland)   fax:    +41 1 730 80 65
==========================================[strong internet security]===


More information about the Users mailing list