invert method

  1. @override
Bls12Fp? invert()
override

Invert null of field is zero

Implementation

@override
Bls12Fp? invert() {
  final modulus = pow([
    BigInt.parse('0xb9feffffffffaaa9'),
    BigInt.parse('0x1eabfffeb153ffff'),
    BigInt.parse('0x6730d2a0f6b0f624'),
    BigInt.parse('0x64774b84f38512bf'),
    BigInt.parse('0x4b1ba7b6434bacd7'),
    BigInt.parse('0x1a0111ea397fe69a'),
  ]);
  if (isZero()) return null;
  return modulus;
}