Re: RFC: kcrypto - (yet another) user space interface

2010-06-12 Thread Uri Simchoni
Hi Phil, Note on implementation: I see that you're using the synchronous (blkcipher) interface and not the async (ablkcipher) one. I'm not 100% sure about this, but it appears to me that you can't utilize async HW drivers this way (there's adapter code from async client to sync driver but not

Re: Bug#552270: Marvell CESA driver and Kirkwood

2010-04-24 Thread Uri Simchoni
On 4/24/2010 6:12 PM, Sebastian Andrzej Siewior wrote: > * Uri Simchoni | 2010-04-22 06:23:12 [+0300]: > > For IPSec I use this[0] shell script which sets up a connection. Good for > testing :) Thanks, That'll save time setting it up... > I enabled list and sg debugg

Re: Bug#552270: Marvell CESA driver and Kirkwood

2010-04-21 Thread Uri Simchoni
I have some IPSec background but am not familiar with the Linux implementation (I'm using the mv_cesa for SSL acceleration through a usermode interface I'm working on). Can you point me to the nearest howto? I suppose I could have a look. Thanks, Uri. On 4/21/2010 11:13 AM, Sebastian Andrzej Si

Re: [PATCH 0/2] crypto: omap-sha1-md5: OMAP3 SHA1 & MD5 driver

