On 19 Oct 2007 13:17:53 -0700, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
>
> I know that you suggest PK11_PubEncryptRaw but I am trying to
> decrypt.

You are trying to verify an RSA signature (by decrypting it with the
public key).

RSA public and private keys can be used symetrically.  The
mathematical operation is the same: modular exponentiation
(raise the input to a power, and then take the modulo).

PK11_PubEncryptRaw performs the mathematical operation
you need.  NSS doesn't have a variant of PK11_VerifyRecover that omits
PKCS #1 RSA padding.  So you need to use PK11_PubEncryptRaw.
I'm sorry this is confusing.

If the RSA signature you need to verify actually has
PKCS #1 RSA padding, then you can use PK11_VerifyRecover
or even PK11_Verify to replace the code you need to do after
RSA_public_decrypt.

Wan-Teh
_______________________________________________
dev-tech-crypto mailing list
dev-tech-crypto@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-crypto

Reply via email to