Add ecdh_calc_secret()
diff --git a/include/polarssl/ecdh.h b/include/polarssl/ecdh.h
index 67d1df5..7f6f4cb 100644
--- a/include/polarssl/ecdh.h
+++ b/include/polarssl/ecdh.h
@@ -150,6 +150,19 @@
const unsigned char *buf, size_t blen );
/**
+ * \brief Derive and export the shared secret
+ *
+ * \param ctx ECDH context
+ * \param olen number of bytes written
+ * \param buf destination buffer
+ * \param blen buffer length
+ *
+ * \return 0 if successful, or an POLARSSL_ERR_ECP_XXX error code
+ */
+int ecdh_calc_secret( ecdh_context *ctx, size_t *olen,
+ unsigned char *buf, size_t blen );
+
+/**
* \brief Checkup routine
*
* \return 0 if successful, or 1 if the test failed