mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
To: linux-security-module@vger.kernel.org
Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
	zohar@linux.vnet.ibm.com, dhowells@redhat.com,
	herbert@gondor.hengli.com.au
Subject: [PATCH v2.2 3/7] crypto: GnuPG based MPI lib - make files (part 3)
Date: Wed, 19 Oct 2011 14:51:32 +0300	[thread overview]
Message-ID: <4582004c479f91ae4f5a847ade3a7cd5cb2edebb.1319025009.git.dmitry.kasatkin@intel.com> (raw)
In-Reply-To: <cover.1319025009.git.dmitry.kasatkin@intel.com>
In-Reply-To: <cover.1319025009.git.dmitry.kasatkin@intel.com>

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>
---
 lib/Kconfig      |    7 +++++++
 lib/Makefile     |    2 ++
 lib/mpi/Makefile |   22 ++++++++++++++++++++++
 3 files changed, 31 insertions(+), 0 deletions(-)
 create mode 100644 lib/mpi/Makefile

diff --git a/lib/Kconfig b/lib/Kconfig
index 6c695ff..f69ce08 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -279,4 +279,11 @@ config CORDIC
 config LLIST
 	bool
 
+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
diff --git a/lib/Makefile b/lib/Makefile
index d5d175c..97705ae 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -117,6 +117,8 @@ obj-$(CONFIG_CORDIC) += cordic.o
 
 obj-$(CONFIG_LLIST) += llist.o
 
+obj-$(CONFIG_MPILIB) += mpi/
+
 hostprogs-y	:= gen_crc32table
 clean-files	:= crc32table.h
 
diff --git a/lib/mpi/Makefile b/lib/mpi/Makefile
new file mode 100644
index 0000000..0c1c6c3
--- /dev/null
+++ b/lib/mpi/Makefile
@@ -0,0 +1,22 @@
+#
+# 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
+
-- 
1.7.4.1


  parent reply	other threads:[~2011-10-19 11:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-19 11:51 [PATCH v2.2 0/7] evm: digital signature verification extension Dmitry Kasatkin
2011-10-19 11:51 ` [PATCH v2.2 1/7] crypto: GnuPG based MPI lib - source files (part 1) Dmitry Kasatkin
2011-11-19  3:33   ` Stephen Rothwell
2011-11-21 10:20     ` Kasatkin, Dmitry
2011-11-21 11:27       ` James Morris
2011-11-21 15:32         ` Kasatkin, Dmitry
2011-11-21 21:09           ` Stephen Rothwell
2011-10-19 11:51 ` [PATCH v2.2 2/7] crypto: GnuPG based MPI lib - header files (part 2) Dmitry Kasatkin
2012-03-11  9:55   ` Geert Uytterhoeven
2012-03-21  8:39     ` Geert Uytterhoeven
2012-03-22  8:21       ` Kasatkin, Dmitry
2011-10-19 11:51 ` Dmitry Kasatkin [this message]
2011-10-19 11:51 ` [PATCH v2.2 4/7] crypto: GnuPG based MPI lib - additional sources (part 4) Dmitry Kasatkin
2011-10-19 11:51 ` [PATCH v2.2 5/7] crypto: digital signature verification support Dmitry Kasatkin
2011-10-19 11:51 ` [PATCH v2.2 6/7] integrity: digital signature verification using multiple keyrings Dmitry Kasatkin
2011-11-04 11:29   ` Mimi Zohar
2011-10-19 11:51 ` [PATCH v2.2 7/7] evm: digital signature verification support Dmitry Kasatkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4582004c479f91ae4f5a847ade3a7cd5cb2edebb.1319025009.git.dmitry.kasatkin@intel.com \
    --to=dmitry.kasatkin@intel.com \
    --cc=dhowells@redhat.com \
    --cc=herbert@gondor.hengli.com.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=zohar@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®