Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 1 of 1 for ctEq (0.04 seconds)

  1. lib/fips140/v1.26.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...
    Created: Tue Apr 07 11:13:11 GMT 2026
    - Last Modified: Thu Jan 08 17:58:32 GMT 2026
    - 660.3K bytes
    - Click Count (0)
Back to Top