Documentation
¶
Index ¶
- func ComputeLagrangeCoefficients(r *ring.Ring, T []int, modulus *big.Int) []ring.Poly
- func GaussianHash(r *ring.Ring, hash []byte, mu string, sigmaU float64, boundU float64, ...) structs.Vector[ring.Poly]
- func GenerateMAC(TildeD structs.Matrix[ring.Poly], MACKey []byte, partyID int, sid int, T []int, ...) []byte
- func GenerateRandomSeed() []byte
- func Hash(A structs.Matrix[ring.Poly], b structs.Vector[ring.Poly], ...) []byte
- func LowNormHash(r *ring.Ring, A structs.Matrix[ring.Poly], b structs.Vector[ring.Poly], ...) ring.Poly
- func PRF(r *ring.Ring, sd_ij []byte, PRFKey []byte, mu string, hash []byte, n int) structs.Vector[ring.Poly]
- func PRNGKey(skShare structs.Vector[ring.Poly]) []byte
- func ShamirSecretSharing(r *ring.Ring, s []ring.Poly, k int, lambdas []ring.Poly) map[int]structs.Vector[ring.Poly]
- func ShamirSecretSharingGeneral(r *ring.Ring, s []ring.Poly, t, k int) map[int]structs.Vector[ring.Poly]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeLagrangeCoefficients ¶
ComputeLagrangeCoefficients computes the Lagrange coefficients for interpolation based on the indices of available shares.
func GaussianHash ¶
func GaussianHash(r *ring.Ring, hash []byte, mu string, sigmaU float64, boundU float64, length int) structs.Vector[ring.Poly]
Hashes parameters to a Gaussian distribution
func GenerateMAC ¶
func GenerateMAC(TildeD structs.Matrix[ring.Poly], MACKey []byte, partyID int, sid int, T []int, otherParty int, verify bool) []byte
GenerateMAC generates a MAC for a given TildeD matrix and mask
func GenerateRandomSeed ¶
func GenerateRandomSeed() []byte
GenerateRandomSeed generates a random seed of length ell
func Hash ¶
func Hash(A structs.Matrix[ring.Poly], b structs.Vector[ring.Poly], D map[int]structs.Matrix[ring.Poly], sid int, T []int) []byte
Hashes precomputable values
func LowNormHash ¶
func LowNormHash(r *ring.Ring, A structs.Matrix[ring.Poly], b structs.Vector[ring.Poly], h structs.Vector[ring.Poly], mu string, kappa int) ring.Poly
Hashes to low norm ring elements
func PRF ¶
func PRF(r *ring.Ring, sd_ij []byte, PRFKey []byte, mu string, hash []byte, n int) structs.Vector[ring.Poly]
PRF generates pseudorandom ring elements
func ShamirSecretSharing ¶
func ShamirSecretSharing(r *ring.Ring, s []ring.Poly, k int, lambdas []ring.Poly) map[int]structs.Vector[ring.Poly]
ShamirSecretSharing shares each coefficient of a vector of ring.Poly across k parties using (t, k)-threshold Shamir secret sharing. This optimized implementation only works when t = k.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.