Bitcoin Forum

Economy => Service Discussion => Topic started by: Muhammed Zakir on October 17, 2014, 12:06:05 PM



Title: What is mean by "Enter Available Shares" in bitaddress.org?
Post by: Muhammed Zakir on October 17, 2014, 12:06:05 PM
What does mean by "Enter Available Shares" in bitaddress.org?

https://i.imgur.com/aa1IhE0.jpg


   ~~MZ~~


Title: Re: What does mean by "Enter Available Shares" in bitaddress.org?
Post by: dserrano5 on October 17, 2014, 12:26:19 PM
What does mean by "Enter Available Shares" in bitaddress.org?

Never used or tried that but I guess the first two boxes mean 2-of-3, then you click on Generate and 3 shares are generated. Pasting any 2 of them in the large box below would yield a privkey.


Title: Re: What does mean by "Enter Available Shares" in bitaddress.org?
Post by: CIYAM on October 17, 2014, 12:30:52 PM
I think the word "share" is probably not the best choice - am pretty sure that in order to construct a M of N address you need to use "public keys" (rather than addresses) so maybe they should change the word "share" to "public key"?


Title: Re: What does mean by "Enter Available Shares" in bitaddress.org?
Post by: dserrano5 on October 17, 2014, 12:38:25 PM
I think the word "share" is probably not the best choice - am pretty sure that in order to construct a M of N address you need to use "public keys" (rather than addresses) so maybe they should change the word "share" to "public key"?

That would be for a multisig address, however this seems to be effectively shares to a single private key.


Title: Re: What does mean by "Enter Available Shares" in bitaddress.org?
Post by: CIYAM on October 17, 2014, 12:40:27 PM
That would be for a multisig address, however this seems to be effectively shares to a single private key.

Oh - oops - I see - so it just *divides* the private key into "parts".

Maybe "parts" would have been a better word then (they would have to be kept in the right order so am guessing they might "prefix" each part with a number to be able to re-assemble the private key correctly).

EDIT: Now I know why they use the word "share" - they are using Shamir's Secret Sharing algo (which will also prefix each part but you only need M of N parts to recreate the shared secret).

Nice addition!


Title: Re: What does mean by "Enter Available Shares" in bitaddress.org?
Post by: Muhammed Zakir on October 17, 2014, 04:53:47 PM
That would be for a multisig address, however this seems to be effectively shares to a single private key.
Now I know why they use the word "share" - they are using Shamir's Secret Sharing algo (which will also prefix each part but you only need M of N parts to recreate the shared secret).

Nice addition!


