aboutsummaryrefslogtreecommitdiffstats
path: root/src/math
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-03-13 01:43:59 +0000
committerlloyd <[email protected]>2010-03-13 01:43:59 +0000
commit168d8aa11092333e166cbedcb8b00465ed7960c3 (patch)
tree9d147c90b2b5dcbd29f887737870691ba20f6552 /src/math
parentc732c77cd0d082c962e987e921a72a11303930f0 (diff)
Hide PointGFp constructors
Diffstat (limited to 'src/math')
-rw-r--r--src/math/numbertheory/point_gfp.cpp10
-rw-r--r--src/math/numbertheory/point_gfp.h11
2 files changed, 14 insertions, 7 deletions
diff --git a/src/math/numbertheory/point_gfp.cpp b/src/math/numbertheory/point_gfp.cpp
index 90885bc94..fcd6a1f4a 100644
--- a/src/math/numbertheory/point_gfp.cpp
+++ b/src/math/numbertheory/point_gfp.cpp
@@ -38,6 +38,16 @@ BigInt decompress_point(bool yMod2,
}
+PointGFp::PointGFp(const CurveGFp& curve) :
+ curve(curve), coord_x(0), coord_y(1), coord_z(0)
+ {
+ }
+
+PointGFp::PointGFp(const CurveGFp& curve, const BigInt& x, const BigInt& y) :
+ curve(curve), coord_x(x), coord_y(y), coord_z(1)
+ {
+ }
+
// arithmetic operators
PointGFp& PointGFp::operator+=(const PointGFp& rhs)
{
diff --git a/src/math/numbertheory/point_gfp.h b/src/math/numbertheory/point_gfp.h
index 3417c7b7f..b994a4532 100644
--- a/src/math/numbertheory/point_gfp.h
+++ b/src/math/numbertheory/point_gfp.h
@@ -46,21 +46,18 @@ class BOTAN_DLL PointGFp
PointGFp() {}
/**
- * Construct the point O
+ * Construct the zero point
* @param curve The base curve
*/
- PointGFp(const CurveGFp& curve) :
- curve(curve), coord_x(0), coord_y(1), coord_z(0) {}
+ PointGFp(const CurveGFp& curve);
/**
- * Construct a point given its affine coordinates
+ * Construct a point from its affine coordinates
* @param curve the base curve
* @param x affine x coordinate
* @param y affine y coordinate
*/
- PointGFp(const CurveGFp& curve,
- const BigInt& x, const BigInt& y) :
- curve(curve), coord_x(x), coord_y(y), coord_z(1) {}
+ PointGFp(const CurveGFp& curve, const BigInt& x, const BigInt& y);
//PointGFp(const PointGFp& other) = default;
//PointGFp& operator=(const PointGFp& other) = default;