/* -*-c-*-
*
- * $Id: ec-bin.c,v 1.5 2004/03/27 17:54:11 mdw Exp $
+ * $Id: ec-bin.c,v 1.6 2004/04/01 12:50:09 mdw Exp $
*
* Arithmetic for elliptic curves over binary fields
*
/*----- Revision history --------------------------------------------------*
*
* $Log: ec-bin.c,v $
+ * Revision 1.6 2004/04/01 12:50:09 mdw
+ * Add cyclic group abstraction, with test code. Separate off exponentation
+ * functions for better static linking. Fix a buttload of bugs on the way.
+ * Generally ensure that negative exponents do inversion correctly. Add
+ * table of standard prime-field subgroups. (Binary field subgroups are
+ * currently unimplemented but easy to add if anyone ever finds a good one.)
+ *
* Revision 1.5 2004/03/27 17:54:11 mdw
* Standard curves and curve checking.
*
int rc;
mp *u, *v;
+ if (EC_ATINF(p)) return (0);
v = F_SQR(f, MP_NEW, p->x);
u = F_MUL(f, MP_NEW, v, p->x);
v = F_MUL(f, v, v, c->a);
}
static const ec_ops ec_binops = {
- ecdestroy, ec_idin, ec_idout, ec_idfix,
+ ecdestroy, ec_stdsamep, ec_idin, ec_idout, ec_idfix,
ecfind, ecneg, ecadd, ec_stdsub, ecdbl, eccheck
};
static const ec_ops ec_binprojops = {
- ecdestroy, ec_projin, ec_projout, ec_projfix,
+ ecdestroy, ec_stdsamep, ec_projin, ec_projout, ec_projfix,
ecfind, ecprojneg, ecprojadd, ec_stdsub, ecprojdbl, ecprojcheck
};