Add ECDH primitives
diff --git a/library/ecp.c b/library/ecp.c
index 9153f11..b8b0dfc 100644
--- a/library/ecp.c
+++ b/library/ecp.c
@@ -122,6 +122,14 @@
 }
 
 /*
+ * Tell if a point is zero
+ */
+int ecp_is_zero( ecp_point *pt )
+{
+    return( mpi_cmp_int( &pt->Z, 0 ) == 0 );
+}
+
+/*
  * Copy the contents of Q into P
  */
 int ecp_copy( ecp_point *P, const ecp_point *Q )