diff options
author | lloyd <[email protected]> | 2010-03-19 18:21:34 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-03-19 18:21:34 +0000 |
commit | 602fb0e763cfaa2caa62b3b239d021efc767d567 (patch) | |
tree | 062a11e60698bdad68ef28b21e34f964cbd41cc7 /src/math/numbertheory/point_gfp.h | |
parent | dab16b79c89e54e9551d30dcf54ca89432932dce (diff) |
Replace PointGFp::check_invaraints, which would either return silently
or throw an exception, with PointGFp::on_the_curve, which returns a bool.
Update callers.
This showed several cases where check_invaraints was being called
multiple times, for instance when decoding a point with OS2ECP,
check_invaraints was called; many callers of OS2ECP would then call
check_invaraints again on the same object.
Diffstat (limited to 'src/math/numbertheory/point_gfp.h')
-rw-r--r-- | src/math/numbertheory/point_gfp.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/math/numbertheory/point_gfp.h b/src/math/numbertheory/point_gfp.h index d92a5cbcb..0708493fe 100644 --- a/src/math/numbertheory/point_gfp.h +++ b/src/math/numbertheory/point_gfp.h @@ -128,12 +128,11 @@ class BOTAN_DLL PointGFp { return (coord_x.is_zero() && coord_z.is_zero()); } /** - * Checks whether the point is to be found on the underlying curve. - * Throws an Invalid_Point exception in case of detecting that the point - * does not satisfy the curve equation. - * To be used to ensure against fault attacks. + * Checks whether the point is to be found on the underlying + * curve; used to prevent fault attacks. + * @return if the point is on the curve */ - void check_invariants() const; + bool on_the_curve() const; /** * swaps the states of *this and other, does not throw! |