mbedtls.mpi Module API

Multi-precision integer library (MPI).

class mbedtls.mpi.MPI

Multi-precision integer.

This class implements numbers.Integral. The representation of the MPI is overwritten with random bytes when the MPI is garbage collected.

bit_length()

Return the number of bits necessary to represent MPI in binary.

conjugate()
denominator
from_bytes()
from_int()
imag()
is_prime()

Miller-Rabin primality test.

numerator
prime()

Return an MPI that is probably prime.

real()
to_bytes()