From: Christoph Fuerst Date: Mon, 10 Apr 2017 17:34:06 +0000 (+0200) Subject: Finally corrected DiscreteLog-Algorithm X-Git-Url: http://git.risc.jku.at/gitweb/?a=commitdiff_plain;h=c3efd54270ad03eb2c4a6482d4bc3f989d09169b;p=cfuerst%2Fformal-numbers.git Finally corrected DiscreteLog-Algorithm --- diff --git a/discrete_log.txt b/discrete_log.txt index c5c11a5..e92aa12 100644 --- a/discrete_log.txt +++ b/discrete_log.txt @@ -2,6 +2,7 @@ val M: ℕ; val K: ℕ; val L: ℕ; +val MAX: ℕ; type nat = ℕ[M]; type prime = ℕ[K]; @@ -20,13 +21,11 @@ proc InvModP(a:ℕ[K^2],p:prime): prime { var ainv:prime := 0; var i:prime; - - // straight search - // algorithmic alternative: Euclidean algorithm + for i=1;i