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 v3] wusb: switch to cbcmac transform

2019-06-15 Thread Ard Biesheuvel
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 scratch buffer, and taking the output IV > > as the MAC. > > > > We can clea

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

2019-06-15 Thread Eric Biggers
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 scratch buffer, and taking the output IV > as the MAC. > > We can clean up this code substantially by switching to the cbcmac > shash,

[PATCH v3] wusb: switch to cbcmac transform

2019-06-15 Thread Ard Biesheuvel
The wusb code takes a very peculiar approach at implementing CBC-MAC, by using plain CBC into a scratch buffer, and taking the output IV as the MAC. We can clean up this code substantially by switching to the cbcmac shash, as exposed by the CCM template. To ensure that the module is loaded on dema