Discrete log implementation that can serve as a benchmark for bigints