aboutsummaryrefslogtreecommitdiffstats
path: root/src/powm_mnt.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2006-08-19 12:23:50 +0000
committerlloyd <[email protected]>2006-08-19 12:23:50 +0000
commitd6ff613df191d078ecb3175a20710d013bcfd3a5 (patch)
treef6a8e546068141298b71470a4fcaaced3e7b12fc /src/powm_mnt.cpp
parent3dbff1820b79f8bf2a9ade41d2f30e73ce8d9f90 (diff)
Move Montgomery reduction algorithm into mp_asm.cpp
Move the inner-most loop of Montgomery into bigint_mul_add_words, in mp_muladd.cpp Use bigint_mul_add_words for the inner loop of bigint_simple_multiply Move the compare/subtract at the end of the Montomgery algorithm into bigint_monty_redc
Diffstat (limited to 'src/powm_mnt.cpp')
-rw-r--r--src/powm_mnt.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/powm_mnt.cpp b/src/powm_mnt.cpp
index 747510d87..9b4916b67 100644
--- a/src/powm_mnt.cpp
+++ b/src/powm_mnt.cpp
@@ -55,9 +55,6 @@ inline void montgomery_reduce(BigInt& out, MemoryRegion<word>& z_buf,
bigint_monty_redc(z, z_size, x, x_size, u);
- if(bigint_cmp(z + x_size, x_size + 1, x, x_size) >= 0)
- bigint_sub2(z + x_size, x_size + 1, x, x_size);
-
out.get_reg().set(z + x_size, x_size + 1);
}