Add ecp_keypair struct, init/free and constants
diff --git a/library/ecp.c b/library/ecp.c
index af18e5b..216fc43 100644
--- a/library/ecp.c
+++ b/library/ecp.c
@@ -91,6 +91,20 @@
 }
 
 /*
+ * Initialize (the components of) a key pair
+ */
+void ecp_keypair_init( ecp_keypair *key )
+{
+    if ( key == NULL )
+        return;
+
+    ecp_group_init( &key->grp );
+    mpi_init( &key->d );
+    ecp_point_init( &key->Q );
+    key->alg = POLARSSL_ECP_KEY_ALG_UNRESTRICTED;
+}
+
+/*
  * Unallocate (the components of) a point
  */
 void ecp_point_free( ecp_point *pt )
@@ -118,6 +132,20 @@
 }
 
 /*
+ * Unallocate (the components of) a key pair
+ */
+void ecp_keypair_free( ecp_keypair *key )
+{
+    if ( key == NULL )
+        return;
+
+    ecp_group_free( &key->grp );
+    mpi_free( &key->d );
+    ecp_point_free( &key->Q );
+    key->alg = POLARSSL_ECP_KEY_ALG_UNRESTRICTED;
+}
+
+/*
  * Set point to zero
  */
 int ecp_set_zero( ecp_point *pt )