Re: [PATCH v4 11/12] security, crypto: LLVMLinux: Remove VLAIS from ima_crypto.c

2014-09-23 Thread Dmitry Kasatkin
macro. > > The new code can be compiled with both gcc and clang. > > Signed-off-by: Behan Webster > Reviewed-by: Mark Charlebois > Reviewed-by: Jan-Simon Möller > Acked-by: Herbert Xu > Cc: t...@linutronix.de Looks good. Thanks. Acked-by: Dmitry Kasatkin > --- &

Re: [PATCH v3 01/12] crypto: LLVMLinux: Add macro to remove use of VLAIS in crypto code

2014-09-17 Thread Dmitry Kasatkin
On 17/09/14 12:22, Herbert Xu wrote: > On Mon, Sep 15, 2014 at 12:30:23AM -0700, beh...@converseincode.com wrote: >> From: Behan Webster >> >> Add a macro which replaces the use of a Variable Length Array In Struct >> (VLAIS) >> with a C99 compliant equivalent. This macro instead allocates the ap

Re: [PATCH] security, crypto: LLVMLinux: Remove VLAIS from ima_crypto.c

2014-09-08 Thread Dmitry Kasatkin
On 07/09/14 05:06, Behan Webster wrote: > On 09/06/14 03:11, Thomas Gleixner wrote: >> On Fri, 5 Sep 2014, Behan Webster wrote: >>> On 09/05/14 17:18, Thomas Gleixner wrote: > Signed-off-by: Behan Webster > Signed-off-by: Mark Charlebois > Signed-off-by: Jan-Simon Möller This SO

Re: Making the asymmetric keys config option into a top-level option

2014-07-19 Thread Dmitry Kasatkin
On Thu, Jul 17, 2014 at 10:55 PM, David Howells wrote: > Dmitry Kasatkin wrote: > >> When ASYMMETRIC_KEYS=y, but depends on CRYPTO=m, selections will be also >> modules. >> In random config case OID_REGISTRY, MPILIB and ASN1 became modules producing >> buil

Re: [PATCH 2/2] digsig: make crypto builtin if digsig selected as builtin

2014-07-19 Thread Dmitry Kasatkin
On Thu, Jul 17, 2014 at 10:56 PM, David Howells wrote: > Dmitry Kasatkin wrote: > >> When SIGNATURE=y but depends on CRYPTO=m, it selects MPILIB as module >> producing build break. This patch makes digsig to select crypto for >> correcting dependency. > > I'll

[PATCH 0/2] Fix build break on dependency from CRYPTO

2014-07-11 Thread Dmitry Kasatkin
(.text+0x9a1): undefined reference to `asn1_ber_decoder' crypto/built-in.o: In function `x509_note_OID': >> (.text+0x9e4): undefined reference to `look_up_OID' crypto/built-in.o: In function `x509_note_OID': >> (.text+0xa01): undefined reference to `

[PATCH 1/2] asymmetric_keys: make crypto builtin if asymmetric keys selected as builtin

2014-07-11 Thread Dmitry Kasatkin
. Signed-off-by: Dmitry Kasatkin --- crypto/Kconfig | 6 +- crypto/asymmetric_keys/Kconfig | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/crypto/Kconfig b/crypto/Kconfig index ce4012a..96835d6 100644 --- a/crypto/Kconfig +++ b/crypto/Kconfig @@ -10,6 +10,11

[PATCH 2/2] digsig: make crypto builtin if digsig selected as builtin

2014-07-11 Thread Dmitry Kasatkin
When SIGNATURE=y but depends on CRYPTO=m, it selects MPILIB as module producing build break. This patch makes digsig to select crypto for correcting dependency. Signed-off-by: Dmitry Kasatkin --- lib/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Kconfig b/lib

Re: [PATCH v3 1/3] ima: use ahash API for file hash calculation

2014-07-10 Thread Dmitry Kasatkin
On 10/07/14 11:02, Marek Vasut wrote: > On Thursday, July 10, 2014 at 01:05:39 AM, Dmitry Kasatkin wrote: >> On 10 July 2014 00:00, Marek Vasut wrote: >>> On Tuesday, July 08, 2014 at 10:07:16 AM, Dmitry Kasatkin wrote: >>> [...] >>> >>>>> Righ

Re: [PATCH v3 1/3] ima: use ahash API for file hash calculation

2014-07-09 Thread Dmitry Kasatkin
On 10 July 2014 00:00, Marek Vasut wrote: > On Tuesday, July 08, 2014 at 10:07:16 AM, Dmitry Kasatkin wrote: > [...] >> > Right, but my concern is not about unloading the kernel module, but >> > about the IMA module parameters left initialized. The existing code >&g

Re: [PATCH v3 1/3] ima: use ahash API for file hash calculation

2014-07-08 Thread Dmitry Kasatkin
On 07/07/14 19:34, Mimi Zohar wrote: > On Mon, 2014-07-07 at 19:11 +0300, Dmitry Kasatkin wrote: >> On 07/07/14 18:44, Mimi Zohar wrote: >>> On Mon, 2014-07-07 at 16:37 +0300, Dmitry Kasatkin wrote: >>>> On 07/07/14 14:56, Mimi Zohar wrote: >>>>&

