SSS (sss v0.1.0)
View SourceDocumentation for SSS
.
Summary
Functions
Takes a string array of shares encoded in Base64 or Hex created via Shamir's Algorithm
Takes a string array of shares encoded in Base64 or Hex created via Shamir's Algorithm
Returns a new array of secret shares (encoding x,y pairs as Base64 or Hex strings) created by Shamir's Secret Sharing Algorithm requiring a minimum number of share to recreate, of length shares, from the input secret raw as a string.
Returns a new array of secret shares (encoding x,y pairs as Base64 or Hex strings) created by Shamir's Secret Sharing Algorithm requiring a minimum number of share to recreate, of length shares, from the input secret raw as a string.
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).
Takes a string array of shares encoded in Hex created via Shamir's Algorithm. Each string must be of equal length of a multiple of 128 characters as a single 128 character share is a pair of 256-bit numbers (x, y).
Returns the number base64 in base 10 Int representation. note: this is not coming from a string representation; the base64 input is exactly 256 bits long, and the output is an arbitrary size base 10 integer.
Returns the number Hex in base 10 Int representation. note: this is not coming from a string representation; the Hex input is exactly 256 bits long, and the output is an arbitrary size base 10 integer.
Create a Zero Matrix(mxn) m-row and n-column
Create a l-layer, m-row, n-column zero matrix(lxmxn)
Get an Element in a 2D Matrix(mxn) at index x-row, y-column
Get an Element in a 3D Matrix(lxmxn) at index x-layer, y-row, z-column
Takes in a given string to check if it is a valid secret
Takes in a given string to check if it is a valid secret
Converts an array of Ints to the original string secret, removing any least significant nulls.
Computes the multiplicative inverse of the number on the field @prime.
Returns a random number from the range 1 <= n <= @prime-1 inclusive
Converts a string secret into a 256-bit Int array, array based upon size of the input string. All values are right-padded to length 256, even if the most significant bit is zero.
Returns the Int number base10 in base64 representation. note: this is not a string representation; the base64 output is exactly 256 bits long.
Returns the Int number base10 in Hex representation. note: this is not a string representation; the Hex output is exactly 256 bits long.
Update an Element in a 2D Matrix(mxn) at index x-row, y-column
Update an Element in a 3D Matrix(lxmxn) at index x-layer, y-row, z-column
Validator combine shares input.
Functions
Takes a string array of shares encoded in Base64 or Hex created via Shamir's Algorithm
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.
Takes a string array of shares encoded in Base64 or Hex created via Shamir's Algorithm
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.
Returns a new array of secret shares (encoding x,y pairs as Base64 or Hex strings) created by Shamir's Secret Sharing Algorithm requiring a minimum number of share to recreate, of length shares, from the input secret raw as a string.
Returns a new array of secret shares (encoding x,y pairs as Base64 or Hex strings) created by Shamir's Secret Sharing Algorithm requiring a minimum number of share to recreate, of length shares, from the input secret raw as a string.
Returns the number base64 in base 10 Int representation. note: this is not coming from a string representation; the base64 input is exactly 256 bits long, and the output is an arbitrary size base 10 integer.
Returns the number Hex in base 10 Int representation. note: this is not coming from a string representation; the Hex input is exactly 256 bits long, and the output is an arbitrary size base 10 integer.
Create a Zero Matrix(mxn) m-row and n-column
Create a l-layer, m-row, n-column zero matrix(lxmxn)
Get an Element in a 2D Matrix(mxn) at index x-row, y-column
Get an Element in a 3D Matrix(lxmxn) at index x-layer, y-row, z-column
Converts an array of Ints to the original string secret, removing any least significant nulls.
Computes the multiplicative inverse of the number on the field @prime.
Returns a random number from the range 1 <= n <= @prime-1 inclusive
Converts a string secret into a 256-bit Int array, array based upon size of the input string. All values are right-padded to length 256, even if the most significant bit is zero.
Returns the Int number base10 in base64 representation. note: this is not a string representation; the base64 output is exactly 256 bits long.
Returns the Int number base10 in Hex representation. note: this is not a string representation; the Hex output is exactly 256 bits long.
Update an Element in a 2D Matrix(mxn) at index x-row, y-column
Update an Element in a 3D Matrix(lxmxn) at index x-layer, y-row, z-column
Validator combine shares input.