Re: [PATCH v8 0/4] crypto: add algif_akcipher user space API

2017-08-11 Thread Andrew Zaborowski
HI, On 11 August 2017 at 02:48, Mat Martineau wrote: > The last round of reviews for AF_ALG akcipher left off at an impasse around > a year ago: the consensus was that hardware key support was needed, but that > requirement was in conflict with the "always

Re: [PATCH v6 3/6] crypto: AF_ALG -- add asymmetric cipher interface

2016-06-16 Thread Andrew Zaborowski
Hi Stephan, On 16 June 2016 at 17:38, Stephan Mueller wrote: >> This isn't an issue with AF_ALG, I should have changed the subject >> line perhaps. In this case it's an inconsistency between some >> implementations and the documentation (header comment). It affects >>

Re: [PATCH v6 3/6] crypto: AF_ALG -- add asymmetric cipher interface

2016-06-16 Thread Andrew Zaborowski
Hi Stephan, On 16 June 2016 at 10:05, Stephan Mueller <smuel...@chronox.de> wrote: > Am Dienstag, 14. Juni 2016, 09:42:34 schrieb Andrew Zaborowski: > > Hi Andrew, > >> > >> > I think we have agreed on dropping the length enforcement at the interface >> &

Re: [PATCH v6 3/6] crypto: AF_ALG -- add asymmetric cipher interface

2016-06-14 Thread Andrew Zaborowski
Hi Stephan, On 14 June 2016 at 07:12, Stephan Mueller <smuel...@chronox.de> wrote: > Am Dienstag, 14. Juni 2016, 00:16:11 schrieb Andrew Zaborowski: >> On 8 June 2016 at 21:14, Mat Martineau >> >> <mathew.j.martin...@linux.intel.com> wrote: >> >

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 <dhowe...@redhat.com> wrote: > Andrew Zaborowski <balr...@googlemail.com> wrote: > >> AIUI Tadeusz is proposing adding the hashing as a new feature. Note >> though that the hash paremeter won't make sense for the

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

[PATCH] crypto: rsa-padding - don't allocate buffer on stack

2015-12-11 Thread Andrew Zaborowski
Avoid the s390 compile "warning: 'pkcs1pad_encrypt_sign_complete' uses dynamic stack allocation" reported by kbuild test robot. Don't use a flat zero-filled buffer, instead zero the contents of the SGL. Signed-off-by: Andrew Zaborowski <andrew.zaborow...@intel.com> --- crypt

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

2015-12-05 Thread Andrew Zaborowski
Add a struct akcipher_instance and struct akcipher_spawn similar to how AEAD declares them and the macros for converting to/from crypto_instance/crypto_spawn. Also add register functions to avoid exposing crypto_akcipher_type. Signed-off-by: Andrew Zaborowski <andrew.zaborow...@intel.com>

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

2015-12-05 Thread Andrew Zaborowski
ertificate work in the kernel or the userspace, and I also hear that it is likely implemented by hardware RSA in which case hardware implementations of the whole of pkcs1pad(rsa) can be provided. Signed-off-by: Andrew Zaborowski <andrew.zaborow...@intel.com> --- v2: rename rsa-padding.c t

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

2015-11-29 Thread Andrew Zaborowski
Add a struct akcipher_instance and struct akcipher_spawn similar to how AEAD declares them and the macros for converting to/from crypto_instance/crypto_spawn. Also add register functions to avoid exposing crypto_akcipher_type. Signed-off-by: Andrew Zaborowski <andrew.zaborow...@intel.com>

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

2015-11-26 Thread Andrew Zaborowski
Add a struct akcipher_instance and struct akcipher_spawn similar to how AEAD declares them and the macros for converting to/from crypto_instance/crypto_spawn. Also add register functions to avoid exposing crypto_akcipher_type. Signed-off-by: Andrew Zaborowski <andrew.zaborow...@intel.com>

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

2015-11-25 Thread Andrew Zaborowski
Add a struct akcipher_instance and struct akcipher_spawn similar to how AEAD declares them and the macros for converting to/from crypto_instance/crypto_spawn. Also add register functions to avoid exposing crypto_akcipher_type. Signed-off-by: Andrew Zaborowski <andrew.zaborow...@intel.com>

[PATCH v4 2/4] crypto: rsa: only require output buffers as big as needed.

2015-11-25 Thread Andrew Zaborowski
be obtained more easily through crypto_akcipher_maxsize change the operations to only require as big a buffer as actually needed if the caller has that information. The semantics for request->dst_len don't change. Signed-off-by: Andrew Zaborowski <andrew.zaborow...@intel.com> --- No changes

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

2015-11-25 Thread Andrew Zaborowski
needed and return -EOVERFLOW to signal when buffer too short. Signed-off-by: Andrew Zaborowski <andrew.zaborow...@intel.com> --- No changes since v1 --- lib/mpi/mpicoder.c | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/lib/mpi/mpicoder.c b/l

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

