[PATCH v3 4/7] crypto: AF_ALG: add AEAD support

2014-11-20 Thread Stephan Mueller
This patch adds the AEAD support for AF_ALG. The AEAD implementation uses the entire memory handling and infrastructure of the existing skcipher implementation. To use AEAD, the user space consumer has to use the salg_type named "aead". The AEAD extension only uses the bind callback as the key di

[PATCH v3 5/7] crypto: AF_ALG: add random number generator support

2014-11-20 Thread Stephan Mueller
This patch adds the random number generator support for AF_ALG. A random number generator's purpose is to generate data without requiring the caller to provide any data. Therefore, the AF_ALG interface handler for RNGs only implements a callback handler for recvmsg. The following parameters provi

[PATCH v3 6/7] crypto: AF_ALG: enable RNG interface compilation

2014-11-20 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 87bbc9c..e12

[PATCH v3 3/7] crypto: AF_ALG: crypto API calls to inline functions

2014-11-20 Thread Stephan Mueller
To avoid excessive branches and cluttering the code, all kernel crypto API calls are extracted into separate inline functions. These functions invoke either the ablkcipher or the aead crypto API function calls, as necessary. Signed-off-by: Stephan Mueller --- crypto/algif_skcipher.c | 143 ++

[PATCH v3 1/7] crypto: AF_ALG: add user space interface for AEAD

2014-11-20 Thread Stephan Mueller
AEAD requires the following data in addition to normal symmetric ciphers: * Associated authentication data of arbitrary length and length * Authentication tag for decryption and length * Length of authentication tag for encryption The memory structure for the d

[PATCH v3 0/7] crypto: AF_ALG: add AEAD and RNG support

2014-11-20 Thread Stephan Mueller
Hi, This patch set adds AEAD and RNG support to the AF_ALG interface exported by the kernel crypto API. By extending AF_ALG with AEAD and RNG support, all cipher types the kernel crypto API allows access to are now accessible from userspace. The RNG support is stand-alone. The AEAD implementatio

[PATCH v3 2/7] crypto: AF_ALG: extend data structuers for AEAD

2014-11-20 Thread Stephan Mueller
The data structure holding the state of an ongoing symmetric cipher operation is extended by the data variables needed for AEAD. The request data structures are encapsulated by a union as the symmetric cipher implementation is either exclusively used for "normal" symmetric ciphers or for AEAD ciph

[PATCH v3 7/7] crypto: AF_ALG: document the user space interface

2014-11-20 Thread Stephan Mueller
The extension of the user space interface documentation covers all aspects of the patchset, including: * AEAD cipher interface * RNG cipher interface Signed-off-by: Stephan Mueller --- Documentation/crypto/crypto-API-userspace.txt | 70 ++- 1 file change

Re: crypto: user - Allow get request with empty driver name

