~mdw
/
catacomb
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
9cbd8bb
)
pub/dh-kcdsa.c: Choose the cofactor size correctly.
author
Mark Wooding
<mdw@distorted.org.uk>
Wed, 23 Oct 2019 03:11:05 +0000
(
04:11
+0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Sat, 9 May 2020 19:57:33 +0000
(20:57 +0100)
Considering that we're going to have to multiply in a factor of 2 at
some point.
pub/dh-kcdsa.c
patch
|
blob
|
blame
|
history
diff --git
a/pub/dh-kcdsa.c
b/pub/dh-kcdsa.c
index
6bd3e19
..
e366a16
100644
(file)
--- a/
pub/dh-kcdsa.c
+++ b/
pub/dh-kcdsa.c
@@
-71,7
+71,7
@@
int dh_kcdsagen(dh_param *dp, unsigned ql, unsigned pl,
/* --- First trick: find %$v$% --- */
pf.step = 2;
- x = mprand(x, pl - ql, r, 1);
+ x = mprand(x, pl - ql
- 1
, r, 1);
x = pgen("v", x, x, ev, ec,
steps, pgen_filter, &pf,
rabin_iters(pl - ql), pgen_test, &rb);