Lines Matching refs:r

102     mbedtls_mpi r;          /* r value              */  member
118 mbedtls_mpi_init( &ctx->r ); in ecdsa_restart_sig_init()
131 mbedtls_mpi_free( &ctx->r ); in ecdsa_restart_sig_free()
253 mbedtls_mpi *r, mbedtls_mpi *s, in ecdsa_sign_restartable() argument
264 mbedtls_mpi *pk = &k, *pr = r; in ecdsa_sign_restartable()
286 pr = &rs_ctx->sig->r; in ecdsa_sign_restartable()
374 mbedtls_mpi_copy( r, pr ); in ecdsa_sign_restartable()
403 int mbedtls_ecdsa_sign( mbedtls_ecp_group *grp, mbedtls_mpi *r, mbedtls_mpi *s, in mbedtls_ecdsa_sign() argument
408 ECDSA_VALIDATE_RET( r != NULL ); in mbedtls_ecdsa_sign()
415 return( ecdsa_sign_restartable( grp, r, s, d, buf, blen, in mbedtls_ecdsa_sign()
425 mbedtls_mpi *r, mbedtls_mpi *s, in ecdsa_sign_det_restartable() argument
475 ret = mbedtls_ecdsa_sign( grp, r, s, d, buf, blen, in ecdsa_sign_det_restartable()
479 ret = ecdsa_sign_restartable( grp, r, s, d, buf, blen, in ecdsa_sign_det_restartable()
532 ret = ecdsa_sign_restartable( grp, r, s, d, buf, blen, in ecdsa_sign_det_restartable()
557 int mbedtls_ecdsa_sign_det( mbedtls_ecp_group *grp, mbedtls_mpi *r, in mbedtls_ecdsa_sign_det() argument
563 ECDSA_VALIDATE_RET( r != NULL ); in mbedtls_ecdsa_sign_det()
568 return( ecdsa_sign_det_restartable( grp, r, s, d, buf, blen, md_alg, in mbedtls_ecdsa_sign_det()
573 int mbedtls_ecdsa_sign_det_ext( mbedtls_ecp_group *grp, mbedtls_mpi *r, in mbedtls_ecdsa_sign_det_ext() argument
582 ECDSA_VALIDATE_RET( r != NULL ); in mbedtls_ecdsa_sign_det_ext()
588 return( ecdsa_sign_det_restartable( grp, r, s, d, buf, blen, md_alg, in mbedtls_ecdsa_sign_det_ext()
601 const mbedtls_mpi *r, const mbedtls_mpi *s, in ecdsa_verify_restartable() argument
635 if( mbedtls_mpi_cmp_int( r, 1 ) < 0 || mbedtls_mpi_cmp_mpi( r, &grp->N ) >= 0 || in ecdsa_verify_restartable()
657 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( pu2, r, &s_inv ) ); in ecdsa_verify_restartable()
687 if( mbedtls_mpi_cmp_mpi( &R.X, r ) != 0 ) in ecdsa_verify_restartable()
709 const mbedtls_mpi *r, in mbedtls_ecdsa_verify() argument
714 ECDSA_VALIDATE_RET( r != NULL ); in mbedtls_ecdsa_verify()
718 return( ecdsa_verify_restartable( grp, buf, blen, Q, r, s, NULL ) ); in mbedtls_ecdsa_verify()
725 static int ecdsa_signature_to_asn1( const mbedtls_mpi *r, const mbedtls_mpi *s, in ecdsa_signature_to_asn1() argument
734 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_mpi( &p, buf, r ) ); in ecdsa_signature_to_asn1()
758 mbedtls_mpi r, s; in mbedtls_ecdsa_write_signature_restartable() local
764 mbedtls_mpi_init( &r ); in mbedtls_ecdsa_write_signature_restartable()
768 MBEDTLS_MPI_CHK( ecdsa_sign_det_restartable( &ctx->grp, &r, &s, &ctx->d, in mbedtls_ecdsa_write_signature_restartable()
777 MBEDTLS_MPI_CHK( mbedtls_ecdsa_sign( &ctx->grp, &r, &s, &ctx->d, in mbedtls_ecdsa_write_signature_restartable()
781 MBEDTLS_MPI_CHK( ecdsa_sign_restartable( &ctx->grp, &r, &s, &ctx->d, in mbedtls_ecdsa_write_signature_restartable()
787 MBEDTLS_MPI_CHK( ecdsa_signature_to_asn1( &r, &s, sig, slen ) ); in mbedtls_ecdsa_write_signature_restartable()
790 mbedtls_mpi_free( &r ); in mbedtls_ecdsa_write_signature_restartable()
856 mbedtls_mpi r, s; in mbedtls_ecdsa_read_signature_restartable() local
861 mbedtls_mpi_init( &r ); in mbedtls_ecdsa_read_signature_restartable()
878 if( ( ret = mbedtls_asn1_get_mpi( &p, end, &r ) ) != 0 || in mbedtls_ecdsa_read_signature_restartable()
888 &ctx->Q, &r, &s ) ) != 0 ) in mbedtls_ecdsa_read_signature_restartable()
892 &ctx->Q, &r, &s, rs_ctx ) ) != 0 ) in mbedtls_ecdsa_read_signature_restartable()
903 mbedtls_mpi_free( &r ); in mbedtls_ecdsa_read_signature_restartable()