public static void Reduce(uint[] xx, uint[] z)
	{
		ulong y = Nat256.Mul33Add(977u, xx, 8, xx, 0, z, 0);
		if (Nat256.Mul33DWordAdd(977u, y, z, 0) != 0 || (z[7] == uint.MaxValue && Nat256.Gte(z, P)))
		{
			Nat.Add33To(8, 977u, z);
		}
	}
Beispiel #2
0
        public static void Reduce(uint[] xx, uint[] z)
        {
            ulong cc = Nat256.Mul33Add(PInv33, xx, 8, xx, 0, z, 0);
            uint  c  = Nat256.Mul33DWordAdd(PInv33, cc, z, 0);

            Debug.Assert(c == 0 || c == 1);

            if (c != 0 || (z[7] == P7 && Nat256.Gte(z, P)))
            {
                Nat.Add33To(8, PInv33, z);
            }
        }