X-Git-Url: https://git.distorted.org.uk/~mdw/secnet/blobdiff_plain/b7a5ecfcbac18c56d0b044975f6ed6835dd86ab4..0bcb8184cfce875a4dde57621139dd44c433f3a5:/fgoldi.h diff --git a/fgoldi.h b/fgoldi.h index b05fd77..1857008 100644 --- a/fgoldi.h +++ b/fgoldi.h @@ -1,3 +1,39 @@ +/* + * fgoldi.h: arithmetic modulo 2^448 - 2^224 - 1 + */ +/* + * 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 lightly modified for Secnet (2017-04-30): + * + * * Use `fake-mLib-bits.h' in place of the real . + * + * * Remove the 16/32-bit implementation, since C99 always has 64-bit + * arithmetic. + * + * The file's original comment headers are preserved below. + */ /* -*-c-*- * * Arithmetic in the Goldilocks field GF(2^448 - 2^224 - 1) @@ -34,7 +70,7 @@ /*----- Header files ------------------------------------------------------*/ -#include +#include "fake-mLib-bits.h" #ifndef CATACOMB_QFARITH_H # include "qfarith.h" @@ -44,7 +80,6 @@ typedef union { int32 p28[16]; - int16 p12[40]; } fgoldi; #if !defined(FGOLDI_IMPL) && defined(HAVE_INT64)