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  linux-hardening  linux-cve-announce  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:   Wed, 1 Dec 2021 08:11:15 +0100
From:   Hannes Reinecke <hare@...e.de>
To:     Nicolai Stange <nstange@...e.de>,
        Herbert Xu <herbert@...dor.apana.org.au>,
        "David S. Miller" <davem@...emloft.net>
Cc:     Stephan Müller <smueller@...onox.de>,
        Torsten Duwe <duwe@...e.de>, Zaibo Xu <xuzaibo@...wei.com>,
        Giovanni Cabiddu <giovanni.cabiddu@...el.com>,
        David Howells <dhowells@...hat.com>,
        Jarkko Sakkinen <jarkko@...nel.org>,
        linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org,
        qat-linux@...el.com, keyrings@...r.kernel.org
Subject: Re: [PATCH 01/18] crypto: dh - remove struct dh's ->q member

On 12/1/21 1:48 AM, Nicolai Stange wrote:
> The only current user of the DH KPP algorithm, the
> keyctl(KEYCTL_DH_COMPUTE) syscall, doesn't set the domain parameter ->q
> in struct dh. Remove it and any associated (de)serialization code in
> crypto_dh_encode_key() and crypto_dh_decode_key. Adjust the encoded
> ->secret values in testmgr's DH test vectors accordingly.
> 
> Note that the dh-generic implementation would have initialized its
> struct dh_ctx's ->q from the decoded struct dh's ->q, if present. If this
> struct dh_ctx's ->q would ever have been non-NULL, it would have enabled a
> full key validation as specified in NIST SP800-56A in dh_is_pubkey_valid().
> However, as outlined above, ->q is always NULL in practice and the full key
> validation code is effectively dead. A later patch will make
> dh_is_pubkey_valid() to calculate Q from P on the fly, if possible, so
> don't remove struct dh_ctx's ->q now, but leave it there until that has
> happened.
> 
> Signed-off-by: Nicolai Stange <nstange@...e.de>
> ---
>   crypto/dh.c         |  6 ------
>   crypto/dh_helper.c  | 17 ++++-------------
>   crypto/testmgr.h    | 16 ++++++----------
>   include/crypto/dh.h |  4 ----
>   4 files changed, 10 insertions(+), 33 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare@...e.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                Kernel Storage Architect
hare@...e.de                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