Beispiel #1
0
 public static void Subtract(uint[] x, uint[] y, uint[] z)
 {
     if (Nat224.Sub(x, y, z) != 0)
     {
         SubPInvFrom(z);
     }
 }
Beispiel #2
0
 public static void Subtract(uint[] x, uint[] y, uint[] z)
 {
     if (Nat224.Sub(x, y, z) != 0)
     {
         Nat.Sub33From(7, 6803u, z);
     }
 }
        public static void Subtract(uint[] x, uint[] y, uint[] z)
        {
            int num = Nat224.Sub(x, y, z);

            if (num != 0)
            {
                SecP224R1Field.SubPInvFrom(z);
            }
        }
 public static void Negate(uint[] x, uint[] z)
 {
     if (Nat224.IsZero(x))
     {
         Nat224.Zero(z);
         return;
     }
     Nat224.Sub(SecP224R1Field.P, x, z);
 }
        public static void Subtract(uint[] x, uint[] y, uint[] z)
        {
            int c = Nat224.Sub(x, y, z);

            if (c != 0)
            {
                Nat.Sub33From(7, PInv33, z);
            }
        }
        public static void Subtract(uint[] x, uint[] y, uint[] z)
        {
            int c = Nat224.Sub(x, y, z);

            if (c != 0)
            {
                Nat224.SubDWord(PInv, z);
            }
        }
 public static uint[] FromBigInteger(BigInteger x)
 {
     uint[] z = Nat224.FromBigInteger(x);
     if (z[6] == P6 && Nat224.Gte(z, P))
     {
         Nat224.Sub(z, P, z);
     }
     return(z);
 }
        public static void Twice(uint[] x, uint[] z)
        {
            uint c = Nat224.ShiftUpBit(x, 0, z);

            if (c != 0 || (z[6] == P6 && Nat224.Gte(z, P)))
            {
                Nat224.Sub(z, P, z);
            }
        }
        public static void Subtract(uint[] x, uint[] y, uint[] z)
        {
            int c = Nat224.Sub(x, y, z);

            if (c != 0)
            {
                Nat224.Add(z, P, z);
            }
        }
Beispiel #10
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)))
            {
                Nat224.Sub(z, P, z);
            }
        }
Beispiel #11
0
        public static void Reduce32(uint x, uint[] z)
        {
            int c = Nat224.SubWord(x, z, 0) + (int)Nat224.AddWord(x, z, 3);

            if (c != 0 || (z[6] == P6 && Nat224.Gte(z, P)))
            {
                Nat224.Sub(z, P, z);
            }
        }
Beispiel #12
0
        public static void AddOne(uint[] x, uint[] z)
        {
            Nat224.Copy(x, z);
            uint c = Nat224.Inc(z, 0);

            if (c != 0 || (z[6] == P6 && Nat224.Gte(z, P)))
            {
                Nat224.Sub(z, P, z);
            }
        }
Beispiel #13
0
 public static void Negate(uint[] x, uint[] z)
 {
     if (Nat224.IsZero(x))
     {
         Nat224.Zero(z);
     }
     else
     {
         Nat224.Sub(P, x, z);
     }
 }