Packages

class SecretSharing extends Tracing

A secret sharing sheme.

Linear Supertypes
Tracing, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SecretSharing
  2. Tracing
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new SecretSharing(shares: Int, threshold: Int, password: CharSequence)

    Creates a new SecretSharing sheme with shares, threshold, password and a default secure random source.

    Creates a new SecretSharing sheme with shares, threshold, password and a default secure random source.

    shares

    the number of shares

    threshold

    the number of shares required for the recovery of the secret bytes

    password

    the actual secret, will be encoded with UTF-8

  2. new SecretSharing(shares: Int, threshold: Int, secretBytes: Array[Byte])

    Creates a new SecretSharing sheme with shares, threshold, secretBytes and a default secure random source.

    Creates a new SecretSharing sheme with shares, threshold, secretBytes and a default secure random source. This is convenient when calling from Java.

    shares

    the number of shares

    threshold

    the number of shares required for the recovery of the secret bytes

    secretBytes

    the actual secret

  3. new SecretSharing(shares: Int, threshold: Int, secretBytes: IndexedSeq[Byte])

    Creates a new SecretSharing sheme with shares, threshold, secretBytes and a default secure random source.

    Creates a new SecretSharing sheme with shares, threshold, secretBytes and a default secure random source.

    shares

    the number of shares

    threshold

    the number of shares required for the recovery of the secret bytes

    secretBytes

    the actual secret

  4. new SecretSharing(secretBytes: IndexedSeq[Byte])

    Creates a new SecretSharing sheme with 6 shares, threshold == 3, the given secretBytes and a default secure random source.

    Creates a new SecretSharing sheme with 6 shares, threshold == 3, the given secretBytes and a default secure random source.

    secretBytes

    the actual secret

  5. new SecretSharing(shares: Int, threshold: Int, secretBytes: IndexedSeq[Byte], random: SecureRandom)

    Creates a new SecretSharing sheme with shares, threshold, secretBytes and a secure random source.

    Creates a new SecretSharing sheme with shares, threshold, secretBytes and a secure random source.

    shares

    the number of shares

    threshold

    the number of shares required for the recovery of the secret bytes

    secretBytes

    the actual secret

    random

    the secure random source

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def chooseCanonicalCoefficients: IndexedSeq[BigInt]

    Calculates a batch of coefficients needed for the polynomial in the canonical form.

    Calculates a batch of coefficients needed for the polynomial in the canonical form.

    returns

    the random coefficients

  6. final def choosePolynomial(degree: Int): Polynomial

    Chooses a random polynomial with the given degrre in the canonical form.

    Chooses a random polynomial with the given degrre in the canonical form.

    degree

    the degree of the polynomial

    returns

    the random polynomial

    Annotations
    @tailrec()
  7. def choosePrime: BigInt

    Calculates a random prime p with the property s < p.

    Calculates a random prime p with the property s < p.

    returns

    a random prime

  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  9. def computeShares: IndexedSeq[(BigInt, BigInt)]

    Computes the required number of random and distinct shares.

    Computes the required number of random and distinct shares.

    returns

    the shares

  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  12. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  13. def getCurrentTracer(): AbstractTracer

    Returns the present tracer for this object.

    Returns the present tracer for this object.

    returns

    the current tracer, by default the NullTracer

    Definition Classes
    Tracing
  14. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  15. val id: String

    The partition id

  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. val k: Int

    An alias for threshold

  18. val n: Int

    An alias for shares

  19. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  21. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  22. def partitionAsJson(sizes: Array[Int]): JsonArray

    Partitions the shares according to the given sizes and converts the different slices containing the shares into a JSON array containing the slices as JSON objects.

    Partitions the shares according to the given sizes and converts the different slices containing the shares into a JSON array containing the slices as JSON objects.

    sizes

    denotes a partition

    returns

    the JSON array of slices containing the shares

  23. val polynomial: Polynomial

    A random polynomial in the canonical form used to compute the shares

  24. val prime: BigInt

    The prime modulus

  25. val random: SecureRandom
  26. val randomGenerator: RandomGenerator

    Used to compute a LazyList of random BigInt numbers

  27. val s: BigInt

    The secret encoded as non-negative BigInt

  28. def savePartition(sizes: Array[Int], path: Path): Unit

    A convenience method.

    A convenience method. Saves the partition in the order as given by the sizes.

    sizes

    denotes the partition

    path

    the path to the partition file

  29. def savePartition(sizes: Iterable[Int], path: Path): Unit

    Saves the desired partition.

    Saves the desired partition. For technical reasons this method delivers the slices in reverse order as given by the sizes.

    sizes

    denotes the partition

    path

    the path to the partition file

  30. val secretBytes: IndexedSeq[Byte]
  31. def sharePointPartition(sizes: Iterable[Int]): List[IndexedSeq[(BigInt, BigInt)]]

    Partitions the share points into disjunct sequences according to the given sizes.

    Partitions the share points into disjunct sequences according to the given sizes.

    sizes

    denotes the sizes of the desired share point sequences

    returns

    a list of share point sequences

  32. val sharePoints: IndexedSeq[(BigInt, BigInt)]

    The actual shares

  33. def sharePointsAsJson(ps: IndexedSeq[(BigInt, BigInt)]): JsonObject

    Translates the given shares into JSON.

    Translates the given shares into JSON.

    ps

    the shares

    returns

    the JSON containing the shares

  34. lazy val sharePointsAsJson: JsonObject

    All shares converted into a JSON object

  35. val shares: Int
  36. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  37. val threshold: Int
  38. def toString(): String

    Gives a textual representation of this particular secret sharing sheme.

    Gives a textual representation of this particular secret sharing sheme.

    returns

    the textual representation

    Definition Classes
    SecretSharing → AnyRef → Any
  39. lazy val verified: Boolean

    Indicates if cross checks with all possible and valid combinations of shares have been successful.

    Indicates if cross checks with all possible and valid combinations of shares have been successful. This is a potentially expensive operation.

  40. def verifyAll: Boolean

    Verifies that all valid combinations of shares recover the secret bytes.

    Verifies that all valid combinations of shares recover the secret bytes.

    returns

    indicates the outcome of all possible and valid cross checks

  41. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  42. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  43. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  44. def withTracer[T](resultType: String, callee: AnyRef, method: String)(block: => T): T

    Custom control structure for tracing of embraced code blocks.

    Custom control structure for tracing of embraced code blocks.

    T

    the actual type of the embraced code block

    resultType

    denotes the return type

    callee

    the call site

    method

    denotes the method signature

    block

    the embraced code block

    returns

    returns whatever block returns

    Definition Classes
    Tracing

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from Tracing

Inherited from AnyRef

Inherited from Any

Ungrouped