Re: [PATCH v4 2/5] crypto: AF_ALG: add AEAD support

2014-12-07 Thread Stephan Mueller
Am Freitag, 5. Dezember 2014, 23:46:06 schrieb Herbert Xu: Hi Herbert, +static struct proto_ops algif_aead_ops = { + .family = PF_ALG, + + .connect= sock_no_connect, + .socketpair = sock_no_socketpair, + .getname=

Re: [PATCH v4 2/5] crypto: AF_ALG: add AEAD support

2014-12-06 Thread Stephan Mueller
Am Freitag, 5. Dezember 2014, 22:51:51 schrieb Stephan Mueller: Hi Herbert, +static struct proto_ops algif_aead_ops = { + .family = PF_ALG, + + .connect= sock_no_connect, + .socketpair = sock_no_socketpair, + .getname=

Re: [PATCH v4 2/5] crypto: AF_ALG: add AEAD support

2014-12-06 Thread Herbert Xu
On Sat, Dec 06, 2014 at 09:08:54PM +0100, Stephan Mueller wrote: While implementing that request, I thought about setting the auth size as part of the msg control in sendmsg instead of setsockopt. This would save us a system call and thus CPU cycles. No, this is a tfm property and

Re: [PATCH v4 2/5] crypto: AF_ALG: add AEAD support

2014-12-05 Thread Herbert Xu
On Wed, Dec 03, 2014 at 08:57:24PM +0100, Stephan Mueller wrote: + if (ctx-merge) { + sg = sgl-sg + sgl-cur - 1; + len = min_t(unsigned long, len, + PAGE_SIZE - sg-offset - sg-length); + + err =

Re: [PATCH v4 2/5] crypto: AF_ALG: add AEAD support

2014-12-05 Thread Stephan Mueller
Am Freitag, 5. Dezember 2014, 23:46:06 schrieb Herbert Xu: Hi Herbert, On Wed, Dec 03, 2014 at 08:57:24PM +0100, Stephan Mueller wrote: + if (ctx-merge) { + sg = sgl-sg + sgl-cur - 1; + len = min_t(unsigned long, len, + PAGE_SIZE - sg-offset -

[PATCH v4 2/5] crypto: AF_ALG: add AEAD support

2014-12-03 Thread Stephan Mueller
This patch adds the AEAD support for AF_ALG. The implementation is based on algif_skcipher, but contains heavy modifications to streamline the interface for AEAD uses. To use AEAD, the user space consumer has to use the salg_type named aead. The AEAD implementation includes some overhead to