• Home
  • Raw
  • Download

Lines Matching refs:rs_ctx

158 #define ECDSA_RS_ECP    (rs_ctx == NULL ? NULL : &rs_ctx->ecp)
167 if (rs_ctx != NULL && rs_ctx->ecp.depth++ == 0) \
168 rs_ctx->ecp.ops_done = 0; \
172 rs_ctx != NULL && rs_ctx->SUB == NULL) \
174 rs_ctx->SUB = mbedtls_calloc(1, sizeof(*rs_ctx->SUB)); \
175 if (rs_ctx->SUB == NULL) \
178 ecdsa_restart_## SUB ##_init(rs_ctx->SUB); \
185 if (rs_ctx != NULL && rs_ctx->SUB != NULL && \
188 ecdsa_restart_## SUB ##_free(rs_ctx->SUB); \
189 mbedtls_free(rs_ctx->SUB); \
190 rs_ctx->SUB = NULL; \
193 if (rs_ctx != NULL) \
194 rs_ctx->ecp.depth--; \
203 #define ECDSA_RS_ENTER(SUB) (void) rs_ctx
204 #define ECDSA_RS_LEAVE(SUB) (void) rs_ctx
248 mbedtls_ecdsa_restart_ctx *rs_ctx) in mbedtls_ecdsa_sign_restartable() argument
272 if (rs_ctx != NULL && rs_ctx->sig != NULL) { in mbedtls_ecdsa_sign_restartable()
274 p_sign_tries = &rs_ctx->sig->sign_tries; in mbedtls_ecdsa_sign_restartable()
275 p_key_tries = &rs_ctx->sig->key_tries; in mbedtls_ecdsa_sign_restartable()
276 pk = &rs_ctx->sig->k; in mbedtls_ecdsa_sign_restartable()
277 pr = &rs_ctx->sig->r; in mbedtls_ecdsa_sign_restartable()
280 if (rs_ctx->sig->state == ecdsa_sig_mul) { in mbedtls_ecdsa_sign_restartable()
283 if (rs_ctx->sig->state == ecdsa_sig_modn) { in mbedtls_ecdsa_sign_restartable()
310 if (rs_ctx != NULL && rs_ctx->sig != NULL) { in mbedtls_ecdsa_sign_restartable()
311 rs_ctx->sig->state = ecdsa_sig_mul; in mbedtls_ecdsa_sign_restartable()
324 if (rs_ctx != NULL && rs_ctx->sig != NULL) { in mbedtls_ecdsa_sign_restartable()
325 rs_ctx->sig->state = ecdsa_sig_modn; in mbedtls_ecdsa_sign_restartable()
362 if (rs_ctx != NULL && rs_ctx->sig != NULL) { in mbedtls_ecdsa_sign_restartable()
415 mbedtls_ecdsa_restart_ctx *rs_ctx) in mbedtls_ecdsa_sign_det_restartable() argument
435 if (rs_ctx != NULL && rs_ctx->det != NULL) { in mbedtls_ecdsa_sign_det_restartable()
437 p_rng = &rs_ctx->det->rng_ctx; in mbedtls_ecdsa_sign_det_restartable()
440 if (rs_ctx->det->state == ecdsa_det_sign) { in mbedtls_ecdsa_sign_det_restartable()
453 if (rs_ctx != NULL && rs_ctx->det != NULL) { in mbedtls_ecdsa_sign_det_restartable()
454 rs_ctx->det->state = ecdsa_det_sign; in mbedtls_ecdsa_sign_det_restartable()
467 f_rng_blind, p_rng_blind, rs_ctx); in mbedtls_ecdsa_sign_det_restartable()
505 mbedtls_ecdsa_restart_ctx *rs_ctx) in mbedtls_ecdsa_verify_restartable() argument
524 if (rs_ctx != NULL && rs_ctx->ver != NULL) { in mbedtls_ecdsa_verify_restartable()
526 pu1 = &rs_ctx->ver->u1; in mbedtls_ecdsa_verify_restartable()
527 pu2 = &rs_ctx->ver->u2; in mbedtls_ecdsa_verify_restartable()
530 if (rs_ctx->ver->state == ecdsa_ver_muladd) { in mbedtls_ecdsa_verify_restartable()
564 if (rs_ctx != NULL && rs_ctx->ver != NULL) { in mbedtls_ecdsa_verify_restartable()
565 rs_ctx->ver->state = ecdsa_ver_muladd; in mbedtls_ecdsa_verify_restartable()
657 mbedtls_ecdsa_restart_ctx *rs_ctx) in mbedtls_ecdsa_write_signature_restartable() argument
671 p_rng, rs_ctx)); in mbedtls_ecdsa_write_signature_restartable()
676 (void) rs_ctx; in mbedtls_ecdsa_write_signature_restartable()
684 p_rng, rs_ctx)); in mbedtls_ecdsa_write_signature_restartable()
729 mbedtls_ecdsa_restart_ctx *rs_ctx) in mbedtls_ecdsa_read_signature_restartable() argument
757 (void) rs_ctx; in mbedtls_ecdsa_read_signature_restartable()
765 &ctx->Q, &r, &s, rs_ctx)) != 0) { in mbedtls_ecdsa_read_signature_restartable()