public override ECFieldElement Invert() { //return new SecP256R1FieldElement(ToBigInteger().ModInverse(Q)); uint[] z = Nat256.Create(); SecP256R1Field.Inv(x, z); return(new SecP256R1FieldElement(z)); }
public override ECFieldElement Divide(ECFieldElement b) { //return Multiply(b.Invert()); uint[] z = Nat256.Create(); SecP256R1Field.Inv(((SecP256R1FieldElement)b).x, z); SecP256R1Field.Multiply(z, x, z); return(new SecP256R1FieldElement(z)); }