Re: [PATCH 4/8] crypto: rsa-pkcs1pad - Require hash to be present

2016-06-22 Thread Andrzej Zaborowski
Hi Herbert, On 22 June 2016 at 12:16, Herbert Xu wrote: > The only user of rsa-pkcs1pad always uses the hash so there is > no reason to support the case of not having a hash. We use pkcs1pad with AF_ALG to implement lightweight TLS. TLS versions < 1.2 use a non-standard hash so we'd have to mov

Re: [PATCH v6 3/4] crypto: akcipher: add akcipher declarations needed by templates.

2015-12-05 Thread Andrzej Zaborowski
Hi Herbert, On 4 December 2015 at 15:28, Herbert Xu wrote: > Andrew Zaborowski wrote: >> >> +static inline struct crypto_akcipher *crypto_spawn_akcipher( >> + struct crypto_akcipher_spawn *spawn) >> +{ >> + return crypto_spawn_tfm2(&spawn->base); >> +} >> + >> +static inline

Re: [PATCH v5 3/4] crypto: akcipher: add akcipher declarations needed by templates.

2015-11-27 Thread Andrzej Zaborowski
Hi Herbert, On 27 November 2015 at 14:12, Herbert Xu wrote: > Andrew Zaborowski wrote: >> >> @@ -75,9 +76,22 @@ static int crypto_akcipher_init_tfm(struct crypto_tfm >> *tfm) >>return 0; >> } >> >> +static void crypto_akcipher_free_instance(struct crypto_instance *inst) >> +{ >> +

Re: [PATCH v3 3/4] crypto: akcipher: add akcipher declarations useful for templates.

2015-11-24 Thread Andrzej Zaborowski
On 24 November 2015 at 10:54, Herbert Xu wrote: > Andrew Zaborowski wrote: >> Expose crypto_akcipher_type like other crypto types are exposed to be >> used from outside akcipher.c. Add a struct akcipher_instance similar to >> aead_instance with just the right size for an akcipher template >> ins

Re: [PATCH 3/4] crypto: akcipher: add crypto_akcipher_type methods needed by templates.

2015-11-17 Thread Andrzej Zaborowski
Hi Herbert, On 17 November 2015 at 14:42, Herbert Xu wrote: > Andrew Zaborowski wrote: >> Add two dummy methods that are required by the crypto API internals: >> .ctxsize and .init >> (just because the framework calls them without checking if they were >> provided). They're only required by the

Re: [PATCH 1/4] lib/mpi: only require buffers as big as needed for the integer

2015-11-13 Thread Andrzej Zaborowski
Hi Stephan, On 13 November 2015 at 13:47, Stephan Mueller wrote: > Sorry to be picky here, but is this v2? If yes, may I ask (at least for the > future) for brief notation of the changes as well as a marking of the patches. There are no changes in patches 1-3, I wasn't sure if it was okay to res

Re: [PATCH 4/4] crypto: RSA padding algorithm

2015-11-13 Thread Andrzej Zaborowski
Hi Stephan, On 11 November 2015 at 14:19, Stephan Mueller wrote: > Am Mittwoch, 11. November 2015, 01:58:45 schrieb Andrew Zaborowski: > > Hi Andrew, > >>This patch adds PKCS#1 v1.5 standard RSA padding as a separate template. >>This way an RSA cipher with padding can be obtained by instantiating

Re: [PATCH 4/8] crypto: akcipher - Changes to asymmetric key API

2015-09-09 Thread Andrzej Zaborowski
Hi, On 9 September 2015 at 18:41, Stephan Mueller wrote: > Am Mittwoch, 9. September 2015, 09:29:28 schrieb Tadeusz Struk: + * @key: BER encoded public key >>> >>> DER encoded? >> >>It is BER (Basic Encoding Rules), which is also valid DER (Distinguished >>Encoding Rules) > > I was just me

Re: [RFC PATCH] crypto: RSA padding transform

2015-09-08 Thread Andrzej Zaborowski
Hi Stephan, On 7 September 2015 at 19:54, Stephan Mueller wrote: > Am Montag, 7. September 2015, 07:31:56 schrieb Tadeusz Struk: >>I can see now that with all these padding schemes there will be more buffer >>copied on top of this, so I wonder if it still make sense. >>Herbert? > > When the paddi

Re: [RFC PATCH] crypto: RSA padding transform

2015-09-07 Thread Andrzej Zaborowski
On 6 September 2015 at 23:17, Stephan Mueller wrote: > Am Sonntag, 6. September 2015, 16:33:26 schrieb Andrzej Zaborowski: > > Hi Andrzej, > >>>> + for (pos = 2; pos < child_req->dst_len; pos++) >>>> + if (dst[pos] == 0x00) >>>>

Re: [RFC PATCH] crypto: RSA padding transform

2015-09-07 Thread Andrzej Zaborowski
Hi Tadeusz, On 7 September 2015 at 16:06, Tadeusz Struk wrote: > Hi Andrew, > On 09/05/2015 04:00 PM, Andrew Zaborowski wrote: >> +static int crypto_akcipher_init(struct crypto_tfm *tfm, u32 type, u32 mask) >> +{ >> + return 0; >> +} >> + > > This is not needed I think. To create the padding

Re: [RFC PATCH] crypto: RSA padding transform

2015-09-06 Thread Andrzej Zaborowski
Hi Stephan, On 6 September 2015 at 10:34, Stephan Mueller wrote: > Am Sonntag, 6. September 2015, 01:00:29 schrieb Andrew Zaborowski: > Albeit I have nothing to say against the code, but shouldn't we first get the > split of the setkey function implemented? The conversion work will increase > mor