diff --git a/shamir/shamir.go b/shamir/shamir.go index fde60bfd1f85..d664e90a149c 100644 --- a/shamir/shamir.go +++ b/shamir/shamir.go @@ -168,7 +168,7 @@ func Split(secret []byte, parts, threshold int) ([][]byte, error) { } // Generate random list of x coordinates - xCoordinates := mathrand.Perm(255) + xCoordinates := mathrand.Perm(parts) // Allocate the output array, initialize the final byte // of the output with the offset. The representation of each