Re: [PATCH 1/2] crypto: skcipher - Add top-level skcipher interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 21, 2015 at 11:24:08AM +0200, Stephan Mueller wrote:
> 
> If I understand the patch set correctly, a caller uses the skcipher API and 
> the API sets up the synchronous or asynchronous callbacks depending on the 
> chosen cipher implementation.
> 
> Now, does a caller always need to create an skcipher_request and always need 
> the async logic of providing a callback function and the like, even though a 
> synchronous cipher is chosen? I.e. the caller has no means to use a 
> synchronous cipher operation any more.
> 
> It looks to me like that, but I would like to confirm.

No you can still use it synchronously.  When allocating it you
should do this:

	crypto_alloc_skcipher(name, 0, CRYPTO_ALG_ASYNC)

When setting up the request just leave the callback and data as
NULL.

Cheers,
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux