public static BigInteger SolveDLP(BigInteger g, BigInteger h, BigInteger p)
        {
            var order         = p - 1;
            var input         = new DLPInput(g, h, p, order);
            var factorBase    = BigIntegerExtension.GetFactorBase(FactorBaseSize);
            var coefficients  = new List <List <BigInteger> >();
            var constantTerms = new List <BigInteger>();

            FirstStep(input, factorBase, ref coefficients, ref constantTerms);
            Console.WriteLine("First step done");
            var factorBaseLogs = SecondStep(input, ref factorBase, Converter.ToTwoDimensionalBigIntegerArray(coefficients), constantTerms.ToArray());

            Console.WriteLine("Second step done");
            if (factorBaseLogs == null)
            {
                return(-1);
            }
            for (int i = 0; i < factorBaseLogs.Length; i++)
            {
                var        l   = factorBaseLogs[i];
                BigInteger pow = -1;
                if (l != -1)
                {
                    pow = BigInteger.ModPow(g, l, p);
                }
                var pr = factorBase[i];
                Console.WriteLine(pow + " = " + pr);
            }
            var x = ThirdStep(input, factorBase, factorBaseLogs);

            Console.WriteLine("Third step done");
            ReducedFactorBaseSize = factorBase.Length;
            return(x);
        }