[PATCH] PKCS#7: fix unitialized boolean 'want'

2016-02-27 Thread Colin King
From: Colin Ian King The boolean want is not initialized and hence garbage. The default should be false (later it is only set to true on tne sinfo->authattrs check). Found with static analysis using CoverityScan Signed-off-by: Colin Ian King --- crypto/asymmetric_keys/pkcs7_parser.c | 2 +- 1

Re: [PATCH 1/4] crypto: algif_skcipher - Require setkey before accept(2)

2016-02-27 Thread Herbert Xu
On Fri, Feb 26, 2016 at 12:44:08PM +0100, Milan Broz wrote: > From: Herbert Xu > > commit dd504589577d8e8e70f51f997ad487a4cb6c026f upstream. > > Some cipher implementations will crash if you try to use them > without calling setkey first. This patch adds a check so that > the ac

Re: [PATCH 3/3] crypto: caam - add support for RSA algorithm

2016-02-27 Thread Herbert Xu
Tudor-Dan Ambarus wrote: > Hi Stephan, > >> -Original Message- >> >+++ b/drivers/crypto/caam/caam_rsaprivkey.asn1 >> >@@ -0,0 +1,11 @@ >> >+RsaPrivKey ::= SEQUENCE { >> >+version INTEGER, >> >+n INTEGER ({ caam_rsa_get_n }), >> >+e INTEGER (

Re: [PATCH] crypto: algif_hash - correctly handle algos without state

2016-02-27 Thread Herbert Xu
On Tue, Feb 23, 2016 at 12:01:56PM -0500, Sasha Levin wrote: > Algorithms without state will cause the creation of a 0 sized array, which > is undefined outside of structs. > > Signed-off-by: Sasha Levin Actually the state size should never be zero and we check it upon algorithm registration, so

Re: [PATCH 2/2] crypto: remove padding logic from rsa.c

2016-02-27 Thread Herbert Xu
Tadeusz Struk wrote: > > diff --git a/crypto/rsa.c b/crypto/rsa.c > index 9a7c9ca..77d737f 100644 > --- a/crypto/rsa.c > +++ b/crypto/rsa.c > @@ -16,78 +16,6 @@ > #include > > /* > - * Hash algorithm OIDs plus ASN.1 DER wrappings [RFC4880 sec 5.2.2]. > - */ > -static const u8 rsa_digest_info_md5

Re: [PATCH 0/3] KEYS: Use crypto rsa pkcs1pad module for software public keys

2016-02-27 Thread Herbert Xu
David Howells wrote: > > Here's a set of patches that change the software public key asymmetric key > subtype to use the RSA pkcs1pad module in the crypto layer. I've merged > together mine and Tadeusz's patches. > > I have not included Tadeusz's original three patches that converted to > using

Re: [RFC PATCH v6] Crypto: rockchip/crypto - add hash support for crypto engine in rk3288

2016-02-27 Thread Herbert Xu
On Tue, Feb 16, 2016 at 10:15:01AM +0800, Zain Wang wrote: > From: Zain Wang > > Add md5 sha1 sha256 support for crypto engine in rk3288. > > Signed-off-by: Zain Wang Patch applied. Thanks! -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org

Re: [PATCH] MPI: Endianness fix

2016-02-27 Thread Herbert Xu
On Wed, Feb 17, 2016 at 02:46:59PM +0100, Michal Marek wrote: > The limbs are integers in the host endianness, so we can't simply > iterate over the individual bytes. The current code happens to work on > little-endian, because the order of the limbs in the MPI array is the > same as the order of t

Re: [PATCH] crypto: allow rfc3686 aes-ctr variants in fips mode.

2016-02-27 Thread Herbert Xu
On Fri, Feb 19, 2016 at 01:34:28PM +0100, Marcus Meissner wrote: > RFC 3686 CTR in various authenc methods. > > rfc3686(ctr(aes)) is already marked fips compliant, > so these should be fine. > > Signed-off-by: Marcus Meissner Applied. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au

Re: [PATCH] The AE id should be less than the maximal AE number

2016-02-27 Thread Herbert Xu
Yang Pingchao wrote: > Signed-off-by: Yang Pingchao Applied. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to major

Re: [PATCH] hw_random: brcm63xx-rng: fix non device tree compatibility

2016-02-27 Thread Herbert Xu
On Sun, Feb 21, 2016 at 10:53:35AM +0100, Álvaro Fernández Rojas wrote: > Allow building when OF is not enabled as suggested by Florian > > Signed-off-by: Álvaro Fernández Rojas > Reported-by: Florian Fainelli Applied. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP K

Re: [PATCH 1/2] lib/mpi: avoid assembler warning

2016-02-27 Thread Herbert Xu
On Fri, Feb 26, 2016 at 01:46:26PM +0100, Arnd Bergmann wrote: > A wrapper around the umull assembly instruction might reuse > the input register as an output, which is undefined on > some ARM machines, as pointed out by this assembler warning: > > CC lib/mpi/generic_mpih-mul1.o > /tmp/ccxJ

Re: [PATCH] crypto: ccp - memset request context to zero during import

2016-02-27 Thread Herbert Xu
On Thu, Feb 25, 2016 at 04:48:13PM -0600, Tom Lendacky wrote: > Since a crypto_ahash_import() can be called against a request context > that has not had a crypto_ahash_init() performed, the request context > needs to be cleared to insure there is no random data present. If not, > the random data ca

Re: [PATCH 1/4] crypto: algif_skcipher - Require setkey before accept(2)

2016-02-27 Thread Sasha Levin
On 02/26/2016 06:44 AM, Milan Broz wrote: > From: Herbert Xu > > commit dd504589577d8e8e70f51f997ad487a4cb6c026f upstream. > > Some cipher implementations will crash if you try to use them > without calling setkey first. This patch adds a check so that > the accept(2) call will

Re: [PATCH 2/2] crypto: remove padding logic from rsa.c

2016-02-27 Thread Tadeusz Struk
Hi Herbert, On 02/27/2016 10:40 AM, Herbert Xu wrote: > Tadeusz Struk wrote: >> >> diff --git a/crypto/rsa.c b/crypto/rsa.c >> index 9a7c9ca..77d737f 100644 >> --- a/crypto/rsa.c >> +++ b/crypto/rsa.c >> @@ -16,78 +16,6 @@ >> #include >> >> /* >> - * Hash algorithm OIDs plus ASN.1 DER wrappings [