From: Nicolai Stange Date: Mon, 21 Feb 2022 12:11:00 +0000 (+0100) Subject: lib/mpi: export mpi_rshift X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=81771ff2411a4cd1224c4b16e0b4247e71bba0de;p=linux.git lib/mpi: export mpi_rshift A subsequent patch will make the crypto/dh's dh_is_pubkey_valid() to calculate a safe-prime groups Q parameter from P: Q = (P - 1) / 2. For implementing this, mpi_rshift() will be needed. Export it so that it's accessible from crypto/dh. Signed-off-by: Nicolai Stange Reviewed-by: Hannes Reinecke Signed-off-by: Herbert Xu --- diff --git a/lib/mpi/mpi-bit.c b/lib/mpi/mpi-bit.c index 142b680835df3..070ba784c9f15 100644 --- a/lib/mpi/mpi-bit.c +++ b/lib/mpi/mpi-bit.c @@ -242,6 +242,7 @@ void mpi_rshift(MPI x, MPI a, unsigned int n) } MPN_NORMALIZE(x->d, x->nlimbs); } +EXPORT_SYMBOL_GPL(mpi_rshift); /**************** * Shift A by COUNT limbs to the left