X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fecdh.h;h=eb66ec0d17713bcd706ce747b60aef1b5a8ceeb4;hb=3a9f2423b3be9423619f74ff5ea277fcb6e28660;hp=fbd47292b614ca06098dd3153974b918918266c8;hpb=7b949262c4c01fdeff30a612d43f4b64f1ad426f;p=meshlink diff --git a/src/ecdh.h b/src/ecdh.h index fbd47292..eb66ec0d 100644 --- a/src/ecdh.h +++ b/src/ecdh.h @@ -1,6 +1,9 @@ +#ifndef MESHLINK_ECDH_H +#define MESHLINK_ECDH_H + /* ecdh.h -- header file for ecdh.c - Copyright (C) 2011-2013 Guus Sliepen + Copyright (C) 2014, 2017 Guus Sliepen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,18 +20,15 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef __TINC_ECDH_H__ -#define __TINC_ECDH_H__ - -#define ECDH_SIZE 67 -#define ECDH_SHARED_SIZE 66 +#define ECDH_SIZE 32 +#define ECDH_SHARED_SIZE 32 -#ifndef __TINC_ECDH_INTERNAL__ +#ifndef __MESHLINK_ECDH_INTERNAL__ typedef struct ecdh ecdh_t; #endif -extern ecdh_t *ecdh_generate_public(void *pubkey) __attribute__ ((__malloc__)); -extern bool ecdh_compute_shared(ecdh_t *ecdh, const void *pubkey, void *shared) __attribute__ ((__warn_unused_result__)); +extern ecdh_t *ecdh_generate_public(void *pubkey) __attribute__((__malloc__)); +extern bool ecdh_compute_shared(ecdh_t *ecdh, const void *pubkey, void *shared) __attribute__((__warn_unused_result__)); extern void ecdh_free(ecdh_t *ecdh); #endif