
我正在推出 Kleopatra,並想驗證正在使用的密碼。在 Kleopatra 中,在「GnuPG 系統 > S/MIME > 使用密碼演算法名稱」下,此選項設定為 AES。這是用於加密的密碼嗎?我如何驗證這一點?
我透過 Kleopatra 加密了一個文件,並將其發送到一個 Linux 盒子,我在其中運行了密文pgpdump
。不確定我在看什麼。我期待在這裡的某個地方看到“AES”。
Old: Public-Key Encrypted Session Key Packet(tag 1)(268 bytes)
New version(3)
Key ID - 0xxxxxxxxxxxx95
Pub alg - RSA Encrypt or Sign(pub 1)
RSA m^e mod n(2045 bits) - ...
-> m = sym alg(1 byte) + checksum(2 bytes) + PKCS-1 block type 02
Old: Public-Key Encrypted Session Key Packet(tag 1)(268 bytes)
New version(3)
Key ID - 0xxxxxxxxxxxx4E
Pub alg - RSA Encrypt or Sign(pub 1)
RSA m^e mod n(2046 bits) - ...
-> m = sym alg(1 byte) + checksum(2 bytes) + PKCS-1 block type 02
New: Symmetrically Encrypted and MDC Packet(tag 18)(512 bytes) partial start
Ver 1
Encrypted data [sym alg is specified in pub-key encrypted session key]
(plain text + MDC SHA1(20 bytes))
New: (54 bytes) partial end
我嘗試過gnupg --list-packets file.gpg
沒有任何我認為可以表明密碼的東西,但這可能是我的無知:
$ gpg --list-packets file.gpg
:pubkey enc packet: version 3, algo 1, keyid xxxxxxxx95
data: [2045 bits]
:pubkey enc packet: version 3, algo 1, keyid xxxxxxxx4E
data: [2046 bits]
:encrypted data packet:
length: unknown
mdc_method: 2
gpg: encrypted with 2048-bit RSA key, ID xxxxxx4E, created 2018-11-28
"xxxxxx <xxxxxx@xxxxx>"
gpg: encrypted with 2048-bit RSA key, ID xxxxxx95, created 2017-07-13
"xxxxxxxxx <xxxxxx@xxxxx>"
gpg: decryption failed: secret key not available
我還提取了 file.gpg 的前 16 個位元組。我在某處讀到第四個位元組應該09
用於 AES,但情況似乎並非如此:
$ od -t x1 file.gpg | head -1
0000000 85 01 0c 03 19 c3 9b 0a b3 f1 23 95 01 07 fd 15
答案1
在 GnuPG 中,在列出的演算法下,例如以下 的輸出gpg --version
,您可以看到您的建置支援的分組密碼。
Supported algorithms:
Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2
與 Camellia 家族不同,AES-128 簡單地列為 AES。這可能是由於 AES-128 的普遍存在所致;它通常被稱為 AES,因為目前大多數應用程式並沒有從使用 AES-192 或 AES-256 中獲得太多安全方面的好處。
版主:這篇文章應該發佈在超級使用者上,而不是最初發布的密碼學。 OP是新用戶,請讓他們知道Cryptography Stack Exchange是用於討論密碼學數學和軟體開發而不是軟體使用。