choice of encryption algorithms

David Shaw dshaw at
Wed Jun 20 19:33:29 CEST 2012

On Jun 20, 2012, at 1:10 PM, John wrote:

> Hello.
> When someone uses my public key to encrypt a message to me, what prevents them from trying to use an encryption algorithm of his choice. In other words, does the public key itself limit the options available to the person sending the message? Thanks.

Yes, it does.  The public key contains a list of all algorithms that you can (or are willing to) accept (you can see your own list with --edit-key and the "showpref" command).  By default, the sending GPG consults this list when picking an algorithm to ensure it does not pick one that you can't/won't handle.

However, note that the sender (if they choose to), can override this default and pick whatever they like.  This is not recommended as it can result in a message that you, the recipient, can't read, but senders do have that power.


More information about the Gnupg-users mailing list