Yes, it is for multisig address. When I click generate it is saying to enter valid integer between 3 and 20(I don't remember correctly-very hard to check it now as I am in mobile). So what should I enter there?

   ~~MZ~~


Title: Re: What does mean by "Enter Available Shares" in bitaddress.org?
Post by: CIYAM on October 17, 2014, 04:56:40 PM
Yes, it is for multisig address. When I click generate it is saying to enter valid integer between 3 and 20(I don't remember correctly-very hard to check it now as I am in mobile). So what should I enter there?

I don't think it is *multisig* in the Bitcoin sense but instead is using Shamir's Secret Shared algo (you might want to find out more about it first).


Title: Re: What is mean by "Enter Available Shares" in bitaddress.org?
Post by: Muhammed Zakir on October 17, 2014, 05:38:15 PM
Yes, it is for multisig address. When I click generate it is saying to enter valid integer between 3 and 20(I don't remember correctly-very hard to check it now as I am in mobile). So what should I enter there?

I don't think it is *multisig* in the Bitcoin sense but instead is using Shamir's Secret Shared algo (you might want to find out more about it first).


Thanks for telling! http://en.m.wikipedia.org/wiki/Shamir's_Secret_Sharing : This is the one, right? So that means our private key is split it into N parts where M of N parts is needed(somewhat like multisig), in my case it will be split into 3 parts where 2 parts is needed to send a tx. It is combining the private key rather than splitting it, if I am right. So is this for combing parts of multisig address or any other purpose? If you can, please define. Thanks! :)

   ~~MZ~~


Title: Re: What is mean by "Enter Available Shares" in bitaddress.org?
Post by: CIYAM on October 17, 2014, 05:52:01 PM
Assuming it is using Shamir's (and I guess so by their use of the word "shared" that confused you to start with) then it is a "multisig" concept but not the Bitcoin *multisig* concept.

So it isn't using Bitcoin multisig *just one private key* but you can get that private key by N of M people providing their "secret share" of the private key.

Hope that makes some sense.


Title: Re: What is mean by "Enter Available Shares" in bitaddress.org?
Post by: Muhammed Zakir on October 17, 2014, 06:06:54 PM
Assuming it is using Shamir's (and I guess so by there use of the word "shared" that confused you to start with) then it is a "multisig" concept but not the Bitcoin *multisig* concept.

So it isn't using Bitcoin multisig *just one private key* but you can get that private key by N of M people providing their "secret share" of the private key.

Hope that makes some sense.


Yes, now it really do! :D So, how to generate shares of the private key? Is there any tool for that? ???

   ~~MZ~~


Title: Re: What is mean by "Enter Available Shares" in bitaddress.org?
Post by: CIYAM on October 17, 2014, 06:16:29 PM
Yes, now it really do! :D So, how to generate shares of the private key? Is there any tool for that? ???

I'd assume that it would do that for you (but I am not familiar with this new version of bitaddress.org).


Title: Re: What is mean by "Enter Available Shares" in bitaddress.org?
Post by: dserrano5 on October 17, 2014, 06:49:29 PM
So, how to generate shares of the private key? Is there any tool for that? ???

bitaddress generates a new random key and splits it. You can't split a specific privkey.


Title: Re: What is mean by "Enter Available Shares" in bitaddress.org?
Post by: Muhammed Zakir on October 18, 2014, 04:39:15 AM
So, how to generate shares of the private key? Is there any tool for that? ???

bitaddress generates a new random key and splits it. You can't split a specific privkey.

Thank you, CIYAM and dserrano5! Now understood! There is java script in Shamir's secret sharing wiki page, can it be used to split private key(after a few changes, if needed)?

   ~~MZ~~


Title: Re: What is mean by "Enter Available Shares" in bitaddress.org?
Post by: CIYAM on October 18, 2014, 05:45:23 AM
I just took a quick look at their source code and it does indeed appear as though they are using Shamir's Secret Sharing algorithm (just test it and see if it works would be my suggestion).


Title: Re: What is mean by "Enter Available Shares" in bitaddress.org?
Post by: Newar on October 18, 2014, 05:54:27 AM
Here's page with some more info and another demo: http://point-at-infinity.org/ssss/index.html  IIRC, you will see different results for the "shares" value, both solutions work as advertised though. ssss is in the Ubuntu repository since Trusty.

The way it's implemented on bitadress currently, it will generate a private key for you. For us who like to generate our own private key (outside of bitadddress), but still would like to split it using their site, there is a fix described here: https://bitcointalk.org/index.php?topic=43496.msg8041834#msg8041834


Title: Re: What is mean by "Enter Available Shares" in bitaddress.org?
Post by: Muhammed Zakir on October 18, 2014, 06:34:52 AM
Here's page with some more info and another demo: http://point-at-infinity.org/ssss/index.html  IIRC, you will see different results for the "shares" value, both solutions work as advertised though. ssss is in the Ubuntu repository since Trusty.

The way it's implemented on bitadress currently, it will generate a private key for you. For us who like to generate our own private key (outside of bitadddress), but still would like to split it using their site, there is a fix described here: https://bitcointalk.org/index.php?topic=43496.msg8041834#msg8041834

Thanks! ssss seems to like a good software. And, I will give this a try! :)

Of course it makes sense. I was so annoyed because of this feature missing that I decided to start learning javascript. Because I am not a programmer it took me one whole day to figure it out.

Under "splitKey: function" replace the line:
var key = new Bitcoin.ECKey(false)

with this line:
var mykey = document.getElementById("combineinput").value.replace(/^\s+|\s+$/g, "").toString();
if ("combineinput" == "") {var key = new Bitcoin.ECKey(false)} else {var key = new Bitcoin.ECKey(mykey)};


Now you can enter your private key into the box under "Enter Available Shares (whitespace separated)" and press the generate button. If you leave the box empty it will generate (and split) new private key.

   ~~MZ~~