Re: [RFC PATCH 0/2] mac80211: use crypto shash for AES cmac

2017-02-04 Thread Ard Biesheuvel
On 4 February 2017 at 14:39, Malinen, Jouni wrote: > On Sat, Feb 04, 2017 at 02:24:36PM +, Ard Biesheuvel wrote: >> There is another issue I spotted: the skcipher you allocate may be of >> the async variant, which may return from skcipher_encrypt() with >> -EINPROGRESS as soon as it has queued

Re: [RFC PATCH 0/2] mac80211: use crypto shash for AES cmac

2017-02-04 Thread Malinen, Jouni
On Sat, Feb 04, 2017 at 02:24:36PM +, Ard Biesheuvel wrote: > There is another issue I spotted: the skcipher you allocate may be of > the async variant, which may return from skcipher_encrypt() with > -EINPROGRESS as soon as it has queued the request. Since you don't > deal with that result, yo

Re: [RFC PATCH 0/2] mac80211: use crypto shash for AES cmac

2017-02-04 Thread Ard Biesheuvel
On 4 February 2017 at 11:35, Malinen, Jouni wrote: > On Fri, Feb 03, 2017 at 09:55:36PM +, Ard Biesheuvel wrote: >> OK, that looks like something I could figure out how to use. But are >> you saying the CMAC code is never called in practice? > > It will get called if there is a frame that were

Re: [RFC PATCH 0/2] mac80211: use crypto shash for AES cmac

2017-02-04 Thread Malinen, Jouni
On Fri, Feb 03, 2017 at 09:55:36PM +, Ard Biesheuvel wrote: > OK, that looks like something I could figure out how to use. But are > you saying the CMAC code is never called in practice? It will get called if there is a frame that were to need to use BIP. There are some APs that do send broadc

Re: [RFC PATCH 0/2] mac80211: use crypto shash for AES cmac

2017-02-03 Thread Ard Biesheuvel
On 3 February 2017 at 21:47, Malinen, Jouni wrote: > On Fri, Feb 03, 2017 at 07:25:53PM +, Ard Biesheuvel wrote: >> The mac80211 aes_cmac code reimplements the CMAC algorithm based on the >> core AES cipher, which is rather restrictive in how platforms can satisfy >> the dependency on this alg

Re: [RFC PATCH 0/2] mac80211: use crypto shash for AES cmac

2017-02-03 Thread Malinen, Jouni
On Fri, Feb 03, 2017 at 07:25:53PM +, Ard Biesheuvel wrote: > The mac80211 aes_cmac code reimplements the CMAC algorithm based on the > core AES cipher, which is rather restrictive in how platforms can satisfy > the dependency on this algorithm. For instance, SIMD implementations may > have a c

[RFC PATCH 0/2] mac80211: use crypto shash for AES cmac

2017-02-03 Thread Ard Biesheuvel
This is something I spotted while working on AES in various modes for ARM and arm64. The mac80211 aes_cmac code reimplements the CMAC algorithm based on the core AES cipher, which is rather restrictive in how platforms can satisfy the dependency on this algorithm. For instance, SIMD implementation