Bitcoin Forum
June 12, 2019, 11:00:02 PM *
News: Latest Bitcoin Core release: 0.18.0 [Torrent] (New!)
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [Question] Multisig for an organisation  (Read 139 times)
thc2008
Newbie
*
Offline Offline

Activity: 2
Merit: 4


View Profile
March 25, 2019, 10:20:34 AM
Merited by bones261 (2), ETFbitcoin (1), HeRetiK (1)
 #1

Hello,

I am currently thinking about implementing a multisignature scheme for an organisation and I would greatly appreciate any help regarding the following two topics:

A- Ex-post accountability
Assuming a signed transaction has been broadcast to the network and that I know the redeem script and all signatory public keys, can I determine which public keys were signatories of the transaction?

B- Signatory groups
Is there a way to implement a signing scheme such as (key1 or key 2 or key 3) AND (key 4 or key 5) AND (key 6 or key 7)

the idea would be to have a scheme such as (Trader 1 or Trader 2 or Trader 3) AND (Accountant 1 or Accountant 2) AND (BOSS 1 or BOSS 2)

I indeed read that OP_AND and OP_OR have been disabled.


Thank you,
PLAY NOW
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1560380402
Hero Member
*
Offline Offline

Posts: 1560380402

View Profile Personal Message (Offline)

Ignore
1560380402
Reply with quote  #2

1560380402
Report to moderator
darosior
Full Member
***
Offline Offline

Activity: 170
Merit: 184



View Profile WWW
March 25, 2019, 12:41:29 PM
Merited by OgNasty (1), ETFbitcoin (1)
 #2

Hello,

I am currently thinking about implementing a multisignature scheme for an organisation and I would greatly appreciate any help regarding the following two topics:

A- Ex-post accountability
Assuming a signed transaction has been broadcast to the network and that I know the redeem script and all signatory public keys, can I determine which public keys were signatories of the transaction?

B- Signatory groups
Is there a way to implement a signing scheme such as (key1 or key 2 or key 3) AND (key 4 or key 5) AND (key 6 or key 7)

the idea would be to have a scheme such as (Trader 1 or Trader 2 or Trader 3) AND (Accountant 1 or Accountant 2) AND (BOSS 1 or BOSS 2)

I indeed read that OP_AND and OP_OR have been disabled.


Thank you,

Hi,

A- Yes. The public key used to redeeem the funds are in the transaction (more precisely the signatures are in the input of the transaction that redeem the funds).
B- Yes. You can use a smart contract in Script.

Github profile ~ Crypto Lyon (french community)  ~ GPG key fingerprint : E13F C145 CD3F 430 ~ LN public key : 03678b4f041fbfbeebcafc076469df75decf81da20a53bd490172e83ce532df1fa
Tutorials/posts : Address from private keyBitcoin smart contracts ~ Setup a Bitcoin node ~ Raw P2PKH transaction in Python ~ P2SH ~ 51% attack
ETFbitcoin
Legendary
*
Offline Offline

Activity: 1666
Merit: 1791

Use SegWit and enjoy lower fees.


View Profile WWW
March 26, 2019, 04:27:57 PM
Merited by bones261 (2), thc2008 (1)
 #3

I indeed read that OP_AND and OP_OR have been disabled.

And that mean script size for multi-sig for you is big. You'd need 12 OP_CHECKMULTISIGVERIFY, unless you could think ways with shorter logic. Roughly it should look like this.

Code:
OP_IF
    0 <Sig. 1> <Sig. 4> <Sig. 6> 3 <Pub. Key 1> <Pub. Key 4> <Pub. Key 6> 3 OP_CHECKMULTISIGVERIFY
OP_IF
    0 <Sig. 1> <Sig. 4> <Sig. 7> 3 <Pub. Key 1> <Pub. Key 4> <Pub. Key 7> 3 OP_CHECKMULTISIGVERIFY
OP_IF
    0 <Sig. 1> <Sig. 5> <Sig. 6> 3 <Pub. Key 1> <Pub. Key 5> <Pub. Key 6> 3 OP_CHECKMULTISIGVERIFY
OP_IF
    0 <Sig. 1> <Sig. 5> <Sig. 7> 3 <Pub. Key 1> <Pub. Key 5> <Pub. Key 7> 3 OP_CHECKMULTISIGVERIFY
OP_IF
    0 <Sig. 2> <Sig. 4> <Sig. 6> 3 <Pub. Key 2> <Pub. Key 4> <Pub. Key 6> 3 OP_CHECKMULTISIGVERIFY
