英文:
OpenPGP Public Key Authentication in Go
问题
我正在开发一个用于在Hyperboria中使用的Go点对点聊天服务,它作为一个网状网络运行。相对于我的问题,这并不是很重要:
我需要使用用户GPG密钥环中存在的OpenPGP密钥来加密和解密消息。我需要能够发现公钥和私钥,检查给定的密钥ID是否存在,并使用它们来加密或解密[]byte
(在通过TCP
连接之前或之后)。
是否有一个我可以查看的包来完成这个任务?
英文:
I'm working on a Go peer-to-peer chat service to be used in Hyperboria, which operates as a meshnet. That is relatively unimportant compared to my problem:
I need to use OpenPGP keys existent in user's GPG keyrings in order to encrypt and decrypt messages. I need to be able to discover public and private keys, check that given key IDs are present, and use them to either encrypt or decrypt []byte
, (either before or after it goes across a TCP
connection)
Is there a package that I could look into to do this?
答案1
得分: 2
你应该查看go.crypto包,特别是其中的http://code.google.com/p/go/source/browse/?repo=crypto#hg%2Fopenpgp
这个包最有可能有你要找的东西。
英文:
You should check out the go.crypto packages particularly the ones in: http://code.google.com/p/go/source/browse/?repo=crypto#hg%2Fopenpgp
It's the most likely to have what you are looking for.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论