Add infrastructure for ecdsa_verify_restartable()
This commit is contained in:
parent
722e5156fd
commit
a0c5bcc2bc
4 changed files with 107 additions and 2 deletions
|
@ -57,12 +57,20 @@ typedef mbedtls_ecp_keypair mbedtls_ecdsa_context;
|
|||
|
||||
#if defined(MBEDTLS_ECP_RESTARTABLE)
|
||||
|
||||
/**
|
||||
* \brief Internal restart context for ecdsa_verify()
|
||||
*
|
||||
* \note Opaque struct
|
||||
*/
|
||||
typedef struct mbedtls_ecdsa_restart_ver mbedtls_ecdsa_restart_ver_ctx;
|
||||
|
||||
/**
|
||||
* \brief General context for resuming ECDSA operations
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
mbedtls_ecp_restart_ctx ecp; /*!< base context (admin+ecp info) */
|
||||
mbedtls_ecdsa_restart_ver_ctx *ver; /*!< ecdsa_verify() sub-context */
|
||||
} mbedtls_ecdsa_restart_ctx;
|
||||
|
||||
#else /* MBEDTLS_ECP_RESTARTABLE */
|
||||
|
|
|
@ -341,6 +341,14 @@ typedef void mbedtls_ecp_restart_ctx;
|
|||
* \note This setting is currently ignored by Curve25519
|
||||
*/
|
||||
void mbedtls_ecp_set_max_ops( unsigned max_ops );
|
||||
|
||||
/**
|
||||
* \brief Check if restart is enabled (max_ops != 0)
|
||||
*
|
||||
* \return 0 if max_ops == 0 (restart disabled)
|
||||
* 1 otherwise (restart enabled)
|
||||
*/
|
||||
int mbedtls_ecp_restart_enabled( void );
|
||||
#endif /* MBEDTLS_ECP_RESTARTABLE */
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue