Documentation

QedShare.Shamir.Params

Parameters #

A split is described by the threshold k (how many shares rebuild the secret) and the number of shares n. Valid parameters satisfy 2 ≤ k ≤ n ≤ 255: at most 255 shares, because share indices are the nonzero elements of GF(2⁸).

Validated split parameters: threshold k and share count n, with 2 ≤ k ≤ n ≤ 255.

  • k : Nat

    Threshold: any k shares rebuild the secret; k − 1 reveal nothing.

  • n : Nat

    Number of shares produced.

  • hk : 2 ≤ self.k
  • hkn : self.k ≤ self.n
  • hn : self.n ≤ 255
Instances For
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      Build parameters, or none if k, n are out of range.

      Equations
      Instances For
        theorem QedShare.Shamir.Params.mk?_isSome_iff (k n : Nat) :
        (mk? k n).isSome = true ↔ 2 ≤ k ∧ k ≤ n ∧ n ≤ 255

        Params.mk? k n succeeds exactly when 2 ≤ k ≤ n ≤ 255.