multi: fix make fmt

This commit is contained in:
yyforyongyu committed 2022-08-23 22:10:24 +08:00
1 parent 3851f286b9
commit 0735522194
77 files changed
+700 -641

No files matched your search

+2 -2
View File
@@ -60,8 +60,8 @@ func (c *Child) String() string {
// DeriveChild computes the child preimage and child hash for a given (root,
// share, index) tuple. The derivation is defined as:
//
// child_preimage = SHA256(root || share || be32(index)),
// child_hash = SHA256(child_preimage).
// child_preimage = SHA256(root || share || be32(index)),
// child_hash = SHA256(child_preimage).
func DeriveChild(root Share, desc ChildDesc) *Child {
var (
indexBytes [4]byte
+6 -4
View File
@@ -165,12 +165,14 @@ func ReconstructChildren(descs ...ChildDesc) []*Child {
// split splits a share into two random values, that when XOR'd reproduce the
// original share. Given a share s, the two shares are derived as:
// left <-$- random
// right = parent ^ left.
//
// left <-$- random
// right = parent ^ left.
//
// When reconstructed, we have that:
// left ^ right = left ^ parent ^ left
// = parent.
//
// left ^ right = left ^ parent ^ left
// = parent.
func split(parent *Share) (Share, Share, error) {
// Generate a random share for the left child.
var left Share