X-Git-Url: https://git.distorted.org.uk/~mdw/secnet/blobdiff_plain/b7a5ecfcbac18c56d0b044975f6ed6835dd86ab4..0bcb8184cfce875a4dde57621139dd44c433f3a5:/x25519.h diff --git a/x25519.h b/x25519.h index 56008df..b7b03e6 100644 --- a/x25519.h +++ b/x25519.h @@ -1,3 +1,38 @@ +/* + * x25519.h: Bernstein's X25519 key-exchange function + */ +/* + * This file is Free Software. It has been modified to as part of its + * incorporation into secnet. + * + * Copyright 2017 Mark Wooding + * + * You may redistribute this file and/or modify it under the terms of + * the permissive licence shown below. + * + * You may redistribute secnet as a whole and/or modify it under the + * terms of the GNU General Public License as published by the Free + * Software Foundation; either version 3, or (at your option) any + * later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see + * https://www.gnu.org/licenses/gpl.html. + */ +/* + * Imported from Catacomb, and modified for Secnet (2017-04-30): + * + * * Use `fake-mLib-bits.h' in place of the real . + * + * * Strip out the key-management definitions. + * + * The file's original comment headers are preserved below. + */ /* -*-c-*- * * The X25519 key-agreement algorithm @@ -45,11 +80,7 @@ /*----- Header files ------------------------------------------------------*/ -#include - -#ifndef CATACOMB_KEY_H -# include "key.h" -#endif +#include "fake-mLib-bits.h" /*----- Important constants -----------------------------------------------*/ @@ -59,15 +90,6 @@ extern const octet x25519_base[32]; -/*----- Key fetching ------------------------------------------------------*/ - -typedef struct x25519_priv { key_bin priv, pub; } x25519_priv; -typedef struct x25519_pub { key_bin pub; } x25519_pub; - -extern const key_fetchdef x25519_pubfetch[], x25519_privfetch[]; -#define X25519_PUBFETCHSZ 3 -#define X25519_PRIVFETCHSZ 6 - /*----- Functions provided ------------------------------------------------*/ /* --- @x25519@ --- *