[PATCH 09/23] mpi: introduce mpi_key_length()