diff options
author | lloyd <[email protected]> | 2009-10-15 16:49:22 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2009-10-15 16:49:22 +0000 |
commit | da210a5de236583baa530d8500a3da9f80b635fd (patch) | |
tree | 9ccb1af2aeb41c645f80a38b89b5058c91e833d7 /src | |
parent | 0b23f4071f21564fb63d7b11768070658c4b8f77 (diff) |
Avoid using word_add() in gfp_element.cpp, actually more complex than necessary,
and was tickling a bug in the asm versions because of the constant 0.
Diffstat (limited to 'src')
-rw-r--r-- | src/math/gfpmath/gfp_element.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/math/gfpmath/gfp_element.cpp b/src/math/gfpmath/gfp_element.cpp index f9e0b09c9..8ae9b3c3a 100644 --- a/src/math/gfpmath/gfp_element.cpp +++ b/src/math/gfpmath/gfp_element.cpp @@ -68,7 +68,9 @@ void inner_montg_mult_sos(word result[], const word* a_bar, const word* b_bar, c while (C > 0) { // we need not worry here about C > 1, because the other operand is zero - word tmp = word_add(t[i+s+cnt], 0, &C); + + word tmp = t[i+s+cnt] + C; + C = (tmp < t[i+s+cnt]); t[i+s+cnt] = tmp; cnt++; } |