Re: Questions about the Crypto API

2013-08-15 Thread Herbert Xu
On Tue, Aug 13, 2013 at 07:25:50PM +, Hsieh, Che-Min wrote: > > Garg: For any tfm, blkcipher or ablkcipher, they must return results > > in the order they were given. For a blkcipher which is synchronous, > > this is always true by definition since we return only after the > > result has be

Re: Questions about the Crypto API

2013-08-15 Thread Herbert Xu
On Mon, Aug 12, 2013 at 10:49:13AM -0300, Marcelo Cerri wrote: > > So does that means that it's possible to keep data in the tfm's context > that is the same for a single SA, such as the AES expanded key, but it's > not possible to keep data that is specific for the current operation, > such as an

RE: Questions about the Crypto API

2013-08-13 Thread Hsieh, Che-Min
Vakul-B16394; linux-crypto@vger.kernel.org Subject: Re: Questions about the Crypto API On Sat, Aug 10, 2013 at 11:15:41AM +1000, Herbert Xu wrote: > On Fri, Aug 09, 2013 at 01:09:12PM +, Hsieh, Che-Min wrote: > > Marcelo/Herbert: > > > > I believe It is. Herbert, please correct me if

Re: Questions about the Crypto API

2013-08-12 Thread Marcelo Cerri
On Sat, Aug 10, 2013 at 11:15:41AM +1000, Herbert Xu wrote: > On Fri, Aug 09, 2013 at 01:09:12PM +, Hsieh, Che-Min wrote: > > Marcelo/Herbert: > > > > I believe It is. Herbert, please correct me if I am wrong. > > A single tfm is used as a user context to crypto, so to speak. But a user > > i

Re: Questions about the Crypto API

2013-08-09 Thread Herbert Xu
On Sat, Aug 10, 2013 at 02:15:10AM +, Hsieh, Che-Min wrote: > > >> . IOW we don't currently provide a kill mechanism to the user. > > Good. Tcrypt.c and Testmgr is only a bad example? Right, they can't really do anything other than waiting so they're not a realistic example. For a good exam

RE: Questions about the Crypto API

2013-08-09 Thread Hsieh, Che-Min
people doing that (including us). Cheers, Chemin -Original Message- From: Herbert Xu [mailto:herb...@gondor.apana.org.au] Sent: Friday, August 09, 2013 9:21 PM To: Hsieh, Che-Min Cc: Marcelo Cerri; linux-crypto@vger.kernel.org Subject: Re: Questions about the Crypto API On Thu, Aug 08, 2013 at 02:04

Re: Questions about the Crypto API

2013-08-09 Thread Herbert Xu
On Thu, Aug 08, 2013 at 02:04:05PM +, Hsieh, Che-Min wrote: > Thanks for Marcelo and Herbert for the questions and answers. > I have a few more questions related to the same subject of API. > > 1. In the crypto_async_request, is the list element available to the driver > to use? I see most

Re: Questions about the Crypto API

2013-08-09 Thread Herbert Xu
On Fri, Aug 09, 2013 at 01:09:12PM +, Hsieh, Che-Min wrote: > Marcelo/Herbert: > > I believe It is. Herbert, please correct me if I am wrong. > A single tfm is used as a user context to crypto, so to speak. But a user is > not a thread. > Let us use ipsec as example. > For each security assoc

Re: Questions about the Crypto API

2013-08-09 Thread Marcelo Cerri
06, 2013 12:30 PM > > To: Marcelo Cerri > > Cc: linux-crypto@vger.kernel.org > > Subject: Re: Questions about the Crypto API > > > > On Mon, Aug 05, 2013 at 05:25:57PM -0300, Marcelo Cerri wrote: > > > > > > My first doubt is regarding which kind of conc

RE: Questions about the Crypto API

2013-08-08 Thread Garg Vakul-B16394
Hi Herbert > -Original Message- > From: linux-crypto-ow...@vger.kernel.org [mailto:linux-crypto- > ow...@vger.kernel.org] On Behalf Of Herbert Xu > Sent: Tuesday, August 06, 2013 12:30 PM > To: Marcelo Cerri > Cc: linux-crypto@vger.kernel.org > Subject: Re: Questions

RE: Questions about the Crypto API

2013-08-08 Thread Hsieh, Che-Min
celo Cerri Cc: linux-crypto@vger.kernel.org Subject: Re: Questions about the Crypto API On Tue, Aug 06, 2013 at 11:16:12AM -0300, Marcelo Cerri wrote: > Herbert, > > Let me include a few more questions. > > There are flags in several structures such as crypto_async_request, > b

Re: Questions about the Crypto API

2013-08-07 Thread Herbert Xu
On Tue, Aug 06, 2013 at 09:05:41AM -0300, Marcelo Cerri wrote: > > I saw it's possible to keep a context in an ablkcipher_request > structure. I'm assuming that multiple callers using the same tfm still > would have to use different requests. So do you think that implementing > it as an asynchronou

Re: Questions about the Crypto API

2013-08-07 Thread Herbert Xu
On Tue, Aug 06, 2013 at 11:16:12AM -0300, Marcelo Cerri wrote: > Herbert, > > Let me include a few more questions. > > There are flags in several structures such as crypto_async_request, > blkcipher_desc and crypto_tfm. How they are intended to be used? > > For example if I want to explicitly ma

Re: Questions about the Crypto API

2013-08-06 Thread Marcelo Cerri
Herbert, Let me include a few more questions. There are flags in several structures such as crypto_async_request, blkcipher_desc and crypto_tfm. How they are intended to be used? For example if I want to explicitly make a call that shouldn't sleep, should I clear the CRYPTO_TFM_REQ_MAY_SLEEP in

Re: Questions about the Crypto API

2013-08-06 Thread Marcelo Cerri
Hi Herbert, Thanks for your answers. On Tue, Aug 06, 2013 at 05:00:10PM +1000, Herbert Xu wrote: > On Mon, Aug 05, 2013 at 05:25:57PM -0300, Marcelo Cerri wrote: > > > > My first doubt is regarding which kind of concurrency the Crypto API > > allows. For example, can a single `struct crypto_tfm`

Re: Questions about the Crypto API

2013-08-06 Thread Herbert Xu
On Mon, Aug 05, 2013 at 05:25:57PM -0300, Marcelo Cerri wrote: > > My first doubt is regarding which kind of concurrency the Crypto API > allows. For example, can a single `struct crypto_tfm` be used by two > concurrent calls? I'm asking about that because I noticed that for Yes. > blkcipher the