[PATCH v2 10/10] crypto: AF_ALG: document the user space interface

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

[PATCH v2 06/10] crypto: AF_ALG: make setkey optional

2014-11-15 Thread Stephan Mueller
The current AF_ALG implementation requires that a userspace interface implementation must provide a callback for setkey. Such a call is not appliable to random number generators. To prepare AF_ALG for the addition of a random number generator user space interface, this function callback invocation

[PATCH v2 07/10] crypto: AF_ALG: add random number generator support

2014-11-15 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 v2 08/10] crypto: AF_ALG: enable RNG interface compilation

2014-11-15 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 v2 05/10] crypto: AF_ALG: add AEAD support

2014-11-15 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 v2 01/10] crypto: AF_ALG: add user space interface for AEAD

2014-11-15 Thread Stephan Mueller
AEAD requires the following data in addition to normal symmetric ciphers: * Associated authentication data of arbitrary length * Authentication tag for decryption * Length of authentication tag for encryption The authentication tag data is communicated as part of the act

[PATCH v2 04/10] crypto: AF_ALG: crypto API calls to inline functions

2014-11-15 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 v2 02/10] crypto: AF_ALG: user space interface for cipher info

2014-11-15 Thread Stephan Mueller
The AF_ALG interface allows normal cipher (hash, encrypt, decrypt). However, it does not allow user space to obtain the following generic information about the currently active cipher: * block size of the cipher * IV size of the cipher * for AEAD, the maximum authenticati

[PATCH v2 00/10] crypto: AF_ALG: add AEAD and RNG support

2014-11-15 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 v2 03/10] crypto: AF_ALG: extend data structuers for AEAD

2014-11-15 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 v2 09/10] crypto: AF_ALG: user space interface for hash info

2014-11-15 Thread Stephan Mueller
The AF_ALG interface allows normal cipher (hash, encrypt, decrypt). However, it does not allow user space to obtain the following generic information about the currently active hash: * digestsize The patch adds a getsockopt interface for the hash ciphers to answer such information request

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

2014-11-15 Thread Arnd Bergmann
On Friday 14 November 2014 15:59:02 Andrew Bresticker wrote: > > diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig > > index 2fb0fdf..4b931eb 100644 > > --- a/drivers/crypto/Kconfig > > +++ b/drivers/crypto/Kconfig > > @@ -436,4 +436,17 @@ config CRYPTO_DEV_QCE > > hardware. To