sqrt method

  1. @override
FieldSqrtResult<JubJubFr> sqrt()
override

Implementation

@override
FieldSqrtResult<JubJubFr> sqrt() {
  // (t - 1) // 2 as four u64s
  final sqrt = powVartime([
    BigInt.parse("0xb425c397b5bdcb2e"),
    BigInt.parse("0x299a0824f3320420"),
    BigInt.parse("0x4199cec0404d0ec0"),
    BigInt.parse("0x039f6d3a994cebea"),
  ]);
  return FieldSqrtResult(sqrt, (sqrt * sqrt) == this);
}