X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fecdh.h;h=03ff77ae9f2429f5eb1b7a06814faed902fe6075;hb=a230bea6a2fc33876ff46478449e466a6407c09d;hp=6d3b2f10dbb222f1b93232f515ccf8dbee3e6612;hpb=0acdce222ff21c84cafc82c137e3d1e107a66fd9;p=meshlink diff --git a/src/ecdh.h b/src/ecdh.h index 6d3b2f10..03ff77ae 100644 --- a/src/ecdh.h +++ b/src/ecdh.h @@ -1,6 +1,6 @@ /* ecdh.h -- header file for ecdh.c - Copyright (C) 2011-2013 Guus Sliepen + Copyright (C) 2014 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 @@ -20,15 +20,15 @@ #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__ typedef struct ecdh ecdh_t; #endif -extern ecdh_t *ecdh_generate_public(void *pubkey); -extern bool ecdh_compute_shared(ecdh_t *ecdh, const void *pubkey, void *shared); +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