1

我正在阅读 RFC4880 以尝试使用http://phpseclib.sourceforge.net/生成 OpenPGP 子集(RSA 签名)的实现。我已解析出公钥和压缩文字签名数据包。我可以提取 n 和 e 并将它们提供给 Crypt_RSA 以构造一个验证器。我告诉它我正在使用 sha256。然后它需要一个“消息”和一个“签名”参数。我从签名包中获取签名数据没问题。我的问题是:什么是“信息”?根据第 5.2.4 节,它是文字数据包(s?)(它们的主体还是整个包?)和“散列”子包的某种组合。我是否只是按照它们出现的顺序将所有数据包和散列数据包连接在一起?

4

1 回答 1

2

The hash is of the literal data packet contents (not the whole body, just the data), followed by the "trailer" (literal bytes from signature packet up to and including hashed subpackets), followed by { 0x44, 0xff, trailer_length_as_4_octet_network_order_unsigned_integer }

于 2010-04-01T16:28:58.973 回答