case BR_EC_secp256r1:
return br_ec_p256_m31.generator(curve, len);
case BR_EC_curve25519:
+#if BR_INT128 || BR_UMUL128
+ return br_ec_c25519_m62.generator(curve, len);
+#else
return br_ec_c25519_m31.generator(curve, len);
+#endif
default:
return br_ec_prime_i31.generator(curve, len);
}
case BR_EC_secp256r1:
return br_ec_p256_m31.order(curve, len);
case BR_EC_curve25519:
+#if BR_INT128 || BR_UMUL128
+ return br_ec_c25519_m62.order(curve, len);
+#else
return br_ec_c25519_m31.order(curve, len);
+#endif
default:
return br_ec_prime_i31.order(curve, len);
}
case BR_EC_secp256r1:
return br_ec_p256_m31.xoff(curve, len);
case BR_EC_curve25519:
+#if BR_INT128 || BR_UMUL128
+ return br_ec_c25519_m62.xoff(curve, len);
+#else
return br_ec_c25519_m31.xoff(curve, len);
+#endif
default:
return br_ec_prime_i31.xoff(curve, len);
}
case BR_EC_secp256r1:
return br_ec_p256_m31.mul(G, Glen, kb, kblen, curve);
case BR_EC_curve25519:
+#if BR_INT128 || BR_UMUL128
+ return br_ec_c25519_m62.mul(G, Glen, kb, kblen, curve);
+#else
return br_ec_c25519_m31.mul(G, Glen, kb, kblen, curve);
+#endif
default:
return br_ec_prime_i31.mul(G, Glen, kb, kblen, curve);
}
case BR_EC_secp256r1:
return br_ec_p256_m31.mulgen(R, x, xlen, curve);
case BR_EC_curve25519:
+#if BR_INT128 || BR_UMUL128
+ return br_ec_c25519_m62.mulgen(R, x, xlen, curve);
+#else
return br_ec_c25519_m31.mulgen(R, x, xlen, curve);
+#endif
default:
return br_ec_prime_i31.mulgen(R, x, xlen, curve);
}
return br_ec_p256_m31.muladd(A, B, len,
x, xlen, y, ylen, curve);
case BR_EC_curve25519:
+#if BR_INT128 || BR_UMUL128
+ return br_ec_c25519_m62.muladd(A, B, len,
+ x, xlen, y, ylen, curve);
+#else
return br_ec_c25519_m31.muladd(A, B, len,
x, xlen, y, ylen, curve);
+#endif
default:
return br_ec_prime_i31.muladd(A, B, len,
x, xlen, y, ylen, curve);