Documentation ¶
Index ¶
Constants ¶
View Source
const (
DefaultPrimeStr = "115792089237316195423570985008687907853269984665640564039457584007913129639747"
)
Variables ¶
View Source
var ()
Functions ¶
func 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 ¶
*
- Returns a new arary 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 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.
Click to show internal directories.
Click to hide internal directories.