OP_IF
    0 <Sig. 2> <Sig. 4> <Sig. 7> 3 <Pub. Key 2> <Pub. Key 4> <Pub. Key 7> 3 OP_CHECKMULTISIGVERIFY
OP_IF
    0 <Sig. 2> <Sig. 5> <Sig. 6> 3 <Pub. Key 2> <Pub. Key 5> <Pub. Key 6> 3 OP_CHECKMULTISIGVERIFY
OP_IF
    0 <Sig. 2> <Sig. 5> <Sig. 7> 3 <Pub. Key 2> <Pub. Key 5> <Pub. Key 7> 3 OP_CHECKMULTISIGVERIFY
OP_IF
    0 <Sig. 3> <Sig. 4> <Sig. 6> 3 <Pub. Key 3> <Pub. Key 4> <Pub. Key 6> 3 OP_CHECKMULTISIGVERIFY
OP_IF
    0 <Sig. 3> <Sig. 4> <Sig. 7> 3 <Pub. Key 3> <Pub. Key 4> <Pub. Key 7> 3 OP_CHECKMULTISIGVERIFY
OP_IF
    0 <Sig. 3> <Sig. 5> <Sig. 6> 3 <Pub. Key 3> <Pub. Key 5> <Pub. Key 6> 3 OP_CHECKMULTISIGVERIFY
OP_ELSE
    0 <Sig. 3> <Sig. 5> <Sig. 7> 3 <Pub. Key 3> <Pub. Key 5> <Pub. Key 7> 3 OP_CHECKMULTISIGVERIFY
OP_ENDIF

Abdussamad
Legendary
*
Offline Offline

Activity: 2128
Merit: 1148



View Profile WWW
March 27, 2019, 04:06:55 AM
 #4

There are no readymade solutions for either a or b. You're going to have to hire a developer to create a suitable wallet for you. So while it is possible there is no easy way to do it yet.

thc2008
Newbie
*
Offline Offline

Activity: 2
Merit: 4


View Profile
March 28, 2019, 03:20:21 PM
 #5

Thank you very much for your kind help


Regarding A), this means that given a transaction such as below:


Quote
{"txid":"d77a241272a04cdcf7513cca04e83dccbf56de5fe602ab2e13f5a0079aa3d711","hash":"23f9da398c98c9be73c0799d54c31c748e5a32e69539e038db13c1f875448c2d","version":2,"size":388,"vsize":226,"weight":904,"locktime":0,"vin":[{"txid":"aac4568857f39a5dcfbcd7be65197a118e1ab1c1dd04566837aceebbf9d3eb4e","vout":0,"scriptSig":{"asm":"0014f5db3a1acc7f18405ab1db8ab54344336d876882","hex":"160014f5db3a1acc7f18405ab1db8ab54344336d876882"},"txinwitness":["304402207949fa75657d5df84c7ed3fadffa10747ce5c7958e1aee3df42ef3fc985331010220552 3cb3b2dd46a6e1c42993b562ba3f530948fec8652d1bd6610c7e97f313a5801","02c787917771dbb98951124b2cc22fe7612f1e1610a79620c48473f8c7dd67f456"],"sequence":4294967295},{"txid":"cfe79aec8fc90f278baf74df75065899a1e933b74f7d6f89ae260a84002c0557","vout":21,"scriptSig":{"asm":"0014bdd7544ed9c4dfb56f8bd786cf81f6344da6e663","hex":"160014bdd7544ed9c4dfb56f8bd786cf81f6344da6e663"},"txinwitness":["3044022036cb3c6f6e426d57f2e41ff1f558f6bae6ebf8a50d38fdb7a15e3558de45f92b02205c3 4f86d2210f6902fb97aa1c419745d4fcf468529721113ec0522eeded0e3f901","0206ebc953a6090d2476879a2c31761e03f7ccedb824feeeec78305ae267bc40bc"],"sequence":4294967295}],"vout":[{"value":0.16414018,"n":0,"scriptPubKey":{"asm":"OP_DUP OP_HASH160 aa97701c85ef9d651e4e9bf01bf7330f2e03e7bc OP_EQUALVERIFY OP_CHECKSIG","hex":"76a914aa97701c85ef9d651e4e9bf01bf7330f2e03e7bc88ac","reqSigs":1,"type":"pubkeyhash","addresses":["1GZ1HhoA3ijNZzsSjDPBgtwenRZvXZbR48"]}}]}

I should be able to know the signatories public keys (the same way miners check the validity of the transaction if I am not mistaken) and I then should try determining to which Xpubs those public keys are linked (if a HD wallet is used)
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!