~mdw
/
tripe
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
76e91db
)
server/dh.c: Set the correct scalar size when loading XDH keys.
author
Mark Wooding
<mdw@distorted.org.uk>
Sun, 9 Jul 2017 18:31:58 +0000
(19:31 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Sun, 9 Jul 2017 18:31:58 +0000
(19:31 +0100)
This was left hardcoded as 32 bytes, which means that X448 could never
work. (The `x448_stsc' function always fails because the buffer size
doesn't match its expectation.)
server/dh.c
patch
|
blob
|
blame
|
history
diff --git
a/server/dh.c
b/server/dh.c
index
5c27a07
..
014446e
100644
(file)
--- a/
server/dh.c
+++ b/
server/dh.c
@@
-702,7
+702,9
@@
static void ecdh_freege(const dhgrp *gg, dhge *YY)
} \
\
KLOAD(xdh, xdh, XDH, \
- { kd->grp = CREATE(dhgrp); kd->grp->scsz = 32; }, \
+ { kd->grp = CREATE(dhgrp); \
+ kd->grp->scsz = XDH##_KEYSZ; \
+ }, \
{ if ((kd->k = xdh##_bintosc(&p.priv)) == 0) { \
a_format(e, "bad-private-key", A_END); \
goto fail; \