Ejemplo n.º 1
0
            public virtual ECPoint Lookup(int index)
            {
                ulong[] x   = Nat192.Create64(), y = Nat192.Create64();
                int     pos = 0;

                for (int i = 0; i < m_size; ++i)
                {
                    ulong MASK = (ulong)(long)(((i ^ index) - 1) >> 31);

                    for (int j = 0; j < SECT131R2_FE_LONGS; ++j)
                    {
                        x[j] ^= m_table[pos + j] & MASK;
                        y[j] ^= m_table[pos + SECT131R2_FE_LONGS + j] & MASK;
                    }

                    pos += (SECT131R2_FE_LONGS * 2);
                }

                return(m_outer.CreateRawPoint(new SecT131FieldElement(x), new SecT131FieldElement(y), false));
            }
Ejemplo n.º 2
0
 private ECPoint CreatePoint(ulong[] x, ulong[] y)
 {
     return(m_outer.CreateRawPoint(new SecT131FieldElement(x), new SecT131FieldElement(y), SECT131R2_AFFINE_ZS, false));
 }