where the tweak routine point to?

2010-04-08 Thread Bai Shuwei
Hi, All: When i use the cryptsetup command to set the aes-xts-plain encryption, the system will entry the crypt() routine which defined in the xts.c file. I find the routine will call two important routines: tw and fn. I think the fn will point to the aes_encrypt/decrypt routine. But i want to kn

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

2010-04-08 Thread Dmitry.Kasatkin
- Original message - > Hi: > > OK so you did answer my question :) > > Dmitry Kasatkin wrote: > > > > Interesting case with hmac. > > > > return crypto_shash_init(&desc.shash) ?: > > crypto_shash_update(&desc.shash, ipad, bs) ?: > > crypto_shash_export(&desc.shash, ipad) ?: > > crypto_

[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/m

[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-2.6.32

[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/mv_c

[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.322816221 +020

[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/mv_

[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/dri

[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

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

2010-04-08 Thread Herbert Xu
Hi: OK so you did answer my question :) Dmitry Kasatkin wrote: > > Interesting case with hmac. > > return crypto_shash_init(&desc.shash) ?: >crypto_shash_update(&desc.shash, ipad, bs) ?: >crypto_shash_export(&desc.shash, ipad) ?: >crypto_shash_init(&desc.

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

2010-04-08 Thread Herbert Xu
On Tue, Mar 23, 2010 at 07:32:39PM +0800, Herbert Xu wrote: > > My only question is what's your plan with respect to HMAC? If > you're going to do it in hardware then it's fine as it is. > > Otherwise you need to implement export/import and we also need > to add ahash support to hmac.c. Dmitry, d

Re: [PATCHv2 1/2] crypto: updates omap sham device related platform code

2010-04-08 Thread Paul Walmsley
On Thu, 8 Apr 2010, Dmitry Kasatkin wrote: > Hi, > > BTW.. > > How will it work if those resource structures anyway conditionally compiled > for OMAP2 or 3 or 4? > only one structure will be compiled at once. Hi Dmitry, it is possible to build a kernel that will run on both OMAP2 and OMAP3 (f

Re: [PATCHv2 1/2] crypto: updates omap sham device related platform code

2010-04-08 Thread Dmitry Kasatkin
Hi, BTW.. How will it work if those resource structures anyway conditionally compiled for OMAP2 or 3 or 4? only one structure will be compiled at once. - Dmitry On 30/03/10 12:41, ext Paul Walmsley wrote: Hi Dmitry, a few comments: On Thu, 25 Mar 2010, Dmitry Kasatkin wrote: - regi

Re: [PATCH 3/7] crypto/testmgr: add testing for arc4 based on ecb(arc4)

2010-04-08 Thread Sebastian Andrzej Siewior
* Herbert Xu | 2010-04-07 17:29:07 [+0800]: >Sebastian, how about precomputing the IV and provide them directly >as a hex array? > >To test arc4_setup_iv itself, you can add an alg_test_arc4 function >(like alg_test_crc32) that tests IV generation specifically. > >Alternatively, just add an alg_te