Skip to content

Commit

Permalink
crypto: GnuPG based MPI lib - make files (part 3)
Browse files Browse the repository at this point in the history
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 <dmitry.kasatkin@intel.com>
  • Loading branch information
Dmitry Kasatkin committed Nov 9, 2011
1 parent 5ce3e31 commit d9c46b1
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -276,4 +276,11 @@ config CORDIC
so its calculations are in fixed point. Modules can select this
when they require this function. Module will be called cordic.

config MPILIB
tristate "Multiprecision maths library"
help
Multiprecision maths library from GnuPG.
It is used to implement RSA digital signature verification,
which is used by IMA/EVM digital signature extension.

endmenu
2 changes: 2 additions & 0 deletions lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ obj-$(CONFIG_CPU_RMAP) += cpu_rmap.o

obj-$(CONFIG_CORDIC) += cordic.o

obj-$(CONFIG_MPILIB) += mpi/

hostprogs-y := gen_crc32table
clean-files := crc32table.h

Expand Down
21 changes: 21 additions & 0 deletions lib/mpi/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#
# MPI multiprecision maths library (from gpg)
#

obj-$(CONFIG_MPILIB) = mpi.o

mpi-y = \
generic_mpih-lshift.o \
generic_mpih-mul1.o \
generic_mpih-mul2.o \
generic_mpih-mul3.o \
generic_mpih-rshift.o \
generic_mpih-sub1.o \
generic_mpih-add1.o \
mpicoder.o \
mpi-bit.o \
mpih-cmp.o \
mpih-div.o \
mpih-mul.o \
mpi-pow.o \
mpiutil.o

0 comments on commit d9c46b1

Please sign in to comment.