diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/math/gfpmath/point_gfp.cpp | 12 | ||||
-rw-r--r-- | src/math/gfpmath/point_gfp.h | 11 |
2 files changed, 13 insertions, 10 deletions
diff --git a/src/math/gfpmath/point_gfp.cpp b/src/math/gfpmath/point_gfp.cpp index baefac438..86bf82f61 100644 --- a/src/math/gfpmath/point_gfp.cpp +++ b/src/math/gfpmath/point_gfp.cpp @@ -48,12 +48,14 @@ PointGFp::PointGFp(const CurveGFp& curve) : } // construct a point given its jacobian projective coordinates -PointGFp::PointGFp(const CurveGFp& curve, const GFpElement& x, - const GFpElement& y, const GFpElement& z) : +PointGFp::PointGFp(const CurveGFp& curve, + const BigInt& x, + const BigInt& y, + const BigInt& z) : mC(curve), - mX(x), - mY(y), - mZ(z) + mX(curve.get_p(), x), + mY(curve.get_p(), y), + mZ(curve.get_p(), z) { } diff --git a/src/math/gfpmath/point_gfp.h b/src/math/gfpmath/point_gfp.h index 4e0b9a76b..e9645d5db 100644 --- a/src/math/gfpmath/point_gfp.h +++ b/src/math/gfpmath/point_gfp.h @@ -17,7 +17,8 @@ namespace Botan { struct BOTAN_DLL Illegal_Point : public Exception { - Illegal_Point(const std::string& err = "") : Exception(err) {} + Illegal_Point(const std::string& err = "Malformed ECP point detected") : + Exception(err) {} }; /** @@ -51,12 +52,12 @@ class BOTAN_DLL PointGFp * @param curve the base curve * @param x jacobian projective x coordinate * @param y jacobian projective y coordinate - * @param z jacobian projective y coordinate + * @param z jacobian projective z coordinate */ PointGFp(const CurveGFp& curve, - const GFpElement& x, - const GFpElement& y, - const GFpElement& z); + const BigInt& x, + const BigInt& y, + const BigInt& z); //PointGFp(const PointGFp& other) = default; //PointGFp& operator=(const PointGFp& other) = default; |