Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: RocketSingh on August 05, 2016, 05:59:25 PM



Title: Is it possible to sign a message from a multisig address?
Post by: RocketSingh on August 05, 2016, 05:59:25 PM
If yes, how?


Title: Re: Is it possible to sign a message from a multisig address?
Post by: achow101 on August 05, 2016, 06:06:09 PM
No it is not possible.

You can sign a message with multiple private keys and thus have multiple signatures, as with a multisig address. However, that would not map to a multisig address but rather three signatures with each one mapping to the three public keys used in the multisig address.


Title: Re: Is it possible to sign a message from a multisig address?
Post by: RocketSingh on August 05, 2016, 06:19:06 PM
No it is not possible.

You can sign a message with multiple private keys and thus have multiple signatures, as with a multisig address. However, that would not map to a multisig address but rather three signatures with each one mapping to the three public keys used in the multisig address.
Ok. But, then how come the signing takes place for an outgoing Tx from a multisig address?


Title: Re: Is it possible to sign a message from a multisig address?
Post by: achow101 on August 05, 2016, 06:24:26 PM
No it is not possible.

You can sign a message with multiple private keys and thus have multiple signatures, as with a multisig address. However, that would not map to a multisig address but rather three signatures with each one mapping to the three public keys used in the multisig address.
Ok. But, then how come the signing takes place for an outgoing Tx from a multisig address?
Because it isn't the address that signs the transaction, but rather the public keys of the address that sign the transaction. The reason the address can be identified is because the redeemScript of the multisig address is included in the input. The redeemScript is what makes the address, and it includes some more stuff other than the public keys.


Title: Re: Is it possible to sign a message from a multisig address?
Post by: Abdussamad on August 08, 2016, 07:08:41 AM
Because it isn't the address that signs the transaction, but rather the public keys of the address that sign the transaction. The reason the address can be identified is because the redeemScript of the multisig address is included in the input. The redeemScript is what makes the address, and it includes some more stuff other than the public keys.

Private keys are used to sign transactions not public keys.


Title: Re: Is it possible to sign a message from a multisig address?
Post by: DannyHamilton on August 08, 2016, 11:38:25 AM
Ok. But, then how come the signing takes place for an outgoing Tx from a multisig address?

Because there are no bitcoin addresses at the technical level in the transactions and blockchain.

Addresses are just an abstraction that our wallets present to us humans to make it easier to use the protocol.

It is much easier to say, "please send 2 bitcoins to address 13qvw..."
Than to say, "please create a transaction that has an output with a value of 200000000 and a script that encumbers the output with a requirement to provide an ECDSA signature of "the transaction that spends the output" where that signature was generated with the private key that is associated with the public key that hashes (through double SHA256 and then a single RIPEMD160) to a hexadecimal value of 0x7A9F88..."

The wallet uses the address as an indication of which script (essentially a small computer program) to create and stores that script in the transaction (which eventually gets stored in the blockchain).  The script encumbers the transaction output with a requirement that must be met in order to use the output to supply value as an input to a new transaction.

In the case of a P2PKH address (an address that starts with a '1'), the script encumbers the output with a requirement to supply a valid signature generated with the private key that is associated with the public key that hashes to a given value.

In the case of a P2SH address (an address that starts with a '3'), the script encumbers the output with a requirement to supply BOTH a script that hashes to the given value AND the necessary data for the script to evaluate successfully (in the case of a multisig script, that "necessary data" is one or more valid signatures from specific private keys as required by the script)