2015-11-25 Thread Andrew Zaborowski
ertificate work in the kernel or the userspace, and I also hear that it is likely implemented by hardware RSA in which case hardware implementations of the whole of pkcs1pad(rsa) can be provided. Signed-off-by: Andrew Zaborowski <andrew.zaborow...@intel.com> --- v2: rename rsa-padding.c t

[PATCH] crypto: Docs blurb about templates.

2015-11-23 Thread Andrew Zaborowski
Signed-off-by: Andrew Zaborowski <andrew.zaborow...@intel.com> --- These are some notes about the template structs that can take some head-scratching to figure out from the code. Please check that this is the current intended use. --- Documentation/crypto/api-intro.tx

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

2015-11-19 Thread Andrew Zaborowski
needed and return -EOVERFLOW to signal when buffer too short. Signed-off-by: Andrew Zaborowski <andrew.zaborow...@intel.com> --- No changes since v1 --- lib/mpi/mpicoder.c | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/lib/mpi/mpicoder.c b/l

[PATCH 4/4] crypto: RSA padding algorithm

2015-11-19 Thread Andrew Zaborowski
ertificate work in the kernel or the userspace, and I also hear that it is likely implemented by hardware RSA in which case hardware implementations of the whole of pkcs1pad(rsa) can be provided. Signed-off-by: Andrew Zaborowski <andrew.zaborow...@intel.com> --- v2: rename rsa-padding.c t

[PATCH v3 2/4] crypto: rsa: only require output buffers as big as needed.

2015-11-19 Thread Andrew Zaborowski
be obtained more easily through crypto_akcipher_maxsize change the operations to only require as big a buffer as actually needed if the caller has that information. The semantics for request->dst_len don't change. Signed-off-by: Andrew Zaborowski <andrew.zaborow...@intel.com> --- No changes

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

2015-11-13 Thread Andrew Zaborowski
like other crypto types are exposed to be used from outside modules. Signed-off-by: Andrew Zaborowski <andrew.zaborow...@intel.com> --- crypto/akcipher.c | 16 +++- include/crypto/algapi.h | 1 + 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/crypto/akciph

[PATCH 2/4] crypto: rsa: only require output buffers as big as needed.

2015-11-13 Thread Andrew Zaborowski
be obtained more easily through crypto_akcipher_maxsize change the operations to only require as big a buffer as actually needed if the caller has that information. The semantics for request->dst_len don't change. Signed-off-by: Andrew Zaborowski <andrew.zaborow...@intel.com> --- crypto/r

[PATCH 4/4] crypto: RSA padding algorithm

2015-11-13 Thread Andrew Zaborowski
ertificate work in the kernel or the userspace, and also I hear that it is likely implemented by hardware RSA in which case an implementation of the whole of pkcs1pad(rsa) can be provided. Signed-off-by: Andrew Zaborowski <andrew.zaborow...@intel.com> --- crypto/Makefile |

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

2015-11-13 Thread Andrew Zaborowski
needed and return -EOVERFLOW to signal when buffer too short. Signed-off-by: Andrew Zaborowski <andrew.zaborow...@intel.com> --- lib/mpi/mpicoder.c | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/lib/mpi/mpicoder.c b/lib/mpi/mpicoder.c index c7e0a70..0

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

2015-11-10 Thread Andrew Zaborowski
like other crypto types are exposed to be used from outside modules. Signed-off-by: Andrew Zaborowski <andrew.zaborow...@intel.com> --- crypto/akcipher.c | 16 +++- include/crypto/algapi.h | 1 + 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/crypto/akciph

[PATCH 4/4] crypto: RSA padding algorithm

2015-11-10 Thread Andrew Zaborowski
ertificate work in the kernel or the userspace, and also I hear that it is likely implemented by hardware RSA in which case an implementation of the whole "pkcs1pad(rsa)" can be provided. Signed-off-by: Andrew Zaborowski <andrew.zaborow...@intel.com> --- crypto/Makefile

[PATCH 2/4] crypto: rsa: only require output buffers as big as needed.

2015-11-10 Thread Andrew Zaborowski
be obtained more easily through crypto_akcipher_maxsize change the operations to only require as big a buffer as actually needed if the caller has that information. The semantics for request->dst_len don't change. Signed-off-by: Andrew Zaborowski <andrew.zaborow...@intel.com> --- crypto/r

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

2015-11-10 Thread Andrew Zaborowski
needed and return -EOVERFLOW to signal when buffer too short. Signed-off-by: Andrew Zaborowski <andrew.zaborow...@intel.com> --- lib/mpi/mpicoder.c | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/lib/mpi/mpicoder.c b/lib/mpi/mpicoder.c index c7e0a70..0

[RFC PATCH] crypto: RSA padding transform

2015-09-05 Thread Andrew Zaborowski
word "compat" in their implementations for shash or blkcipher. If they are to be added for akcipher it should probably be a separate patch. Signed-off-by: Andrew Zaborowski <andrew.zaborow...@intel.com> --- crypto/Makefile | 1 + crypto/akcipher.c | 16 +- crypto