aboutsummaryrefslogtreecommitdiff
path: root/lib/mpi/mpi-pow.c
AgeCommit message (Collapse)AuthorFilesLines
2012-10-08MPILIB: Provide count_leading/trailing_zeros() based on arch functionsDavid Howells1-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]>
2012-02-02lib/mpi: return error code on dividing by zeroDmitry Kasatkin1-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]>
2011-11-09crypto: GnuPG based MPI lib - source files (part 1)Dmitry Kasatkin1-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]>