ECDH JWK imports should not be checking the JWK "alg" parameter
Categories
(Core :: DOM: Web Crypto, defect, P5)
Tracking
()
People
(Reporter: panva.ip, Unassigned)
Details
Steps to reproduce:
const publicJwk = {
kty: 'EC',
crv: 'P-256',
alg: 'THIS CAN BE ANYTHING',
x: 'Ze2loSV3wrroKUN_4zhwGhCqo3Xhu1td4QjeQ5wIVR0',
y: 'HlLtdXARY_f55A3fnzQbPcm6hgr34Mp8p-nuzQCE0Zw',
}
await crypto.subtle.importKey('jwk', publicJwk, { name: 'ECDH', namedCurve: 'P-256' }, true, [])
Actual results:
importKey is rejected with "Data provided to an operation does not meet requirements"
Expected results:
The key should successfully import, ECDH JWK key import steps do not have a step for checking the JWK alg. This is a problem for when ECDH is used as a step in fully specified JOSE Algorithms such as the upcoming HPKE-Base-P256-SHA256-AES128GCM and other HPKE based algorithms, or even the existing ones such as ECDH-ES or ECDH-ES+A128KW
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Comment 1•1 year ago
|
||
The severity field is not set for this bug.
:keeler, could you have a look please?
For more information, please visit BugBot documentation.
Updated•1 year ago
|
Updated•4 months ago
|
Description
•