user11179: In the bitcoin-qt client you can sign and verify messages using only the public address. Since the public address is a RIPEMD160 hash how is it possible that I can verify a signature since I do not have access to the public key?

user9301: When signing a message (as opposed to signing a transaction), the signature contains additional information needed to recover the public key using the signature and the signed message.  The recovered public key is then hashed and the result compared to the address.  If they match, the message was signed by that address.

user1307: It is possible to recover the public key from the signed message and the signature. This public key can than be hashed and compared to the hashed public key you already have.
So you don't really "verify the signature with the public key*, because you don't need to have it beforehand to verify the signature. What you do is calculate the public key that corresponds to the private key with which the signature has been created.

11179: <p>In the bitcoin-qt client you can sign and verify messages using only the public address. Since the public address is a RIPEMD160 hash how is it possible that I can verify a signature since I do not have access to the public key?</p>
 9301: <p>When signing a message (as opposed to signing a transaction), the signature contains additional information needed to recover the public key using the signature and the signed message.  The recovered public key is then hashed and the result compared to the address.  If they match, the message was signed by that address.</p>
 1307: <p>It is possible to recover the public key from the signed message and the signature. This public key can than be hashed and compared to the hashed public key you already have.</p>

<p>So you don't really "verify the signature <em>with</em> the public key*, because you don't need to have it beforehand to verify the signature. What you do is calculate the public key that corresponds to the private key with which the signature has been created.</p>
