diff options
author | lloyd <[email protected]> | 2008-11-17 18:05:32 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-11-17 18:05:32 +0000 |
commit | 33e15eb51ce0a2cd5c4b1dc0b36d1bb90b3a4d81 (patch) | |
tree | 58fe40ad147ae832ee8f1ef0c6033fb6cf76c66e | |
parent | e057d12f32e9397dc3ccd201d2fe80b012a4eb5a (diff) |
Remove print statements in PointGFp::check_invariants which were triggered
when the test failed. I had added them for debugging something long ago.
What I thought was an InSiTo ECC test failure was actually a sucessful test,
it was making sure an Illegal_Point would be thrown in the conditions tested.
So, all seems OK.
-rw-r--r-- | src/math/gfpmath/point_gfp.cpp | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/src/math/gfpmath/point_gfp.cpp b/src/math/gfpmath/point_gfp.cpp index b2bc1d946..5312eeaee 100644 --- a/src/math/gfpmath/point_gfp.cpp +++ b/src/math/gfpmath/point_gfp.cpp @@ -793,12 +793,6 @@ bool PointGFp::is_zero() const // function will return silently. If Oskar managed to corrupt this object's state, // then it will throw an exception.) -static void print(const GFpElement& e, const char* name) - { - std::cout << name << " = (" << e.get_value() << ", " - << e.get_p() << ")\n"; - } - void PointGFp::check_invariants() const { if (is_zero()) @@ -813,12 +807,6 @@ void PointGFp::check_invariants() const GFpElement ax = mC.get_a() * mX; if(y2 != (x3 + ax + mC.get_b())) { - print(y2, "y2"); - print(x3, "x3"); - print(ax, "ax"); - print(mC.get_b(), "mC.b"); - print(x3 + ax + mC.get_b(), "+"); - throw Illegal_Point(); } @@ -834,14 +822,7 @@ void PointGFp::check_invariants() const const GFpElement bZ6 = mC.get_b() * mZpow3 * mZpow3; if (y2 != (x3 + aXZ4 + bZ6)) - { - print(y2, "y2"); - print(x3, "x3"); - print(aXZ4, "axZ4"); - print(bZ6, "bZ6"); - print(x3 + aXZ4 + bZ6, "+"); throw Illegal_Point(); - } } // swaps the states of *this and other, does not throw! |