Clear Filters
Clear Filters

reconstruction of shamir secrete sharing

2 views (last 30 days)
goldensona
goldensona on 30 Dec 2012
Hi i have two shares (1,200) (3,240) i want to reconstruct the secret key from how to do i achieve it . if i use the method http://www.mathworks.in/matlabcentral/fileexchange/29989-shamirs-secret-sharing it give large number of shares. i m having 6 share , i can identify 2 share from that i need to generate secret key.

Answers (1)

Walter Roberson
Walter Roberson on 31 Dec 2012
Doesn't (1,200) mean that any 1 of 200 shares can reconstruct the secret, and doesn't (3,240) mean that any 3 of 240 shares can reconstruct the secret? If so then is it not expected that it would return a large number of shares? If you want 2 shares of 6 to be able to reconstruct the key, you would use (2,6) as the input.
  2 Comments
goldensona
goldensona on 20 Jan 2013
how to create shares using shamir screat sharing scheme i have image ,and key i dont know how to generate shares
Walter Roberson
Walter Roberson on 20 Jan 2013
Reshape the image as a row vector. Now re-interpret the row vector as a very large number, with the first byte of the row vector being the first byte of the large number, the second byte of the row vector being the second byte of the large number, and so on. Apply the share generation algorithm to that very large number, getting out a series of very large numbers that are the shares. Re-interpret those very large numbers that are the shares as row vectors of bytes; the row vectors are then what are to be distributed.
You will quickly notice that the code in entry 29989 is not suitable for handling very large numbers, so you will need to re-implement the algorithm. You may wish to use the Symbolic Toolbox for that, or John D'Errico's vpi (Variable Precision Integer) FEX contribution.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!