Re: [PATCH] mac80211: Allocate a sync skcipher explicitly for FILS AEAD

2017-02-06 Thread Johannes Berg
> The type and mask are used as follows when checking an algorithm: > > alg->type & mask == type & mask > > So to request a synchronous algorithm (that is, one with the > CRYPTO_ALG_ASYNC bit set to zero), you would set type to 0 and > mask to CRYPTO_ALG_ASYNC. Ah. Ok, that makes sense,

Re: [PATCH] mac80211: Allocate a sync skcipher explicitly for FILS AEAD

2017-02-06 Thread Herbert Xu
On Mon, Feb 06, 2017 at 07:54:37AM +0100, Johannes Berg wrote: > Hi, > > > The skcipher could have been of the async variant which may return > > from skcipher_encrypt() with -EINPROGRESS after having queued the > > request. > > The FILS AEAD implementation here does not have code for dealing

Re: [PATCH] mac80211: Allocate a sync skcipher explicitly for FILS AEAD

2017-02-05 Thread Johannes Berg
Hi, > The skcipher could have been of the async variant which may return > from skcipher_encrypt() with -EINPROGRESS after having queued the > request. > The FILS AEAD implementation here does not have code for dealing with > that possibility, so allocate a sync cipher explicitly to avoid >

[PATCH] mac80211: Allocate a sync skcipher explicitly for FILS AEAD

2017-02-04 Thread Jouni Malinen
The skcipher could have been of the async variant which may return from skcipher_encrypt() with -EINPROGRESS after having queued the request. The FILS AEAD implementation here does not have code for dealing with that possibility, so allocate a sync cipher explicitly to avoid potential issues with