Skip to content

Commit

Permalink
lib/mpi: export mpi_rshift
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
nicstange authored and herbertx committed Mar 2, 2022
1 parent 32f07cc commit 81771ff
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/mpi/mpi-bit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 81771ff

Please sign in to comment.