multi: fix make fmt
This commit is contained in:
77 files changed
+700
-641
No files matched your search
+2
-2
@@ -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
@@ -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
|
||||
|
||||
Reference in new issue
Block a user