I maintain web forum software, which is accessible via NNTP and e-mail (as mailing lists). Since NNTP by design allows anyone to spoof their e-mail address, message signing can be used instead to verify identities of posters.

Thus, I would like to integrate optional PGP message signing and verification into the web UI, in a way that's reasonably secure but doesn't get in your way. Verification probably wouldn't be too difficult - the key could be looked up on keyservers, and perhaps the web UI could display the linked keybase.io identities once that opens up.

The more difficult problem is signing the message. Essentially, the workflow would need to be somewhat along these lines:

  1. The user composes the message in the web UI.
  2. Once the user is ready to post the message, it is compiled into an RFC-850 message, then somehow signed.
  3. The signed message is stored and e.g. sent to the mailing list subscribers.

I can think of a few ways to sign the message:

  • Have the user upload their private key.
    • This is out, of course.
  • Use a JavaScript PGP implementation and store the user's private key in localStorage.
    • An XSS vulnerability in the forum software would mean compromising the private key.
  • Have the forum software maintain its own key pair for each user (encrypted with their login password), which the user then somehow links to their identity.
    • I'm not sure about the details for this idea. The user should probably be able to revoke the key somehow too.
  • Present the user with the text that they would need to copy from their web browser, sign on their machine, then paste the signed message back into the web browser.
    • Having to do this for every forum post will quickly become tiresome.
  • Write browser extensions to sign the message.
    • I don't look forward to maintaining multiple browser extensions for this purpose.
  • Write a signing service, which runs as a web server on localhost. Thus, the web forum software would e.g. POST to http://localhost:8081/, where the signing service would display the message and allow the user confirm that this is the message they wish to sign, which would then POST the signed message to a callback URL.
    • Perhaps something like this already exists?

Is there a better way?

  • "encrypted with their login password" Which of course means that you lose the ability to do password resets while maintaining the key. This may or may not be a problem. (I'm assuming, of course, that you would do proper key stretching of the password.)
    – user
    Feb 24, 2017 at 7:17
  • Yep, I meant the usual technique of using an encryption key (that is not visible to the user), which is itself encrypted with their login password. Feb 24, 2017 at 11:08

1 Answer 1


I've discovered https://www.mailvelope.com/, looks interesting.

It's a browser extension which keeps keys on the client. Although primarily designed for encrypting messages on webmail, it also supports signing. It also seems to expose an API, though I haven't found anything in the API pertaining to message signing in particular.

  • 1
    Is it an answer to your question? Or is it promo for the extension? Because it looks much like the latter.
    – techraf
    Mar 24, 2016 at 5:33
  • I'm not sure what you're asking. I found the extension an hour after posting my question, before which I'd have never heard of it (I may not have even posted the question otherwise). I suppose that makes it an answer to my question, but I'm interested to know what other approaches there are to solve this problem. Mar 24, 2016 at 12:54
  • I'm just telling that SE format is not very effective in recording and retaining good intentions. Taken literally this answer has characteristics of spam. See security.stackexchange.com/help/promotion.
    – techraf
    Mar 24, 2016 at 13:01
  • 1
    I have no affiliations to declare except the web forum software I've mentioned in the question (github.com/CyberShadow/DFeed). I am not at all affiliated with the extension, the existence of which I've only discovered today, after posting the question. I'm an open-source developer, and maintain a number of open-source projects, however said extension is not one of them. I'm not really sure what else you want me to say or do. Mar 24, 2016 at 13:05
  • I don't want you to tell anything. You could edit your answer to meet the criteria "A good answer should at minimum allow the person whose question you're answering to solve his problem" ("seems to", "though I haven't found" does not, imho) or you could not care and safely ignore my comments. You have to live with the fact that I have my opinion about an answer written in this form and I expressed this opinion. I have not written that you might be affiliated or anything, I said that written as written it has characteristics of a spam message.
    – techraf
    Mar 24, 2016 at 13:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .