ecc_eh_to_a (const struct ecc_curve *ecc,
	     int op,
	     mp_limb_t *r, const mp_limb_t *p,
	     mp_limb_t *scratch)
{
#define izp scratch
#define tp (scratch + ecc->p.size)

#define xp p
#define yp (p + ecc->p.size)
#define zp (p + 2*ecc->p.size)

  assert(op == 0);

  /* Needs size + scratch for the invert call. */
  ecc->p.invert (&ecc->p, izp, zp, tp);

  ecc_mod_mul_canonical (&ecc->p, r, xp, izp, tp);
  ecc_mod_mul_canonical (&ecc->p, r + ecc->p.size, yp, izp, tp);
}
ecc_eh_to_a (const struct ecc_curve *ecc,
	     int op,
	     mp_limb_t *r, const mp_limb_t *p,
	     mp_limb_t *scratch)
{
#define izp scratch
#define tp (scratch + ecc->p.size)

#define xp p
#define yp (p + ecc->p.size)
#define zp (p + 2*ecc->p.size)

  assert(op == 0);

   
  ecc->p.invert (&ecc->p, izp, zp, tp);

  ecc_mod_mul_canonical (&ecc->p, r, xp, izp, tp);
  ecc_mod_mul_canonical (&ecc->p, r + ecc->p.size, yp, izp, tp);
}