- From: Richard Barnes <rlb@ipv.sx>
- Date: Thu, 20 Feb 2014 20:53:19 -0500
- To: Mark Watson <watsonm@netflix.com>
- Cc: "public-webcrypto@w3.org" <public-webcrypto@w3.org>
- Message-ID: <CAL02cgQr1pVA7BFTbHKK=X2eb40zpA0SxGbN1+XDkWBpDSvaYw@mail.gmail.com>
Note that the "pkcs8" and "spki" key types also have algorithm identifiers. So if we do this for JWK, we might as well do it for those key types as well. Only "raw" is, well, raw. The only nuance I see here would be in mapping the respective algorithm identifiers to WebCrypto algorithm identifiers. It would be unpleasant to have to specify all these mappings, which it seems like we would have to do unless we all agree that the mappings are obvious. I do think that it is the case (that the mappings are obvious), but not having thought much about it, I'm concerned that there's some subtlety lurking. So while I generally agree that the API should do the right thing when it has the information it needs (sensible defaults!), we should have some discussion of the mapping issue to make sure we're OK. --Richard On Thu, Feb 20, 2014 at 8:09 PM, Mark Watson <watsonm@netflix.com> wrote: > I filed this: > > Presently, the algorithm whose import key operation is executed when > importKey is called is determined entirely by the "algorithm" parameter to > that method. > > For JWK, it would in theory be possible to support: > > P = crypto.subtle.importKey( "jwk", jwk, null, true, [ <usages> ] ) > > and have the correct algorithm determined by the "alg" member of the JWK. > > Do we want to support this ? > > https://www.w3.org/Bugs/Public/show_bug.cgi?id=24759 > > ...Mark >
Received on Friday, 21 February 2014 01:53:46 UTC