コード例 #1
0
 public void SetFrom(ulong[] x, ulong[] y, ulong[] z, bool isInfinity)
 {
     ECCBase.Let(this.X, x);
     ECCBase.Let(this.Y, y);
     ECCBase.Let(this.Z, z);
     this.IsInfinity = false;
 }
コード例 #2
0
 public OwnECPoint ToECPoint(ECCBase ecc)
 {
     ulong[] inverse = new ulong[ecc.N];
     inverse[0] = 1;
     ecc.RemodFriendlyPrime(this.Z);
     AsmX64Operations.DivideModuloPrime(inverse, this.Z, ecc.P, ecc.N);
     ulong[] inverseSquare = inverse.ToArray();
     ecc.SquareModP(inverseSquare);
     ecc.MultiplyModP(inverse, inverseSquare);
     ulong[] nx = this.X.ToArray(); ecc.MultiplyModP(nx, inverseSquare);
     ulong[] ny = this.Y.ToArray(); ecc.MultiplyModP(ny, inverse);
     ecc.RemodFriendlyPrime(nx);
     ecc.RemodFriendlyPrime(ny);
     return(new OwnECPoint(nx, ny, this.IsInfinity));
 }
コード例 #3
0
 public void SetFrom(ulong[] x, ulong[] y, bool isInfinity)
 {
     ECCBase.Let(this.X, x);
     ECCBase.Let(this.Y, y);
     this.IsInfinity = isInfinity;
 }