Exemple #1
0
 public override ECFieldElement Invert()
 {
     //return new SM2P256V1FieldElement(ToBigInteger().ModInverse(Q));
     uint[] z = Nat256.Create();
     SM2P256V1Field.Inv(x, z);
     return(new SM2P256V1FieldElement(z));
 }
Exemple #2
0
 public override ECFieldElement Divide(ECFieldElement b)
 {
     //return Multiply(b.Invert());
     uint[] z = Nat256.Create();
     SM2P256V1Field.Inv(((SM2P256V1FieldElement)b).x, z);
     SM2P256V1Field.Multiply(z, x, z);
     return(new SM2P256V1FieldElement(z));
 }