2014-11-20 Thread Stephan Mueller
Am Donnerstag, 20. November 2014, 14:02:21 schrieb Stephan Mueller: Hi Stephan, > Am Donnerstag, 20. November 2014, 12:46:50 schrieb Herbert Xu: > > Hi Herbert, > > > On Thu, Nov 20, 2014 at 05:23:23AM +0100, Stephan Mueller wrote: > > > Here is the code: > > > > > > static int crypto_report(s

Re: crypto: user - Allow get request with empty driver name

2014-11-20 Thread Stephan Mueller
Am Freitag, 21. November 2014, 10:31:31 schrieb Herbert Xu: Hi Herbert, > On Thu, Nov 20, 2014 at 05:08:42PM +0100, Stephan Mueller wrote: > > Am Donnerstag, 20. November 2014, 21:40:29 schrieb Herbert Xu: > > > > Hi Herbert, > > > > > On Thu, Nov 20, 2014 at 02:10:00PM +0100, Stephan Mueller w

Re: crypto: user - Allow get request with empty driver name

2014-11-20 Thread Herbert Xu
On Thu, Nov 20, 2014 at 05:08:42PM +0100, Stephan Mueller wrote: > Am Donnerstag, 20. November 2014, 21:40:29 schrieb Herbert Xu: > > Hi Herbert, > > > On Thu, Nov 20, 2014 at 02:10:00PM +0100, Stephan Mueller wrote: > > > What about the following > > > > > > if (p->cru_driver_name[0] > > If th

[PATCH v3] crypto: prefix module autoloading with "crypto-"

2014-11-20 Thread Kees Cook
This prefixes all crypto module loading with "crypto-" so we never run the risk of exposing module auto-loading to userspace via a crypto API, as demonstrated by Mathias Krause: https://lkml.org/lkml/2013/3/4/70 Signed-off-by: Kees Cook --- v3: - added unprefixed alias back for userspace compat

Fix Penguin Penalty 17th October2014 ( mail-archive.com )

2014-11-20 Thread attiring36612
Dear Sir Did your website get hit by Google Penguin update on October 17th 2014? What basically is Google Penguin Update? It is actually a code name for Google algorithm which aims at decreasing your websites search engine rankings that violate Google’s guidelines by using black hat SEO techniq

Re: crypto: user - Allow get request with empty driver name

2014-11-20 Thread Stephan Mueller
Am Donnerstag, 20. November 2014, 21:40:29 schrieb Herbert Xu: Hi Herbert, > On Thu, Nov 20, 2014 at 02:10:00PM +0100, Stephan Mueller wrote: > > What about the following > > > > if (p->cru_driver_name[0] If the driver name is not empty > > > > alg = crypto_alg_match(p, 1); Do an exact ma

Re: crypto-drbg: Deletion of unnecessary checks before the function call "kzfree"

2014-11-20 Thread SF Markus Elfring
> Sorry but you're too late as someone else has already fixed this :) Thanks for your feedback. https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/commit/crypto/drbg.c?id=46f64f6ef978dc1f36ebaa50ed79c7c8386711ee Regards, Markus -- To unsubscribe from this list: send the line "unsu

Re: [PATCH RESEND v2 0/4] hwrng: atmel: add DT support

2014-11-20 Thread Herbert Xu
On Thu, Nov 20, 2014 at 10:43:21AM +0100, Nicolas Ferre wrote: > This is the patch series that Boris sent yesterday. I've just collected > "Acked-by" tags and resend it with updated cover letter. > > This series adds DT support for the TRNG (True Random Generator) block and > adds > missing trng

Re: [PATCH] arm64: crypto: Add ARM64 CRC32 hw accelerated module

2014-11-20 Thread Herbert Xu
On Thu, Nov 20, 2014 at 07:42:23AM -0600, Yazen Ghannam wrote: > +linux-arm-ker...@lists.infradead.org > > On Wed, Nov 19, 2014 at 11:19 AM, Yazen Ghannam > wrote: > > > This module registers a crc32 algorithm and a crc32c algorithm > > that use the optional CRC32 and CRC32C instructions in ARMv

Re: [PATCH] bfin_crc: don't include linux/unaligned/access_ok.h

2014-11-20 Thread Herbert Xu
On Wed, Nov 19, 2014 at 09:16:04PM +0100, Johannes Berg wrote: > From: Johannes Berg > > This is a specific implementation, is the > multiplexer that has the arch-specific knowledge of which > of the implementations needs to be used, so include that. > > Signed-off-by: Johannes Berg Patch app

Re: [PATCH 1/1] crypto-drbg: Deletion of unnecessary checks before the function call "kzfree"

2014-11-20 Thread Herbert Xu
On Wed, Nov 19, 2014 at 10:20:32AM +0100, SF Markus Elfring wrote: > From: Markus Elfring > Date: Wed, 19 Nov 2014 10:11:04 +0100 > > The kzfree() function tests whether its argument is NULL and then > returns immediately. Thus the test around the call is not needed. > > This issue was detected

Re: [PATCH] arm64: crypto: Add ARM64 CRC32 hw accelerated module

2014-11-20 Thread Yazen Ghannam
+linux-arm-ker...@lists.infradead.org On Wed, Nov 19, 2014 at 11:19 AM, Yazen Ghannam wrote: > This module registers a crc32 algorithm and a crc32c algorithm > that use the optional CRC32 and CRC32C instructions in ARMv8. > > Tested on AMD Seattle. > > Improvement compared to crc32c-generic algor

Re: [PATCH V2 1/2] crypto: Add Imagination Technologies hw hash accelerator

2014-11-20 Thread Herbert Xu
On Tue, Nov 18, 2014 at 08:48:46PM +, James Hartley wrote: > > +struct img_hash_request_ctx { > + struct img_hash_dev *hdev; > + u8 digest[SHA256_DIGEST_SIZE] __aligned(sizeof(u32)); > + unsigned long flags; > + size_t digsize; > + > + dma_addr

Re: crypto: user - Allow get request with empty driver name

2014-11-20 Thread Herbert Xu
On Thu, Nov 20, 2014 at 02:10:00PM +0100, Stephan Mueller wrote: > > What about the following > > if (p->cru_driver_name[0] > alg = crypto_alg_match(p, 1); > else > alg = crypto_alg_match(p, 0); If cru_driver_name is not empty then exact will never be used, no? Cheers, -- Email: Her

Re: crypto: user - Allow get request with empty driver name

2014-11-20 Thread Stephan Mueller
Am Donnerstag, 20. November 2014, 14:02:21 schrieb Stephan Mueller: Hi Stephan, > Am Donnerstag, 20. November 2014, 12:46:50 schrieb Herbert Xu: > > Hi Herbert, > > > On Thu, Nov 20, 2014 at 05:23:23AM +0100, Stephan Mueller wrote: > > > Here is the code: > > > > > > static int crypto_report(s

Re: crypto: user - Allow get request with empty driver name

2014-11-20 Thread Stephan Mueller
Am Donnerstag, 20. November 2014, 09:04:06 schrieb Steffen Klassert: Hi Steffen, > On Thu, Nov 20, 2014 at 03:45:26PM +0800, Herbert Xu wrote: > > On Thu, Nov 20, 2014 at 08:11:42AM +0100, Steffen Klassert wrote: > > > I think this is not sufficient, crypto_alg_match() will now return the > > > f

Re: crypto: user - Allow get request with empty driver name

2014-11-20 Thread Stephan Mueller
Am Donnerstag, 20. November 2014, 12:46:50 schrieb Herbert Xu: Hi Herbert, > On Thu, Nov 20, 2014 at 05:23:23AM +0100, Stephan Mueller wrote: > > Here is the code: > > > > static int crypto_report(struct sk_buff *in_skb, struct nlmsghdr *in_nlh, > > > > struct nlattr **attr

[PATCH RESEND v2 2/4] hwrng: atmel: add DT support

2014-11-20 Thread Nicolas Ferre
From: Boris Brezillon Add DT support. Make the driver depend on CONFIG_OF as at91sam9g45 was the only SoC making use of the TRNG block and this SoC is now fully migrated to DT. Signed-off-by: Boris Brezillon Acked-by: Peter Korsgaard Acked-by: Nicolas Ferre --- drivers/char/hw_random/Kconfi

[PATCH RESEND v2 3/4] hwrng: atmel: Add TRNG DT binding doc

2014-11-20 Thread Nicolas Ferre
From: Boris Brezillon Document DT bindings of Atmel's TRNG (True Random Number Generator) IP. Signed-off-by: Boris Brezillon Acked-by: Peter Korsgaard Acked-by: Nicolas Ferre --- Documentation/devicetree/bindings/hwrng/atmel-trng.txt | 16 1 file changed, 16 insertions(+) c

[PATCH RESEND v2 4/4] ARM: at91/dt: add trng node to at91sam9g45

2014-11-20 Thread Nicolas Ferre
From: Boris Brezillon Add a DT node for the TRNG (True Random Number Generator) block. Keep this block enabled as it does not depend on any external connection, and thus should be available on all boards. Signed-off-by: Boris Brezillon Acked-by: Nicolas Ferre --- arch/arm/boot/dts/at91sam9g4

[PATCH RESEND v2 1/4] hwrng: atmel: use clk_prepapre_enable/_disable_unprepare

2014-11-20 Thread Nicolas Ferre
From: Boris Brezillon Use clk_prepare_enable/_disable_unprepare instead of clk_enable/disable to work properly with the CCF. Signed-off-by: Boris Brezillon Acked-by: Peter Korsgaard Acked-by: Nicolas Ferre --- drivers/char/hw_random/atmel-rng.c | 8 1 file changed, 4 insertions(+),

[PATCH RESEND v2 0/4] hwrng: atmel: add DT support

2014-11-20 Thread Nicolas Ferre
This is the patch series that Boris sent yesterday. I've just collected "Acked-by" tags and resend it with updated cover letter. This series adds DT support for the TRNG (True Random Generator) block and adds missing trng nodes to at91sam9g45 dtsi files. Herbert, As you said that you can take thi

Re: crypto: user - Allow get request with empty driver name

2014-11-20 Thread Steffen Klassert
On Thu, Nov 20, 2014 at 03:45:26PM +0800, Herbert Xu wrote: > On Thu, Nov 20, 2014 at 08:11:42AM +0100, Steffen Klassert wrote: > > > > I think this is not sufficient, crypto_alg_match() will now return the first > > algorithm in crypto_alg_list that matches cra_name. We would need to extend > > cr

Re: [PATCH] crypto: aesni-intel - avoid IPsec re-ordering

2014-11-20 Thread Herbert Xu
On Thu, Nov 20, 2014 at 08:59:44AM +0100, Steffen Klassert wrote: > > Sure, but could be an option if this is really a rare case. Well it's rare but when it does hit it'll probably be there all the time for that system. IOW you either have no apps using the FPU, but when you do, it's probably goi

Re: [PATCH] crypto: aesni-intel - avoid IPsec re-ordering

2014-11-20 Thread Steffen Klassert
On Thu, Nov 20, 2014 at 03:43:42PM +0800, Herbert Xu wrote: > On Thu, Nov 20, 2014 at 08:26:51AM +0100, Steffen Klassert wrote: > > > > What about to use a fallback algorithm that does not need to touch > > FPU/SIMD in such cases? We would not need cryptd at all and it would > > keep the requests i