Bitcoin Forum
November 06, 2024, 03:20:45 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: different signatures for different destinations  (Read 803 times)
justanickname (OP)
Full Member
***
Offline Offline

Activity: 157
Merit: 100


View Profile
December 17, 2015, 10:53:47 PM
 #1


Let's say I am sending 1 bitcoin from address "A" to address "B"
Is it possible to do it in such a way that:

1)to transfer bitcoin form address "B" to address "C" it can only be done with private key "c".
2)to transfer bitcoin form address "B" to address "D" it can only be done with private key "d".

and of course "c","d" are different.
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3542
Merit: 6886


Just writing some code


View Profile WWW
December 17, 2015, 10:59:42 PM
 #2

I don't think that is possible. It may be possible to do if address B was a p2sh address that used a custom script, but I don't think it will be possible.

justanickname (OP)
Full Member
***
Offline Offline

Activity: 157
Merit: 100


View Profile
December 17, 2015, 11:09:01 PM
 #3

I don't think that is possible. It may be possible to do if address B was a p2sh address that used a custom script, but I don't think it will be possible.

I am confused, with a custom script it is possible?
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3542
Merit: 6886


Just writing some code


View Profile WWW
December 17, 2015, 11:10:51 PM
 #4

I don't think that is possible. It may be possible to do if address B was a p2sh address that used a custom script, but I don't think it will be possible.

I am confused, with a custom script it is possible?
Possibly. I don't know as I haven't checked or tried, but it may be possible to create a custom script which requires different private keys. I think the OP codes have enough options for that logic, but as I said earlier, I do not know. You will need to try this yourself.

justanickname (OP)
Full Member
***
Offline Offline

Activity: 157
Merit: 100


View Profile
December 17, 2015, 11:12:18 PM
 #5

I don't think that is possible. It may be possible to do if address B was a p2sh address that used a custom script, but I don't think it will be possible.

I am confused, with a custom script it is possible?
Possibly. I don't know as I haven't checked or tried, but it may be possible to create a custom script which requires different private keys. I think the OP codes have enough options for that logic, but as I said earlier, I do not know. You will need to try this yourself.

Thanks !
Beraturker
Sr. Member
****
Offline Offline

Activity: 308
Merit: 250



View Profile
December 23, 2015, 10:21:43 PM
 #6

From what i understood-- if you send the amount to your own different wallet and then to the destination , private key will be changed.. So you do not have to struggle with different things
fbueller
Sr. Member
****
Offline Offline

Activity: 412
Merit: 287


View Profile
December 26, 2015, 12:42:40 AM
Last edit: December 26, 2015, 01:07:33 AM by fbueller
 #7

I think this was asked only a few weeks ago, and they didn't like my answer Smiley I'll explain it once more: I would use this P2SH script:

Code:
IF
   <Q1> CHECKSIG
   DUP HASH160 <hashDestinationOne> EQUALVERIFY CHECKSIG
ELSE
   <Q2> CHECKSIG
   DUP HASH160 <hashDestinationTwo> EQUALVERIFY CHECKSIG
ENDIF

The output script will be plain ol p2sh:
Code:
HASH160 <hashScript> EQUAL

To compare with your situation: Address "B" is the P2SH address for the above script. Address "C" / "D" are destinationOne / destinationTwo, and they have private keys c/d.

Q1 and Q2 can be different individuals, or just the same person with two private keys. HashDestinationOne and HashDestinationTwo would be the pubkey-hashes of the end public keys we want to authorize to redeem the coins.

We don't use addresses natively on the blockchain, we use hash locks and signatures. A destination is a specific requirement allowing a person to redeem the coins. Take the DUP .... CHECKSIG blocks - if that was the only script, it would have a 1something.... address. But in this case, we've stipulated Q1 needs to add their signature for this branch to be possible. Same for branch 2.

So a destination is just a set of conditions that can be met. In this case, OP requested different signatures to allow the funds to be redeemed at different destinations.

Q1 signature doesn't cause funds to move to destinationOne as there are additional requirements to be met, but once that party has the partially signed transaction, he can add his signature and move the coins. The owner of destinationTwo may even see the partially signed transaction for destinationOne, but he can't tamper with it to allow him access: Q2 has to sign.

Q1/Q2 will necessarily know where the party is moving their funds, and will have to sign that transaction. This isn't bad for privacy, because in another scheme, they could still observe spends from where-ever the coins end up. But it does sound like a way to provide federated access to bitcoin: sign by A and the funds belong to the user; sign by B, and we've got them.. *evil laugh*

Bitwasp Developer.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!