- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for ctEq (0.04 sec)
-
lib/fips140/v1.0.0-c2097c7c.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 Dec 30 11:13:12 UTC 2025 - Last Modified: Thu Sep 25 19:53:19 UTC 2025 - 642.7K bytes - Viewed (0) -
lib/fips140/v1.1.0-rc1.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 Dec 30 11:13:12 UTC 2025 - Last Modified: Thu Dec 11 16:27:41 UTC 2025 - 663K bytes - Viewed (0)