const parameter
diff --git a/bn_mp_ilogb.c b/bn_mp_ilogb.c
index d1ff4e9..c0f40f7 100644
--- a/bn_mp_ilogb.c
+++ b/bn_mp_ilogb.c
@@ -70,7 +70,7 @@ static mp_digit s_digit_ilogb(mp_digit base, mp_digit n)
as is the output of mp_bitcount.
With the same problem: max size is INT_MAX * MP_DIGIT not INT_MAX only!
*/
-int mp_ilogb(mp_int *a, mp_digit base, mp_int *c)
+int mp_ilogb(const mp_int *a, mp_digit base, mp_int *c)
{
int err, cmp;
unsigned int high, low, mid;
diff --git a/tommath.h b/tommath.h
index 5dc2b3a..353234a 100644
--- a/tommath.h
+++ b/tommath.h
@@ -630,7 +630,7 @@ MP_WUR MP_DEPRECATED(mp_prime_rand) int mp_prime_random_ex(mp_int *a, int t, int
MP_WUR int mp_prime_rand(mp_int *a, int t, int size, int flags);
/* Integer logarithm to integer base */
-MP_WUR int mp_ilogb(mp_int *a, mp_digit base, mp_int *c);
+MP_WUR int mp_ilogb(const mp_int *a, mp_digit base, mp_int *c);
/* ---> radix conversion <--- */