Commit 1b4072de authored by Mike Hamburg's avatar Mike Hamburg

fix(?) perf regression in monty_aux_step

parent d274c648
......@@ -258,21 +258,23 @@ void
montgomery_aux_step (
struct montgomery_aux_t* a
) {
field_add ( a->xs, a->xa, a->za );
field_sub ( a->zs, a->xa, a->za );
field_add ( a->xa, a->xd, a->zd );
field_sub ( a->za, a->xd, a->zd );
ANALYZE_THIS_ROUTINE_CAREFULLY;
field_add_nr ( a->xs, a->xa, a->za );
field_subx_nr ( a->zs, a->xa, a->za );
field_add_nr ( a->xa, a->xd, a->zd );
field_subx_nr ( a->za, a->xd, a->zd );
field_mul ( a->xd, a->xa, a->zs );
field_mul ( a->zd, a->xs, a->za );
field_add ( a->xs, a->xd, a->zd );
field_sub ( a->zd, a->xd, a->zd );
field_add_nr ( a->xs, a->xd, a->zd );
field_subx_nr ( a->zd, a->xd, a->zd );
field_mul ( a->zs, a->zd, a->s0 );
field_sqr ( a->zd, a->xa );
field_sqr ( a->xa, a->za );
field_sub ( a->za, a->zd, a->xa );
field_subx_nr ( a->za, a->zd, a->xa );
IF32( field_weak_reduce( a->za ) );
field_mul ( a->xd, a->xa, a->zd );
field_mulw_scc_wr ( a->zd, a->xa, 1-EDWARDS_D );
field_add ( a->xa, a->za, a->zd );
field_add_nr ( a->xa, a->za, a->zd );
field_mul ( a->zd, a->xa, a->za );
field_sqr ( a->xa, a->xs );
field_sqr ( a->za, a->zs );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment