- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for ctEq (0.04 sec)
-
lib/fips140/v1.0.0.zip
not(c choice) choice { return 1 ^ c } const yes = choice(1) const no = choice(0) // ctMask is all 1s if on is yes, and all 0s otherwise. func ctMask(on choice) uint { return -uint(on) } // ctEq returns 1 if x == y, and 0 otherwise. The execution time of this // function does not depend on its inputs. func ctEq(x, y uint) choice { // If x != y, then either x - y or y - x will generate a carry. _, c1 := bits.Sub(x, y, 0) _, c2 := bits.Sub(y, x, 0) return not(choice(c1 | c2)) } // Nat represents an...
Registered: Tue Sep 09 11:13:09 UTC 2025 - Last Modified: Wed Jan 29 15:10:35 UTC 2025 - 635K bytes - Viewed (0)