Dynamically allocate/free restart subcontext in PK
diff --git a/include/mbedtls/pk.h b/include/mbedtls/pk.h
index 55b0668..8ec6985 100644
--- a/include/mbedtls/pk.h
+++ b/include/mbedtls/pk.h
@@ -135,7 +135,8 @@
  */
 typedef struct
 {
-    mbedtls_ecdsa_restart_ctx ecdsa;    /* temporary */
+    const mbedtls_pk_info_t *   pk_info; /**< Public key informations        */
+    void *                      rs_ctx;  /**< Underlying restart context     */
 } mbedtls_pk_restart_ctx;
 #else
 /* Now we can declare functions that take a pointer to that */
diff --git a/include/mbedtls/pk_internal.h b/include/mbedtls/pk_internal.h
index e996b6c..d56b0b3 100644
--- a/include/mbedtls/pk_internal.h
+++ b/include/mbedtls/pk_internal.h
@@ -94,6 +94,14 @@
     /** Free the given context */
     void (*ctx_free_func)( void *ctx );
 
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+    /** Allocate the restart context */
+    void * (*rs_alloc_func)( void );
+
+    /** Free the restart context */
+    void (*rs_free_func)( void *rs_ctx );
+#endif /* MBEDTLS_ECP_RESTARTABLE */
+
     /** Interface with the debug module */
     void (*debug_func)( const void *ctx, mbedtls_pk_debug_item *items );