DEV Community

Discussion on: Shamir's Secret Sharing Scheme in JavaScript

Collapse
 
simbo1905 profile image
Simon Massey

Yes, it's really super cool. The shares are randomised which is why the crypto randomBytes function is needed. If someone tries to recombine less than the threshold number of shares no errors occurs it is just a random result. The maths behind it are really interesting and not as hard as most cryptography. There are some good free videos showing how things work and explaining the two key methods used.