在 Javascript 中检查 GPG 签名
已经有一个解决方案用于在JavaScript中提取公钥和加密消息,但我不知道如何解密消息或检查签名。有什么想法吗?
据我所知,已经有一个用于实际解密消息的函数,现在只需提取私钥即可对消息进行签名。如果我错了请纠正我,但是看起来第1步是解密密钥字符串,然后获取MPI(多精度整数),然后将其分离为素数和解密器,可以将其传递给解密功能。
There is already a solution for extracting public keys and encrypting messages in JavaScript, but I cannot figure out how to decrypt messages or check signatures. Any ideas?
From what I can see, there is already a function for actually decrypting the message, now it's just a matter of extracting a private key so messages can be signed. Correct me if I'm wrong, but it looks like step 1 is to decrypt the secret key string, then get the MPI (multi-precision integer), then separate it into the prime numbers and decryptor, which can be passed to the decryption function.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我编写了一个在浏览器中使用的通用 GPG/PGP NPAPI 库,该库具有几乎所有内容的公共方法,包括解密和验证。
插件源位于此处: https://github.com/kylehuff/webpg-npapi
该插件目前在 Chrome 的 WebPG 扩展中使用,位于:https://chrome.google。 com/webstore/detail/hhaopbphlojhnmbomffjcbnllcenbnih
扩展源位于此处:https://github。 com/kylehuff/webpg-chrome
两者都是跨平台的 Windows、Linux 和 OSX。
I wrote a generic GPG/PGP NPAPI library for use in the browser that has public methods for most everything, including decryption and verification.
The plugin source is located here: https://github.com/kylehuff/webpg-npapi
The plugin is currently in use in the WebPG extension for chrome, located here: https://chrome.google.com/webstore/detail/hhaopbphlojhnmbomffjcbnllcenbnih
And the extensions source is locate here: https://github.com/kylehuff/webpg-chrome
Both are cross-platform for Windows, Linux and OSX.
有一个 Chrome 扩展程序 https://chrome.google.com/webstore/detail/pinhikmcljjkhnpjmpfkhjgiaacajajm虽然我还不确定它是否可以在 Windows 上运行——我现在正在亲自尝试。
There's a chrome extension https://chrome.google.com/webstore/detail/pinhikmcljjkhnpjmpfkhjgiaacajajm though I'm not sure if it works on Windows yet -- I'm trying it out myself right now.