MCPcopy Create free account
hub / github.com/DOSNetwork/core / context

Function context

share/vss/pedersen/dh.go:44–53  ·  view source on GitHub ↗

context returns the context slice to be used when encrypting a share

(suite suites.Suite, dealer kyber.Point, verifiers []kyber.Point)

Source from the content-addressed store, hash-verified

42
43// context returns the context slice to be used when encrypting a share
44func context(suite suites.Suite, dealer kyber.Point, verifiers []kyber.Point) []byte {
45 h := suite.Hash()
46 _, _ = h.Write([]byte("vss-dealer"))
47 _, _ = dealer.MarshalTo(h)
48 _, _ = h.Write([]byte("vss-verifiers"))
49 for _, v := range verifiers {
50 _, _ = v.MarshalTo(h)
51 }
52 return h.Sum(nil)
53}

Callers 3

TestVSSContextFunction · 0.85
NewDealerFunction · 0.85
NewVerifierFunction · 0.85

Calls 3

HashMethod · 0.45
WriteMethod · 0.45
MarshalToMethod · 0.45

Tested by 1

TestVSSContextFunction · 0.68