A set of primitives and utilities necessary to implement Shamir's Secret Sharing with Pedersen's Verifiable Secret Sharing (VSS) and the capability to implement Jarecki's Proactive Secret Sharing (PSS). There are other alternatives to Pedersen's VSS and Jarecki's PSS. The key alternative to Pedersen is Feldman's scheme. The big difference is that Pedersen's scheme uses an additional "commitment value", which adds the benefits of distributing multiple commiments that can be compared without knowledge of the secret.

In order to implement VSS, there are four public values that must be known by all shares. Two of those public values are the prime numbers, p and q. They are related numbers, q must divide p-1. The {@link Secret_Share.ShareUtil#generateValues(SecureRandom, int) autogenerate()} method chooses q first and then attempts to find a prime number that is 2q + 1, 4q + 1 or 8q + 1. The {@link Secret_Share.ShareUtil#generateValues(SecureRandom, int) autogenerate()} method will also choose g and h, the other two publicly known values. Both of these values must be in the subgroup of the field Zp generated by q. They should be chosen such that no one knows logg h.

At the suggestion of Jarecki's PSS protocol, each share maintains a set of public versions of each share/commitment value pair. The values can be used to confirm that information provided from one share to another, for instance in the case of secret recovery, are valid. The public versions, y, are calculated in the same manner as the commitment values, for each share i, yi = gsihti.

The {@link Secret_Share.Share Share} class contains all necessary fields to implement Pedersen's VSS on top of Shamir's Secret Sharing. The {@linkplain Secret_Share.Share#Share(int, BigInteger, BigInteger, BigInteger, BigInteger, BigInteger, BigInteger, BigInteger[], int) constructor} takes as arguments the share's secret, commitment value, share number, the public information described above, the public versions of the shares described above and the threshold number. Each share can derive from the public versions of the shares the total number of shares (N). Each share has the ability to verify itself in two ways, against the commitment values from the server or from the public version that it stores. It can also verify any other share that is in the same secret sharing group by looking it up in the public version array. The share class is serializable if there is ever a need to write it to disk or the network. The Share class also implements {@link Secret_Share.Share#add(Share, BigInteger[]) add()} fuctionality for PSS.

The {@link Secret_Share.ShareUtil ShareUtil} class contains all of the share utilities needed for secret sharing. The two crucial methods are {@link Secret_Share.ShareUtil#split(BigInteger, int, int, int, BigInteger, BigInteger, BigInteger, BigInteger, BigInteger[]) split()} and {@link Secret_Share.ShareUtil#recover(Share[], BigInteger, int) recover()} form the basis for secret sharing. These two simple methods (and the auxillary {@link Secret_Share.ShareUtil#split(BigInteger, int, int, int, BigInteger, BigInteger, BigInteger, BigInteger, BigInteger[], BigInteger) split()} method) provide all of the support necessary to implement PSS as well as normal sharing and recovery.