Bug 233704
Summary: | support importing compressed EC keys in webcrypto | ||
---|---|---|---|
Product: | WebKit | Reporter: | Filip Skokan <panva.ip> |
Component: | WebKit Misc. | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | a_izquierdogarcia, bfulgham, katherine_cheney, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | Other | ||
Hardware: | All | ||
OS: | All |
Filip Skokan
Steps to reproduce:
// SPKI representation of a P-384 EC key in a compressed form.
const spki = new Uint8Array([48, 70, 48, 16, 6, 7, 42, 134, 72, 206, 61, 2, 1, 6, 5, 43, 129, 4, 0, 34, 3, 50, 0, 2, 251, 203, 124, 105, 238, 28, 96, 87, 155, 231, 163, 52, 19, 72, 120, 217, 197, 197, 191, 53, 213, 82, 218, 182, 60, 1, 64, 57, 126, 209, 76, 239, 99, 125, 119, 32, 146, 92, 68, 105, 158, 163, 14, 114, 135, 76, 114, 251])
crypto.subtle.importKey('spki', spki, { name: 'ECDSA', namedCurve: 'P-384' }, false, ['verify'])
Actual result:
importKey is rejected with DataError: Data provided to an operation does not meet requirements
Expected result:
compressed EC public key SPKI should import as in other browsers (we expect interoperability in this regard)
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Filip Skokan
Likewise, same issue, when using the raw keyFormat
const pub = new Uint8Array([2, 251, 203, 124, 105, 238, 28, 96, 87, 155, 231, 163, 52, 19, 72, 120, 217, 197, 197, 191, 53, 213, 82, 218, 182, 60, 1, 64, 57, 126, 209, 76, 239, 99, 125, 119, 32, 146, 92, 68, 105, 158, 163, 14, 114, 135, 76, 114, 251])
await crypto.subtle.importKey('raw', pub, { name: 'ECDSA', namedCurve: 'P-384' }, false, ['verify'])
importKey is rejected with DataError: Data provided to an operation does not meet requirements
Radar WebKit Bug Importer
<rdar://problem/86211772>
Angela
Pull request: https://github.com/WebKit/WebKit/pull/3406
Alexey Proskuryakov
*** Bug 244005 has been marked as a duplicate of this bug. ***
Alexey Proskuryakov
*** Bug 244032 has been marked as a duplicate of this bug. ***
Alexey Proskuryakov
*** Bug 244083 has been marked as a duplicate of this bug. ***