public inbox for linux-crypto@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephan Mueller <smueller@chronox.de>
To: Mat Martineau <mathew.j.martineau@linux.intel.com>
Cc: herbert@gondor.apana.org.au, ebiggers@kernel.org,
	Jarkko Sakkinen <jarkko@kernel.org>,
	"dhowells@redhat.com" <dhowells@redhat.com>,
	linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
	keyrings <keyrings@vger.kernel.org>,
	simo@redhat.com
Subject: Re: [PATCH v3 3/4] security: DH - remove dead code for zero padding
Date: Thu, 18 Nov 2021 09:37:01 +0100	[thread overview]
Message-ID: <6300797.NZM0BCWY22@tauon.chronox.de> (raw)
In-Reply-To: <f98dbf21-50d1-7847-18cb-2f5093a8ac8@linux.intel.com>

Am Mittwoch, 17. November 2021, 22:28:46 CET schrieb Mat Martineau:

Hi Mat,

> On Mon, 15 Nov 2021, Stephan Müller wrote:
> > Remove the specific code that adds a zero padding that was intended
> > to be invoked when the DH operation result was smaller than the
> > modulus. However, this cannot occur any more these days because the
> > function mpi_write_to_sgl is used in the code path that calculates the
> > shared secret in dh_compute_value. This MPI service function guarantees
> > that leading zeros are introduced as needed to ensure the resulting data
> > is exactly as long as the modulus. This implies that the specific code
> > to add zero padding is dead code which can be safely removed.
> > 
> > Signed-off-by: Stephan Mueller <smueller@chronox.de>
> > ---
> > security/keys/dh.c | 25 ++++---------------------
> > 1 file changed, 4 insertions(+), 21 deletions(-)
> 
> Hi Stephan -
> 
> Thanks for the cleanup!

Thank you for the review.
> 
> Acked-by: Mat Martineau <mathew.j.martineau@linux.intel.com>

I have added your signature to the patch.

Ciao
Stephan



  reply	other threads:[~2021-11-18  8:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-15  8:41 [PATCH v3 0/4] Add SP800-108 KDF implementation to crypto API Stephan Müller
2021-11-15  8:42 ` [PATCH v3 1/4] crypto: Add key derivation self-test support code Stephan Müller
2021-11-15  8:43 ` [PATCH v3 2/4] crypto: add SP800-108 counter key derivation function Stephan Müller
2021-11-17 19:11   ` Eric Biggers
2021-11-18  8:07     ` Stephan Mueller
2021-11-15  8:43 ` [PATCH v3 3/4] security: DH - remove dead code for zero padding Stephan Müller
2021-11-17 21:28   ` Mat Martineau
2021-11-18  8:37     ` Stephan Mueller [this message]
2021-11-15  8:44 ` [PATCH v3 4/4] security: DH - use KDF implementation from crypto API Stephan Müller
2021-11-17 21:45   ` Mat Martineau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6300797.NZM0BCWY22@tauon.chronox.de \
    --to=smueller@chronox.de \
    --cc=dhowells@redhat.com \
    --cc=ebiggers@kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=jarkko@kernel.org \
    --cc=keyrings@vger.kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathew.j.martineau@linux.intel.com \
    --cc=simo@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox