Bug 129127 - JWK export should be padded to 8*n bytes
Summary: JWK export should be padded to 8*n bytes
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks: 160883
  Show dependency treegraph
 
Reported: 2014-02-20 16:07 PST by Alexey Proskuryakov
Modified: 2016-11-07 18:30 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2014-02-20 16:07:17 PST
As AES-KW can only wrap keys that are 8*n bytes bytes long, wrapping a CryptoKey in JWK format is only possible when the exported key happens to be of that size.

See <https://www.w3.org/Bugs/Public/show_bug.cgi?id=24457>. We should probably wait to see if a particular form of padding gets prescribed.

When done, we should re-add a subtest to crypto/subtle/aes-kw-wrap-unwrap-aes.html that was removed in <http://trac.webkit.org/r163244>.
Comment 1 Radar WebKit Bug Importer 2016-08-15 17:59:19 PDT
<rdar://problem/27858069>
Comment 2 Jiewen Tan 2016-11-07 18:30:57 PST
Per discussion of the W3C thread and the most updated spec:
https://www.w3.org/TR/WebCryptoAPI/#aes-kw-operations, and Editor's draft:
https://w3c.github.io/webcrypto/Overview.html#aes-kw-operations.

This padding restriction becomes a check on the wrapKey operation of AES-KW. Therefore, this bug is obsolete.