VestaFq.conditionalSelect constructor

VestaFq.conditionalSelect(
  1. VestaFq a,
  2. VestaFq b,
  3. bool choice
)

Implementation

factory VestaFq.conditionalSelect(VestaFq a, VestaFq b, bool choice) {
  return VestaFq([
    BigintUtils.ctSelectBigInt(a.limbs[0], b.limbs[0], choice),
    BigintUtils.ctSelectBigInt(a.limbs[1], b.limbs[1], choice),
    BigintUtils.ctSelectBigInt(a.limbs[2], b.limbs[2], choice),
    BigintUtils.ctSelectBigInt(a.limbs[3], b.limbs[3], choice),
  ]);
}