Botan

RTSS (threshold secret sharing)

License
Botan is released under the Simplified BSD License (see LICENSE.md)

struct  RTSS;

A split secret, using the format from draft-mcgrew-tss-03


static Vector!RTSS  split(ubyte M, ubyte N, const(ubyte)* S, size_t S_len, in ubyte[16] identifier, RandomNumberGenerator rng);

Parameters
ubyte M the number of shares needed to reconstruct
ubyte N the number of shares generated
const(ubyte)* S the secret to  split
size_t S_len the length of the secret
ubyte[16] identifier the 16 ubyte share identifier
RandomNumberGenerator rng the random number generator to use

SecureVector!ubyte  reconstruct()(auto ref const Vector!RTSS shares);

Parameters
Vector!RTSS shares the list of shares

this(in string hex_input);

Parameters
string hex_input the share encoded in hexadecimal

const string  toString();

Returns
hex representation

const ubyte  shareId();

Returns
share identifier

const size_t  size();
const @property size_t  length();

Returns
 size of this share in bytes

const bool  initialized();

Returns
if this TSS share was  initialized or not