Пример #1
0
        public static void AddOne(uint[] x, uint[] z)
        {
            Nat192.Copy(x, z);
            uint c = Nat192.Inc(z, 0);

            if (c != 0 || (z[5] == P5 && Nat192.Gte(z, P)))
            {
                Nat192.Sub(z, P, z);
            }
        }
Пример #2
0
        public override ECLookupTable CreateCacheSafeLookupTable(ECPoint[] points, int off, int len)
        {
            uint[] table = new uint[len * SECP192K1_FE_INTS * 2];
            {
                int pos = 0;
                for (int i = 0; i < len; ++i)
                {
                    ECPoint p = points[off + i];
                    Nat192.Copy(((SecP192K1FieldElement)p.RawXCoord).x, 0, table, pos); pos += SECP192K1_FE_INTS;
                    Nat192.Copy(((SecP192K1FieldElement)p.RawYCoord).x, 0, table, pos); pos += SECP192K1_FE_INTS;
                }
            }

            return(new SecP192K1LookupTable(this, table, len));
        }