Re: [PATCH v3 1/3] ima: use ahash API for file hash calculation

2014-07-07 Thread Dmitry Kasatkin
On 07/07/14 18:44, Mimi Zohar wrote: > On Mon, 2014-07-07 at 16:37 +0300, Dmitry Kasatkin wrote: >> On 07/07/14 14:56, Mimi Zohar wrote: >>> On Fri, 2014-07-04 at 15:05 +0300, Dmitry Kasatkin wrote: >>>> +/** >>> This is the kernel-doc delimiter. >>

Re: [PATCH v3 1/3] ima: use ahash API for file hash calculation

2014-07-07 Thread Dmitry Kasatkin
On 07/07/14 14:56, Mimi Zohar wrote: > On Fri, 2014-07-04 at 15:05 +0300, Dmitry Kasatkin wrote: >> Async hash API allows to use HW acceleration for hash calculation. >> It may give significant performance gain or/and reduce power consumption, >> which might be very beneficia

[PATCH v3 3/3] ima: provide double buffering for hash calculation

2014-07-04 Thread Dmitry Kasatkin
Asynchronous hash API allows initiate hash calculation and perform other tasks while hash is calculated. This patch introduces usage of double buffering for simultaneous hashing and reading of the next chunk of data from the storage. Changes in v3: - better comments Signed-off-by: Dmitry

[PATCH v3 2/3] ima: introduce multi-page collect buffers

2014-07-04 Thread Dmitry Kasatkin
: - kernel parameter replaced with module parameter Signed-off-by: Dmitry Kasatkin --- Documentation/kernel-parameters.txt | 8 +++ security/integrity/ima/ima_crypto.c | 98 - 2 files changed, 104 insertions(+), 2 deletions(-) diff --git a/Documentat

[PATCH v3 1/3] ima: use ahash API for file hash calculation

2014-07-04 Thread Dmitry Kasatkin
first use. - hash calculation falls back to shash if ahash allocation/calculation fails - complex initialization separated from variable declaration - improved comments Signed-off-by: Dmitry Kasatkin --- Documentation/kernel-parameters.txt | 9 ++ security/integrity/ima/ima_cryp

[PATCH v3 0/3] ima: use asynchronous hash API for hash calculation

2014-07-04 Thread Dmitry Kasatkin
ahash crypto modules. Ahash allocated once on the first use. - hash calculation falls back to sahsh if ahash allocation/calculation fails - complex initialization separated from variable declaration - improved comments - Dmitry Dmitry Kasatkin (3): ima: use ahash API for file hash calculation

Re: [PATCH v2 2/3] ima: introduce multi-page collect buffers

2014-07-02 Thread Dmitry Kasatkin
On 2 July 2014 23:21, Mimi Zohar wrote: > On Tue, 2014-07-01 at 23:12 +0300, Dmitry Kasatkin wrote: >> Use of multiple-page collect buffers reduces: >> 1) the number of block IO requests >> 2) the number of asynchronous hash update requests >> >> Second is imp

Re: [PATCH v2 1/3] ima: use ahash API for file hash calculation

2014-07-02 Thread Dmitry Kasatkin
On 2 July 2014 21:33, Dave Hansen wrote: > On 07/01/2014 01:12 PM, Dmitry Kasatkin wrote: >> + ima_ahash= [IMA] Asynchronous hash usage parameters >> + Format: >> + Set the minimal file size when use asynchronous hash. >&g

Re: [PATCH v2 1/3] ima: use ahash API for file hash calculation

2014-07-02 Thread Dmitry Kasatkin
On 2 July 2014 20:44, Mimi Zohar wrote: > On Tue, 2014-07-01 at 23:12 +0300, Dmitry Kasatkin wrote: > >> -/* >> - * Calculate the MD5/SHA1 file digest >> - */ >> +static struct crypto_ahash *ima_alloc_atfm(enum hash_algo algo) >> +{ >> + struct crypt

Re: [PATCH v2 1/3] ima: use ahash API for file hash calculation

2014-07-02 Thread Dmitry Kasatkin
On 2 July 2014 19:40, Mimi Zohar wrote: > On Tue, 2014-07-01 at 23:12 +0300, Dmitry Kasatkin wrote: >> Async hash API allows to use HW acceleration for hash calculation. >> It may give significant performance gain or/and reduce power consumption, >> which might be very b

[PATCH v2 1/3] ima: use ahash API for file hash calculation

2014-07-01 Thread Dmitry Kasatkin
ll be used. Signed-off-by: Dmitry Kasatkin --- Documentation/kernel-parameters.txt | 5 + security/integrity/ima/ima_crypto.c | 185 +++- 2 files changed, 186 insertions(+), 4 deletions(-) diff --git a/Documentation/kernel-parameters.txt b/Documentat

[PATCH v2 2/3] ima: introduce multi-page collect buffers

2014-07-01 Thread Dmitry Kasatkin
hash=2048,16384' specifies that minimal file size to use ahash is 2048 byes and buffer size is 16384 bytes. Default buffer size is 4096 bytes. Signed-off-by: Dmitry Kasatkin --- Documentation/kernel-parameters.txt | 3 +- security/integrity/ima/ima_crypto.c | 85 ++---

[PATCH v2 3/3] ima: provide double buffering for hash calculation

2014-07-01 Thread Dmitry Kasatkin
Asynchronous hash API allows initiate hash calculation and perform other tasks while hash is calculated. This patch introduces usage of double buffering for simultaneous hashing and reading of the next chunk of data from the storage. Signed-off-by: Dmitry Kasatkin --- security/integrity/ima

[PATCH v2 0/3] ima: use asynchronous hash API for hash calculation

2014-07-01 Thread Dmitry Kasatkin
ted from variable declaration - improved comments - Dmitry Dmitry Kasatkin (3): ima: use ahash API for file hash calculation ima: introduce multi-page collect buffers ima: provide double buffering for hash calculation Documentation/kernel-parameters.txt | 6 + s

Re: [PATCH v1 1/3] ima: use ahash API for file hash calculation

2014-06-30 Thread Dmitry Kasatkin
On 26/06/14 14:54, Mimi Zohar wrote: > On Thu, 2014-06-19 at 18:20 +0300, Dmitry Kasatkin wrote: >> Async hash API allows to use HW acceleration for hash calculation. >> It may give significant performance gain or/and reduce power consumption, >> which might be very beneficia

Re: [PATCH v1 1/3] ima: use ahash API for file hash calculation

2014-06-24 Thread Dmitry Kasatkin
On 23/06/14 14:32, Mimi Zohar wrote: > On Thu, 2014-06-19 at 18:20 +0300, Dmitry Kasatkin wrote: >> Async hash API allows to use HW acceleration for hash calculation. >> It may give significant performance gain or/and reduce power consumption, >> which might be very beneficia

[PATCH v1 2/3] ima: introduce multi-page collect buffers

2014-06-19 Thread Dmitry Kasatkin
ect buffer. Signed-off-by: Dmitry Kasatkin --- Documentation/kernel-parameters.txt | 3 ++ security/integrity/ima/ima_crypto.c | 81 +++-- 2 files changed, 81 insertions(+), 3 deletions(-) diff --git a/Documentation/kernel-parameters.txt b/Documentat

[PATCH v1 1/3] ima: use ahash API for file hash calculation

2014-06-19 Thread Dmitry Kasatkin
ed by this parameter, shash will be used. Thus, by defult, original shash implementation is used. Signed-off-by: Dmitry Kasatkin --- Documentation/kernel-parameters.txt | 3 + security/integrity/ima/ima_crypto.c | 182 +++- 2 files changed, 181 insertions(+), 4

[PATCH v1 3/3] ima: provide double buffering for hash calculation

2014-06-19 Thread Dmitry Kasatkin
Asynchronous hash API allows initiate hash calculation and perform other tasks while hash is calculated. This patch introduces usage of double buffering for simultenous hashing and reading of the next chunk of data from the storage. Signed-off-by: Dmitry Kasatkin --- security/integrity/ima

[PATCH v1 0/3] ima: use asynchronous hash API for hash calculation

2014-06-19 Thread Dmitry Kasatkin
i-page buffers which makes HW acceleration more efficient. It adds kernel parameter to specify buffer size to use. Third patch introduces double-buffering which allows to readahead next portion of data for hashing while calculating the hash. - Dmitry Dmitry Kasatkin (3): ima: use ahash API for f

Re: ahash vs. shash

2014-05-14 Thread Dmitry Kasatkin
On 14 May 2014 04:39, Herbert Xu wrote: > Dmitry Kasatkin wrote: >> Hi, >> >> ahash allows to use HW acceleration, but usually it comes at a cost of >> additional HW related configuration overhead, such as configuring hash >> module, DMA, etc. For that reaso

ahash vs. shash

2014-05-06 Thread Dmitry Kasatkin
Hi, ahash allows to use HW acceleration, but usually it comes at a cost of additional HW related configuration overhead, such as configuring hash module, DMA, etc. For that reason hashing small chucks of data is faster doing it with shash (CPU) rather than HW acceleration. I measured long time ag

Re: [PATCH V4 02/15] asymmetric keys: implement EMSA_PKCS1-v1_5-ENCODE in rsa

2013-09-17 Thread Dmitry Kasatkin
On Sat, Sep 14, 2013 at 7:56 PM, Lee, Chun-Yi wrote: > Implement EMSA_PKCS1-v1_5-ENCODE [RFC3447 sec 9.2] in rsa.c. It's the > first step of signature generation operation (RSASSA-PKCS1-v1_5-SIGN). > > This patch is temporary set emLen to pks->k, and temporary set EM to > pks->S for debugging. We

Re: [PATCH V4 02/15] asymmetric keys: implement EMSA_PKCS1-v1_5-ENCODE in rsa

2013-09-17 Thread Dmitry Kasatkin
Hello, On Sat, Sep 14, 2013 at 7:56 PM, Lee, Chun-Yi wrote: > Implement EMSA_PKCS1-v1_5-ENCODE [RFC3447 sec 9.2] in rsa.c. It's the > first step of signature generation operation (RSASSA-PKCS1-v1_5-SIGN). > > This patch is temporary set emLen to pks->k, and temporary set EM to > pks->S for debug

Re: [PATCH 02/10] crypto: omap-aes: Add useful debug macros

2013-08-14 Thread Dmitry Kasatkin
On 15/08/13 06:12, Joel Fernandes wrote: > On 08/14/2013 07:47 PM, Joe Perches wrote: >> On Wed, 2013-08-14 at 18:40 -0500, Joel Fernandes wrote: >>> On 08/14/2013 06:29 PM, Joe Perches wrote: On Wed, 2013-08-14 at 18:12 -0500, Joel Fernandes wrote: > When DEBUG is enabled, these macros ca

Re: [PATCH 00/10] crypto: omap-aes: DMA and PIO mode improvements

2013-08-14 Thread Dmitry Kasatkin
On 15/08/13 02:30, Joel Fernandes wrote: > On 08/14/2013 06:12 PM, Joel Fernandes wrote: >> This patch series is a rewrite of the DMA portion of omap-aes driver >> and also adds support for PIO mode. Both these modes, give better >> performance than before. >> >> Earlier, only a single SG was used

[PATCH 2/2] mpilib: use DIV_ROUND_UP and remove unused macros

2013-01-30 Thread Dmitry Kasatkin
From: Andy Shevchenko Remove MIN, MAX and ABS macros that are duplicates kernel's native implementation. Signed-off-by: Andy Shevchenko --- lib/mpi/mpi-internal.h |4 lib/mpi/mpicoder.c |8 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/mpi/mpi-int

[PATCH 1/2] digsig: remove unnecessary memory allocation and copying

2013-01-30 Thread Dmitry Kasatkin
In existing use case, copying of the decoded data is unnecessary in pkcs_1_v1_5_decode_emsa. It is just enough to get pointer to the message. Removing copying and extra buffer allocation. Signed-off-by: Dmitry Kasatkin --- lib/digsig.c | 41 ++--- 1 file

[PATCH 0/2] digsig and mpi cleanups

2013-01-30 Thread Dmitry Kasatkin
Here is couple of cleanups for digsig and libmpi. - Dmitry Andy Shevchenko (1): mpilib: use DIV_ROUND_UP and remove unused macros Dmitry Kasatkin (1): digsig: remove unnecessary memory allocation and copying lib/digsig.c | 41 ++--- lib/mpi

[PATCH v3 0/1] dm-integrity: integrity protection device-mapper target

2013-01-22 Thread Dmitry Kasatkin
ed new option 'zero_on_error' to return zeroed block instead of an error default behavior is to return an error - improved error printing -Dmitry Dmitry Kasatkin (1): dm-integrity: integrity protection device-mapper target Documentation/device-mapper/dm-integrity.txt | 137 +

[PATCH v3 1/1] dm-integrity: integrity protection device-mapper target

2013-01-22 Thread Dmitry Kasatkin
e specific, binds integrity data to the device. As a result data blocks and corresponding HMACs cannot simply be copied over from other file systems. Signed-off-by: Dmitry Kasatkin --- Documentation/device-mapper/dm-integrity.txt | 137 drivers/md/Kconfig | 13 +

[PATCH v2.1 1/1] dm-integrity: integrity protection device-mapper target

2013-01-15 Thread Dmitry Kasatkin
e specific, binds integrity data to the device. As a result data blocks and corresponding HMACs cannot simply be copied over from other file systems. Signed-off-by: Dmitry Kasatkin --- Documentation/device-mapper/dm-integrity.txt | 137 drivers/md/Kconfig | 13 +

[PATCH v2.1 0/1] dm-integrity: integrity protection device-mapper target

2013-01-15 Thread Dmitry Kasatkin
yption. I addressed all comments I got so far. Can it be now added to the DM tree? - Dmitry Dmitry Kasatkin (1): dm-integrity: integrity protection device-mapper target Documentation/device-mapper/dm-integrity.txt | 137 drivers/md/Kconfig | 13 + drivers/m

[RFC 0/1] ima/evm: signature verification support using asymmetric keys

2013-01-15 Thread Dmitry Kasatkin
signature format. BR, Dmitry Dmitry Kasatkin (1): ima: digital signature verification using asymmetric keys security/integrity/Kconfig | 12 + security/integrity/digsig.c | 103 ++- 2 files changed, 114 insertions(+), 1 deletion(-) -- 1.7.10.4

[PATCHv2 0/1] dm-integrity: integrity protection device-mapper target

2012-11-26 Thread Dmitry Kasatkin
added sync mode flag to handle reboot notifications - added discards handling - use DM functions for printing kernel messages - Dmitry Dmitry Kasatkin (1): dm-integrity: integrity protection device-mapper target Documentation/device-mapper/dm-integrity.txt | 137 drivers/

[PATCHv2 1/1] dm-integrity: integrity protection device-mapper target

2012-11-26 Thread Dmitry Kasatkin
e specific, binds integrity data to the device. As a result data blocks and corresponding HMACs cannot simply be copied over from other file systems. Signed-off-by: Dmitry Kasatkin --- Documentation/device-mapper/dm-integrity.txt | 137 drivers/md/Kconfig | 13 +

[PATCH 0/1] dm-integrity: integrity protection device-mapper target

2012-09-24 Thread Dmitry Kasatkin
-integrity provides a lighter weight read-write block level integrity protection for file systems not requiring full disk encryption, but which do require writability. - Dmitry Dmitry Kasatkin (1): dm-integrity: integrity protection device-mapper target Documentation/device-mapper/dm-integrity.

[PATCH 1/1] dm-integrity: integrity protection device-mapper target

2012-09-24 Thread Dmitry Kasatkin
e specific, binds integrity data to the device. As a result data blocks and corresponding HMACs cannot simply be copied over from other file systems. Signed-off-by: Dmitry Kasatkin --- Documentation/device-mapper/dm-integrity.txt | 125 drivers/md/Kconfig | 12 +

[PATCH v2.2 4/7] crypto: GnuPG based MPI lib - additional sources (part 4)

2011-10-19 Thread Dmitry Kasatkin
, if CONFIG_MPILIB_EXTRA is enabled. Signed-off-by: Dmitry Kasatkin Signed-off-by: Dmitry Kasatkin --- lib/Kconfig| 10 ++ lib/mpi/Makefile | 11 ++ lib/mpi/generic_mpi-asm-defs.h |4 + lib/mpi/mpi-add.c | 234

[PATCH v2.2 5/7] crypto: digital signature verification support

2011-10-19 Thread Dmitry Kasatkin
defines the name of the key. Signed-off-by: Dmitry Kasatkin Acked-by: Mimi Zohar --- Documentation/digsig.txt | 97 include/linux/digsig.h | 64 +++ lib/Kconfig |8 ++ lib/Makefile |1 + lib/digsig.c | 283

[PATCH v2.2 3/7] crypto: GnuPG based MPI lib - make files (part 3)

2011-10-19 Thread Dmitry Kasatkin
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 --- lib/Kconfig |7 +++ lib/Makefile |2 ++ lib/mpi/Makefile | 22

[PATCH v2.2 7/7] evm: digital signature verification support

2011-10-19 Thread Dmitry Kasatkin
should be different on every device. Signed-off-by: Dmitry Kasatkin Acked-by: Mimi Zohar --- security/integrity/evm/evm.h| 12 + security/integrity/evm/evm_crypto.c | 66 ++-- security/integrity/evm/evm_main.c | 94 ++- 3

[PATCH v2.2 6/7] integrity: digital signature verification using multiple keyrings

2011-10-19 Thread Dmitry Kasatkin
added from initramfs. Signed-off-by: Dmitry Kasatkin --- security/integrity/Kconfig | 14 +++ security/integrity/Makefile|1 + security/integrity/digsig.c| 48 security/integrity/integrity.h | 20 4 files c

[PATCH v2.2 0/7] evm: digital signature verification extension

2011-10-19 Thread Dmitry Kasatkin
: git://git.kernel.org/pub/scm/linux/kernel/git/kasatkin/ima-ksign.git http://meego.gitorious.org/meego-platform-security/ima-ksign Supporting utility for key handling and signing is available here: http://meego.gitorious.org/meego-platform-security/evm-utils Regards, Dmitry Dmitry Kasatkin (7): crypto:

[PATCH v2.1 5/7] crypto: digital signature verification support

2011-10-14 Thread Dmitry Kasatkin
defines the name of the key. Signed-off-by: Dmitry Kasatkin Acked-by: Mimi Zohar --- Documentation/digsig.txt | 97 include/linux/digsig.h | 64 +++ lib/Kconfig |8 ++ lib/Makefile |1 + lib/digsig.c | 283

[PATCH v2.1 6/7] integrity: digital signature verification using multiple keyrings

2011-10-14 Thread Dmitry Kasatkin
added from initramfs. Signed-off-by: Dmitry Kasatkin --- security/integrity/Kconfig | 14 +++ security/integrity/Makefile|1 + security/integrity/digsig.c| 48 security/integrity/integrity.h | 20 4 files c

[PATCH v2.1 7/7] evm: digital signature verification support

2011-10-14 Thread Dmitry Kasatkin
should be different on every device. Signed-off-by: Dmitry Kasatkin Acked-by: Mimi Zohar --- security/integrity/evm/evm.h| 12 + security/integrity/evm/evm_crypto.c | 66 ++-- security/integrity/evm/evm_main.c | 94 ++- 3

[PATCH v2.1 3/7] crypto: GnuPG based MPI lib - make files (part 3)

2011-10-14 Thread Dmitry Kasatkin
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 --- lib/Kconfig |7 +++ lib/Makefile |2 ++ lib/mpi/Makefile | 22

[PATCH v2.1 4/7] crypto: GnuPG based MPI lib - additional sources (part 4)

2011-10-14 Thread Dmitry Kasatkin
, if CONFIG_MPILIB_EXTRA is enabled. Signed-off-by: Dmitry Kasatkin --- lib/Kconfig| 10 ++ lib/mpi/Makefile | 12 ++ lib/mpi/generic_mpi-asm-defs.h |4 + lib/mpi/generic_udiv-w-sdiv.c | 106 + lib/mpi/mpi-add.c | 234

[PATCH v2.1 0/7] evm: digital signature verification extension

2011-10-14 Thread Dmitry Kasatkin
urity/ima-ksign Supporting utility for key handling and signing is available here: http://meego.gitorious.org/meego-platform-security/evm-utils Regards, Dmitry Dmitry Kasatkin (7): crypto: GnuPG based MPI lib - source files (part 1) crypto: GnuPG based MPI lib - header files (part 2) crypto:

[RFC v2.1 4/6] crypto: GnuPG based MPI lib - extra MPI sources

2011-09-13 Thread Dmitry Kasatkin
used to implemenet RSA digital signature verification used in IMA/EVM integrity protection subsystem. Signed-off-by: Dmitry Kasatkin --- crypto/mpi/Makefile | 10 + crypto/mpi/generic_mpi-asm-defs.h |4 + crypto/mpi/generic_udiv-w-sdiv.c | 106 crypto/mpi/mpi

[RFC v2.1 5/6] crypto: ksign - digital signature verification support

2011-09-13 Thread Dmitry Kasatkin
key to the kernel format and to load it into the keyring. Signed-off-by: Dmitry Kasatkin Acked-by: Mimi Zohar --- crypto/Kconfig | 13 ++ crypto/Makefile |3 + crypto/ksign.c | 269 ++ include/linux/cryp

[RFC v2.1 6/6] evm: digital signature verification support

2011-09-13 Thread Dmitry Kasatkin
different on every device. File metadata can be protected using digital signature. Signed-off-by: Dmitry Kasatkin Acked-by: Mimi Zohar --- security/integrity/evm/Kconfig | 15 security/integrity/evm/evm.h| 12 security/integrity/evm/evm_crypto.c | 66

[RFC v2.1 3/6] crypto: GnuPG based MPI lib - make files needed for ksign

2011-09-13 Thread Dmitry Kasatkin
used to implemenet RSA digital signature verification used in IMA/EVM integrity protection subsystem. Signed-off-by: Dmitry Kasatkin --- crypto/Kconfig |6 ++ crypto/Makefile |1 + crypto/mpi/Makefile | 20 3 files changed, 27 insertions(+), 0

[RFC v2.1 0/6] evm: digital signature verification extension

2011-09-13 Thread Dmitry Kasatkin
http://meego.gitorious.org/meego-platform-security/evm-utils Regards, Dmitry Dmitry Kasatkin (6): crypto: GnuPG based MPI lib - source files needed for ksign crypto: GnuPG based MPI lib - header files needed for ksign crypto: GnuPG based MPI lib - make files needed for ksign crypto: GnuPG

[RFC v2.0 3/3] evm: digital signature support

2011-09-06 Thread Dmitry Kasatkin
: Dmitry Kasatkin Acked-by: Mimi Zohar --- security/integrity/evm/Kconfig | 14 security/integrity/evm/evm.h| 12 security/integrity/evm/evm_crypto.c | 66 ++- security/integrity/evm/evm_main.c | 125 +++ 4 files changed

[RFC v2.0 3/3] evm: digital signature verification support

2011-09-06 Thread Dmitry Kasatkin
different on every device. File metadata can be protected using digital signature. Signed-off-by: Dmitry Kasatkin Acked-by: Mimi Zohar --- security/integrity/evm/Kconfig | 15 security/integrity/evm/evm.h| 12 security/integrity/evm/evm_crypto.c | 66

[RFC v2.0 2/3] crypto: ksign - digital signature verification support

2011-09-06 Thread Dmitry Kasatkin
key to the kernel format and to load it into the keyring. Signed-off-by: Dmitry Kasatkin Acked-by: Mimi Zohar --- crypto/Kconfig | 13 ++ crypto/Makefile |3 + crypto/ksign.c | 269 ++ include/linux/cryp

[RFC v2.0 0/3] evm: digital signature verification extension

2011-09-06 Thread Dmitry Kasatkin
: git://git.kernel.org/pub/scm/linux/kernel/git/kasatkin/ima-ksign.git Supporting utility for key handling and signing is available here: http://meego.gitorious.org/meego-platform-security/evm-utils Regards, Dmitry Dmitry Kasatkin (3): crypto: GnuPG based MPI lib crypto: ksign - digital sign

Re: [RFC v1.1 1/5] crypto: GnuPG based MPI lib

2011-08-17 Thread Dmitry Kasatkin
On 17/08/11 14:38, Nikos Mavrogiannopoulos wrote: > On Mon, Aug 15, 2011 at 6:12 PM, Dmitry Kasatkin > wrote: >> On 11/08/11 20:20, Dmitry Kasatkin wrote: >>> From: Dmitry Kasatkin >>> >>> Adds the multi-precision-integer maths library which was origin

Re: [RFC v1.1 2/5] crypto: ksign - digital signature verification support

2011-08-17 Thread Dmitry Kasatkin
On 16/08/11 04:00, James Morris wrote: > On Thu, 11 Aug 2011, Dmitry Kasatkin wrote: > >> +static int ksign_verify_rsa(struct key *key, >> +const char *sig, int siglen, >> + const char *h, int hlen) >> +{ >> +int err

Re: [RFC v1.1 1/5] crypto: GnuPG based MPI lib

2011-08-17 Thread Dmitry Kasatkin
On 16/08/11 03:57, James Morris wrote: > On Thu, 11 Aug 2011, Dmitry Kasatkin wrote: > >> From: Dmitry Kasatkin >> >> Adds the multi-precision-integer maths library which was originally taken >> from GnuPG and ported to the kernel by (among others) David Howells.

Re: [RFC v1.1 1/5] crypto: GnuPG based MPI lib

2011-08-15 Thread Dmitry Kasatkin
Hi, Can anyone please tell why this patch did not appear in archives? I have received it in my 2 accounts, but I cannot see it in archive. Is any size limitations?? - Dmitry On 11/08/11 20:20, Dmitry Kasatkin wrote: > From: Dmitry Kasatkin > > Adds the multi-precision-integer math

Re: RSA

2011-08-11 Thread Dmitry Kasatkin
Hi, Please look to the patch just before your email... [RFC v1.1 2/5] crypto: ksign - digital signature verification support It implements RSA verification for IMA/EVM. May be it would be interesting to you. - Dmitry On 11/08/11 21:30, Michel Machado wrote: > Hi there, > >I'm implementing a

[RFC v1.1 4/5] ksign: provides keyring to search in for the key

2011-08-11 Thread Dmitry Kasatkin
From: Dmitry Kasatkin Allows to specify keyring to search in for the key. Later patches will use special keyrings to store EVM and IMA public keys. Signed-off-by: Dmitry Kasatkin Acked-by: Mimi Zohar --- crypto/ksign.c | 17 ++--- include/linux/crypto/ksign.h

[RFC v1.1 0/5] evm: digital signature extension

2011-08-11 Thread Dmitry Kasatkin
http://meego.gitorious.org/meego-platform-security/ima-ksign Supporting utility for key handling and signing is available here: http://meego.gitorious.org/meego-platform-security/evm-utils Regards, Dmitry Dmitry Kasatkin (5): crypto: GnuPG based MPI lib crypto: ksign - digital signature verification su

[RFC v1.1 3/5] evm: digital signature support

2011-08-11 Thread Dmitry Kasatkin
From: Dmitry Kasatkin When building an image, which has to be flashed to different devices, an HMAC cannot be used to sign file metadata, as the HMAC key is different on every device. File metadata can be protected using digital signature. This patch enables RSA signature based integrity

[RFC v1.1 5/5] evm: creates dedicated evm keyring to store public keys

2011-08-11 Thread Dmitry Kasatkin
From: Dmitry Kasatkin EVM/IMA might perform lots of signature verification operations. For that reason performance is very critical. This patch adds evm_keyring to store public keys used by EVM only. Signed-off-by: Dmitry Kasatkin Acked-by: Mimi Zohar --- security/integrity/evm/evm.h

[RFC v1.1 2/5] crypto: ksign - digital signature verification support

2011-08-11 Thread Dmitry Kasatkin
From: Dmitry Kasatkin This patch implements RSA digital signature verification using GnuPG library. Signature and public key have a special format and have special headers. Signature header contains keyid, which is used to identify the key, needed for signature verification. Payload of the

Re: [PATCH 00/11] crypto: omap-sham driver fixes

2011-06-08 Thread Dmitry Kasatkin
Thanks! On Wed, Jun 8, 2011 at 4:08 PM, Herbert Xu wrote: > On Thu, Jun 02, 2011 at 09:10:02PM +0300, Dmitry Kasatkin wrote: >> Hi, >> >> Recently we got crashes few times after some other patches to 2.6.32 kernel. >> This patch set greatly prevents race condition si

[PATCH 02/11] omap-sham: remove unused code

2011-06-02 Thread Dmitry Kasatkin
From: Dmitry Kasatkin Signed-off-by: Dmitry Kasatkin --- drivers/crypto/omap-sham.c |5 - 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c index 8a45fb7..ac12a60 100644 --- a/drivers/crypto/omap-sham.c +++ b/drivers

[PATCH 05/11] omap-sham: move some flags to device context

2011-06-02 Thread Dmitry Kasatkin
From: Dmitry Kasatkin Couple of context flags have been moved to device flags. IRQ and tasklet handlers does not need to access request context anymore. Signed-off-by: Dmitry Kasatkin --- drivers/crypto/omap-sham.c | 19 ++- 1 files changed, 6 insertions(+), 13 deletions

[PATCH 09/11] omap-sham: irq handler must not clear error code

2011-06-02 Thread Dmitry Kasatkin
From: Dmitry Kasatkin Signed-off-by: Dmitry Kasatkin --- drivers/crypto/omap-sham.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c index a8de7b8..7ca7075 100644 --- a/drivers/crypto/omap-sham.c +++ b/drivers

[PATCH 11/11] omap-sham: do not schedule tasklet if there is no active requests

2011-06-02 Thread Dmitry Kasatkin
From: Dmitry Kasatkin Signed-off-by: Dmitry Kasatkin --- drivers/crypto/omap-sham.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c index 804c16b..6399a8f 100644 --- a/drivers/crypto/omap-sham.c +++ b/drivers

[PATCH 10/11] omap-sham: clear device flags when finishing request

2011-06-02 Thread Dmitry Kasatkin
From: Dmitry Kasatkin Signed-off-by: Dmitry Kasatkin --- drivers/crypto/omap-sham.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c index 7ca7075..804c16b 100644 --- a/drivers/crypto/omap-sham.c +++ b/drivers

[PATCH 07/11] omap-sham: remove dedicated queue handling tasklet

2011-06-02 Thread Dmitry Kasatkin
From: Dmitry Kasatkin Calling omap_sham_handle_queue from "done" tasklet should be done after irq scheduled tasklet completes. Having additional tasklet does not solve that issue because it might be execute before. So queue handling tasklet has been removed and functionality integ

[PATCH 08/11] omap-sham: irq and dma handling changes

2011-06-02 Thread Dmitry Kasatkin
From: Dmitry Kasatkin It could be a situation, that tasklet is executed twice because of certain delay between dma callback and irq handler execution. In that case, second tasklet execution could actually corrupt the data of the new started dma transactions. This patch improves tasklet logic

[PATCH 06/11] omap-sham: remove unnecessary local variable

2011-06-02 Thread Dmitry Kasatkin
From: Dmitry Kasatkin Signed-off-by: Dmitry Kasatkin --- drivers/crypto/omap-sham.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c index b959dc6..84e5890 100644 --- a/drivers/crypto/omap-sham.c +++ b/drivers

[PATCH 03/11] omap-sham: replace flags bit mask with bit number

2011-06-02 Thread Dmitry Kasatkin
From: Dmitry Kasatkin Flags mask cannot be used with atomic bit operations. This patch changes masks to bit numbers. Atomic bit operations will be used by following patches. Signed-off-by: Dmitry Kasatkin --- drivers/crypto/omap-sham.c | 102 ++- 1

[PATCH 04/11] omap-sham: replace flags operation with atomic bit operations

2011-06-02 Thread Dmitry Kasatkin
From: Dmitry Kasatkin Some flags are changed in interrupt handlers and verified in the tasklet. There might be a race condition when tasklet is interrupted or another cpu/core will run IRQ handler and tasklet in parallel. Atomic bitops functions are now used instead of bitmask operations

[PATCH 01/11] omap-sham: remove extra reference

2011-06-02 Thread Dmitry Kasatkin
From: Dmitry Kasatkin Request pointer is already available in the function. Signed-off-by: Dmitry Kasatkin --- drivers/crypto/omap-sham.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c index ba8f1ea..8a45fb7

[PATCH 00/11] crypto: omap-sham driver fixes

2011-06-02 Thread Dmitry Kasatkin
Hi, Recently we got crashes few times after some other patches to 2.6.32 kernel. This patch set greatly prevents race condition situations. No crashes are noticed any more. Now the driver should be ok for multi core as well. Regards, Dmitry Dmitry Kasatkin (11): omap-sham: remove extra

Re: [PATCH 0/4] crypto: omap-sham driver fixes

2011-04-26 Thread Dmitry Kasatkin
Thanks. On 26/04/11 09:36, ext Herbert Xu wrote: > On Wed, Apr 20, 2011 at 01:34:54PM +0300, Dmitry Kasatkin wrote: >> Hi, >> >> Here is few patches with couple of important fixes... > All applied. Thanks! -- To unsubscribe from this list: send the line "unsubscribe

[PATCH 1/4] crypto: omap-sham - fix concurrent sha1 calculations

2011-04-20 Thread Dmitry Kasatkin
From: Markku Kylanpaa SHA1 accelerator can also be busy. Add -EBUSY status return option and return busy status from omap_sham_finup(). Signed-off-by: Markku Kylanpaa --- drivers/crypto/omap-sham.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/crypto/omap-sh

[PATCH 2/4] crypto: omap-sham - remove debug print

2011-04-20 Thread Dmitry Kasatkin
Signed-off-by: Dmitry Kasatkin --- drivers/crypto/omap-sham.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c index e36032b..50aca41 100644 --- a/drivers/crypto/omap-sham.c +++ b/drivers/crypto/omap-sham.c

[PATCH 4/4] crypto: omap-sham - hmac calculation bug fix for sha1 base hash

2011-04-20 Thread Dmitry Kasatkin
result was correct. But in fact only the final hash had to be used. All crypto tests for HMAC produces only single request and could not catch the problem. This problem is fixed here. Signed-off-by: Dmitry Kasatkin --- drivers/crypto/omap-sham.c | 71 +++---

[PATCH 3/4] crypto: omap-sham - enable driver for EMU chips

2011-04-20 Thread Dmitry Kasatkin
EMU chips also have crypto HW as HS chips. Signed-off-by: Dmitry Kasatkin --- drivers/crypto/omap-sham.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c index 50aca41..f5c01dc 100644 --- a/drivers/crypto/omap

[PATCH 0/4] crypto: omap-sham driver fixes

2011-04-20 Thread Dmitry Kasatkin
Hi, Here is few patches with couple of important fixes... Regards, Dmitry Dmitry Kasatkin (3): crypto: omap-sham - remove debug print crypto: omap-sham - enable driver for EMU chips crypto: omap-sham - hmac calculation bug fix for sha1 base hash Markku Kylanpaa (1): crypto: omap-sham

Re: RSA signature verification

2011-03-22 Thread Dmitry Kasatkin
Hi, Accepted by whom? We extend functionality of Integrity subsystem in order to support flashable images which can be verified with public keys... - Dmitry On 22/03/11 09:34, ext Herbert Xu wrote: > On Tue, Mar 22, 2011 at 08:59:56AM +0200, Dmitry Kasatkin wrote: >> As I have said in

  1   2   3   >