Skip to main content

select

Function select 

Source
pub fn select(
    b: &CircuitBuilder,
    cond: Wire,
    pt: &Secp256k1Affine,
    pf: &Secp256k1Affine,
) -> Secp256k1Affine
Expand description

Conditionally selects between two affine secp256k1 points.

§Arguments

  • builder - Circuit builder for constraint generation
  • cond - an MSB-boolean
  • t - Value to select when cond is true (MSB=1)
  • f - Value to select when cond is false (MSB=0)

§Return value

Selects t if cond is true, otherwise selects f.