[Webkit-unassigned] [Bug 233705] New: PKCS8 EC private keys without the public key component cannot be imported with SubtleCrypto.importKey

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Dec 1 08:12:31 PST 2021


https://bugs.webkit.org/show_bug.cgi?id=233705

            Bug ID: 233705
           Summary: PKCS8 EC private keys without the public key component
                    cannot be imported with SubtleCrypto.importKey
           Product: WebKit
           Version: Other
          Hardware: All
                OS: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKit Misc.
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: panva.ip at gmail.com

Steps to reproduce:

// PKCS8 representation of a private P-384 EC key with the public key omitted
const pkcs8 = new Uint8Array([48, 78, 2, 1, 0, 48, 16, 6, 7, 42, 134, 72, 206, 61, 2, 1, 6, 5, 43, 129, 4, 0, 34, 4, 55, 48, 53, 2, 1, 1, 4, 48, 32, 52, 118, 9, 96, 116, 119, 172, 168, 251, 251, 197, 230, 33, 132, 85, 243, 25, 150, 105, 121, 46, 248, 180, 102, 250, 168, 123, 220, 103, 121, 129, 68, 200, 72, 221, 3, 102, 30, 237, 90, 198, 36, 97, 52, 12, 234, 150])

crypto.subtle.importKey('pkcs8', pkcs8, { name: 'ECDSA', namedCurve: 'P-384' }, false, ['sign'])

Actual result:

importKey is rejected with DataError: Data provided to an operation does not meet requirements

Expected result:
EC private key PKCS8 without the public key component should import as in other browsers and Web Cryptography API implementations (we expect interoperability in this regard)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20211201/8d5ca0dd/attachment-0001.htm>


More information about the webkit-unassigned mailing list