public static BigInteger SolveDLP(BigInteger g, BigInteger h, BigInteger p) { var startTime = System.Diagnostics.Stopwatch.StartNew(); var x = RhoPollard.SolveDLP(g, h, p); startTime.Stop(); var resultTime = startTime.Elapsed; ElapsedTime = String.Format("{0:00}:{1:00}:{2:00}.{3:000}", resultTime.Hours, resultTime.Minutes, resultTime.Seconds, resultTime.Milliseconds); StepsCount = RhoPollard.StepsCount; return(x); }
public static BigInteger SolveDLP(ProjectivePoint P, ProjectivePoint Q) { var startTime = System.Diagnostics.Stopwatch.StartNew(); var x = RhoPollard.SolveDLP(P, Q); startTime.Stop(); var resultTime = startTime.Elapsed; TimeInSec = resultTime.Hours * 3600 + resultTime.Minutes * 60 + resultTime.Seconds + (resultTime.Milliseconds * 1.0) / (1.0 * 100); ElapsedTime = String.Format("{0:00}:{1:00}:{2:00}.{3:000}", resultTime.Hours, resultTime.Minutes, resultTime.Seconds, resultTime.Milliseconds); StepsCount = RhoPollard.StepsCount; return(x); }