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 warning has been fixed.
This library is used to implemenet RSA digital signature verification used in IMA/EVM integrity protection subsystem. Signed-off-by: Dmitry Kasatkin <dmitry.kasat...@intel.com> --- crypto/Kconfig | 6 ++++++ crypto/Makefile | 1 + crypto/mpi/Makefile | 20 ++++++++++++++++++++ 3 files changed, 27 insertions(+), 0 deletions(-) create mode 100644 crypto/mpi/Makefile diff --git a/crypto/Kconfig b/crypto/Kconfig index ae27b753..4b1b9a4 100644 --- a/crypto/Kconfig +++ b/crypto/Kconfig @@ -857,6 +857,12 @@ config CRYPTO_USER_API_SKCIPHER This option enables the user-spaces interface for symmetric key cipher algorithms. +config CRYPTO_MPILIB + bool "Multiprecision maths library (EXPERIMENTAL)" + depends on CRYPTO + help + Multiprecision maths library from GnuPG + source "drivers/crypto/Kconfig" endif # if CRYPTO diff --git a/crypto/Makefile b/crypto/Makefile index ce5a813..604006d 100644 --- a/crypto/Makefile +++ b/crypto/Makefile @@ -88,6 +88,7 @@ obj-$(CONFIG_CRYPTO_GHASH) += ghash-generic.o obj-$(CONFIG_CRYPTO_USER_API) += af_alg.o obj-$(CONFIG_CRYPTO_USER_API_HASH) += algif_hash.o obj-$(CONFIG_CRYPTO_USER_API_SKCIPHER) += algif_skcipher.o +obj-$(CONFIG_CRYPTO_MPILIB) += mpi/ # # generic algorithms and the async_tx api diff --git a/crypto/mpi/Makefile b/crypto/mpi/Makefile new file mode 100644 index 0000000..978dc58 --- /dev/null +++ b/crypto/mpi/Makefile @@ -0,0 +1,20 @@ +# +# MPI multiprecision maths library (from gpg) +# + +obj-$(CONFIG_CRYPTO_MPILIB) = \ + 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 + -- 1.7.4.1 -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html