lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 28 Feb 2019 18:18:54 +0000
From:   David Howells <dhowells@...hat.com>
To:     Vitaly Chikunov <vt@...linux.org>
Cc:     dhowells@...hat.com, Herbert Xu <herbert@...dor.apana.org.au>,
        Mimi Zohar <zohar@...ux.ibm.com>,
        linux-integrity@...r.kernel.org, keyrings@...r.kernel.org,
        linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 04/10] crypto: akcipher - new verify API for public key algorithms

Vitaly Chikunov <vt@...linux.org> wrote:

> +	digest = kmemdup(sig->digest, sig->digest_size, GFP_KERNEL);
> +	if (!digest)

You shouldn't need to copy the digest.  It's being passed in to the crypto
algorithm, not extracted out.

> +		if (memcmp(c, outbuf_enc, c_size)) {

Please use == 0 and != 0 with memcmp() and strcmp().  Their return values are
kind of inverted in sense if you treat them as boolean.

David

Powered by blists - more mailing lists