When trying to import RSA-OAEP private key with hash parameter == SHA-256, the result uses SHA-1 instead. IMPORTING KEY: Uint8Array [123, 34, 97, 108, 103, 34, 58, 34, 82, 83, …] Object hash: {name: "SHA-256"} modulusLength: 2048 name: "RSA-OAEP" publicExponent: Uint8Array [1, 0, 1] IMPORTED KEY: algorithm: {name: "RSA-OAEP", modulusLength: 2048, publicExponent: Uint8Array [1, 0, 1], hash: {name: "SHA-1"}} extractable: true type: "private" usages: ["decrypt"]
Yes, the older version of WebCrypto spec that WebKit currently implements didn't take a hash when importing, so SHA-256 here is just ignored. We also don't support the RSA-OAEP-256 JWK algorithm yet.
<rdar://problem/27311678>
I keep scanning the Safari TP release notes in hopes that I'll see some progress on this. Safari is still unsupported for many 1Password customers who created accounts last year using Chrome or Firefox, which support RSA-OAEP-256.
The bug is resolved by Bug 164446.