diff options
Diffstat (limited to 'src/math/bigint')
-rw-r--r-- | src/math/bigint/monty_generic/mp_monty.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/math/bigint/monty_generic/mp_monty.cpp b/src/math/bigint/monty_generic/mp_monty.cpp index d8c88a7e7..bce35259a 100644 --- a/src/math/bigint/monty_generic/mp_monty.cpp +++ b/src/math/bigint/monty_generic/mp_monty.cpp @@ -63,9 +63,8 @@ void bigint_monty_redc(word z[], u32bit z_size, copy_mem(ws + x_size + 1, z + x_size, x_size + 1); - clear_mem(z, z_size); - copy_mem(z, ws + borrow*(x_size+1), x_size + 1); + clear_mem(z + x_size + 1, z_size - x_size - 1); } } |