Change-Id: I6d76fe4a307be0f976ccaeeedb6f08d672ae4851
GitHub-Last-Rev:
a9554cdb47489b9160d3f03efd41898b244f13d0
GitHub-Pull-Request: golang/go#65992
Reviewed-on: https://go-review.googlesource.com/c/go/+/567675
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Roland Shoemaker <roland@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
Auto-Submit: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
return not(choice(c1 | c2))
}
-// ctGeq returns 1 if x >= y, and 0 otherwise. The execution time of this
-// function does not depend on its inputs.
-func ctGeq(x, y uint) choice {
- // If x < y, then x - y generates a carry.
- _, carry := bits.Sub(x, y, 0)
- return not(choice(carry))
-}
-
// Nat represents an arbitrary natural number
//
// Each Nat has an announced length, which is the number of limbs it has stored.