No support for modulusLength 3072 bit
danhnn opened this issue · 3 comments
danhnn commented
Currently, we want to use 3072-bit for RSA key's modulusLength but as I checked the current source code:
webcrypto/src/mechs/rsa/rsa_es.ts
Line 51 in a1760f2
We only support 1024, 2048, and 4096 modulusLength. Could I ask that why we don't support 3072-bit value here?
microshine commented
microshine commented
@danhnn I've fixed and published @peculiar/webcrypto@1.2.3
.
const alg = {
name: "RSASSA-PKCS1-v1_5",
hash: "SHA-256",
publicExponent: new Uint8Array([1,0,1]),
modulusLength: 3072,
};
const keys = await crypto.subtle.generateKey(alg, false, ["sign", "verify"]);
Please try it
danhnn commented
Thanks, @microshine!