Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need Help to understand the "Third Component Shamir Share" #15

Open
asialoop opened this issue Jun 4, 2019 · 0 comments
Open

Need Help to understand the "Third Component Shamir Share" #15

asialoop opened this issue Jun 4, 2019 · 0 comments

Comments

@asialoop
Copy link

asialoop commented Jun 4, 2019

Dear Ian, i am new on Git Hub and i dont know how to contact you, so i will write here my question :)

I try to understand your example (see below) but i did not understand well about the third component....can you please complete the example also about the third component
??

that will help me to understand in full yr example.

Thank you so much in advance,

Marco from Phuket :)

Example encoding parameters across multiple words
Consider
M = 35 = 100011
O = 10 = 1010

Left pad both to multiple of 5 bits

M = 0000100011
O = 0000001010

Split into groups of 5 bits

M = 00001 00011
O = 00000 01010

Convert this into mnemonic words:

The first word is not the final word so it:

  • starts with 1
  • then has the first five bits of M
  • then has the first five bits of O

1 00001 00000 = 10000100000 = 1056 = "lottery"

The second word is the final word so it:

  • starts with 0
  • then has the second five bits of M
  • then has the second five bits of O

0 00011 01010 = 00001101010 = 106 = "ask"

So the parameters M = 35 and O = 10 are encoded as "lottery ask"
Third Component is The Shamir Share
The third component is the data for the shamir share and is a binary blob which must be encoded to mnemonic words.

The binary shamir share is encoded to mnemonic words by:

left pad the binary share to multiple of 11 bits
convert each group of 11 bits to the corresponding word in the wordlist
The mnemonic words are decoded to the binary shamir share by:

convert each word to the 11 bit binary representation and concatenate together
truncate from the left to the required multiple for the specific shamir implementation (in the case of the prototype it's 4 bits)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant