Re: [PATCH] crypto: ccp - Fix handling of RSA exponent on a v5 device

2016-11-15 Thread Gary R Hook
On 11/13/2016 03:49 AM, Herbert Xu wrote: On Tue, Nov 01, 2016 at 02:05:05PM -0500, Gary R Hook wrote: The exponent size in the ccp_op structure is in bits. A v5 CCP requires the exponent size to be in bytes, so convert the size from bits to bytes when populating the descriptor. The current

Re: [PATCH V2 6/9] crypto: ccp - Add support for RSA on the CCP

2016-11-15 Thread Gary R Hook
On 11/13/2016 03:39 AM, Herbert Xu wrote: On Fri, Nov 04, 2016 at 11:04:32AM -0500, Gary R Hook wrote: + ctx->u.rsa.pkey.e = mpi_read_raw_data(raw_key.e, raw_key.e_sz); + if (!ctx->u.rsa.pkey.e) + goto e_ret; + ctx->u.rsa.e_buf =

Re: [RFC][PATCH 0/6] crypto: Adding Hash-Encrypt-Hash(HEH)

2016-11-15 Thread Alex Cope
I accidentally had an off-by-one in this patch set. There is no patch 7/7. I've edited this subject but don't plan to resend the rest of the patches to fix the subject lines. To clarify, this patchset is on top of "crypto: skcipher - skcipher algorithm conversion part 3" that Herbert currently

Re: [PATCH 2/3] crypto: AF_ALG - disregard AAD buffer space for output

2016-11-15 Thread Stephan Mueller
Am Samstag, 12. November 2016, 10:13:02 CET schrieb Herbert Xu: Hi Herbert, > On Sat, Nov 12, 2016 at 03:03:36AM +0100, Stephan Mueller wrote: > > When you have separate buffers, the kernel does not seem to copy the AD > > over to the target buffer. > > OK we should definitely fix that. Shall

Re: [PATCH 2/2] fscrypto: don't use on-stack buffer for key derivation

2016-11-15 Thread Eric Biggers
On Tue, Nov 15, 2016 at 11:47:04AM -0500, Theodore Ts'o wrote: > On Thu, Nov 03, 2016 at 03:03:02PM -0700, Eric Biggers wrote: > > With the new (in 4.9) option to use a virtually-mapped stack > > (CONFIG_VMAP_STACK), stack buffers cannot be used as input/output for > > the scatterlist crypto API

[RFC PATCH] powerpc: crypto/vmx: clean up generated files

2016-11-15 Thread Naveen N. Rao
..as stray .S files result in build errors, especially when using cross-compilers. More specifically, the generated .S files are endian-specific and will break subsequent builds targeting the other endian architecture. Signed-off-by: Naveen N. Rao ---

Re: [PATCH] crypto: sha*-mb Fix total_len for correct hash when larger than 512MB

2016-11-15 Thread Tim Chen
On Mon, 2016-11-14 at 16:11 -0700, Greg Tucker wrote: > Current multi-buffer hash implementations have a restriction on the total > length of a hash job to 512MB. Hashing larger buffers will result in an > incorrect hash. This extends the limit to 2^62 - 1. > > Signed-off-by: Greg Tucker

Re: [PATCH 2/2] fscrypto: don't use on-stack buffer for key derivation

2016-11-15 Thread Theodore Ts'o
On Thu, Nov 03, 2016 at 03:03:02PM -0700, Eric Biggers wrote: > With the new (in 4.9) option to use a virtually-mapped stack > (CONFIG_VMAP_STACK), stack buffers cannot be used as input/output for > the scatterlist crypto API because they may not be directly mappable to > struct page.

Re: [PATCH 1/2] fscrypto: don't use on-stack buffer for filename encryption

2016-11-15 Thread Theodore Ts'o
On Thu, Nov 03, 2016 at 03:03:01PM -0700, Eric Biggers wrote: > With the new (in 4.9) option to use a virtually-mapped stack > (CONFIG_VMAP_STACK), stack buffers cannot be used as input/output for > the scatterlist crypto API because they may not be directly mappable to > struct page. For short

Re: [v2 PATCH 7/16] crypto: simd - Add simd skcipher helper

2016-11-15 Thread Herbert Xu
On Sun, Nov 13, 2016 at 06:27:40PM -0800, Eric Biggers wrote: > On Sun, Nov 13, 2016 at 07:45:38PM +0800, Herbert Xu wrote: > > This patch adds the simd skcipher helper which is meant to be > > a replacement for ablk helper. It replaces the underlying blkcipher > > interface with skcipher, and

Re: [v2 PATCH 4/16] crypto: xts - Convert to skcipher

2016-11-15 Thread Herbert Xu
On Sun, Nov 13, 2016 at 06:10:29PM -0800, Eric Biggers wrote: > > There's duplicated code for encryption and decryption here. AFAICS, the only > difference between XTS encryption and decryption is whether the block cipher > is > used in encryption or decryption mode for the ECB step. So I

Re: [v2 PATCH 1/16] crypto: skcipher - Add skcipher walk interface

2016-11-15 Thread Herbert Xu
Hi Eric: On Sun, Nov 13, 2016 at 05:35:48PM -0800, Eric Biggers wrote: > Hi Herbert, > > On Sun, Nov 13, 2016 at 07:45:32PM +0800, Herbert Xu wrote: > > +int skcipher_walk_done(struct skcipher_walk *walk, int err) > > +{ > > + unsigned int nbytes = 0; > > + unsigned int n = 0; > > + > > +