diff --git a/library/ecp.c b/library/ecp.c index afa795525..4c7cdbfb1 100644 --- a/library/ecp.c +++ b/library/ecp.c @@ -952,7 +952,9 @@ static int ecp_double_jac( const ecp_group *grp, ecp_point *R, MOD_SUB( X3 ); } else + { MPI_CHK( mpi_mul_mpi( &X3, &X3, &grp->A ) ); MOD_MUL( X3 ); + } MPI_CHK( mpi_add_mpi( &T3, &T3, &X3 ) ); MOD_ADD( T3 ); MPI_CHK( mpi_mul_mpi( &X3, &T3, &T3 ) ); MOD_MUL( X3 );