aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-02-21 17:49:51 -0500
committerJack Lloyd <[email protected]>2018-02-21 17:49:51 -0500
commitb647b159a7ac81d544250dd11aafe9541b477b37 (patch)
tree19e45cf9b3a14212b514a6a1d610f4f2842a2df2
parentbb2352f8861683999fb8a226fb5b79e2f89ab3e8 (diff)
Move declarations that don't need to be friends of PointGFp
-rw-r--r--src/lib/math/ec_gfp/point_gfp.h41
1 files changed, 20 insertions, 21 deletions
diff --git a/src/lib/math/ec_gfp/point_gfp.h b/src/lib/math/ec_gfp/point_gfp.h
index 51f8a1cf8..a2c7ae86a 100644
--- a/src/lib/math/ec_gfp/point_gfp.h
+++ b/src/lib/math/ec_gfp/point_gfp.h
@@ -117,30 +117,9 @@ class BOTAN_PUBLIC_API(2,0) PointGFp final
* @param scalar the PointGFp to multiply with *this
* @result resulting PointGFp
*/
-
PointGFp& operator*=(const BigInt& scalar);
/**
- * Multiplication Operator
- * @param scalar the scalar value
- * @param point the point value
- * @return scalar*point on the curve
- */
- friend BOTAN_PUBLIC_API(2,0) PointGFp operator*(const BigInt& scalar, const PointGFp& point);
-
- /**
- * Multiexponentiation
- * @param p1 a point
- * @param z1 a scalar
- * @param p2 a point
- * @param z2 a scalar
- * @result (p1 * z1 + p2 * z2)
- */
- friend BOTAN_PUBLIC_API(2,0) PointGFp multi_exponentiate(
- const PointGFp& p1, const BigInt& z1,
- const PointGFp& p2, const BigInt& z2);
-
- /**
* Negate this point
* @return *this
*/
@@ -222,6 +201,26 @@ class BOTAN_PUBLIC_API(2,0) PointGFp final
BigInt m_coord_x, m_coord_y, m_coord_z;
};
+/**
+* Point multiplication operator
+* @param scalar the scalar value
+* @param point the point value
+* @return scalar*point on the curve
+*/
+BOTAN_PUBLIC_API(2,0) PointGFp operator*(const BigInt& scalar, const PointGFp& point);
+
+/**
+* ECC point multiexponentiation
+* @param p1 a point
+* @param z1 a scalar
+* @param p2 a point
+* @param z2 a scalar
+* @result (p1 * z1 + p2 * z2)
+*/
+BOTAN_PUBLIC_API(2,0) PointGFp multi_exponentiate(
+ const PointGFp& p1, const BigInt& z1,
+ const PointGFp& p2, const BigInt& z2);
+
// relational operators
inline bool operator!=(const PointGFp& lhs, const PointGFp& rhs)
{