* (c) 2004 Straylight/Edgeware
*/
-/*----- Licensing notice --------------------------------------------------*
+/*----- Licensing notice --------------------------------------------------*
*
* This file is part of Catacomb.
*
* 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,
static void gmexp(group *gg, ec *d, const group_expfactor *f, size_t n) {
gctx_ec *g = (gctx_ec *)gg; size_t i;
- ec_mulfactor *ff = xmalloc(n * sizeof(ec_mulfactor));
+ ec_mulfactor *ff = xmalloc(n * sizeof(ec_mulfactor));
for (i = 0; i < n; i++) { ff[i].base = *f[i].base; ff[i].exp = f[i].exp; }
ec_immul(g->ei.c, d, ff, n); xfree(ff);
}
rc = EC_CHECK(g->ei.c, &t); if (!rc) EC_COPY(d, &t); EC_DESTROY(&t);
return (rc);
}
-
+
static int gtobuf(group *gg, buf *b, ec *x) {
gctx_ec *g = (gctx_ec *)gg; ec t = EC_INIT; int rc;
EC_OUT(g->ei.c, &t, x); rc = buf_putec(b, &t); EC_DESTROY(&t); return (rc);