aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mpi/mpi-pow.c
Commit message (Collapse)AuthorAgeFilesLines
* MPILIB: Provide count_leading/trailing_zeros() based on arch functionsDavid Howells2012-10-081-2/+2
| | | | | | | | | | | | | | | | Provide count_leading/trailing_zeros() macros based on extant arch bit scanning functions rather than reimplementing from scratch in MPILIB. Whilst we're at it, turn count_foo_zeros(n, x) into n = count_foo_zeros(x). Also move the definition to asm-generic as other people may be interested in using it. Signed-off-by: David Howells <[email protected]> Cc: David S. Miller <[email protected]> Cc: Dmitry Kasatkin <[email protected]> Cc: Arnd Bergmann <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
* lib/mpi: return error code on dividing by zeroDmitry Kasatkin2012-02-011-1/+1
| | | | | | | | Definitely better to return error code than to divide by zero. Signed-off-by: Dmitry Kasatkin <[email protected]> Reviewed-by: Tetsuo Handa <[email protected]> Signed-off-by: James Morris <[email protected]>
* crypto: GnuPG based MPI lib - source files (part 1)Dmitry Kasatkin2011-11-091-0/+323
Adds the multi-precision-integer maths library which was originally taken from GnuPG and ported to the kernel by (among others) David Howells. This version is taken from Fedora kernel 2.6.32-71.14.1.el6. The difference is that checkpatch reported errors and warnings have been fixed. This library is used to implemenet RSA digital signature verification used in IMA/EVM integrity protection subsystem. Due to patch size limitation, the patch is divided into 4 parts. Signed-off-by: Dmitry Kasatkin <[email protected]>