Added ecp_check_pubkey().
diff --git a/include/polarssl/ecp.h b/include/polarssl/ecp.h
index 3336553..96c135b 100644
--- a/include/polarssl/ecp.h
+++ b/include/polarssl/ecp.h
@@ -159,6 +159,25 @@
 int ecp_copy( ecp_point *P, const ecp_point *Q );
 
 /**
+ * \brief           Check that a point is a valid public key on this curve
+ *
+ * \param grp       Curve/group the point should belong to
+ * \param pt        Point to check
+ *
+ * \return          0 if point is a valid public key,
+ *                  POLARSSL_ERR_ECP_GENERIC otherwise.
+ *
+ * \note            This function only checks the point is non-zero, has valid
+ *                  coordinates and lies on the curve, but not that it is
+ *                  indeed a multiple of G. This is additional check is more
+ *                  expensive, isn't required by standards, and shouldn't be
+ *                  necessary if the group used has a small cofactor. In
+ *                  particular, it is useless for the NIST groups which all
+ *                  have a cofactor of 1.
+ */
+int ecp_check_pubkey( const ecp_group *grp, const ecp_point *pt );
+
+/**
  * \brief           Import a non-zero point from two ASCII strings
  *
  * \param P         Destination point