예제 #1
0
 public static void Add(uint[] x, uint[] y, uint[] z)
 {
     if (Nat224.Add(x, y, z) != 0 || (z[6] == uint.MaxValue && Nat224.Gte(z, P)))
     {
         Nat.Add33To(7, 6803u, z);
     }
 }
예제 #2
0
        public static void Add(uint[] x, uint[] y, uint[] z)
        {
            uint c = Nat224.Add(x, y, z);

            if (c != 0 || (z[6] == P6 && Nat224.Gte(z, P)))
            {
                Nat.Add33To(7, PInv33, z);
            }
        }
예제 #3
0
        public static void Add(uint[] x, uint[] y, uint[] z)
        {
            uint c = Nat224.Add(x, y, z);

            if (c != 0 || (z[6] == P6 && Nat224.Gte(z, P)))
            {
                AddPInvTo(z);
            }
        }
예제 #4
0
    public static void Half(uint[] x, uint[] z)
    {
        if ((x[0] & 1) == 0)
        {
            Nat.ShiftDownBit(7, x, 0u, z);
            return;
        }
        uint c = Nat224.Add(x, P, z);

        Nat.ShiftDownBit(7, z, c);
    }