Exemple #1
0
        private static uint[] PointPrecompute(PointExt p, int count)
        {
            Debug.Assert(count > 0);

            PointExt q = PointCopy(p);
            PointExt d = PointCopy(q);

            PointDouble(d);

            uint[] table = X448Field.CreateTable(count * 3);
            int    off   = 0;

            int i = 0;

            for (;;)
            {
                F.Copy(q.x, 0, table, off);     off += F.Size;
                F.Copy(q.y, 0, table, off);     off += F.Size;
                F.Copy(q.z, 0, table, off);     off += F.Size;

                if (++i == count)
                {
                    break;
                }

                PointAdd(d, q);
            }

            return(table);
        }