~edwargix/tallyard

98795274e861981276b5f4c1cdb45535ba288f7d — David Florness 5 years ago 07da363
Fix RandomBigInt
1 files changed, 2 insertions(+), 2 deletions(-)

M poly.go
M poly.go => poly.go +2 -2
@@ 18,10 18,10 @@ func RandomBigInt(numBytes uint, allowAllZeros bool) (*big.Int, error) {
		return nil, err
	}
	bi := new(big.Int).SetBytes(randBytes)
	if bi.Cmp(big.NewInt(0)) == 0 {
	if !allowAllZeros && bi.Cmp(big.NewInt(0)) == 0 {
		return RandomBigInt(numBytes, allowAllZeros)
	}
	return bi.SetBytes(randBytes), nil
	return bi, nil
}

// creates a random polynomial of the given degree, uses at least `entropy' bits