gpg签名似乎"删除"完整性

时间:2015-06-19 00:53:56

标签: encryption gnupg integrity

谷歌没有回答这个问题,因为Google的结果充斥着类似于我的问题,但意义却截然不同。我之所以提到这一点,是因为我已经知道在使用CAST5(默认值)时,有关邮件完整性的投诉存在常见问题。我只想清楚我不是在询问CAST5,我问的是关于AES256的问题(总是AES256,我的默认设置为AES256),但我对有符号和无符号之间的差异感到好奇。好的,所以,在这里:

将gpg与AES256一起使用时,消息完整性已打开"默认情况下,当使用AES256对称加密时,我不会对邮件完整性提出任何建议。例如,假设我有这个文件" test.txt":

 $ ls
test.txt
 $ cat test.txt
blah blah blah

我对称加密:

 $ gpg --symmetric ./test.txt        <---[Symmetric AES256]
 $ ls
test.txt  test.txt.gpg
 $ gpg -d ./test.txt.gpg
gpg: AES256 encrypted data
gpg: encrypted with 1 passphrase     <---[No complaint about integrity]
blah blah blah

但是,如果我添加签名,那么gpg会抱怨消息的完整性,即使我仍在使用AES256。像这样:

 $ gpg --symmetric --sign ./test.txt

You need a passphrase to unlock the secret key for
user: "hft"
4096-bit RSA key

gpg: AES256 encryption will be used

现在,当我解密时,我会收到关于诚信的投诉:

 $ gpg -d ./test.txt.gpg
gpg: AES256 encrypted data
gpg: encrypted with 1 passphrase
blah blah blah
gpg: Signature made Thu, Jun 18, 2015
gpg: Good signature from "hft"
gpg: WARNING: message was not integrity protected

我知道我可以强迫投诉废除我使用--force-mdc这样:

 $ gpg --symmetric --sign --force-mdc ./test.txt

但是,我的问题是:gpg真的&#34;关闭&#34;当我选择使用私钥对消息进行签名时,AES256 MACing的完整性?即使它已经打开了#34;对于我没有签名的AES256?或者这只是一个错误?关闭完整性MAC似乎是荒谬的,因为我使用非对称密钥签名。

0 个答案:

没有答案