aboutsummaryrefslogtreecommitdiffstats
path: root/src/math/numbertheory/point_gfp.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-09-24 17:27:07 +0000
committerlloyd <[email protected]>2010-09-24 17:27:07 +0000
commit6bce29a5d0e2a004fdbac4f30e35c9266ff45295 (patch)
treec5893d8c4d6faad7804cdce57a913d9faf42d9b3 /src/math/numbertheory/point_gfp.h
parent9aaa77f62ec389f94e674deeda14def72ddd515b (diff)
Modify bigint_monty_redc to take an additional workspace argument.
Modify it to avoid a timing condition during the compare at the end; this is done by always doing the subtraction, and then copying to the output either the pre-subtraction or post-subtraction value depending on if the final borrow was set or not.
Diffstat (limited to 'src/math/numbertheory/point_gfp.h')
-rw-r--r--src/math/numbertheory/point_gfp.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/math/numbertheory/point_gfp.h b/src/math/numbertheory/point_gfp.h
index 5b3e32c7d..42baa7d2c 100644
--- a/src/math/numbertheory/point_gfp.h
+++ b/src/math/numbertheory/point_gfp.h
@@ -179,6 +179,7 @@ class BOTAN_DLL PointGFp
/**
* Montgomery multiplication/reduction
+ * @warning z cannot alias x or y
* @param z output
* @param x first multiplicand
* @param y second multiplicand
@@ -203,6 +204,7 @@ class BOTAN_DLL PointGFp
/**
* Montgomery squaring/reduction
+ * @warning z cannot alias x
* @param z output
* @param x multiplicand
* @param workspace temp space