projects
/
cfuerst
/
formal-numbers.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b96a057
)
b is actually a prime
author
Christoph Fuerst
<ch.fuerst@gmx.at>
Sat, 8 Apr 2017 17:39:03 +0000
(19:39 +0200)
committer
Christoph Fuerst
<ch.fuerst@gmx.at>
Sat, 8 Apr 2017 17:39:03 +0000
(19:39 +0200)
discrete_log.txt
patch
|
blob
|
history
diff --git
a/discrete_log.txt
b/discrete_log.txt
index
08e5964
..
30b5143
100644
(file)
--- a/
discrete_log.txt
+++ b/
discrete_log.txt
@@
-52,7
+52,7
@@
proc IntegerRoot(a:nat): nat
proc DiscreteLog(p:prime,g:nat,a:nat): res
requires 1 < p ∧ isPrime(p) ∧ // p is a prime greater than 1
1 < g ∧ g < p ∧
- ∀b:
nat
. (0 < b ∧ b < p-1) ⇒ (g^b % p ≠ 1) ∧ g^(p-1)%p = 1 ∧ // g has order p-1
+ ∀b:
prime
. (0 < b ∧ b < p-1) ⇒ (g^b % p ≠ 1) ∧ g^(p-1)%p = 1 ∧ // g has order p-1
0 < a ∧ a < p; // a is in ℤ/pℤ - {0}
ensures (g^result)%p = a;
{