[PATCH 2/2] updating for keypayload null check.

2015-11-25 Thread Ameen
adding NULL check to make it fail safe. Signed-Off-By : Ameen Ali --- crypto/asymmetric_keys/x509_public_key.c | 4 1 file changed, 4 insertions(+) diff --git a/crypto/asymmetric_keys/x509_public_key.c b/crypto/asymmetric_keys/x509_public_key.c index 2a44b37..76610cc 100644 --- a/crypto/a

[PATCH] crypto/cryptod: use crypto_skcipher_type() for getting skcipher type

2015-11-25 Thread Alexander Kuleshov
The provides inline function - crypto_skcipher_type(). Let's use it in the cryptd_alloc_ablkcipher() instead of direct calculation. Signed-off-by: Alexander Kuleshov --- crypto/cryptd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crypto/cryptd.c b/crypto/cryptd.c index

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

2015-11-25 Thread Andrew Zaborowski
rhe RSA operations explicitly left-align the integers being written skipping any leading zero bytes, but still require the output buffers to include just enough space for the integer + the leading zero bytes. Since the size of integer + the leading zero bytes (i.e. the key modulus size) can now be

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

2015-11-25 Thread Andrew Zaborowski
Since mpi_write_to_sgl and mpi_read_buffer explicitly left-align the integers being written it makes no sense to require a buffer big enough for the number + the leading zero bytes which are not written. The error returned also doesn't convey any information. So instead require only the size need

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

2015-11-25 Thread Andrew Zaborowski
This patch adds PKCS#1 v1.5 standard RSA padding as a separate template. This way an RSA cipher with padding can be obtained by instantiating "pkcs1pad(rsa)". The reason for adding this is that RSA is almost never used without this padding (or OAEP) so it will be needed for either certificate work

[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 --- v2: no changes since v1 v3: drop

Re: [PATCH 2/2] ath9k: export HW random number generator

2015-11-25 Thread Kalle Valo
Nick Kossifidis writes: > That was partially my intention too when I submitted > 2aa56cca3571fd08c0c38f3e2d4bb0bfb3def3c5 which mixes FFT measurements > to the entropy pool without providing any estimation on entropy > (entropy estimation is the wrong approach, read the papers on fortuna > for mo

Re: [PATCH v5 2/4] clk: rockchip: set an ID for crypto clk

2015-11-25 Thread Zain
On 2015年11月25日 16:14, Heiko Stübner wrote: > Hi Zain, > > Am Mittwoch, 25. November 2015, 13:43:31 schrieb Zain Wang: >> Set an ID for crypto clk, so that it can be called in other part. >> >> Signed-off-by: Zain Wang >> Acked-by: Michael Turquette >> Tested-by: Heiko Stuebner > I've already t

Re: [PATCH v5 2/4] clk: rockchip: set an ID for crypto clk

2015-11-25 Thread Heiko Stübner
Hi Zain, Am Mittwoch, 25. November 2015, 13:43:31 schrieb Zain Wang: > Set an ID for crypto clk, so that it can be called in other part. > > Signed-off-by: Zain Wang > Acked-by: Michael Turquette > Tested-by: Heiko Stuebner I've already taken this patch, so no need to resubmit on further vers