@@ -451,6 +451,42 @@ extern const br_ec_impl br_ec_p256_m15;
451451 */
452452extern const br_ec_impl br_ec_p256_m31 ;
453453
454+ /**
455+ * \brief EC implementation "m62" (specialised code) for P-256.
456+ *
457+ * This implementation uses custom code relying on multiplication of
458+ * integers up to 64 bits, with a 128-bit result. This implementation is
459+ * defined only on platforms that offer the 64x64->128 multiplication
460+ * support; use `br_ec_p256_m62_get()` to dynamically obtain a pointer
461+ * to that implementation.
462+ */
463+ extern const br_ec_impl br_ec_p256_m62 ;
464+
465+ /**
466+ * \brief Get the "m62" implementation of P-256, if available.
467+ *
468+ * \return the implementation, or 0.
469+ */
470+ const br_ec_impl * br_ec_p256_m62_get (void );
471+
472+ /**
473+ * \brief EC implementation "m64" (specialised code) for P-256.
474+ *
475+ * This implementation uses custom code relying on multiplication of
476+ * integers up to 64 bits, with a 128-bit result. This implementation is
477+ * defined only on platforms that offer the 64x64->128 multiplication
478+ * support; use `br_ec_p256_m64_get()` to dynamically obtain a pointer
479+ * to that implementation.
480+ */
481+ extern const br_ec_impl br_ec_p256_m64 ;
482+
483+ /**
484+ * \brief Get the "m64" implementation of P-256, if available.
485+ *
486+ * \return the implementation, or 0.
487+ */
488+ const br_ec_impl * br_ec_p256_m64_get (void );
489+
454490/**
455491 * \brief EC implementation "i15" (generic code) for Curve25519.
456492 *
@@ -531,6 +567,30 @@ extern const br_ec_impl br_ec_c25519_m62;
531567 */
532568const br_ec_impl * br_ec_c25519_m62_get (void );
533569
570+ /**
571+ * \brief EC implementation "m64" (specialised code) for Curve25519.
572+ *
573+ * This implementation uses custom code relying on multiplication of
574+ * integers up to 64 bits, with a 128-bit result. This implementation is
575+ * defined only on platforms that offer the 64x64->128 multiplication
576+ * support; use `br_ec_c25519_m64_get()` to dynamically obtain a pointer
577+ * to that implementation. Due to the specificities of the curve
578+ * definition, the following applies:
579+ *
580+ * - `muladd()` is not implemented (the function returns 0 systematically).
581+ * - `order()` returns 2^255-1, since the point multiplication algorithm
582+ * accepts any 32-bit integer as input (it clears the top bit and low
583+ * three bits systematically).
584+ */
585+ extern const br_ec_impl br_ec_c25519_m64 ;
586+
587+ /**
588+ * \brief Get the "m64" implementation of Curve25519, if available.
589+ *
590+ * \return the implementation, or 0.
591+ */
592+ const br_ec_impl * br_ec_c25519_m64_get (void );
593+
534594/**
535595 * \brief Aggregate EC implementation "m15".
536596 *
0 commit comments