OSDN Git Service

lib/mpi: export mpi_rshift
authorNicolai Stange <nstange@suse.de>
Mon, 21 Feb 2022 12:11:00 +0000 (13:11 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 2 Mar 2022 22:47:52 +0000 (10:47 +1200)
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 <nstange@suse.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
lib/mpi/mpi-bit.c

index 142b680..070ba78 100644 (file)
@@ -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