PeculiarVentures/webcrypto

`oct` JWK should not require alg during importKey

panva opened this issue · 3 comments

panva commented

The HmacCryptoKey and AesCryptoKey interfaces wrongfully require the alg attribute to be present when importing keyData in jwk key format.

Every other webcrypto runtime allows these to omitted and in order to have interoperable behaviour between runtimes it is in fact better to remove the alg attribute.

Looks like Chrome compares key_ops and alg with incoming parameters if those fields present in JWK
image

I'll fix it

@panva The new version @peculiar/webcrypto@1.2.1 has been published

panva commented

@microshine confirmed, thank you!