CVSROOT: /cvs Module name: src Changes by: js...@cvs.openbsd.org 2025/03/24 07:07:04
Modified files: lib/libcrypto/ec: ec_lib.c ec_local.h ec_mult.c ecp_methods.c Log message: Explicitly pass group generator to mul_double_nonct() from EC_POINT_mul(). EC_POINT_mul() has a complex multi-use interface - there are effectively three different ways it will behave, depending on which arguments are NULL. In the case where we compute g_scalar * generator + p_scalar * point, the mul_double_nonct() function pointer is called, however only g_scalar, p_scalar and point are passed - it is expected that the lower level implementation (in this case ec_wnaf_mul()) will use the generator from the group. Change mul_double_nonct(), ec_mul_double_nonct() and ec_wnaf_mul() so that they take scalar1, point1, scalar2 and point2. This removes all knowledge of g_scalar and the generator from the multiplication code, keeping it limited to EC_POINT_mul(). While here also consistently pass scalar then point, rather than a mix of scalar/point and point/scalar. ok tb@