W3C home > Mailing lists > Public > public-webcrypto@w3.org > March 2014

Re: [Bug 24963] Export Key with "jwk" operations should return a JWK, rather than an ArrayBuffer

From: Ryan Sleevi <sleevi@google.com>
Date: Fri, 7 Mar 2014 18:59:38 -0800
Message-ID: <CACvaWvZ1NoPaVXCXHWX8PKVCYGabDG3NLanAifaGysf_r9wiaQ@mail.gmail.com>
To: bugzilla@jessica.w3.org, public-webcrypto@w3.org, Mark Watson <watsonm@netflix.com>
The argument that wrap/unwrap should dictate format is a particularly weak
one, given the fact that
1) there is little interoperability guaranteed by the API
2) the *only* party that had requested wrap/unwrap has been Netflix, while
multiple parties and use cases make clear they will be using JWK
3) the whole point of the any type is to allow the most useful and
appropriate return

The object being returned by exporting jwk is not, by definition, a JWK.

We also have gained new insight into the uses and use cases, and I believe
they strongly support the argument for returning a more meaningful object
by default.

The *only* factor that should weigh in at this time - before LC, before any
implementations have shipped, is "What is right for the user" - and I do
not believe that an ArrayBuffer - that has to be manually copied and
expanded to UTF-16 as a DOMString to JSON.parse it - is right for users.

Just look at the amount of code to turn it into a JS object versus
converting the object to a string to see the unnecessary complexity you're
advocating.
On Mar 7, 2014 4:59 PM, <bugzilla@jessica.w3.org> wrote:

> https://www.w3.org/Bugs/Public/show_bug.cgi?id=24963
>
> --- Comment #2 from Mark Watson <watsonm@netflix.com> ---
> As per my comment on the mailing list, I disagree.
>
> Serialized output aligns with the other formats and is necessary in any
> case
> for wrap/unwrap. We discussed and rejected providing object input / output
> instead some time ago and the reasons discussed then still apply now.
>
> We should consider in Last Call whether to *add* the capability to import /
> export in object format. This would be an additional key format (e.g.
> "jwk-js").
>
> --
> You are receiving this mail because:
> You are the assignee for the bug.
> You reported the bug.
>
Received on Saturday, 8 March 2014 03:00:10 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:17:22 UTC