Documentation ¶
Index ¶
Constants ¶
const (
DefaultPrimeStr = "115792089237316195423570985008687907853269984665640564039457584007913129639747"
)
secure prime number
Variables ¶
var ()
exported errors
Functions ¶
func Combine ¶
Combine takes a string array of shares encoded in base64 created via Shamir's Algorithm; each string must be of equal length of a multiple of 88 characters as a single 88 character share is a pair of 256-bit numbers (x, y). Note: the polynomial will converge if the specified minimum number of shares
or more are passed to this function. Passing thus does not affect it Passing fewer however, simply means that the returned secret is wrong.
func Create ¶
Create returns a new array of secret shares (encoding x,y pairs as base64 strings) created by Shamir's Secret Sharing Algorithm requring a minimum number of share to recreate, of length shares, from the input secret raw as a string
func CreateFromBytes ¶
CreateFromBytes allows the creation of the shares from an array of bytes
func IsValidShare ¶
IsValidShare takes in a given string to check if it is a valid secret Requirements: Length multiple of 88
Can decode each 44 character block as base64
Returns only success/failure (bool)
Types ¶
This section is empty.