Rename multiplication-specific restart context

It's going to be convenient for each function that can generate a
MBEDTLS_ERR_ECP_IN_PROGRESS on its own (as opposed to just passing it around)
to have its own restart context that they can allocate and free as needed
independently of the restart context of other functions.

For example ecp_muladd() is going to have its own restart_muladd context that
in can managed, then when it calls ecp_mul() this will manage a restart_mul
context without interfering with the caller's context.

So, things need to be renames to avoid future name clashes.
This commit is contained in:
Manuel Pégourié-Gonnard 2017-03-22 08:24:42 +01:00
parent e58f65a04b
commit 45fd0164dd
2 changed files with 81 additions and 81 deletions

View file

@ -114,12 +114,12 @@ mbedtls_ecp_point;
#if defined(MBEDTLS_ECP_EARLY_RETURN)
/**
* \brief ECP context for resuming operations after returning
* \brief ECP context for resuming multiplication after returning
* \c MBEDTLS_ERR_ECP_IN_PROGRESS
*
* \note Opaque struct
*/
typedef struct mbedtls_ecp_restart mbedtls_ecp_restart_ctx;
typedef struct mbedtls_ecp_restart_mul mbedtls_ecp_restart_mul_ctx;
#endif
/**
@ -164,7 +164,7 @@ typedef struct
mbedtls_ecp_point *T; /*!< pre-computed points for ecp_mul_comb() */
size_t T_size; /*!< number for pre-computed points */
#if defined(MBEDTLS_ECP_EARLY_RETURN)
mbedtls_ecp_restart_ctx *rs; /*!< context for resuming operation */
mbedtls_ecp_restart_mul_ctx *rsm; /*!< restart context for ecp_mul() */
#endif
}
mbedtls_ecp_group;