cipher used when both --encrypt and --symmetric is specified

Peter Lebbing peter at
Fri Feb 26 10:55:46 CET 2016

On 25/02/16 15:42, Martin Ilchev wrote:
> I am looking for some help to figure out what cipher is used for
> symmetric encryption when both pass phrase and public keys are used. I
> have configured my gpg.conf with my preferred cipher algorithms as follows:
> personal-cipher-preferences AES256 TWOFISH CAMELLIA256 AES192

Those preferences are not what is used when encrypting to your own key.
To see those do:

$ gpg2 --edit-key {KEYID}
> showpref

To change them do:

> setpref <preference list>

Note that this refers to all types of preferences, not just ciphers.

To set a default preference list for setpref, include in your gpg.conf:

default-preference-list <preference list>

I'd suggest a bit of browsing through the man page with a search term of
"preference" :). Note that these key preferences are part of your public
key, and if you want others to respect them as well, they need to
refresh your public key with the new preferences if you change them.

> 2. Symmetrically encrypt and also encrypt for my own public key:
> gpg2 -vvv --symmetric --encrypt --sign -r 0x1234567890ABCDEF somefile
> decrypting the file shows that the cipher used is CAST5

It would be helpful to know what your key preferences are, since it
might just be the most preferred algorithm from the intersection of
personal preferences and key preferences.



I use the GNU Privacy Guard (GnuPG) in combination with Enigmail.
You can send me encrypted mail if you want some privacy.
My key is available at <>

More information about the Gnupg-users mailing list