Re: [PATCH v8 3/4] crypto: AF_ALG -- add asymmetric cipher

2017-08-21 Thread Stephan Mueller
Am Montag, 21. August 2017, 11:23:55 CEST schrieb Tudor Ambarus: Hi Tudor, > > Oops, I missed the negation. When crypto_akcipher_set_priv_key succeeds > you return the akcipher_maxsize. Not a bad idea, you save few cpu > cycles. I was hoping to save some context switches. > > > crypto

Re: [PATCH v8 3/4] crypto: AF_ALG -- add asymmetric cipher

2017-08-21 Thread Tudor Ambarus
On 08/21/2017 11:55 AM, Tudor Ambarus wrote: Hi, Stephan, +static int akcipher_setprivkey(void *private, const u8 *key, + unsigned int keylen) +{ +struct akcipher_tfm *tfm = private; +struct crypto_akcipher *akcipher = tfm->akcipher; +int err; + +err =

Re: [PATCH v8 3/4] crypto: AF_ALG -- add asymmetric cipher

2017-08-21 Thread Tudor Ambarus
Hi, Stephan, +static int akcipher_setprivkey(void *private, const u8 *key, + unsigned int keylen) +{ + struct akcipher_tfm *tfm = private; + struct crypto_akcipher *akcipher = tfm->akcipher; + int err; + + err =

Re: [PATCH v8 3/4] crypto: AF_ALG -- add asymmetric cipher

2017-08-19 Thread Stephan Müller
Am Freitag, 11. August 2017, 14:51:10 CEST schrieb Tudor Ambarus: Hi Tudor, I have covered all your requests > > > + size_t used = 0; > > initialization to zero not needed. You can directly initialize to > ctx->used or don't initialize at all. It is not initialized now. We cannot use

Re: [PATCH v8 3/4] crypto: AF_ALG -- add asymmetric cipher

2017-08-11 Thread Tudor Ambarus
Hi, Stephan, On 08/10/2017 09:40 AM, Stephan Müller wrote: This patch adds the user space interface for asymmetric ciphers. The interface allows the use of sendmsg as well as vmsplice to provide data. The akcipher interface implementation uses the common AF_ALG interface code regarding TX and

[PATCH v8 3/4] crypto: AF_ALG -- add asymmetric cipher

2017-08-10 Thread Stephan Müller
This patch adds the user space interface for asymmetric ciphers. The interface allows the use of sendmsg as well as vmsplice to provide data. The akcipher interface implementation uses the common AF_ALG interface code regarding TX and RX SGL handling. Signed-off-by: Stephan Mueller