additionStep method

  1. @override
Bls12NativeFp12 additionStep(
  1. Bls12NativeFp12 f
)
override

Performs an addition step on the accumulated value.

Implementation

@override
Bls12NativeFp12 additionStep(Bls12NativeFp12 f) {
  for (final term in terms) {
    final eitherIdentity = term.$1.isIdentity() | term.$2.infinity;

    final newF = Bls12PairingUtils.ell(f, term.$2.coeffs[index], term.$1);
    f = Bls12NativeFp12.conditionalSelect(newF, f, eitherIdentity);
  }
  _index += 1;
  return f;
}