Hm, it looks like this one slipped through the cracks and that pastebay is
no longer active.

I think what you're asking is how you know if the sender email address
matches the email address of the public key you're checking against? You
could look up the public key(s) associated with the given email address and
then check the signature. Of course, verifying the signature depends on you
previously having the public key.


On Wed, Jun 19, 2013 at 5:13 PM, "Rémi Zoeten, de" <[email protected]>wrote:

> Hy,
>
> I am started on a project, I pasted the code here:
> http://www.pastebay.net/1241717
>
> Basically I made 3 wrappers/functions: pgpGenerateKeys(user_id, length),
>  pgpEncrypt(message, publicKey, privateKey) and pgpDecrypt(message,
> privateKey).
> I am now stuck on pgpVerifySignature(message, privateKey, publicKey).
> message has been send to me, privateKey is my key, publicKey is the key
> from the sender. I want to verify that the sender has the private key
> associated with his public key, much like pgpEncrypt(message, publicKey,
> privateKey) is supposed to encrypt and sign a message with my private key.
> How should I do this? I am having trouble making sense of the documentation.
> Also, I don't think I need to store much data or keyrings per-se. I just
> need these four functions.
>
> Thank you in advance.
> Rémi.
> _______________________________________________
>
> http://openpgpjs.org
>
_______________________________________________

http://openpgpjs.org

Reply via email to