projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Refactor crypto RNG; add getrandom() support
[tinc]
/
src
/
ed25519
/
ecdh.c
diff --git
a/src/ed25519/ecdh.c
b/src/ed25519/ecdh.c
index
d0cd7e0
..
469f502
100644
(file)
--- a/
src/ed25519/ecdh.c
+++ b/
src/ed25519/ecdh.c
@@
-18,23
+18,23
@@
*/
#include "../system.h"
*/
#include "../system.h"
+#include "../random.h"
#include "ed25519.h"
#include "ed25519.h"
-#define
__TINC_ECDH_INTERNAL__
+#define
TINC_ECDH_INTERNAL
typedef struct ecdh_t {
uint8_t private[64];
} ecdh_t;
typedef struct ecdh_t {
uint8_t private[64];
} ecdh_t;
-#include "../crypto.h"
#include "../ecdh.h"
#include "../xalloc.h"
ecdh_t *ecdh_generate_public(void *pubkey) {
#include "../ecdh.h"
#include "../xalloc.h"
ecdh_t *ecdh_generate_public(void *pubkey) {
- ecdh_t *ecdh = xzalloc(sizeof
*ecdh
);
+ ecdh_t *ecdh = xzalloc(sizeof
(*ecdh)
);
uint8_t seed[32];
uint8_t seed[32];
- randomize(seed, sizeof
seed
);
+ randomize(seed, sizeof
(seed)
);
ed25519_create_keypair(pubkey, ecdh->private, seed);
return ecdh;
ed25519_create_keypair(pubkey, ecdh->private, seed);
return ecdh;