All of lore.kernel.org
 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: [RFC v2.1 3/6] crypto: GnuPG based MPI lib - make files needed for ksign
Date: Tue, 13 Sep 2011 17:20:10 +0300	[thread overview]
Message-ID: <01cf591b5e8cf6cdfac854ceb6109b6a6179e823.1315921427.git.dmitry.kasatkin@intel.com> (raw)
In-Reply-To: <cover.1315921427.git.dmitry.kasatkin@intel.com>
In-Reply-To: <cover.1315921427.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 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.kasatkin@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

  parent reply	other threads:[~2011-09-13 14:20 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-13 14:20 [RFC v2.1 0/6] evm: digital signature verification extension Dmitry Kasatkin
2011-09-13 14:20 ` [RFC v2.1 1/6] crypto: GnuPG based MPI lib - source files needed for ksign Dmitry Kasatkin
2011-09-13 14:20 ` [RFC v2.1 2/6] crypto: GnuPG based MPI lib - header " Dmitry Kasatkin
2011-09-13 14:20 ` Dmitry Kasatkin [this message]
2011-09-13 14:20 ` [RFC v2.1 4/6] crypto: GnuPG based MPI lib - extra MPI sources Dmitry Kasatkin
2011-09-13 14:20 ` [RFC v2.1 5/6] crypto: ksign - digital signature verification support Dmitry Kasatkin
2011-09-13 14:20 ` [RFC v2.1 6/6] evm: " Dmitry Kasatkin
2011-09-20 13:24 ` [RFC v2.1 0/6] evm: digital signature verification extension Mimi Zohar
2011-09-26  7:33   ` Kasatkin, Dmitry
2011-09-26 23:15     ` James Morris
2011-09-28 15:37       ` Kasatkin, Dmitry
2011-09-28 15:37         ` Kasatkin, Dmitry
2011-09-29  0:14         ` Herbert Xu
2011-09-29  0:14           ` Herbert Xu
2011-09-29  0:42           ` James Morris
2011-09-29 12:13             ` Kasatkin, Dmitry
2011-10-04 19:04             ` Herbert Xu
2011-10-04 19:04               ` Herbert Xu

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=01cf591b5e8cf6cdfac854ceb6109b6a6179e823.1315921427.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.