Re: [PATCH v2 00/25] Multiple changes to crypto/ansi_cprng.c

2014-12-15 Thread Stephan Mueller
Am Montag, 15. Dezember 2014, 03:42:44 schrieb George Spelvin: Hi George, >> - the non-determinism you get from get_random_int is very weak. If >> you start thinking about the information theoretical entropy behind >> that function that is used once in a while, you may not get much >> entropy. Pl

Re: [PATCH v2 00/25] Multiple changes to crypto/ansi_cprng.c

2014-12-15 Thread Stephan Mueller
Am Montag, 15. Dezember 2014, 03:28:16 schrieb George Spelvin: Hi George, >> That output is good for the VST test vectors. For the MCT vectors, I >> need the 1th value. > >That was test 9 in the first group: >> [167586.784923] COUNT = 9 >> [167586.784925] Key = 10379b53317a2500879e88ad445ea38

Re: [PATCH v2 00/25] Multiple changes to crypto/ansi_cprng.c

2014-12-15 Thread Stephan Mueller
Am Montag, 15. Dezember 2014, 05:21:49 schrieb George Spelvin: Hi George, > > Ah, now I see it. Yes, all AES 128 are covered. > > > > What about AES 192 and 256? > > The implementation doesn't support them, and I didn't add them. Sorry, my bad. :-) Then, I think the updated implementation ma

Re: [PATCH v2 00/25] Multiple changes to crypto/ansi_cprng.c

2014-12-15 Thread Stephan Mueller
Am Montag, 15. Dezember 2014, 05:45:31 schrieb George Spelvin: Hi George, >>> You will agree, I hope, that the result from get_random_int *does* >>> include the entropy of a high-resolution timestamp? Which is >>> cryptographically equivalent to including the unobfuscated >>> timestamp? >> >> g

Re: [PATCH v2 00/25] Multiple changes to crypto/ansi_cprng.c

2014-12-15 Thread Stephan Mueller
Am Montag, 15. Dezember 2014, 17:01:02 schrieb George Spelvin: Hi George, >> With that then, I'm really fine with the changes given that they pass >> the NIST tests. > >So here's the current list of issues. First, minor ones: >1) Add const to DRBG interface, as per Stephan's request. >2) Revised

algif_hash: splice of data > 2**16

2014-12-18 Thread Stephan Mueller
Hi Herbert, While testing the vmsplice/splice interface of algif_hash I was made aware of the problem that data blobs larger than 16 pages do not seem to be hashed properly. For testing, a file is mmap()ed and handed to vmsplice / splice. If the file is smaller than 2**16, the interface return

Re: algif_hash: splice of data > 2**16

2014-12-18 Thread Stephan Mueller
Am Donnerstag, 18. Dezember 2014, 13:22:20 schrieb leroy christophe: Hi Leroy, Herbert, >Le 18/12/2014 13:15, Stephan Mueller a écrit : >> Hi Herbert, >> >> While testing the vmsplice/splice interface of algif_hash I was made >> aware of the problem that data blobs

Re: algif_hash: splice of data > 2**16

2014-12-19 Thread Stephan Mueller
Am Donnerstag, 18. Dezember 2014, 13:22:20 schrieb leroy christophe: Hi Christophe, > Le 18/12/2014 13:15, Stephan Mueller a écrit : > > Hi Herbert, > > > > While testing the vmsplice/splice interface of algif_hash I was made > > aware of the problem that data blobs

Re: [PATCH v5 3/8] crypto: AF_ALG: add AEAD support

