[PATCH v2 4/5] crypto: AES CBC by8 encryption

2015-10-29 Thread Tim Chen
This patch introduces the assembly routine to do a by8 AES CBC encryption in support of the AES CBC multi-buffer implementation. Encryption of 8 data streams of a key size are done simultaneously. Originally-by: Chandramouli Narayanan Signed-off-by: Tim Chen --- arch/x86/crypto/aes-cbc-mb/aes

[PATCH v2 2/5] crypto: AES CBC multi-buffer data structures

2015-10-29 Thread Tim Chen
This patch introduces the data structures and prototypes of functions needed for doing AES CBC encryption using multi-buffer. Included are the structures of the multi-buffer AES CBC job, job scheduler in C and data structure defines in x86 assembly code. Originally-by: Chandramouli Narayanan Sig

[PATCH v2 1/5] crypto: Multi-buffer encryptioin infrastructure support

2015-10-29 Thread Tim Chen
In this patch, the infrastructure needed to support multibuffer encryption implementation is added: a) Enhace mcryptd daemon to support blkcipher requests. b) Update configuration to include multi-buffer encryption build support. c) Add support to crypto scatterwalk support that can sleep durin

[PATCH v2 5/5] crypto: AES CBC multi-buffer glue code

2015-10-29 Thread Tim Chen
This patch introduces the multi-buffer job manager which is responsible for submitting scatter-gather buffers from several AES CBC jobs to the multi-buffer algorithm. The glue code interfaces with the underlying algorithm that handles 8 data streams of AES CBC encryption in parallel. AES key expan

[PATCH v2 3/5] crypto: AES CBC multi-buffer scheduler

2015-10-29 Thread Tim Chen
This patch implements in-order scheduler for encrypting multiple buffers in parallel supporting AES CBC encryption with key sizes of 128, 192 and 256 bits. It uses 8 data lanes by taking advantage of the SIMD instructions with XMM registers. The multibuffer manager and scheduler is mostly written

[PATCH v2 0/5] crypto: x86 AES-CBC encryption with multibuffer

2015-10-29 Thread Tim Chen
In this patch series, we introduce AES CBC encryption that is parallelized on x86_64 cpu with XMM registers. The multi-buffer technique encrypt 8 data streams in parallel with SIMD instructions. Decryption is handled as in the existing AESNI Intel CBC implementation which can already parallelize d

Re: [PATCH 5/5] crypto: AES CBC multi-buffer glue code

2015-10-29 Thread Tim Chen
On Thu, 2015-10-29 at 09:19 -0700, Tim Chen wrote: > On Thu, 2015-10-29 at 03:03 +0100, Stephan Mueller wrote: > > Am Mittwoch, 28. Oktober 2015, 14:19:29 schrieb Tim Chen: > > > > Hi Tim, > > > > >+ > > >+ /* check for dependent cpu features */ > > >+ if (!cpu_has_aes) { > > >+ pr_err

Re: [PATCH 5/5] crypto: AES CBC multi-buffer glue code

2015-10-29 Thread Tim Chen
On Thu, 2015-10-29 at 03:03 +0100, Stephan Mueller wrote: > Am Mittwoch, 28. Oktober 2015, 14:19:29 schrieb Tim Chen: > > Hi Tim, > > >+ > >+/* check for dependent cpu features */ > >+if (!cpu_has_aes) { > >+pr_err("aes_cbc_mb_mod_init: no aes support\n"); > >+err

Re: [PATCH] crypto: x86: Remove duplicate define of SHA1_DIGEST_SIZE

2015-10-29 Thread Tim Chen
On Thu, 2015-10-29 at 08:51 +0100, LABBE Corentin wrote: > On Fri, Oct 16, 2015 at 09:04:58AM -0700, Tim Chen wrote: > > On Wed, 2015-10-14 at 21:15 +0200, LABBE Corentin wrote: > > > The sha x86 crypto code use two define for the same thing: > > > NUM_SHA1_DIGEST_WORDS and SHA1_DIGEST_LENGTH > > >

[PATCH v1 0/4] TPM2: select hash algorithm for a trusted key

2015-10-29 Thread Jarkko Sakkinen
Jarkko Sakkinen (4): crypto: add entry for sm3-256 tpm: choose hash algorithm for sealing when using TPM 2.0 keys, trusted: select the hash algorithm keys, trusted: update documentation for 'hash=' option Documentation/security/keys-trusted-encrypted.txt | 3 ++ crypto/hash_info.c

[PATCH v1 1/4] crypto: add entry for sm3-256

2015-10-29 Thread Jarkko Sakkinen
Added entry for sm3-256 to the following tables: * hash_algo_name * hash_digest_size Needed for TPM 2.0 trusted key sealing. Signed-off-by: Jarkko Sakkinen --- crypto/hash_info.c | 2 ++ include/crypto/hash_info.h | 3 +++ include/uapi/linux/hash_info.h | 1 + 3 files changed,

Re: [PATCH] crypto: x86: Remove duplicate define of SHA1_DIGEST_SIZE

2015-10-29 Thread LABBE Corentin
On Fri, Oct 16, 2015 at 09:04:58AM -0700, Tim Chen wrote: > On Wed, 2015-10-14 at 21:15 +0200, LABBE Corentin wrote: > > The sha x86 crypto code use two define for the same thing: > > NUM_SHA1_DIGEST_WORDS and SHA1_DIGEST_LENGTH > > Replace them by SHA1_DIGEST_SIZE/4 > > Thanks. Acked-by: Tim Che