de.christofreichardt.scala.shamir
Contains the core classes needed for sharing or merging of secrets.
Attributes
- See also
Members list
Type members
Classlikes
Implements Newtons interpolation algorithm. All calculations will be carried out by finite field algebra.
Implements Newtons interpolation algorithm. All calculations will be carried out by finite field algebra.
Value parameters
- prime
-
a prime number
- supportingPoints
-
some pairwise different supporting points
Attributes
- Constructor
-
Creates a new NewtonInterpolation by applying some supporting points and a prime number.
- Supertypes
Defines a Newton Polynomial.
Defines a Newton Polynomial.
Value parameters
- basis
-
the Newton basis polynomials
- coefficients
-
The Newton coefficients
- degree
-
the degree of the polynomial
- prime
-
the prime modulus
Attributes
- Constructor
-
Creates an instance of a Newton Polynomial suitable for calculations using finite field algebra.
- Supertypes
Defines a polynomial in its canonical form.
Defines a polynomial in its canonical form.
Value parameters
- coefficients
-
the polynoms coefficients
- prime
-
the prime modulus
Attributes
- Supertypes
Recovers the original secret bytes by combining the given shares.
This object provides some operations to create SecretMerging
instances.
This object provides some operations to create SecretMerging
instances.
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
SecretMerging.type
A secret sharing sheme.
A secret sharing sheme.
Value parameters
- random
-
the secure random source
- secretBytes
-
the actual secret
- shares
-
the number of shares
- threshold
-
the number of shares required for the recovery of the secret bytes
Attributes
- Constructor
-
Creates a new SecretSharing sheme with shares, threshold, secretBytes and a secure random source.
- Supertypes
Value members
Concrete methods
Converts the given BigInt
number into bytes by discarding the leading byte.
Converts the given BigInt
number into bytes by discarding the leading byte.
Value parameters
- s
-
the to be converted
BigInt
number
Attributes
- Returns
-
the resulting bytes
Converts the given bytes into a non-negative BigInt
number by padding 0x7F upfront.
Converts the given bytes into a non-negative BigInt
number by padding 0x7F upfront.
Value parameters
- bytes
-
the to be converted bytes
Attributes
- Returns
-
the resulting non-negative BigInt number
Encodes a given character sequence as bytes ba applying UTF-8 encoding.
Encodes a given character sequence as bytes ba applying UTF-8 encoding.
Value parameters
- charSequence
-
the to be encoded characters
Attributes
- Returns
-
the encoded character sequence
Checks if any two items within the Iterable are identical.
Checks if any two items within the Iterable are identical.
Value parameters
- items
-
an Iterable of some items
Attributes
- Returns
-
true if no pair of identical items has been found
Concrete fields
defines the certainty of a number being prime, that is between 2^64 primes computed by the underlying algorithm there is one false positive.
defines the certainty of a number being prime, that is between 2^64 primes computed by the underlying algorithm there is one false positive.