Re: [RFC] AF_ALG AIO and IV

2018-01-16 Thread Jonathan Cameron
On Tue, 16 Jan 2018 07:28:06 +0100 Stephan Mueller wrote: > Am Montag, 15. Januar 2018, 15:42:58 CET schrieb Jonathan Cameron: > > Hi Jonathan, > > > > What about: > > > > > > sendmsg(IV, data) > > > sendmsg(data) > > > .. > > > AIO recvmsg with multiple IOCBs > > > AIO recvmsg with multiple I

Re: [RFC] AF_ALG AIO and IV

2018-01-15 Thread Stephan Mueller
Am Montag, 15. Januar 2018, 15:42:58 CET schrieb Jonathan Cameron: Hi Jonathan, > > What about: > > > > sendmsg(IV, data) > > sendmsg(data) > > .. > > AIO recvmsg with multiple IOCBs > > AIO recvmsg with multiple IOCBs > > .. > > sendmsg(IV, data) > > .. > > > > This implies, however, that befo

Re: [RFC] AF_ALG AIO and IV

2018-01-15 Thread Jonathan Cameron
On Mon, 15 Jan 2018 15:31:42 +0100 Stephan Mueller wrote: > Am Montag, 15. Januar 2018, 15:25:38 CET schrieb Jonathan Cameron: > > Hi Jonathan, > > > On Mon, 15 Jan 2018 14:15:42 +0100 > > > > Stephan Mueller wrote: > > > Am Montag, 15. Januar 2018, 13:59:27 CET schrieb Jonathan Cameron: >

Re: [RFC] AF_ALG AIO and IV

2018-01-15 Thread Jonathan Cameron
On Mon, 15 Jan 2018 14:25:38 + Jonathan Cameron wrote: > On Mon, 15 Jan 2018 14:15:42 +0100 > Stephan Mueller wrote: > > > Am Montag, 15. Januar 2018, 13:59:27 CET schrieb Jonathan Cameron: > > > > Hi Jonathan, > > > > > > > > But there may be hardware that cannot/will not track such de

Re: [RFC] AF_ALG AIO and IV

2018-01-15 Thread Stephan Mueller
Am Montag, 15. Januar 2018, 15:25:38 CET schrieb Jonathan Cameron: Hi Jonathan, > On Mon, 15 Jan 2018 14:15:42 +0100 > > Stephan Mueller wrote: > > Am Montag, 15. Januar 2018, 13:59:27 CET schrieb Jonathan Cameron: > > > > Hi Jonathan, > > > > > > But there may be hardware that cannot/will no

Re: [RFC] AF_ALG AIO and IV

2018-01-15 Thread Jonathan Cameron
On Mon, 15 Jan 2018 14:15:42 +0100 Stephan Mueller wrote: > Am Montag, 15. Januar 2018, 13:59:27 CET schrieb Jonathan Cameron: > > Hi Jonathan, > > > > > > But there may be hardware that cannot/will not track such dependencies. > > > Yet, it has multiple hardware queues. Such hardware can still

Re: [RFC] AF_ALG AIO and IV

2018-01-15 Thread Stephan Mueller
Am Montag, 15. Januar 2018, 13:59:27 CET schrieb Jonathan Cameron: Hi Jonathan, > > > > But there may be hardware that cannot/will not track such dependencies. > > Yet, it has multiple hardware queues. Such hardware can still handle > > parallel requests when they are totally independent from eac

Re: [RFC] AF_ALG AIO and IV

2018-01-15 Thread Jonathan Cameron
On Mon, 15 Jan 2018 13:07:16 +0100 Stephan Mueller wrote: > Am Montag, 15. Januar 2018, 12:05:03 CET schrieb Jonathan Cameron: > > Hi Jonathan, > > > On Fri, 12 Jan 2018 14:21:15 +0100 > > > > Stephan Mueller wrote: > > > Hi, > > > > > > The kernel crypto API requires the caller to set an

Re: [RFC] AF_ALG AIO and IV

2018-01-15 Thread Stephan Mueller
Am Montag, 15. Januar 2018, 12:05:03 CET schrieb Jonathan Cameron: Hi Jonathan, > On Fri, 12 Jan 2018 14:21:15 +0100 > > Stephan Mueller wrote: > > Hi, > > > > The kernel crypto API requires the caller to set an IV in the request data > > structure. That request data structure shall define one

Re: [RFC] AF_ALG AIO and IV

2018-01-15 Thread Jonathan Cameron
On Fri, 12 Jan 2018 14:21:15 +0100 Stephan Mueller wrote: > Hi, > > The kernel crypto API requires the caller to set an IV in the request data > structure. That request data structure shall define one particular cipher > operation. During the cipher operation, the IV is read by the cipher > i

Re: [RFC] AF_ALG AIO and IV

2018-01-15 Thread Stephan Mueller
Am Freitag, 12. Januar 2018, 14:21:15 CET schrieb Stephan Mueller: Hi, > > 1. Require that the cipher implementations serialize any AIO requests that > have dependencies. I.e. for CBC, requests need to be serialized by the > driver. For, say, ECB or XTS no serialization is necessary. > > 2. Chan

[RFC] AF_ALG AIO and IV

2018-01-12 Thread Stephan Mueller
Hi, The kernel crypto API requires the caller to set an IV in the request data structure. That request data structure shall define one particular cipher operation. During the cipher operation, the IV is read by the cipher implementation and eventually the potentially updated IV (e.g. in case of