2014-12-23 Thread Stephan Mueller
Am Montag, 22. Dezember 2014, 22:23:41 schrieb Herbert Xu: Hi Herbert, > On Sun, Dec 07, 2014 at 11:22:30PM +0100, Stephan Mueller wrote: > > +static inline bool aead_sufficient_data(struct aead_ctx *ctx) > > +{ > > + unsigned as = crypto_aead_authsize(crypto_aead_r

Re: [PATCH v5 5/8] crypto: AF_ALG: add user space interface for RNG

2014-12-23 Thread Stephan Mueller
Am Montag, 22. Dezember 2014, 22:27:30 schrieb Herbert Xu: Hi Herbert, > On Sun, Dec 07, 2014 at 11:23:48PM +0100, Stephan Mueller wrote: > > Allow user space to seed / reset the RNG via a setsockopt. > > > > This patch reuses alg_setkey to copy data into the kernel. The

[PATCH] crypto: AF_ALG: zeroize key data

2014-12-23 Thread Stephan Mueller
alg_setkey should zeroize the sensitive data after use. Signed-off-by: Stephan Mueller --- crypto/af_alg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/af_alg.c b/crypto/af_alg.c index a8ff3c4..76d739d 100644 --- a/crypto/af_alg.c +++ b/crypto/af_alg.c @@ -188,7

Re: [PATCH v5 3/8] crypto: AF_ALG: add AEAD support

2014-12-23 Thread Stephan Mueller
Am Dienstag, 23. Dezember 2014, 22:56:26 schrieb Herbert Xu: Hi Herbert, > On Tue, Dec 23, 2014 at 09:14:43AM +0100, Stephan Mueller wrote: > > - the check aead_readable() immediately before this check implements the > > blocking if we do not have sufficient data *and* mor

Re: [PATCH v5 3/8] crypto: AF_ALG: add AEAD support

2014-12-24 Thread Stephan Mueller
Am Mittwoch, 24. Dezember 2014, 07:24:01 schrieb Herbert Xu: Hi Herbert, > On Tue, Dec 23, 2014 at 03:52:27PM +0100, Stephan Mueller wrote: > > Am Dienstag, 23. Dezember 2014, 22:56:26 schrieb Herbert Xu: > > > In fact AEAD is rather awkward because you need to do everythi

Re: algif_hash: splice of data > 2**16

2014-12-24 Thread Stephan Mueller
Am Dienstag, 23. Dezember 2014, 18:16:01 schrieb leroy christophe: Hi leroy, > Le 20/12/2014 07:37, Stephan Mueller a écrit : > > Am Donnerstag, 18. Dezember 2014, 13:22:20 schrieb leroy christophe: > > > > Hi Christophe, > > > >> Le 18/12/2014 13:15, Stepha

Re: algif_hash: splice of data > 2**16

2014-12-24 Thread Stephan Mueller
Am Mittwoch, 24. Dezember 2014, 15:10:14 schrieb leroy christophe: Hi leroy, > Le 24/12/2014 10:03, Stephan Mueller a écrit : > > Am Dienstag, 23. Dezember 2014, 18:16:01 schrieb leroy christophe: > > > > Hi leroy, > > > >> Le 20/12/2014 07:37, Stephan Muell

Re: [PATCH v5 3/8] crypto: AF_ALG: add AEAD support

2014-12-25 Thread Stephan Mueller
Am Mittwoch, 24. Dezember 2014, 09:54:33 schrieb Stephan Mueller: Hi Stephan, > Am Mittwoch, 24. Dezember 2014, 07:24:01 schrieb Herbert Xu: > > Hi Herbert, > > > On Tue, Dec 23, 2014 at 03:52:27PM +0100, Stephan Mueller wrote: > > > Am Dienstag, 23. Dezember 2014,

[PATCH v6 4/4] crypto: AF_ALG: enable RNG interface compilation

2014-12-25 Thread Stephan Mueller
Enable compilation of the RNG AF_ALG support and provide a Kconfig option to compile the RNG AF_ALG support. Signed-off-by: Stephan Mueller --- crypto/Kconfig | 9 + crypto/Makefile | 1 + 2 files changed, 10 insertions(+) diff --git a/crypto/Kconfig b/crypto/Kconfig index cd3e6fd

[PATCH v6 1/4] crypto: AF_ALG: add AEAD support

2014-12-25 Thread Stephan Mueller
en and how that operation is performed. A fully working example using all aspects of AEAD is provided at http://www.chronox.de/libkcapi.html Signed-off-by: Stephan Mueller --- crypto/algif_aead.c | 651 1 file changed, 651 insertions(+) c

[PATCH v6 3/4] crypto: AF_ALG: add random number generator support

2014-12-25 Thread Stephan Mueller
e RNG implementation requires seeding. If so, the RNG is seeded with output from get_random_bytes. A fully working example using all aspects of the RNG interface is provided at http://www.chronox.de/libkcapi.html Signed-off-by: Stephan Mueller --- crypto/algif_rng.c

[PATCH v6 0/4] crypto: AF_ALG: add AEAD and RNG support

2014-12-25 Thread Stephan Mueller
the zeroization patch for alg_setkey into a stand-alone patch submission * fix bug in aead_sufficient_data (reporter Herbert Xu) * testing of all interfaces with test application provided with libkcapi version 0.6.2 Stephan Mueller (4): crypto: AF_ALG: add AEAD support crypto: AF_ALG: ena

[PATCH v6 2/4] crypto: AF_ALG: enable AEAD interface compilation

2014-12-25 Thread Stephan Mueller
Enable compilation of the AEAD AF_ALG support and provide a Kconfig option to compile the AEAD AF_ALG support. Signed-off-by: Stephan Mueller --- crypto/Kconfig | 9 + crypto/Makefile | 1 + 2 files changed, 10 insertions(+) diff --git a/crypto/Kconfig b/crypto/Kconfig index 1618468

Re: algif_hash: splice of data > 2**16

2014-12-25 Thread Stephan Mueller
Am Mittwoch, 24. Dezember 2014, 16:12:53 schrieb Stephan Mueller: Hi Christophe, > Am Mittwoch, 24. Dezember 2014, 15:10:14 schrieb leroy christophe: > > Hi leroy, > > > Le 24/12/2014 10:03, Stephan Mueller a écrit : > > > Am Dienstag, 23. Dezember 2014, 18:16:

Re: [PATCH v6 1/4] crypto: AF_ALG: add AEAD support

2014-12-29 Thread Stephan Mueller
Am Montag, 29. Dezember 2014, 21:33:19 schrieb Herbert Xu: Hi Herbert, > On Thu, Dec 25, 2014 at 11:01:47PM +0100, Stephan Mueller wrote: > > + err = -ENOMEM; > > This should be EINVAL. Changed > > > + if (!aead_sufficient_data(ctx)) > > + goto unlo

Re: [PATCH v6 1/4] crypto: AF_ALG: add AEAD support

2014-12-30 Thread Stephan Mueller
Am Dienstag, 30. Dezember 2014, 04:33:41 schrieb Herbert Xu: Hi Herbert, > > > > PS we should add a length check for missing/partial auth tags > > > to crypto_aead_decrypt. We can then remove such checks from > > > individual implementations. > > > > I agree in full here. Shall I create such a

[PATCH] crypto: AEAD: add check for presence of auth tag

2014-12-30 Thread Stephan Mueller
than once. Thus, the speed penalty should be marginal. Signed-off-by: Stephan Mueller --- include/linux/crypto.h | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/include/linux/crypto.h b/include/linux/crypto.h index 9c8776d..badc53b 100644 --- a/include/linux

Re: [PATCH v6 1/4] crypto: AF_ALG: add AEAD support

2014-12-30 Thread Stephan Mueller
Am Dienstag, 30. Dezember 2014, 04:33:41 schrieb Herbert Xu: Hi Herbert, > On Mon, Dec 29, 2014 at 04:05:40PM +0100, Stephan Mueller wrote: > > This would mean that the check must stay in recvmsg as only here we know > > that the caller wants data to be processed. > > On th

Re: [PATCH v6 4/4] crypto: AF_ALG: enable RNG interface compilation

2014-12-30 Thread Stephan Mueller
Am Montag, 29. Dezember 2014, 21:41:58 schrieb Herbert Xu: Hi Herbert, > On Thu, Dec 25, 2014 at 11:00:39PM +0100, Stephan Mueller wrote: > > Enable compilation of the RNG AF_ALG support and provide a Kconfig > > option to compile the RNG AF_ALG support. > > > > Sig

[PATCH v7 0/2] crypto: AF_ALG: add AEAD and RNG support

2015-01-02 Thread Stephan Mueller
30/200. Otherwise, user space can trigger a kernel crash. * RNG: patch dropped as it was applied * AEAD: port Kconfig/Makefile patch forward to current code base Stephan Mueller (2): crypto: AF_ALG: add AEAD support crypto: AF_ALG: enable AEAD interface compilation crypto/Kconfig | 9 +

[PATCH v7 1/2] crypto: AF_ALG: add AEAD support

2015-01-02 Thread Stephan Mueller
en and how that operation is performed. A fully working example using all aspects of AEAD is provided at http://www.chronox.de/libkcapi.html Signed-off-by: Stephan Mueller --- crypto/algif_aead.c | 631 1 file changed, 631 insertions(+) c

[PATCH v7 2/2] crypto: AF_ALG: enable AEAD interface compilation

2015-01-02 Thread Stephan Mueller
Enable compilation of the AEAD AF_ALG support and provide a Kconfig option to compile the AEAD AF_ALG support. Signed-off-by: Stephan Mueller --- crypto/Kconfig | 9 + crypto/Makefile | 1 + 2 files changed, 10 insertions(+) diff --git a/crypto/Kconfig b/crypto/Kconfig index 50f4da4

Re: [PATCH] crypto: AEAD: add check for presence of auth tag

2015-01-05 Thread Stephan Mueller
Am Montag, 5. Januar 2015, 21:19:01 schrieb Herbert Xu: Hi Herbert, > On Tue, Dec 30, 2014 at 10:16:03PM +0100, Stephan Mueller wrote: > > The AEAD decryption operation requires the authentication tag to be > > present as part of the cipher text buffer. The added check verifi

Re: [PATCH v7 1/2] crypto: AF_ALG: add AEAD support

2015-01-05 Thread Stephan Mueller
Am Montag, 5. Januar 2015, 21:31:59 schrieb Herbert Xu: Hi Herbert, > On Fri, Jan 02, 2015 at 03:41:33PM +0100, Stephan Mueller wrote: > > + if (!con.aead_assoclen) > > + return -EINVAL; > > AD being zero should

Re: [PATCH] crypto: AEAD: add check for presence of auth tag

2015-01-05 Thread Stephan Mueller
Am Montag, 5. Januar 2015, 21:39:57 schrieb Herbert Xu: Hi Herbert, > On Mon, Jan 05, 2015 at 11:26:48AM +0100, Stephan Mueller wrote: > > Could you please help me understand where that check should be and what > > should be done at the crypto API level? > > All I was a

Re: [PATCH v7 1/2] crypto: AF_ALG: add AEAD support

2015-01-05 Thread Stephan Mueller
Am Montag, 5. Januar 2015, 21:51:06 schrieb Herbert Xu: Hi Herbert, > On Mon, Jan 05, 2015 at 11:46:50AM +0100, Stephan Mueller wrote: > > The need for that check lies in aead_recvmsg: > > /* > > > > * first chunk of input is AD -- o

Re: [PATCH] crypto: AEAD: add check for presence of auth tag

2015-01-05 Thread Stephan Mueller
Am Montag, 5. Januar 2015, 21:55:40 schrieb Herbert Xu: Hi Herbert, > On Mon, Jan 05, 2015 at 11:53:38AM +0100, Stephan Mueller wrote: > > Could you please check: I am unable to find the function. > > It's in crypto/authenc.c. > > > Note, there is

Re: [PATCH v7 1/2] crypto: AF_ALG: add AEAD support

2015-01-05 Thread Stephan Mueller
Am Montag, 5. Januar 2015, 21:51:06 schrieb Herbert Xu: Hi Herbert, > On Mon, Jan 05, 2015 at 11:46:50AM +0100, Stephan Mueller wrote: > > The need for that check lies in aead_recvmsg: > > /* > > > > * first chunk of input is AD -- o

[PATCH v2] crypto: AEAD: add check for presence of auth tag

2015-01-05 Thread Stephan Mueller
The AEAD decryption operation requires the authentication tag to be present as part of the cipher text buffer. The added check verifies that the caller provides a cipher text with at least the authentication tag. Signed-off-by: Stephan Mueller --- include/linux/crypto.h | 3 +++ 1 file changed

[PATCH v8 1/2] crypto: AF_ALG: add AEAD support

2015-01-07 Thread Stephan Mueller
en and how that operation is performed. A fully working example using all aspects of AEAD is provided at http://www.chronox.de/libkcapi.html Signed-off-by: Stephan Mueller --- crypto/algif_aead.c | 666 1 file changed, 666 insertions(+) c

[PATCH v8 0/2] crypto: AF_ALG: add AEAD and RNG support

2015-01-07 Thread Stephan Mueller
6th page for plaintext). See [1] for updated test case. Stephan Mueller (2): crypto: AF_ALG: add AEAD support crypto: AF_ALG: enable AEAD interface compilation crypto/Kconfig | 9 + crypto/Makefile | 1 + crypto/algif_aead.c | 666 +++

[PATCH v8 2/2] crypto: AF_ALG: enable AEAD interface compilation

2015-01-07 Thread Stephan Mueller
Enable compilation of the AEAD AF_ALG support and provide a Kconfig option to compile the AEAD AF_ALG support. Signed-off-by: Stephan Mueller --- crypto/Kconfig | 9 + crypto/Makefile | 1 + 2 files changed, 10 insertions(+) diff --git a/crypto/Kconfig b/crypto/Kconfig index 50f4da4

Re: [PATCH v8 1/2] crypto: AF_ALG: add AEAD support

2015-01-08 Thread Stephan Mueller
Am Donnerstag, 8. Januar 2015, 22:09:31 schrieb Herbert Xu: Hi Herbert, > On Wed, Jan 07, 2015 at 04:51:38PM +0100, Stephan Mueller wrote: > > + if (!aead_writable(sk)) { > > + /* > > +* If there is more data to be ex

[PATCH v9 2/2] crypto: AF_ALG: enable AEAD interface compilation

2015-01-10 Thread Stephan Mueller
Enable compilation of the AEAD AF_ALG support and provide a Kconfig option to compile the AEAD AF_ALG support. Signed-off-by: Stephan Mueller --- crypto/Kconfig | 9 + crypto/Makefile | 1 + 2 files changed, 10 insertions(+) diff --git a/crypto/Kconfig b/crypto/Kconfig index 50f4da4

[PATCH v9 1/2] crypto: AF_ALG: add AEAD support

2015-01-10 Thread Stephan Mueller
en and how that operation is performed. A fully working example using all aspects of AEAD is provided at http://www.chronox.de/libkcapi.html Signed-off-by: Stephan Mueller --- crypto/algif_aead.c | 679 1 file changed, 679 insertions(+) c

[PATCH v9 0/2] crypto: AF_ALG: add AEAD and RNG support

2015-01-10 Thread Stephan Mueller
d in sendmsg/sendpage * release all buffers in case insufficient data was provided in sendmsg/sendpage * bug fix in sendmsg: when a new page is allocated, reset sg->offset to 0 -- the error is visible with the new tests in [1] when using the -d flag with the test application Stephan Muelle

Re: [PATCH v9 1/2] crypto: AF_ALG: add AEAD support

2015-01-11 Thread Stephan Mueller
Am Sonntag, 11. Januar 2015, 04:45:53 schrieb Stephan Mueller: Hi Herbert, > +static int aead_accept_parent(void *private, struct sock *sk) > +{ > + struct aead_ctx *ctx; > + struct alg_sock *ask = alg_sk(sk); > + unsigned int len = sizeof(*ctx) + crypto_aead_

Re: [PATCH -next] crypto: algif_rng - fix sparse non static symbol warning

2015-01-13 Thread Stephan Mueller
Am Mittwoch, 14. Januar 2015, 09:14:41 schrieb weiyj...@163.com: Hi, > From: Wei Yongjun > > Fixes the following sparse warnings: > > crypto/algif_rng.c:185:13: warning: > symbol 'rng_exit' was not declared. Should it be static? > > Signed-off-by: Wei Y

[PATCH v10 0/2] crypto: AF_ALG: add AEAD and RNG support

2015-01-13 Thread Stephan Mueller
initialize ctx->trunc in aead_accept_parent to zero * fix one line with code formatting problems Stephan Mueller (2): crypto: AF_ALG: add AEAD support crypto: AF_ALG: enable AEAD interface compilation crypto/Kconfig | 9 + crypto/Makefile | 1 + crypto/

[PATCH v10 2/2] crypto: AF_ALG: enable AEAD interface compilation

2015-01-13 Thread Stephan Mueller
Enable compilation of the AEAD AF_ALG support and provide a Kconfig option to compile the AEAD AF_ALG support. Signed-off-by: Stephan Mueller --- crypto/Kconfig | 9 + crypto/Makefile | 1 + 2 files changed, 10 insertions(+) diff --git a/crypto/Kconfig b/crypto/Kconfig index 50f4da4

[PATCH v10 1/2] crypto: AF_ALG: add AEAD support

2015-01-13 Thread Stephan Mueller
en and how that operation is performed. A fully working example using all aspects of AEAD is provided at http://www.chronox.de/libkcapi.html Signed-off-by: Stephan Mueller --- crypto/algif_aead.c | 680 1 file changed, 680 insertions(+) c

Re: [PATCH v10 0/2] crypto: AF_ALG: add AEAD and RNG support

2015-01-14 Thread Stephan Mueller
Am Mittwoch, 14. Januar 2015, 22:00:11 schrieb Herbert Xu: Hi Herbert, > On Wed, Jan 14, 2015 at 04:46:31AM -0500, Neil Horman wrote: > > On Wed, Jan 14, 2015 at 04:52:29AM +0100, Stephan Mueller wrote: > > > Hi, > > > > > > This patch set adds AEAD and

Intel GCM: __driver-gcm-aes-aesni setkey missing

2015-01-17 Thread Stephan Mueller
Hi Gabriele, Adrian, Tadeusz, Aidan, during testing of my algif_aead patch with the different GCM implementations I am able to trigger a kernel crash from user space using __driver-gcm-aes- aesni. As I hope that algif_aead is going to be included, unprivileged userspace would then reliably cras

Re: Intel GCM: __driver-gcm-aes-aesni setkey missing

2015-01-18 Thread Stephan Mueller
Am Samstag, 17. Januar 2015, 17:37:06 schrieb Tadeusz Struk: Hi Tadeusz, > Hi Stephan, > > On 01/17/2015 10:23 AM, Stephan Mueller wrote: > > during testing of my algif_aead patch with the different GCM > > implementations I am able to trigger a kernel crash from user spa

[PATCH] crypto: aesni: add setkey for driver-gcm-aes-aesni

2015-01-18 Thread Stephan Mueller
to crypto_aead_setkey will cause a NULL pointer dereference without this patch. CC: Tadeusz Struk Signed-off-by: Stephan Mueller --- arch/x86/crypto/aesni-intel_glue.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/x86/crypto/aesni-intel_glue.c b/arch/x86/crypto/aesni

Re: [PATCH] crypto: aesni: add setkey for driver-gcm-aes-aesni

2015-01-18 Thread Stephan Mueller
Am Sonntag, 18. Januar 2015, 23:56:03 schrieb Stephan Mueller: Hi Tadeusz, > The cipher registered as __driver-gcm-aes-aesni is never intended > to be used directly by any caller. Instead it is a service mechanism to > rfc4106-gcm-aesni. > > The kernel crypto API unconditio

[PATCH] crypto: Documentation: remove colons in comments

2015-01-18 Thread Stephan Mueller
comments that shall not be treated as headings. Signed-off-by: Stephan Mueller --- include/linux/crypto.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/linux/crypto.h b/include/linux/crypto.h index 9099834..fb5ef16 100644 --- a/include/linux/crypto.h +++ b

Re: [PATCH v8 1/2] crypto: AF_ALG: add AEAD support

2015-01-19 Thread Stephan Mueller
Am Dienstag, 20. Januar 2015, 14:00:17 schrieb Herbert Xu: Hi Herbert, >On Fri, Jan 09, 2015 at 04:30:45AM +0100, Stephan Mueller wrote: >> Am Donnerstag, 8. Januar 2015, 22:09:31 schrieb Herbert Xu: >> >> Hi Herbert, >> >> > On Wed, Jan 07, 2015 at 04:

Re: [PATCH] crypto: aesni: add setkey for driver-gcm-aes-aesni

2015-01-19 Thread Stephan Mueller
Am Dienstag, 20. Januar 2015, 14:17:04 schrieb Herbert Xu: Hi Herbert, >On Sun, Jan 18, 2015 at 11:56:03PM +0100, Stephan Mueller wrote: >> The cipher registered as __driver-gcm-aes-aesni is never intended >> to be used directly by any caller. Instead it is a service mechanism &g

Re: [PATCH] crypto: aesni: add setkey for driver-gcm-aes-aesni

2015-01-19 Thread Stephan Mueller
Am Dienstag, 20. Januar 2015, 14:37:05 schrieb Herbert Xu: Hi Herbert, >On Tue, Jan 20, 2015 at 04:35:41AM +0100, Stephan Mueller wrote: >> This in turn would then turn the __driver implementation into a full >> GCM implementation. That would mean that we should rename it from &

[PATCH v11 2/2] crypto: AF_ALG: enable AEAD interface compilation

2015-01-20 Thread Stephan Mueller
Enable compilation of the AEAD AF_ALG support and provide a Kconfig option to compile the AEAD AF_ALG support. Signed-off-by: Stephan Mueller --- crypto/Kconfig | 9 + crypto/Makefile | 1 + 2 files changed, 10 insertions(+) diff --git a/crypto/Kconfig b/crypto/Kconfig index 50f4da4

[PATCH v11 0/2] crypto: AF_ALG: add AEAD and RNG support

2015-01-20 Thread Stephan Mueller
m service function * remove now unneeded ctx->trunc and MSG_TRUNC error return Stephan Mueller (2): crypto: AF_ALG: add AEAD support crypto: AF_ALG: enable AEAD interface compilation crypto/Kconfig | 9 + crypto/Makefile | 1 + cryp

[PATCH v11 1/2] crypto: AF_ALG: add AEAD support

2015-01-20 Thread Stephan Mueller
en and how that operation is performed. A fully working example using all aspects of AEAD is provided at http://www.chronox.de/libkcapi.html Signed-off-by: Stephan Mueller --- crypto/algif_aead.c | 638 1 file changed, 638 insertions(+) c

Re: [PATCH] crypto: aesni: add setkey for driver-gcm-aes-aesni

2015-01-20 Thread Stephan Mueller
Am Dienstag, 20. Januar 2015, 14:17:04 schrieb Herbert Xu: Hi Tadeusz, > On Sun, Jan 18, 2015 at 11:56:03PM +0100, Stephan Mueller wrote: > > The cipher registered as __driver-gcm-aes-aesni is never intended > > to be used directly by any caller. Instead it is a service mechanism

Re: [PATCH] crypto: aesni: add setkey for driver-gcm-aes-aesni

2015-01-22 Thread Stephan Mueller
Am Donnerstag, 22. Januar 2015, 10:23:57 schrieb Tadeusz Struk: Hi Tadeusz, >On 01/20/2015 05:25 PM, Stephan Mueller wrote: >>> Rather than adding a bogus setkey function, please fix this mess >>> properly by moving the top-level setkey function into the __driver >&

Re: [PATCH] crypto/testmgr: mark rfc4106(gcm(aes)) as fips_allowed

2015-01-23 Thread Stephan Mueller
Am Freitag, 23. Januar 2015, 12:42:15 schrieb Jarod Wilson: Hi Jarod, >This gcm variant is popular for ipsec use, and there are folks who >would like to use it while in fips mode. Mark it with fips_allowed=1 >to facilitate that. Acked-by: Stephan Mueller For the records: this change

Re: [PATCH] crypto: aesni - make driver-gcm-aes-aesni helper a proper aead alg

2015-01-25 Thread Stephan Mueller
Am Freitag, 23. Januar 2015, 14:33:57 schrieb Tadeusz Struk: Hi Tadeusz, > Changed the __driver-gcm-aes-aesni to be a proper aead algorithm. > > Signed-off-by: Tadeusz Struk > --- > arch/x86/crypto/aesni-intel_glue.c | 53 > ++-- 1 file changed, 39 insertions(+

Re: [PATCH v11 1/2] crypto: AF_ALG: add AEAD support

2015-01-25 Thread Stephan Mueller
Am Montag, 26. Januar 2015, 10:55:50 schrieb Herbert Xu: Hi Herbert, > On Wed, Jan 21, 2015 at 02:19:17AM +0100, Stephan Mueller wrote: > > + /* use the existing memory in an allocated page */ > > + if (ctx->merge) { > > + sg

Re: [PATCH v11 1/2] crypto: AF_ALG: add AEAD support

2015-01-25 Thread Stephan Mueller
Am Montag, 26. Januar 2015, 11:06:31 schrieb Herbert Xu: Hi Herbert, > On Wed, Jan 21, 2015 at 02:19:17AM +0100, Stephan Mueller wrote: > > + /* > > +* Require exactly one IOV block as the AEAD operation is a one shot > > +* due to the authentication tag. > &

Re: [PATCH v11 1/2] crypto: AF_ALG: add AEAD support

2015-01-25 Thread Stephan Mueller
Am Montag, 26. Januar 2015, 15:32:18 schrieb Herbert Xu: Hi Herbert, > On Mon, Jan 26, 2015 at 05:26:33AM +0100, Stephan Mueller wrote: > > Am Montag, 26. Januar 2015, 10:55:50 schrieb Herbert Xu: > > > > Hi Herbert, > > > > > On Wed, Jan 21, 2015 at 02:

Re: [PATCH v11 1/2] crypto: AF_ALG: add AEAD support

2015-01-25 Thread Stephan Mueller
Am Montag, 26. Januar 2015, 15:37:33 schrieb Herbert Xu: Hi Herbert, > On Mon, Jan 26, 2015 at 05:35:07AM +0100, Stephan Mueller wrote: > > It seems I have misunderstood you in the last discussion. > > I thought you were limiting the receive SGL by ALG_MAX_PAGES rather > than

Re: [PATCH] crypto: aesni - make driver-gcm-aes-aesni helper a proper aead alg

2015-01-26 Thread Stephan Mueller
Am Montag, 26. Januar 2015, 08:58:33 schrieb Tadeusz Struk: Hi Tadeusz, > On 01/25/2015 04:10 PM, Herbert Xu wrote: > > On Sun, Jan 25, 2015 at 08:26:50AM -0800, Tadeusz Struk wrote: > >> > Hi Stephan, > >> > > >> > On 01/25/2015 12:58 AM, S

[PATCH v12 2/2] crypto: AF_ALG: enable AEAD interface compilation

2015-01-29 Thread Stephan Mueller
Enable compilation of the AEAD AF_ALG support and provide a Kconfig option to compile the AEAD AF_ALG support. Signed-off-by: Stephan Mueller --- crypto/Kconfig | 9 + crypto/Makefile | 1 + 2 files changed, 10 insertions(+) diff --git a/crypto/Kconfig b/crypto/Kconfig index 50f4da4

[PATCH v12 0/2] crypto: AF_ALG: add AEAD and RNG support

2015-01-29 Thread Stephan Mueller
ECs (reported by Herbert Xu) * prevent an edge condition error case in sendmsg (reported by Herbert Xu) * correct some formatting as suggested by checkpatch.pl Stephan Mueller (2): crypto: AF_ALG: add AEAD support crypto: AF_ALG: enable AEAD interface compilation crypto/Kconfig

[PATCH v12 1/2] crypto: AF_ALG: add AEAD support

2015-01-29 Thread Stephan Mueller
en and how that operation is performed. A fully working example using all aspects of AEAD is provided at http://www.chronox.de/libkcapi.html Signed-off-by: Stephan Mueller --- crypto/algif_aead.c | 666 1 file changed, 666 insertions(+) c

Re: [PATCH 0/3] crypto: algif - change algif_skcipher to be asynchronous

2015-02-01 Thread Stephan Mueller
Am Donnerstag, 29. Januar 2015, 15:13:39 schrieb Tadeusz Struk: Hi Tadeusz, > The way the algif_skcipher works currently is that on sendmsg/sendpage it > builds an sgl for the input data and then on read/recvmsg it sends the job > for encryption putting the user to sleep till the data is processe

Re: [PATCH 0/3] crypto: algif - change algif_skcipher to be asynchronous

2015-02-02 Thread Stephan Mueller
Am Montag, 2. Februar 2015, 07:03:02 schrieb Tadeusz Struk: Hi Tadeusz, >On 02/01/2015 10:31 AM, Stephan Mueller wrote: >> Hi Tadeusz, >> >>> > The way the algif_skcipher works currently is that on >>> > sendmsg/sendpage it builds an sgl for the input

Re: [PATCH v12 1/2] crypto: AF_ALG: add AEAD support

2015-02-05 Thread Stephan Mueller
Am Donnerstag, 29. Januar 2015, 21:24:45 schrieb Stephan Mueller: Hi Herbert, > 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 u

Re: [PATCH v3 12/18] crypto: switch af_alg_make_sg() to iov_iter

2015-02-09 Thread Stephan Mueller
Am Mittwoch, 4. Februar 2015, 06:40:03 schrieb Al Viro: Hi Al, > From: Al Viro > > With that, all ->sendmsg() instances are converted to iov_iter primitives > and are agnostic wrt the kind of iov_iter they are working with. > So's the last remaining ->recvmsg() instance that wasn't kind-agnosti

Re: [PATCH v3 12/18] crypto: switch af_alg_make_sg() to iov_iter

2015-02-09 Thread Stephan Mueller
Am Mittwoch, 4. Februar 2015, 06:40:03 schrieb Al Viro: Hi Al, > From: Al Viro > > With that, all ->sendmsg() instances are converted to iov_iter primitives > and are agnostic wrt the kind of iov_iter they are working with. > So's the last remaining ->recvmsg() instance that wasn't kind-agnosti

Re: AF_ALG interface not marking the end of the scatter-gather list

2015-02-13 Thread Stephan Mueller
Am Donnerstag, 12. Februar 2015, 17:41:59 schrieb Tom Lendacky: Hi Tom, > I was doing some testing of the CCP driver using the AF_ALG interface > and encountered a BUG_ON statement during scatter-gather DMA mapping. > > In algif_skcipher.c, before submitting a request to the the Crypto API > the

GCM / seqiv and SP800-38D

2015-02-18 Thread Stephan Mueller
Hi Herbert, After some research, we think that the current implementation of seqiv as used for GCM does not comply with SP800-38D. Before I outline the issue, please allow me to state my understanding of seqiv (to make sure I really understand it :-) ). Seqiv works as a wrapper around the asso

Re: Intermediate Hash states

2015-02-20 Thread Stephan Mueller
Am Donnerstag, 19. Februar 2015, 21:48:30 schrieb sri sowj: Hi sri, > Hi , > > I am trying to understand Hashing Algorithms implementation in linux kernel > . > > I am really not sure on how to deal with following scenario. > > assume when App1 is in middle of > execution(crypto_ahash_init/upd

Re: Intermediate Hash states

2015-02-20 Thread Stephan Mueller
locks or mutexes being used. > BR, > Srisowj > > On Sat, Feb 21, 2015 at 1:07 AM, Stephan Mueller wrote: > > Am Donnerstag, 19. Februar 2015, 21:48:30 schrieb sri sowj: > > > > Hi sri, > > > >> Hi , > >> > >> I am trying to understa

Re: communicating from the user space

2015-02-20 Thread Stephan Mueller
Am Samstag, 21. Februar 2015, 01:27:04 schrieb sri sowj: Hi sri, > Hi , > > I want to interact with Crypto Hardware from user space using openssl > like libraries based applications through cryptodev-linux interface. > > it looks like openssl comes with cryptodev-linux support(through > eng_cry

Re: communicating from the user space

2015-02-20 Thread Stephan Mueller
u can provide some info regarding cryptodev-linux from the > openssl prospect it will be more helpful. cryptodev-linux is not merged into the kernel and it looks that it never will considering the presence of AF_ALG > > > BR, > Srisowj > > On Sat, Feb 21, 2015 at 2:28 AM, Ste

Re: communicating from the user space

2015-02-22 Thread Stephan Mueller
-cbc aes-192-cbc aes-256-cbc des-cbc des-ede3-cbc > DIGESTS=md4 md5 sha1 sha224 sha256 sha512 > > > Next step is ,I would like to see the support available to write and > test more and more samples/test utilities between PF/AF_ALG and > cryptodev . > > BR, > SriSowj &

Re: communicating from the user space

2015-02-22 Thread Stephan Mueller
gt; > please can you also help me to explore like "libkcapi" or the other > method(#1 to #5 for libaf_alg.so ) is more active in open source > community > > BR, > Srisowj > > On Sun, Feb 22, 2015 at 8:34 PM, Stephan Mueller wrote: > > Am Sonntag, 22. F

Re: communicating from the user space

2015-02-23 Thread Stephan Mueller
Am Sonntag, 22. Februar 2015, 22:26:32 schrieb Nikos Mavrogiannopoulos: Hi Nikos, > On Sun, 2015-02-22 at 16:04 +0100, Stephan Mueller wrote: > > Am Sonntag, 22. Februar 2015, 18:32:34 schrieb sri sowj: > > > > Hi sri, > > > > > Hi Stephen, > >

Re: communicating from the user space

2015-02-23 Thread Stephan Mueller
arget machine before compiling > openssl etc? Per default, you lack the kernel side support (there is no /dev/crypto) unless you patch your kernel. Thus, that cryptodev support in OpenSSL is not used on default kernels. > > BR, > Srisowj > > > On Mon, Feb 23, 2015 at 2:56

Re: [PATCH v12 1/2] crypto: AF_ALG: add AEAD support

2015-02-27 Thread Stephan Mueller
Am Freitag, 27. Februar 2015, 22:49:44 schrieb Herbert Xu: Hi Herbert, >On Thu, Feb 05, 2015 at 04:10:58PM +0100, Stephan Mueller wrote: >> Am Donnerstag, 29. Januar 2015, 21:24:45 schrieb Stephan Mueller: >> >> Hi Herbert, >> >> > This patch adds the AEA

Re: [PATCH v12 1/2] crypto: AF_ALG: add AEAD support

2015-02-27 Thread Stephan Mueller
Am Freitag, 27. Februar 2015, 10:34:37 schrieb Tadeusz Struk: Hi Tadeusz, > On 02/27/2015 02:26 AM, Stephan Mueller wrote: > >>>> This patch adds the AEAD support for AF_ALG. > >>>> > >>>> >> > The implementation is based on algif_

[PATCH] crypto: Documentation - describe internal structure

2015-02-27 Thread Stephan Mueller
The kernel crypto API has many indirections which warrant a description as otherwise one can get easily lost. The description explains the layers of the kernel crypto API based on examples. Signed-off-by: Stephan Mueller --- Documentation/DocBook/crypto-API.tmpl | 264

Re: GCM / seqiv and SP800-38D

2015-02-28 Thread Stephan Mueller
Am Samstag, 28. Februar 2015, 23:47:12 schrieb Herbert Xu: Hi Herbert, > On Thu, Feb 19, 2015 at 07:56:48AM +0100, Stephan Mueller wrote: > > In case of rfc4106(gcm(aes)), the IV is 96 bits. Thus, our constructed > > > IV looks like: > The IV to rfc4106 is 96 bits, but the

[PATCH v13 2/2] crypto: AF_ALG: enable AEAD interface compilation

2015-02-28 Thread Stephan Mueller
Enable compilation of the AEAD AF_ALG support and provide a Kconfig option to compile the AEAD AF_ALG support. Signed-off-by: Stephan Mueller --- crypto/Kconfig | 9 + crypto/Makefile | 1 + 2 files changed, 10 insertions(+) diff --git a/crypto/Kconfig b/crypto/Kconfig index 2ca8d15

[PATCH v13 0/2] crypto: AF_ALG: add AEAD support

2015-02-28 Thread Stephan Mueller
ase in sendmsg (reported by Herbert Xu) * correct some formatting as suggested by checkpatch.pl Changes v13: * convert recvmsg to use the iov_iter API Stephan Mueller (2): crypto: AF_ALG: add AEAD support crypto: AF_ALG: enable AEAD interface compilation crypto/Kconfig | 9 + c

[PATCH v13 1/2] crypto: AF_ALG: add AEAD support

2015-02-28 Thread Stephan Mueller
en and how that operation is performed. A fully working example using all aspects of AEAD is provided at http://www.chronox.de/libkcapi.html Signed-off-by: Stephan Mueller --- crypto/algif_aead.c | 666 1 file changed, 666 insertions(+) c

[PATCH 0/2] crypto: drbg: performance improvements

2015-03-01 Thread Stephan Mueller
Hi, The following patches increase the performance of the CTR DRBG and Hash DRBG. The updates successfully pass the CAVS testing. for Hash DRBG and CTR DRBG. Stephan Mueller (2): crypto: drbg: use single block cipher API crypto: drbg: remove superflowous memsets crypto/drbg.c | 57

[PATCH 1/2] crypto: drbg: use single block cipher API

2015-03-01 Thread Stephan Mueller
The CTR DRBG only encrypts one single block at a time. Thus, use the single block crypto API to avoid additional overhead from the block chaining modes. With the patch, the speed of the DRBG increases between 30% and 40%. The DRBG still passes the CTR DRBG CAVS test. Signed-off-by: Stephan

[PATCH 2/2] crypto: drbg: remove superflowous memsets

2015-03-01 Thread Stephan Mueller
The DRBG code contains memset(0) calls to initialize a varaible that are not necessary as the variable is always overwritten by the processing. This patch increases the CTR and Hash DRBGs by about 5%. Signed-off-by: Stephan Mueller --- crypto/drbg.c | 18 -- 1 file changed, 18

Re: [PATCH v13 0/2] crypto: AF_ALG: add AEAD support

2015-03-04 Thread Stephan Mueller
Am Mittwoch, 4. März 2015, 22:16:32 schrieb Herbert Xu: Hi Herbert, >On Sat, Feb 28, 2015 at 08:49:22PM +0100, Stephan Mueller wrote: >> Hi, >> >> This patch set adds AEAD support to the AF_ALG interface >> exported by the kernel crypto API. >> > >All ap

[PATCH] crypto: RNGs must return 0 in success case

2015-03-05 Thread Stephan Mueller
Change the RNGs to always return 0 in success case. This patch ensures that seqiv.c works with RNGs other than krng. seqiv expects that any return code other than 0 is an error. Without the patch, rfc4106(gcm(aes)) will not work when using a DRBG or an ANSI X9.31 RNG. Signed-off-by: Stephan

<    1   2   3   4   5   6   7   8   9   10   >