Пример #1
0
 public static uint[] FromBigInteger(BigInteger x)
 {
     uint[] z = Nat256.FromBigInteger(x);
     while (Nat256.Gte(z, P))
     {
         Nat256.SubFrom(P, z);
     }
     return(z);
 }
Пример #2
0
 public static uint[] FromBigInteger(BigInteger x)
 {
     uint[] z = Nat256.FromBigInteger(x);
     if (z[7] == P7 && Nat256.Gte(z, P))
     {
         Nat256.SubFrom(P, z);
     }
     return(z);
 }
Пример #3
0
 public static uint[] FromBigInteger(BigInteger x)
 {
     uint[] array = Nat256.FromBigInteger(x);
     if (array[7] == uint.MaxValue && Nat256.Gte(array, P))
     {
         Nat256.SubFrom(P, array);
     }
     return(array);
 }
Пример #4
0
 public static uint[] FromBigInteger(BigInteger x)
 {
     uint[] array = Nat256.FromBigInteger(x);
     while (Nat256.Gte(array, P))
     {
         Nat256.SubFrom(P, array);
     }
     return(array);
 }
Пример #5
0
 public static uint[] FromBigInteger(BigInteger x)
 {
     uint[] array = Nat256.FromBigInteger(x);
     while (Nat256.Gte(array, Curve25519Field.P))
     {
         Nat256.SubFrom(Curve25519Field.P, array);
     }
     return(array);
 }