Re: [PATCH 4/8] akcipher: Move the RSA DER encoding to the crypto layer

2016-02-26 Thread David Howells
Andrew Zaborowski wrote: > Without overhauling akcipher you could modify pkcs1pad so that sign > takes the hash as input, adds the DER struct in front of it to build > the signature, and the verify operation could at most check that the > DER string matches the hash type

Re: [PATCH 4/8] akcipher: Move the RSA DER encoding to the crypto layer

2016-02-23 Thread Andrew Zaborowski
Hi David, On 23 February 2016 at 11:55, David Howells wrote: > Andrew Zaborowski wrote: > >> AIUI Tadeusz is proposing adding the hashing as a new feature. Note >> though that the hash paremeter won't make sense for the encrypt, >> decrypt or verify

Re: [PATCH 4/8] akcipher: Move the RSA DER encoding to the crypto layer

2016-02-23 Thread David Howells
Andrew Zaborowski wrote: > AIUI Tadeusz is proposing adding the hashing as a new feature. Note > though that the hash paremeter won't make sense for the encrypt, > decrypt or verify operations. The hash parameter is necessary for the verify operation. From my

Re: [PATCH 4/8] akcipher: Move the RSA DER encoding to the crypto layer

2016-02-23 Thread David Howells
Tadeusz Struk wrote: > > Ummm... Possibly. Is that how it's used? > > > > warthog>git grep pkcs1pad -- Documentation > > warthog1> > > Yes, no docs. Sorry. Can I suggest you at least stick a quick usage summary in the banner comment at the top of the file?

Re: [PATCH 4/8] akcipher: Move the RSA DER encoding to the crypto layer

2016-02-22 Thread Andrew Zaborowski
Hi, On 22 February 2016 at 23:28, David Howells wrote: > Tadeusz Struk wrote: > >> I wonder if this should be merged with the crypto/rsa-pkcs1pad.c template >> that we already have. Looks like the two do the same padding now. I think that'd be a

Re: [PATCH 4/8] akcipher: Move the RSA DER encoding to the crypto layer

2016-02-22 Thread Tadeusz Struk
On 02/22/2016 02:28 PM, David Howells wrote: > Tadeusz Struk wrote: > >> I wonder if this should be merged with the crypto/rsa-pkcs1pad.c template >> that we already have. Looks like the two do the same padding now. >> Should we merge then and pass the hash param as a

Re: [PATCH 4/8] akcipher: Move the RSA DER encoding to the crypto layer

2016-02-22 Thread David Howells
Tadeusz Struk wrote: > I wonder if this should be merged with the crypto/rsa-pkcs1pad.c template > that we already have. Looks like the two do the same padding now. > Should we merge then and pass the hash param as a separate template param, > e.g the public_key would