2010-04-13 Thread Uri Simchoni
Doing step 3 using sw is probably faster than by hw (because it's short and avoid all the hw setup), so the suggested approach is probably faster than generic async hmac. On 4/13/2010 5:45 PM, Herbert Xu wrote: > On Tue, Apr 13, 2010 at 04:00:11PM +0300, Dmitry Kasatkin wrote: >> >> I would also

Re: [PATCH 0/2] crypto: omap-sha1-md5: OMAP3 SHA1 & MD5 driver

2010-04-13 Thread Uri Simchoni
The Marvell CESA needs some software assistance in doing HMAC - the inner and outer blocks need to be prepared and hashed (partial hash). The hash results are fed into the hardware and the hardware uses it as IVs and does the two hash operations. So in effect the HW hmac(sha1) driver needs softw

[PATCHv2 10/10] crypto mv_cesa : Add sha1 and hmac(sha1) async hash drivers

2010-04-08 Thread Uri Simchoni
Add sha1 and hmac(sha1) async hash drivers Signed-off-by: Uri Simchoni --- diff -upr linux-2.6.32.8_p9/drivers/crypto/mv_cesa.c linux-2.6.32.8_p10/drivers/crypto/mv_cesa.c --- linux-2.6.32.8_p9/drivers/crypto/mv_cesa.c 2010-03-16 12:33:45.504199755 +0200 +++ linux-2.6.32.8_p10/drivers/crypto

[PATCHv2 9/10] crypto mv_cesa : Support processing of data from previous requests

2010-04-08 Thread Uri Simchoni
Support processing of data from previous requests (as in hashing update/final requests). Signed-off-by: Uri Simchoni --- diff -upr linux-2.6.32.8_p8/drivers/crypto/mv_cesa.c linux-2.6.32.8_p9/drivers/crypto/mv_cesa.c --- linux-2.6.32.8_p8/drivers/crypto/mv_cesa.c 2010-03-16 12:25:34.815950170

[PATCHv2 8/10] crypto mv_cesa : Make the copy-back of data optional

2010-04-08 Thread Uri Simchoni
Make the copy-back of data optional (not done in hashing requests) Signed-off-by: Uri Simchoni --- diff -upr linux-2.6.32.8_p7/drivers/crypto/mv_cesa.c linux-2.6.32.8_p8/drivers/crypto/mv_cesa.c --- linux-2.6.32.8_p7/drivers/crypto/mv_cesa.c 2010-03-16 12:07:31.147897717 +0200 +++ linux

[PATCHv2 7/10] crypto mv_cesa : Execute some code via function pointers rathr than direct calls

2010-04-08 Thread Uri Simchoni
Execute some code via function pointers rathr than direct calls (to allow customization in the hashing request) Signed-off-by: Uri Simchoni --- diff -upr linux-2.6.32.8_p6/drivers/crypto/mv_cesa.c linux-2.6.32.8_p7/drivers/crypto/mv_cesa.c --- linux-2.6.32.8_p6/drivers/crypto/mv_cesa.c 2010-03

[PATCHv2 6/10] crypto mv_cesa : Rename a variable to a more suitable name

2010-04-08 Thread Uri Simchoni
Rename a variable to a more suitable name Signed-off-by: Uri Simchoni --- diff -upr linux-2.6.32.8_p5/drivers/crypto/mv_cesa.c linux-2.6.32.8_p6/drivers/crypto/mv_cesa.c --- linux-2.6.32.8_p5/drivers/crypto/mv_cesa.c 2010-03-16 11:43:37.443646086 +0200 +++ linux-2.6.32.8_p6/drivers/crypto

[PATCHv2 5/10] crypto mv_cesa : Enqueue generic async requests

2010-04-08 Thread Uri Simchoni
Enqueue generic async requests rather than ablkcipher requests in the driver's queue Signed-off-by: Uri Simchoni --- diff -upr linux-2.6.32.8_p4/drivers/crypto/mv_cesa.c linux-2.6.32.8_p5/drivers/crypto/mv_cesa.c --- linux-2.6.32.8_p4/drivers/crypto/mv_cesa.c 2010-03-16 10:54:07.3228

[PATCHv2 4/10] crypto mv_cesa : Fix situations where the src sglist spans more data than the request asks for

2010-04-08 Thread Uri Simchoni
Fix for situations where the source scatterlist spans more data than the request nbytes Signed-off-by: Uri Simchoni --- diff -upr linux-2.6.32.8_p3/drivers/crypto/mv_cesa.c linux-2.6.32.8_p4/drivers/crypto/mv_cesa.c --- linux-2.6.32.8_p3/drivers/crypto/mv_cesa.c 2010-03-16 09:06:10.183753278

[PATCHv2 3/10] crypto mv_cesa : Fix situation where the dest sglist is organized differently than the source sglist

2010-04-08 Thread Uri Simchoni
Bugfix for situations where the destination scatterlist has a different buffer structure than the source scatterlist (e.g. source has one 2K buffer and dest has 2 1K buffers) Signed-off-by: Uri Simchoni --- diff -upr linux-2.6.32.8_p2/drivers/crypto/mv_cesa.c linux-2.6.32.8_p3/drivers/crypto

[PATCHv2 2/10] crypto mv_cesa : Remove compiler warning in mv_cesa driver

2010-04-08 Thread Uri Simchoni
Remove compiler warning Signed-off-by: Uri Simchoni --- diff -upr linux-2.6.32.8_p1/drivers/crypto/mv_cesa.c linux-2.6.32.8_p2/drivers/crypto/mv_cesa.c --- linux-2.6.32.8_p1/drivers/crypto/mv_cesa.c 2010-03-16 08:59:12.074583163 +0200 +++ linux-2.6.32.8_p2/drivers/crypto/mv_cesa.c 2010-03-16

[PATCHv2 1/10] crypto mv_cesa : Invoke the user callback from a softirq context

2010-04-08 Thread Uri Simchoni
Invoke the user callback from a softirq context Signed-off-by: Uri Simchoni --- diff -upr linux-2.6.32.8_orig/drivers/crypto/mv_cesa.c linux-2.6.32.8_p1/drivers/crypto/mv_cesa.c --- linux-2.6.32.8_orig/drivers/crypto/mv_cesa.c2010-02-09 14:57:19.0 +0200 +++ linux-2.6.32.8_p1

[PATCHv2 0/10] crypto mv_cesa : Add sha1 and hmac(sha1) support to the mv_cesa driver

2010-04-08 Thread Uri Simchoni
This is a resubmission of a patchset I set a while ago, and that was corrupted by my email client. The following patchset adds async hashing (sha1 and hmac-sha1) to the mv_cesa crypto driver. This driver utilizes the Marvell CESA crypto accelerator that exists in some Marvell CPU's (Orion and K

[PATCH 10/10] crypto mv_cesa : Add sha1 and hmac(sha1) async hash drivers

2010-03-16 Thread Uri Simchoni
Add sha1 and hmac(sha1) async hash drivers Signed-off-by: Uri Simchoni --- diff -upr linux-2.6.32.8_p9/drivers/crypto/mv_cesa.c linux-2.6.32.8_p10/drivers/crypto/mv_cesa.c --- linux-2.6.32.8_p9/drivers/crypto/mv_cesa.c2010-03-16 12:33:45.504199755 +0200 +++ linux-2.6.32.8_p10/drivers

[PATCH 9/10] crypto mv_cesa : Support processing of data from previous requests

2010-03-16 Thread Uri Simchoni
Support processing of data from previous requests (as in hashing update/final requests). Signed-off-by: Uri Simchoni --- diff -upr linux-2.6.32.8_p8/drivers/crypto/mv_cesa.c linux-2.6.32.8_p9/drivers/crypto/mv_cesa.c --- linux-2.6.32.8_p8/drivers/crypto/mv_cesa.c2010-03-16 12:25

[PATCH 8/10] crypto mv_cesa : Make the copy-back of data optional

2010-03-16 Thread Uri Simchoni
Make the copy-back of data optional (not done in hashing requests) Signed-off-by: Uri Simchoni --- diff -upr linux-2.6.32.8_p7/drivers/crypto/mv_cesa.c linux-2.6.32.8_p8/drivers/crypto/mv_cesa.c --- linux-2.6.32.8_p7/drivers/crypto/mv_cesa.c2010-03-16 12:07:31.147897717 +0200 +++ linux

[PATCH 3/10] crypto mv_cesa : Fix situation where the dest sglist is organized differently than the source sglist

2010-03-16 Thread Uri Simchoni
Bugfix for situations where the destination scatterlist has a different buffer structure than the source scatterlist (e.g. source has one 2K buffer and dest has 2 1K buffers) Signed-off-by: Uri Simchoni --- diff -upr linux-2.6.32.8_p2/drivers/crypto/mv_cesa.c linux-2.6.32.8_p3/drivers/crypto

[PATCH 7/10] crypto mv_cesa : Execute some code via function pointers rathr than direct calls

2010-03-16 Thread Uri Simchoni
Execute some code via function pointers rathr than direct calls (to allow customization in the hashing request) Signed-off-by: Uri Simchoni --- diff -upr linux-2.6.32.8_p6/drivers/crypto/mv_cesa.c linux-2.6.32.8_p7/drivers/crypto/mv_cesa.c --- linux-2.6.32.8_p6/drivers/crypto/mv_cesa.c2010

[PATCH 6/10] crypto mv_cesa : Rename a variable to a more suitable name

2010-03-16 Thread Uri Simchoni
Rename a variable to a more suitable name Signed-off-by: Uri Simchoni --- diff -upr linux-2.6.32.8_p5/drivers/crypto/mv_cesa.c linux-2.6.32.8_p6/drivers/crypto/mv_cesa.c --- linux-2.6.32.8_p5/drivers/crypto/mv_cesa.c2010-03-16 11:43:37.443646086 +0200 +++ linux-2.6.32.8_p6/drivers/crypto

[PATCH 2/10] crypto mv_cesa : Remove compiler warning in mv_cesa driver

2010-03-16 Thread Uri Simchoni
Remove compiler warning Signed-off-by: Uri Simchoni --- diff -upr linux-2.6.32.8_p1/drivers/crypto/mv_cesa.c linux-2.6.32.8_p2/drivers/crypto/mv_cesa.c --- linux-2.6.32.8_p1/drivers/crypto/mv_cesa.c2010-03-16 08:59:12.074583163 +0200 +++ linux-2.6.32.8_p2/drivers/crypto/mv_cesa.c2010

[PATCH 5/10] crypto mv_cesa : Enqueue generic async requests

2010-03-16 Thread Uri Simchoni
Enqueue generic async requests rather than ablkcipher requests in the driver's queue Signed-off-by: Uri Simchoni --- diff -upr linux-2.6.32.8_p4/drivers/crypto/mv_cesa.c linux-2.6.32.8_p5/drivers/crypto/mv_cesa.c --- linux-2.6.32.8_p4/drivers/crypto/mv_cesa.c2010-03-16 10:54:07.3228

[PATCH 1/10] crypto mv_cesa : Invoke the user callback from a softirq context

2010-03-16 Thread Uri Simchoni
Invoke the user callback from a softirq context Signed-off-by: Uri Simchoni --- diff -upr linux-2.6.32.8_orig/drivers/crypto/mv_cesa.c linux-2.6.32.8_p1/drivers/crypto/mv_cesa.c --- linux-2.6.32.8_orig/drivers/crypto/mv_cesa.c2010-02-09 14:57:19.0 +0200 +++ linux-2.6.32.8_p1

[PATCH 4/10] crypto mv_cesa : Fix situations where the src sglist spans more data than the request asks for

2010-03-16 Thread Uri Simchoni
Fix for situations where the source scatterlist spans more data than the request nbytes Signed-off-by: Uri Simchoni --- diff -upr linux-2.6.32.8_p3/drivers/crypto/mv_cesa.c linux-2.6.32.8_p4/drivers/crypto/mv_cesa.c --- linux-2.6.32.8_p3/drivers/crypto/mv_cesa.c2010-03-16 09:06

[PATCH 0/10] crypto mv_cesa : Add sha1 and hmac(sha1) support to the mv_cesa driver

2010-03-16 Thread Uri Simchoni
The following patchset adds async hashing (sha1 and hmac-sha1) to the mv_cesa crypto driver. This driver utilizes the Marvell CESA crypto accelerator that exists in some Marvell CPU's (Orion and Kirkwood). The existing driver has AES crypto support. Compared to SW hashing on a 1.2GHz Kirkwood,

Async hash reentrancy

2010-03-01 Thread Uri Simchoni
Hi, I'd like to add sha1/hmac-sha1 support to the Marvell CESA driver. I couldn't see an ahash driver that I can use as a reference. Is there such a driver? There's a thing I'm not sure I understand, and that's the init-update-final mechanism. I know what it's for (as in other APIs, e.g. OpenSS