Added ecp_copy() (for points)
diff --git a/include/polarssl/ecp.h b/include/polarssl/ecp.h
index e76cd9e..23d3fbd 100644
--- a/include/polarssl/ecp.h
+++ b/include/polarssl/ecp.h
@@ -33,6 +33,7 @@
* ECP Error codes
*/
+
/**
* \brief ECP point structure (affine coordinates)
*/
@@ -145,6 +146,26 @@
#endif
/**
+ * \brief Free the components of a point
+ */
+void ecp_point_free( ecp_point *pt );
+
+/**
+ * \brief Free the components of an ECP group
+ */
+void ecp_group_free( ecp_group *grp );
+
+/**
+ * \brief Copy the contents of point Q into P
+ *
+ * \param P Destination point
+ * \param Q Source point
+ *
+ * \return 0 if successful, or an POLARSSL_ERR_ECP_XXX error code
+ */
+int ecp_copy( ecp_point *P, const ecp_point *Q );
+
+/**
* \brief Addition: R = P + Q
*
* \param grp ECP group
@@ -171,16 +192,6 @@
const mpi *m, const ecp_point *P );
/**
- * \brief Free the components of a point
- */
-void ecp_point_free( ecp_point *pt );
-
-/**
- * \brief Free the components of an ECP group
- */
-void ecp_group_free( ecp_group *grp );
-
-/**
* \brief Checkup routine
*
* \return 0 if successful, or 1 if the test failed