I would like to be able to check which (inner) symmetric algorithm was used to encrypt a file with GPG using a public key.
Somewhere I've read this can be done with --list-packets
, so I tried
$ gpg --list-packets encrypted_file.asc
gpg: encrypted with 256-Bit ECDH key, ID 0865135E90D1AF38, created 2020-03-20
"First Last <[email protected]>"
# off=0 ctb=84 tag=1 hlen=2 plen=94
:pubkey enc packet: version 3, algo 18, keyid 0865135E90D1AF38
data: [263 bits]
data: [392 bits]
# off=96 ctb=d2 tag=18 hlen=3 plen=1965 new-ctb
:encrypted data packet:
length: 1965
mdc_method: 2
# off=118 ctb=a3 tag=8 hlen=1 plen=0 indeterminate
:compressed packet: algo=1
# off=120 ctb=cb tag=11 hlen=2 plen=0 partial new-ctb
:literal data packet:
mode b (62), created 0, name="_CONSOLE",
raw data: unknown length
I thought the symmetric encryption algorithm was encoded in mdc_method
, but whatever algorithm I use to encrypt, it always displays 2
there. So this doesn't seem to be the correct approach.
How can I find out the symmetric algorithm?