Create ecdh_context structure
diff --git a/include/polarssl/ecdh.h b/include/polarssl/ecdh.h
index ad13106..2f1e51d 100644
--- a/include/polarssl/ecdh.h
+++ b/include/polarssl/ecdh.h
@@ -29,6 +29,19 @@
#include "polarssl/ecp.h"
+/**
+ * \brief ECDH context structure
+ */
+typedef struct
+{
+ ecp_group grp; /*!< ellipitic curve used */
+ mpi d; /*!< our secret value */
+ ecp_point Q; /*!< our public value */
+ ecp_point Qp; /*!< peer's public value */
+ mpi z; /*!< shared secret */
+}
+ecdh_context;
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -64,6 +77,20 @@
const ecp_point *Q, const mpi *d );
/**
+ * \brief Initialize context
+ *
+ * \param ctx Context to initialize
+ */
+void ecdh_init( ecdh_context *ctx );
+
+/**
+ * \brief Free context
+ *
+ * \param ctx Context to free
+ */
+void ecdh_free( ecdh_context *ctx );
+
+/**
* \brief Checkup routine
*
* \return 0 if successful, or 1 if the test failed