Re: [PATCH v2] net: ipv4: move tcp_fastopen server side code to SipHash library

2019-06-16 Thread Herbert Xu
On Fri, Jun 14, 2019 at 04:01:22PM +0200, Ard Biesheuvel wrote: > Using a bare block cipher in non-crypto code is almost always a bad idea, > not only for security reasons (and we've seen some examples of this in > the kernel in the past), but also for performance reasons. > > In the TCP fastopen

Re: [PATCH v2] net: ipv4: move tcp_fastopen server side code to SipHash library

2019-06-16 Thread David Miller
From: Ard Biesheuvel Date: Fri, 14 Jun 2019 16:01:22 +0200 > Using a bare block cipher in non-crypto code is almost always a bad idea, > not only for security reasons (and we've seen some examples of this in > the kernel in the past), but also for performance reasons. > > In the TCP fastopen cas

Re: [PATCH] wireless: airo: switch to skcipher interface

2019-06-16 Thread Johannes Berg
On Sun, 2019-06-16 at 00:12 -0700, Eric Biggers wrote: > > The actual crypto in this driver, on the other hand, looks very outdated and > broken. Apparently it's implementing some Cisco proprietary extension to WEP > that uses a universal hashing based MAC, where the hash key is generated from >

Re: [PATCH] lib80211: use crypto API ccm(aes) transform for CCMP processing

2019-06-16 Thread Eric Biggers
On Sun, Jun 16, 2019 at 09:07:28PM +0200, Ard Biesheuvel wrote: > On Sun, 16 Jun 2019 at 21:01, Eric Biggers wrote: > > > > Hi Ard, > > > > On Fri, Jun 14, 2019 at 11:29:22AM +0200, Ard Biesheuvel wrote: > > > -static void ccmp_init_blocks(struct crypto_cipher *tfm, > > > -

Re: [PATCH] wireless: airo: switch to skcipher interface

2019-06-16 Thread Eric Biggers
On Sun, Jun 16, 2019 at 09:03:58PM +0200, Ard Biesheuvel wrote: > > > > Otherwise this patch looks correct to me. > > > > The actual crypto in this driver, on the other hand, looks very outdated and > > broken. Apparently it's implementing some Cisco proprietary extension to > > WEP > > that uses

Re: [PATCH] lib80211: use crypto API ccm(aes) transform for CCMP processing

2019-06-16 Thread Eric Biggers
On Sun, Jun 16, 2019 at 12:01:38PM -0700, Eric Biggers wrote: > Hi Ard, > > On Fri, Jun 14, 2019 at 11:29:22AM +0200, Ard Biesheuvel wrote: > > -static void ccmp_init_blocks(struct crypto_cipher *tfm, > > -struct ieee80211_hdr *hdr, > > -u8 * pn, siz

Re: [PATCH] lib80211: use crypto API ccm(aes) transform for CCMP processing

2019-06-16 Thread Ard Biesheuvel
On Sun, 16 Jun 2019 at 21:01, Eric Biggers wrote: > > Hi Ard, > > On Fri, Jun 14, 2019 at 11:29:22AM +0200, Ard Biesheuvel wrote: > > -static void ccmp_init_blocks(struct crypto_cipher *tfm, > > - struct ieee80211_hdr *hdr, > > - u8 * pn, size_t dl

Re: [PATCH] wireless: airo: switch to skcipher interface

2019-06-16 Thread Ard Biesheuvel
On Sun, 16 Jun 2019 at 09:12, Eric Biggers wrote: > > On Fri, Jun 14, 2019 at 11:36:03AM +0200, Ard Biesheuvel wrote: > > The AIRO driver applies a ctr(aes) on a buffer of considerable size > > (2400 bytes), and instead of invoking the crypto API to handle this > > in its entirety, it open codes t

Re: [PATCH] lib80211: use crypto API ccm(aes) transform for CCMP processing

2019-06-16 Thread Eric Biggers
Hi Ard, On Fri, Jun 14, 2019 at 11:29:22AM +0200, Ard Biesheuvel wrote: > -static void ccmp_init_blocks(struct crypto_cipher *tfm, > - struct ieee80211_hdr *hdr, > - u8 * pn, size_t dlen, u8 * b0, u8 * auth, u8 * s0) > +static void ccmp_init_blocks

Re: [PATCH v3] wusb: switch to cbcmac transform

2019-06-16 Thread Ard Biesheuvel
On Sun, 16 Jun 2019 at 09:19, Eric Biggers wrote: > > On Sun, Jun 16, 2019 at 08:52:32AM +0200, Ard Biesheuvel wrote: > > On Sun, 16 Jun 2019 at 03:20, Eric Biggers wrote: > > > > > > On Sat, Jun 15, 2019 at 11:17:45AM +0200, Ard Biesheuvel wrote: > > > > The wusb code takes a very peculiar appro

Re: [PATCH v3] wusb: switch to cbcmac transform

2019-06-16 Thread Eric Biggers
On Sun, Jun 16, 2019 at 08:52:32AM +0200, Ard Biesheuvel wrote: > On Sun, 16 Jun 2019 at 03:20, Eric Biggers wrote: > > > > On Sat, Jun 15, 2019 at 11:17:45AM +0200, Ard Biesheuvel wrote: > > > The wusb code takes a very peculiar approach at implementing CBC-MAC, > > > by using plain CBC into a sc

Re: [PATCH] wireless: airo: switch to skcipher interface

2019-06-16 Thread Eric Biggers
On Fri, Jun 14, 2019 at 11:36:03AM +0200, Ard Biesheuvel wrote: > The AIRO driver applies a ctr(aes) on a buffer of considerable size > (2400 bytes), and instead of invoking the crypto API to handle this > in its entirety, it open codes the counter manipulation and invokes > the AES block cipher di