是否可以(以及如何)与 PGP key 服务器通信,例如 https://pgp.mit.edu或http://keyserver.pgp.com或私钥服务器:上传 key 、搜索 key 、下载 key 等 - 在 Java 上使用 Bouncy CaSTLe OpenPGP API?
Java 上有开源的 PGP key 服务器实现吗?
最佳答案
我不知道 Bouncy CaSTLe 支持 key 服务器通信,但不认为这是一个问题。
用于 key 服务器通信的最广泛使用的协议(protocol)是 HKP ,基于 HTTP 构建。作为客户端实现协议(protocol)实际上并不需要任何大型库,对于基本操作,一些简单的 HTTP 请求就足够了。
例如,specification proposal lists following requests :
Search for all keys containing the string "dshaw":
http://keys.example.com:11371/pks/lookup?search=dshaw&op=index
Get key 0x99242560 (32-bit key ID):
http://keys.example.com:11371/pks/lookup?op=get&search=0x99242560
上传新 key 非常简单,如 sending an HTTP POST request :
Keyserver submissions are done via a HTTP POST URL. Specifically, the abs_path (see [2], section 3.2) is set to "/pks/add", and the key data is provided via HTTP POST as specified in [2], section 8.3, and [3], section 8.2.3. [...]
关于java - PGP key 服务器和 Bouncy CaSTLe OpenPGP API Java,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37117238/