package shamir
Contains the core classes needed for sharing or merging of secrets.
- See also
- Alphabetic
- By Inheritance
- shamir
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- class NewtonInterpolation extends Tracing
Implements Newtons interpolation algorithm.
Implements Newtons interpolation algorithm. All calculations will be carried out by finite field algebra.
- class NewtonPolynomial extends Tracing
Defines a Newton Polynomial.
- class Polynomial extends Tracing
Defines a polynomial in its canonical form.
- class SecretMerging extends Tracing
Recovers the original secret bytes by combining the given shares.
- class SecretSharing extends Tracing
A secret sharing sheme.
Value Members
- val CERTAINTY: Int
defines the certainty of a number being prime, that is between 2^64 primes computed by the underlying algorithm there is one false positive.
- def bigIntToBytes(s: BigInt): IndexedSeq[Byte]
Converts the given
BigIntnumber into bytes by discarding the leading byte.Converts the given
BigIntnumber into bytes by discarding the leading byte.- s
the to be converted
BigIntnumber- returns
the resulting bytes
- def bytes2BigInt(bytes: IndexedSeq[Byte]): BigInt
Converts the given bytes into a non-negative
BigIntnumber by padding 0x7F upfront.Converts the given bytes into a non-negative
BigIntnumber by padding 0x7F upfront.- bytes
the to be converted bytes
- returns
the resulting non-negative BigInt number
- def charSequenceToByteArray(charSequence: CharSequence): Array[Byte]
Encodes a given character sequence as bytes ba applying UTF-8 encoding.
Encodes a given character sequence as bytes ba applying UTF-8 encoding.
- charSequence
the to be encoded characters
- returns
the encoded character sequence
- def pairWiseDifferent[T](items: Iterable[T]): Boolean
Checks if any two items within the Iterable are identical.
Checks if any two items within the Iterable are identical.
- items
an Iterable of some items
- returns
true if no pair of identical items has been found
- object SecretMerging
This object provides some operations to create
SecretMerginginstances.