X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/b0b682aa5f6174deb5bde83701b191556986fe05..6ec3a4cf4aaa7cd375e1aa18f85861986259b8e5:/rho.c diff --git a/rho.c b/rho.c index aae4951..a02eeba 100644 --- a/rho.c +++ b/rho.c @@ -1,13 +1,13 @@ /* -*-c-*- * - * $Id: rho.c,v 1.3 2001/06/16 12:56:38 mdw Exp $ + * $Id: rho.c,v 1.5 2004/04/08 01:36:15 mdw Exp $ * * Pollard's rho algorithm for discrete logs * * (c) 2000 Straylight/Edgeware */ -/*----- Licensing notice --------------------------------------------------* +/*----- Licensing notice --------------------------------------------------* * * This file is part of Catacomb. * @@ -15,32 +15,18 @@ * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. - * + * * Catacomb 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 Library General Public License for more details. - * + * * You should have received a copy of the GNU Library General Public * License along with Catacomb; if not, write to the Free * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ -/*----- Revision history --------------------------------------------------* - * - * $Log: rho.c,v $ - * Revision 1.3 2001/06/16 12:56:38 mdw - * Fixes for interface change to @mpmont_expr@ and @mpmont_mexpr@. - * - * Revision 1.2 2000/10/08 12:11:22 mdw - * Use @MP_EQ@ instead of @MP_CMP@. - * - * Revision 1.1 2000/07/09 21:32:30 mdw - * Pollard's rho algorithm for computing discrete logs. - * - */ - /*----- Header files ------------------------------------------------------*/ #include "fibrand.h" @@ -215,7 +201,7 @@ static void prime_drop(void *x) MP_DROP(*(mp **)x); } -static rho_ops prime_ops = { +static const rho_ops prime_ops = { prime_sqr, prime_mul, prime_eq, prime_split, prime_drop };