Based on "How to Share a Secret", by Adi Shamir, Communications of the ACM, November, 1979, Volume 22, Number 11, page 612.
SSS provides a perfect -threshold secret sharing scheme. i.e. it is a method for
parties to carry shares
of a secret s such that any
of them are needed to recover the secret, but so that no
of them can do so. The threshold is perfect if knowledge of
or fewer shares provides no information regarding
. Shamir
-threshold scheme is based on classical Lagrange polynomial interpolation of degree
with modular arithmetic instead of real arithmetic. The set of integers modulo a prime number 'prime' forms a field in which interpolation is possible. We choose to break the key in byte unit handled separately. The prime number has to be bigger than the largest number than can be represented (i.e. 0xff) and the number of shares n. In order to handle all byte values (0x00-0xff) and so that we can multiply two such numbers, the shared secrets will fit in a 16-bits integer (unsigned short). The prime has to be less than
in order to fit them all. The largest such prime is 65521.
test-shamir.cc This is an simple split/join test for Shamir secret sharing scheme.
#include <crypt.h>
Namespaces | |
namespace | glite |