->SSSS function splits a byte array into
N shares so
K of them can reconstruct the original byte array.
The principle is based on the fact that a polynomial
P of degree
K-1 can be fully determined by
K points (
Y = P(X). All computations are performed using arithmetic in the Galois Field
GF(256) used for QR/Code Reed Solomon error correction, its generator is
2 and its primitive polynomial
x^8 + x^4 + x^3 + x^2 + 1).
For each byte
B to encode, a random polynomial
GF(256) is chosen with the constraint that
P(0) = B. Then
N random values of
GF(256) are selected and for each
X such value, the two bytes
P(X) are output to a share. If
X was 0, a random value is emitted instead of
P(X) and a new
X value is selected. This is done to ensure the randomness of the output. It may therefore be possible that a split is longer than twice the size of the original input.