mbedtls_mpi_div_mpi() is only used within mbedTLS.
 
Symbols
loading...
Files
loading...

mbedtls_mpi_div_mpi() function

Perform a division with remainder of two MPIs: A = Q * B + R

Syntax

int mbedtls_mpi_div_mpi( mbedtls_mpi *Q,     mbedtls_mpi *R,     const mbedtls_mpi *A,     const mbedtls_mpi *B );
Implemented in bignum.c:1547

Arguments

Q

The destination MPI for the quotient. This may be \c NULL if the value of the quotient is not needed.

R

The destination MPI for the remainder value. This may be \c NULL if the value of the remainder is not needed.

A

The dividend. This must point to an initialized MPi.

B

The divisor. This must point to an initialized MPI.

Return value

\c 0 if successful. #MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed. #MBEDTLS_ERR_MPI_DIVISION_BY_ZERO if \p B equals zero. Another negative error code on different kinds of failure.

References

LocationReferrerText
bignum.c:1547
int mbedtls_mpi_div_mpi( mbedtls_mpi *Q, mbedtls_mpi *R, const mbedtls_mpi *A,
bignum.h:709
int mbedtls_mpi_div_mpi( mbedtls_mpi *Q, mbedtls_mpi *R, const mbedtls_mpi *A,
bignum.c:1678mbedtls_mpi_div_int()
return( mbedtls_mpi_div_mpi( Q, R, A, &_B ) );
bignum.c:1694mbedtls_mpi_mod_mpi()
MBEDTLS_MPI_CHK( mbedtls_mpi_div_mpi( NULL, R, A, B ) );

Call Tree

Data read by mbedtls_mpi_div_mpi()
Data written by mbedtls_mpi_div_mpi()
mbedtls_mpi_div_mpi()::ret
mbedtls_mpi_div_mpi()::i
mbedtls_mpi_div_mpi()::n
mbedtls_mpi_div_mpi()::t
mbedtls_mpi_div_mpi()::k
mbedtls_mpi_div_mpi()::X
mbedtls_mpi_div_mpi()::Y
mbedtls_mpi_div_mpi()::Z
mbedtls_mpi_div_mpi()::T1
mbedtls_mpi_div_mpi()::T2
all items filtered out
mbedtls_mpi_div_mpi()
mbedtls_mpi_div_mpi()::ret
mbedtls_mpi_div_mpi()::i
mbedtls_mpi_div_mpi()::n
mbedtls_mpi_div_mpi()::t
mbedtls_mpi_div_mpi()::k
all items filtered out
Type of mbedtls_mpi_div_mpi()
mbedtls_mpi_div_mpi()
size_t
all items filtered out