size_t nlen, rlen, ulen;
uint32_t n0i, res;
+ /*
+ * If the curve is not supported, then report an error.
+ */
+ if (((impl->supported_curves >> pk->curve) & 1) == 0) {
+ return 0;
+ }
+
/*
* Get the curve parameters (generator and order).
*/
*/
ulen = cd->generator_len;
memcpy(eU, pk->q, ulen);
- res = impl->muladd(eU, cd->generator, ulen,
+ res = impl->muladd(eU, NULL, ulen,
tx, nlen, ty, nlen, cd->curve);
/*