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

Re: W3C Web Crypto WG - Is our deliverable doomed ?

From: Ryan Sleevi <sleevi@google.com>
Date: Tue, 18 Sep 2012 13:04:18 -0700
Message-ID: <CACvaWvbpiPjTggtOJWtRY096fqBfMyD0-Q4VffSLTntxn1Cs1Q@mail.gmail.com>
To: Seetharama Rao Durbha <S.Durbha@cablelabs.com>
Cc: Mark Watson <watsonm@netflix.com>, Harry Halpin <hhalpin@w3.org>, GALINDO Virginie <Virginie.GALINDO@gemalto.com>, "public-webcrypto@w3.org" <public-webcrypto@w3.org>, Wendy Seltzer <wseltzer@w3.org>
On Tue, Sep 18, 2012 at 12:56 PM, Seetharama Rao Durbha
<S.Durbha@cablelabs.com> wrote:
>
> One comment inline.
>
> On 9/18/12 11:29 AM, "Ryan Sleevi" <sleevi@google.com> wrote:
>
>
> On Tue, Sep 18, 2012 at 8:53 AM, Mark Watson <watsonm@netflix.com> wrote:
>>
>> One of the points missing from the article, which we have considered a lot, is the fact that it is possible to build systems with useful security properties, whilst always accepting that we can't really trust the Javascript code at the client (for the reasons given in the article).
>>
>>
>> Specifically, we trust the browser code more than the Javascript code and we trust code in secure elements even more. We take care understand the security properties we have through the lens of exactly what operations are being performed by which code and with which data.
>>
>> This is why the API becomes much more interesting when we introduce concepts like pre-provisioned keys. Without them, then I fear the API does indeed suffer from many of the issues identified in the article.
>>
>> Pre-provisioned keys allow us to bind to something we trust, even if that is just the browser code, and from there we can infer something useful. Without that, then any Javascript could be using a malicious polyfill WebCrypto API and all your security bets are off.
>>
>> Having said that, it is certainly possible to 'simulate' pre-provisioned keys (insecurely) in polyfill for test and API validation purposes. I wouldn't rule out some kind of obfuscation-based JS polyfill implementation with pre-provisioned keys, but that does sound like a "challenging" project that I am not about to embark on ;-)
>>
>> …Mark
>>
>
> Respectfully, I have to disagree with Mark here. I do not think pre-provisioned keys (smart card or deivce) do not, in themselves, buy any additional security properties, just as they would not and do not within native applications.
>
> To take a step back, to see how I get there, let's take a step back and look at the points raised in the article:
>
> Secure delivery of Javascript to browsers is hard
>
> If you have SSL, just use SSL
>
> Browsers are hostile to cryptography
>
> The prevalence of content-controlled code
> The malleability of the Javascript runtime
> The lack of systems programming primitives needed to implement crypto
>
> The browser lacks secure random number generation
> The browser lacks secure erase
> The browser lacks functions with known-timing characteristics
> A secure keystore
>
> The crushing weight of the installed base of users
>
> The view-source transparency is illusory
>
> Unlike native applications, Javascript is delivered on demand and thus may be mutated in time
> An exploit server side can compromise many tens or hundreds of thousands of users
>
> To address these points, let's look at what we have at our disposal.
>
> This work
>
> Our API so far provides secure RNG and functions with known-timing characteristics, along with a secure keystore. Yes, we don't offer a secure erase, nor do we offer a generic secure memory comparison, and perhaps those are things we can look at in the future. But I'd suggest that, given the general framework of what is brought by the API, it's not as c
>
> I think the bolded statement above is the root of all questions. We are pretending that the API comes with specific guarantees around crypto functionality and secure storage. I say that we totally get away from that. We just say that the API is what it is – just an API – the application MUST treat a client using these API like any other client – untrusted. Any trust can come only from external sources that the server application controls – like in Mark's example

I'm sorry you feel we've been pretending - I certainly haven't meant
there to be any such pretense of that.

Despite that, I think we still offer improvements over a strict
polyfill - the least of all being the ability to support
non-extractable keys.

The only guarantees of functionality or storage we're making are with
respect of the user agent and arbitrary origins. Everything beneath
the user agent is (intentionally) not specified. I agree, if you're
looking for strong assurances of a particular nature, you may need to
know everything from the CPU to the user agent, but I don't think all
applications or consumers are looking for those guarantees. We can
directly meet the needs of applications that do not care, and we can
provide the framework and guarantees for those that do to build out
the guarantees "underneath" the user agent in order to reach their
desired level of assurance.

This is the general issue with concepts like "trust" or "security" -
they mean different things to different people, and a clear definition
(of degree or kind) has yet to emerge. That said, I don't think our
efforts need to focus on such a definition - let's focus on an API
instead :-)
Received on Tuesday, 18 September 2012 20:04:46 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 18 September 2012 20:04:47 GMT