W3C home > Mailing lists > Public > public-webcrypto@w3.org > June 2012

RE: Need for Smart Card support

From: Lu HongQian Karen <karen.lu@gemalto.com>
Date: Mon, 11 Jun 2012 19:25:41 +0200
To: Ryan Sleevi <sleevi@google.com>, David Dahl <ddahl@mozilla.com>
CC: Ali Asad <Asad.Ali@gemalto.com>, "James L. Davenport" <jdavenpo@mitre.org>, "public-webcrypto@w3.org" <public-webcrypto@w3.org>
Message-ID: <1126F161F6F1B24FABD92B850CAFBD6E015F0B3F6418@CROEXCFWP04.gemalto.com>
The crypto API itself (for encryption, signing, hash etc.) should be generic without specific reference to hardware devices.

A web application or the user should be able to choose which crypto provider (implemented in software or hardware) to use, which may be default to the one built-in the browser or OS. A hardware secure element may implement a different crypto provider. This approach has been implemented in current browsers (or add-ons) so that SSL/TLS mutual authentications are possible. Users can choose which crypto provider to use, for example, select her smart card. The problems are: first, the crypto functionalities are only available to the web browsers but not to web applications; and second, different OS's and browsers uses different API's (Microsoft's CAPI, Apple's CSSM, PKCS#11 for everyone else).

May be choosing crypto providers and accessing hardware devices belong to different working groups?

Regards,
Karen

From: Ryan Sleevi [mailto:sleevi@google.com]
Sent: Friday, June 08, 2012 1:45 PM
To: David Dahl
Cc: Ali Asad; James L. Davenport; public-webcrypto@w3.org
Subject: Re: Need for Smart Card support


On Fri, Jun 8, 2012 at 9:43 AM, David Dahl <ddahl@mozilla.com<mailto:ddahl@mozilla.com>> wrote:
Of course, the existing PKCS#11 routine (Prefs->Advanced->Encryption) in Firefox is a way to register a device. Perhaps I am under the impression that the API would govern the registration of hardware modules?

I would think that would definitely be out of scope.

"Registration of hardware modules" inevitably involves native code, and the idea of a JavaScript API allowing sites to install native code is a non-starter. Further, as noted in the charter and as Harry noted, specifically trying to avoid that as it involves device-specific calls.


I need to read up on how other browsers do this - and how NSS deals with crypto hardware and keyIDs. I think the real question here is does the API not have to do anything, just have the keyID passed to it to operate? All of the implementation details are hidden from the API, and things
just work?

I would prefer that, in our first draft, and consistent with the charters goals, that any awareness of smart cards or secure elements be left out. Simply dealing in key IDs is, I believe, sufficient enough to support the core use cases and primary goals, and also gives implementors the flexibility to expose keys stored in secure elements in an implementation-independent way that is compatible with the core API.

For web developers, the nature of whether or not a key is stored in a secure element is unknown/unknowable to them - they have simply have a key ID, for which they can do the appropriate low or high level crypto operations.

At the risk of fueling a fire, I do not believe the "this key is in a secure element" can be reliably exposed to applications, both due to the web security model and due to the vendor-specific nature. As Anders Rundgren repeatedly pointed out during the community group and the activity on the public-identity mailing list, proof of possession/proof of a key being within secure element has been a fundamental challenge in crypto, one which inevitably requires significantly more complex protocols that simply don't belong within a generic, simple API for signing/encrypting. Anything short of such complex schemes/protocols can easily be faked, and thus add zero security or programmatic value and only hinder further progress.


Cheers,

David

----- Original Message -----
From: "David Dahl" <ddahl@mozilla.com<mailto:ddahl@mozilla.com>>
To: "Ali Asad" <Asad.Ali@gemalto.com<mailto:Asad.Ali@gemalto.com>>
Cc: "James L. Davenport" <jdavenpo@mitre.org<mailto:jdavenpo@mitre.org>>, public-webcrypto@w3.org<mailto:public-webcrypto@w3.org>
Sent: Friday, June 8, 2012 11:18:56 AM
Subject: Re: Need for Smart Card support

----- Original Message -----
> From: "Ali Asad" <Asad.Ali@gemalto.com<mailto:Asad.Ali@gemalto.com>>
> To: "James L. Davenport" <jdavenpo@mitre.org<mailto:jdavenpo@mitre.org>>, public-webcrypto@w3.org<mailto:public-webcrypto@w3.org>
> Sent: Monday, June 4, 2012 9:32:25 AM
> Subject: RE: Need for Smart Card support
>
> I think it will be good to have an option for interacting with secure
> element (smart card being one example) in the API. Browsers that
> choose to support it can implement it while others can skip it. But
> the fact that it is there in the API will allow creation of secure
> applications (as indicated by the use cases below) for those
> interested in them.
>

I would like to see what the interfaces for this look like.

A. How does the browser (in a cross-browser and platform way) know about the secure element? In other words, how is the secure element registered with the browser?

B. Does the secure element appear to the browser as another software API that can be called, e.g: window.crypto.secureElement.* ?

* or *

C. Does the secure element export keys which the browser imports and uses like any other keys that have a key handle?

I wonder what this looks like in practice. Is this a combination of crypto API + new browser features that 'register' the secure element with the  browser?  It does not appear an API can do all of this alone.

Cheers,

David
Received on Monday, 11 June 2012 17:26:23 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 11 June 2012 17:26:24 GMT