reconstruction of shamir secrete sharing
2 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(1 个)
Walter Roberson
2012-12-31
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 个评论
Walter Roberson
2013-1-20
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.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!