RE: On Registries

Simple.  In the first case, the algorithm is a data value.  In the second case, it’s encoded in an API.  Data values are easily extensible.  APIs are not.  That’s why extending the space of algorithms by registering new data values makes a world of sense.  Expending the algorithms by adding new APIs for each would be clunky, procedurally slow, and mostly unworkable.

Note that the kinds of errors you get back the two are very different as well.  In the first case, it would be “unsupported algorithm”.  In the second case, your code would be treated as having invalid syntax.  The code is much more straightforward to handle the first kind of errors, which are expected, than the second, which are unexpected.

                                                            -- Mike

From: Ryan Sleevi [mailto:sleevi@google.com]
Sent: Thursday, August 07, 2014 2:37 PM
To: public-webcrypto@w3.org
Subject: On Registries

Since it seems like this issue won't die, it's at least fruitful to discuss.

For the proponents of registries, can you please describe what difference, if any, there is for the web development community and user agent authors between

window.crypto.subtle.encrypt("AES-GCM", foo, bar)
and
window.crypto.subtle.aes_gcm.encrypt(foo, bar)

I assert that there fundamentally is none. Both, once implemented, are parts of the Web Platform. Like any other feature in the Web Platform, we want to see such work develop through consensus. Like any other feature of the Web Platform, it is extremely unlikely for two groups, let alone three or more, to develop competing definitions. The only historical precedents for this has been WHATWG vs W3C, or UA Vendor vs (WHATWG || W3C), and both are recognized as unfortunate failings, not desirable/normal outcomes.

Let's stick solely to discussing how things work in the W3C and the Web. What IETF does, while important, is not the same as what the W3C does - and that's OK.

Received on Thursday, 7 August 2014 21:49:09 UTC