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
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