mdn / kuma

The project that powers MDN.
https://developer.mozilla.org
Mozilla Public License 2.0
1.93k stars 679 forks source link

window.crypto.subtle.importKey, usage sign, and(lost) decrypt #5965

Closed Red-Owl closed 5 years ago

Red-Owl commented 5 years ago

var cucco = window.crypto.subtle.importKey( "pkcs8", binaryDer, { name: "RSA-PSS", modulusLength: 2048, publicExponent: new Uint8Array([1, 0, 1]), hash: "SHA-256", }, true, ["sign"] <------ (add decrypt) );

if import private key is not possible to decrypt a message.

the rsa have a 2 usage of key encrypt by private key and decrypt in public key (yes decrypt in public ) encrypt by public key and decrypt in private key

is not possible to use key small (....512, 1024) to encrypt message

escattone commented 5 years ago

I'm not sure what group you intended this message for, but the issues in this repo are for MDN Web Docs.