コード例 #1
0
 public override ECFieldElement SquarePlusProduct(ECFieldElement x, ECFieldElement y)
 {
     ulong[] array  = this.x;
     ulong[] array2 = ((SecT283FieldElement)x).x;
     ulong[] y2     = ((SecT283FieldElement)y).x;
     ulong[] array3 = Nat.Create64(9);
     SecT283Field.SquareAddToExt(array, array3);
     SecT283Field.MultiplyAddToExt(array2, y2, array3);
     ulong[] z = Nat320.Create64();
     SecT283Field.Reduce(array3, z);
     return(new SecT283FieldElement(z));
 }
コード例 #2
0
        public override ECFieldElement MultiplyPlusProduct(ECFieldElement b, ECFieldElement x, ECFieldElement y)
        {
            ulong[] ax = this.x, bx = ((SecT283FieldElement)b).x;
            ulong[] xx = ((SecT283FieldElement)x).x, yx = ((SecT283FieldElement)y).x;

            ulong[] tt = Nat.Create64(9);
            SecT283Field.MultiplyAddToExt(ax, bx, tt);
            SecT283Field.MultiplyAddToExt(xx, yx, tt);

            ulong[] z = Nat320.Create64();
            SecT283Field.Reduce(tt, z);
            return(new SecT283FieldElement(z));
        }
コード例 #3
0
 public override ECFieldElement MultiplyPlusProduct(ECFieldElement b, ECFieldElement x, ECFieldElement y)
 {
     ulong[] numArray  = this.x;
     ulong[] numArray2 = ((SecT283FieldElement)b).x;
     ulong[] numArray3 = ((SecT283FieldElement)x).x;
     ulong[] numArray4 = ((SecT283FieldElement)y).x;
     ulong[] zz        = Nat.Create64(9);
     SecT283Field.MultiplyAddToExt(numArray, numArray2, zz);
     SecT283Field.MultiplyAddToExt(numArray3, numArray4, zz);
     ulong[] z = Nat320.Create64();
     SecT283Field.Reduce(zz, z);
     return(new SecT283FieldElement(z));
 }