Bug 177226

Summary: wrapKey_unwrapKey.worker.html is flaky
Product: WebKit Reporter: Ms2ger (he/him; ⌚ UTC+1/+2) <Ms2ger>
Component: WPE WebKitAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: bugs-noreply, jiewen_tan, mcatanzaro, zan
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=176759
https://bugs.webkit.org/show_bug.cgi?id=177301

Description Ms2ger (he/him; ⌚ UTC+1/+2) 2017-09-20 05:54:51 PDT
With a diff like

+PASS Can wrap and unwrap RSA-OAEP private key keys using pkcs8 and AES-KW 
+PASS Can wrap and unwrap RSA-OAEP private key keys as non-extractable using pkcs8 and AES-KW 

where I've also seen RSA-PSS instead of RSA-OAEP. That is, these tests sometimes run, and sometimes don't.

The tests will run if the following function returns true:

    function wrappingIsPossible(exportedKey, algorithmName) {
        if ("byteLength" in exportedKey && algorithmName === "AES-KW") {
            return exportedKey.byteLength % 8 === 0;
        }
        ...

I suspect that we don't guarantee that the length is correct (but it might also be something else entirely).
Comment 1 Jiewen Tan 2017-09-20 11:16:44 PDT
(In reply to Ms2ger from comment #0)
> With a diff like
> 
> +PASS Can wrap and unwrap RSA-OAEP private key keys using pkcs8 and AES-KW 
> +PASS Can wrap and unwrap RSA-OAEP private key keys as non-extractable using
> pkcs8 and AES-KW 
> 
> where I've also seen RSA-PSS instead of RSA-OAEP. That is, these tests
> sometimes run, and sometimes don't.
> 
> The tests will run if the following function returns true:
> 
>     function wrappingIsPossible(exportedKey, algorithmName) {
>         if ("byteLength" in exportedKey && algorithmName === "AES-KW") {
>             return exportedKey.byteLength % 8 === 0;
>         }
>         ...
> 
> I suspect that we don't guarantee that the length is correct (but it might
> also be something else entirely).

That seems tree.

Does this sound the same? https://github.com/w3c/web-platform-tests/pull/6102

I have filed a PR long time ago but no reviewers wish to take any actions or maybe I am missing something to motivate them.
Comment 2 Ms2ger (he/him; ⌚ UTC+1/+2) 2017-09-21 00:30:19 PDT
(In reply to Jiewen Tan from comment #1)
> (In reply to Ms2ger from comment #0)
> > With a diff like
> > 
> > +PASS Can wrap and unwrap RSA-OAEP private key keys using pkcs8 and AES-KW 
> > +PASS Can wrap and unwrap RSA-OAEP private key keys as non-extractable using
> > pkcs8 and AES-KW 
> > 
> > where I've also seen RSA-PSS instead of RSA-OAEP. That is, these tests
> > sometimes run, and sometimes don't.
> > 
> > The tests will run if the following function returns true:
> > 
> >     function wrappingIsPossible(exportedKey, algorithmName) {
> >         if ("byteLength" in exportedKey && algorithmName === "AES-KW") {
> >             return exportedKey.byteLength % 8 === 0;
> >         }
> >         ...
> > 
> > I suspect that we don't guarantee that the length is correct (but it might
> > also be something else entirely).
> 
> That seems tree.
> 
> Does this sound the same? https://github.com/w3c/web-platform-tests/pull/6102
> 
> I have filed a PR long time ago but no reviewers wish to take any actions or
> maybe I am missing something to motivate them.

I don't think it's the same, but it seems similar. (If you rebase the PR and ping me there, I can probably merge it.)