RE: status of async crypto

2007-08-07 Thread Ronen Shitrit
Hi Herbert

I found a mailing thread discussing combined mode algorithms, I think
that this is the main missing link for good async support.

Are you planning that this combined alg mode will support the async API?
Is there any progress on this direction?

Regards
Ronen Shitrit


 -Original Message-
 From: Evgeniy Polyakov [mailto:[EMAIL PROTECTED]
 Sent: Sunday, August 05, 2007 6:16 PM
 To: Ronen Shitrit
 Cc: linux-crypto@vger.kernel.org
 Subject: Re: status of async crypto
 
 On Sun, Aug 05, 2007 at 01:50:48PM +0300, Ronen Shitrit
 ([EMAIL PROTECTED]) wrote:
  I saw that the current code support async crypto for the dm-crypt,
does
  it
  also support async crypto for the klips?
  Is there any support for using the async crypto from the OpenSSL
engine
  library?
  I saw that the async crypto support block cipher, does it also
support
  digest operations?
  Can it support encryption + authentication (lets say AES-SHA1) as
one
  operation?
  Is there any Documentation available? (I guess not)
 
 No for all above.
 
  What is the todo list for further development of the async crypto
  support?
 
 New drivers and extending functionality if required. Some work is
being
 done in this area, although not that fast.
 
 --
   Evgeniy Polyakov
-
To unsubscribe from this list: send the line unsubscribe linux-crypto in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: status of async crypto

2007-08-07 Thread Herbert Xu
Ronen Shitrit [EMAIL PROTECTED] wrote:
 Hi Herbert
 
 I found a mailing thread discussing combined mode algorithms, I think
 that this is the main missing link for good async support.
 
 Are you planning that this combined alg mode will support the async API?

Yes that's the main focus right now.

 Is there any progress on this direction?

I'm working on the infrastructure bits, i.e., setting up a
new operation type currently called authenc which sits at
the same level as ablkcipher or hash.  Joy Latten is looking
at CTR, as well as converting IPsec over once the crypto
infrastructure is done.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmVHI~} [EMAIL PROTECTED]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-
To unsubscribe from this list: send the line unsubscribe linux-crypto in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


OCF triggering kernel BUG()

2007-08-07 Thread Ico


Hello,

I've been trying to use OCF in one of my projects, but I run into a nasty
problem I can't seem to solve. I setup a session and call the crypto_dispatch()
function, after which a kernel BUG() occurs in one of the linux crypto.h
functions. There's problably something I forgot or did not properly initialize,
I hope anybody can give me a hint on how to debug and solve this.


The following is an extract of my code involving the crypto library:



zut = kmalloc(sizeof *zut, GFP_ATOMIC);
memset(zut, 0, sizeof(*zut));

memset(ci, 0, sizeof(ci));
ci.cri_alg  = CRYPTO_ARC4;
ci.cri_klen = sizeof(zut-key);
ci.cri_key  = zut-key;
r = crypto_newsession(sid, ci, 0);
printk(crypto_newsession r=%d sid=%llu\n, r, sid);
if(r != 0) {
printk(crypto_newsession failed %d\n, r);
return;
}

co = crypto_getreq(1);
printk(co=%p\n, co);
co-crp_sid = sid;
co-crp_ilen = sizeof(zut-text);
co-crp_olen = sizeof(zut-text);
co-crp_callback = hop_done;
co-crp_flags = 0;
co-crp_buf = zut-text;
co-crp_opaque = (void *)zut;

co-crp_desc-crd_skip = 0;
co-crp_desc-crd_len = 32;
co-crp_desc-crd_inject = zut-iv;
co-crp_desc-crd_flags = CRD_F_ENCRYPT;
co-crp_desc-crd_alg = CRYPTO_ARC4;

r = crypto_dispatch(co);
printk(dispatching to %llu, r=%d\n, co-crp_sid, r);




The call to crypto_dispatch results in a kernel BUG message:



  kernel BUG at include/linux/crypto.h:364! 

  ...   

  [c00e2bcc] (__bug+0x0/0x58) from [bf21d350] (swcr_process+0xb18/0xc84 
[cryptosoft])   
  [bf21c838] (swcr_process+0x0/0xc84 [cryptosoft]) from [bf118170] 
(crypto_invoke+0x17c/0x1a8 [ocf])
  [bf117ff4] (crypto_invoke+0x0/0x1a8 [ocf]) from [bf11776c] 
(crypto_dispatch+0x154/0x2c8 [ocf])
  [bf117618] (crypto_dispatch+0x0/0x2c8 [ocf]) from [bf11f604] 
(ebt_crypt_target+0x3a0/0x434 [ebt_crypt])   


The snippet from crypto.h:  



  358: static inline int crypto_cipher_encrypt_iv(struct crypto_tfm *tfm,   

  359:struct scatterlist *dst,  

  360:struct scatterlist *src,  

  361:unsigned int nbytes, u8 *iv)  

  362: {

  363: BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER);  

  364: BUG_ON(tfm-crt_cipher.cit_mode == CRYPTO_TFM_MODE_ECB); 

  365: return tfm-crt_cipher.cit_encrypt_iv(tfm, dst, src, nbytes, 
iv);
  366: }


   

Any hints ?

Thank you very much for your time,

Ico
-- 
:wq
^X^Cy^K^X^C^C^C^C
-
To unsubscribe from this list: send the line unsubscribe linux-crypto in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: status of async crypto

2007-08-07 Thread Sebastian Siewior
* Herbert Xu | 2007-08-07 15:29:44 [+0800]:

Joy Latten is looking
at CTR, as well as converting IPsec over once the crypto
infrastructure is done.
Can you estimate/guesstimate when the IPsec over async crypto will be
available?
I tried to test the dm-crypt user but the patches don't apply on top of
current git.

Cheers,

Sebastian
-
To unsubscribe from this list: send the line unsubscribe linux-crypto in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: status of async crypto

2007-08-07 Thread Herbert Xu
On Tue, Aug 07, 2007 at 10:01:10AM +0200, Sebastian Siewior wrote:
 * Herbert Xu | 2007-08-07 15:29:44 [+0800]:
 
 Joy Latten is looking
 at CTR, as well as converting IPsec over once the crypto
 infrastructure is done.
 Can you estimate/guesstimate when the IPsec over async crypto will be
 available?
 I tried to test the dm-crypt user but the patches don't apply on top of
 current git.

Originally I was going to convert IPsec to use ablkcipher
which we can do right now.

This is certainly going to delay things a bit.  However,
it's certainly pretty close to the top of my todo list
right now.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmVHI~} [EMAIL PROTECTED]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-
To unsubscribe from this list: send the line unsubscribe linux-crypto in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html