Commit 81771ff2 authored by Nicolai Stange's avatar Nicolai Stange Committed by Herbert Xu
Browse files

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: default avatarNicolai Stange <nstange@suse.de>
Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 32f07cc4
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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