Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for ctEq (0.17 sec)

  1. src/crypto/internal/bigmod/nat.go

    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)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 18:57:38 UTC 2024
    - 24K bytes
    - Viewed (0)
Back to top