Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Shamir
Description
Module for information-theoretic threshold secret sharing.
Threshold secret sharing assumes secure channels for communication.
Synopsis
- randomSplit :: RandomGen g => FiniteField -> [FiniteField] -> Integer -> Integer -> g -> ([[Integer]], g)
- _recombinationVector :: FiniteField -> [Integer] -> Integer -> [Integer]
- recombine :: FiniteField -> [IdSharesPair] -> [FiniteField]
- type IdSharesPair = (Integer, [Integer])
Documentation
randomSplit :: RandomGen g => FiniteField -> [FiniteField] -> Integer -> Integer -> g -> ([[Integer]], g) Source #
Split each secret given in s into m random Shamir shares.
The (maximum) degree for the Shamir polynomials is t, 0 <= t < m
.
Return matrix of shares, one row per party.
_recombinationVector :: FiniteField -> [Integer] -> Integer -> [Integer] Source #
Compute and store a recombination vector.
A recombination vector depends on the field, the x-coordinates xs of the shares and the x-coordinate x_r of the recombination point.
recombine :: FiniteField -> [IdSharesPair] -> [FiniteField] Source #
Recombine shares given by points into secrets.
Recombination is done for x-coordinates x_rs.
type IdSharesPair = (Integer, [Integer]) Source #
Couples a ID pi to the share list si.