In EC math, normal keys are encoded as (x, y) points (known as affine coordinates), but actual calculations are done in jacobian coordinates (x, y, z). Long term, having ec_scalar and ec_point be in Jacobian coordinates would be better (with conversion functions).