context returns the context slice to be used when encrypting a share
(suite suites.Suite, dealer kyber.Point, verifiers []kyber.Point)
| 42 | |
| 43 | // context returns the context slice to be used when encrypting a share |
| 44 | func 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 | } |