I've been reading this page about subkeys and I was surprised to read that "GnuPG actually uses a signing-only key as the master key". I can understand how this was the case when DSA was the default (at least for GPG) for the master key, since DSA is a signing algorithm. But now, RSA is standard and RSA if I understand correctly RSA can both encrypt and sign. If I publish my public key (which I guess includes my subkeys??), how does the client know which key, master or subkey, which may be both RSA, to use to encrypt their message? For that matter, what if I have multiple RSA and el-gamal master and subkeys?
In the OpenPGP format, public keys are distributed with signatures; every key is signed by another key. A "master" key is a key which is signed by itself. The signature includes some flags which tell what the signed key may be used for; these are described in section 184.108.40.206. Thus, a key intended for signatures only will be distributed with the flag "