Pay to public key hash scripts hash the recipients public key for added security.
Is the same done with the public keys that make up part of a multisig script?
https://en.bitcoin.it/wiki/Script doesn't seem to indicate they are.
Bitcoin Stack Exchange is a question and answer site for Bitcoin crypto-currency enthusiasts. It only takes a minute to sign up.Sign up to join this community
Yes and no.
In a bare multisig pubkey script, the public keys are not hashed. For example, a 2-of-3 pubkey script would look like:
2 <pubkey1> <pubkey2> <pubkey3> 3 OP_CHECKMULTISIG
In a multisig pay-to-script-hash (P2SH) script, the whole redeem script---including the public keys---would be hashed. For example, the redeem script would be the same as above, but the actual pubkey script would be:
OP_HASH160 <Hash160(redeemScript)> OP_EQUAL
Almost all multisig transactions on the network currently use P2SH multisig.
As an aside, although there is some hypothetical security increase from hashing public keys in case of a major problem with ECDSA, the main reason for hashing public keys is to create short addresses.
Typically, you will use P2SH (pay to script hash) for multisig transactions, which means the transaction output does not contain the full script (with full public keys), but instead a hash of that script - and the full script is revealed when spending. See BIP16 for more information.
When this is done, you get the same effect: the transaction output does not contain a public key directly.
Note that there is indeed a small security benefit to this (it takes 2^160 steps in theory to reverse the hash function, while it takes 2^128 steps to find a private key for a given public key), but there are larger advantages (like the sender not needing to know the full script, and less data in the database of unspent transaction outputs that every full node maintains).