All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Steve French <smfrench@gmail.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	linux-crypto@vger.kernel.org,
	Herbert Xu <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>,
	CIFS <linux-cifs@vger.kernel.org>,
	Steve French <sfrench@samba.org>
Subject: Re: [PATCH v2 7/7] fs: cifs: switch to RC4 library interface
Date: Mon, 10 Jun 2019 09:17:37 -0700	[thread overview]
Message-ID: <20190610161736.GB63833@gmail.com> (raw)
In-Reply-To: <CAH2r5mvQmY8onx6y2Y1aJOuWP9AsK52EJ=cXiJ7hdYPWrLp6uA@mail.gmail.com>

Hi Steve,

On Sun, Jun 09, 2019 at 05:03:25PM -0500, Steve French wrote:
> Probably harmless to change this code path (build_ntlmssp_auth_blob is
> called at session negotiation time so shouldn't have much of a
> performance impact).
> 
> On the other hand if we can find optimizations in the encryption and
> signing paths, that would be really helpful.   There was a lot of
> focus on encryption performance at SambaXP last week.
> 
> Andreas from Redhat gave a talk on the improvements in Samba with TLS
> implementation of AES-GCM.   I added the cifs client implementation of
> AES-GCM and notice it is now faster to encrypt packets than sign them
> (performance is about 2 to 3 times faster now with GCM).
> 
> On Sun, Jun 9, 2019 at 6:57 AM Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
> >
> > The CIFS code uses the sync skcipher API to invoke the ecb(arc4) skcipher,
> > of which only a single generic C code implementation exists. This means
> > that going through all the trouble of using scatterlists etc buys us
> > very little, and we're better off just invoking the arc4 library directly.

This patch only changes RC4 encryption, and to be clear it actually *improves*
the performance of the RC4 encryption, since it removes unnecessary
abstractions.  I'd really hope that people wouldn't care either way, though,
since RC4 is insecure and should not be used.

Also it seems that fs/cifs/ supports AES-CCM but not AES-GCM?

/* pneg_ctxt->Ciphers[0] = SMB2_ENCRYPTION_AES128_GCM;*/ /* not supported yet */
        pneg_ctxt->Ciphers[0] = SMB2_ENCRYPTION_AES128_CCM;

AES-GCM is usually faster than AES-CCM, so if you want to improve performance,
switching from CCM to GCM would do that.

- Eric

  reply	other threads:[~2019-06-10 16:17 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-09 11:55 [PATCH v2 0/7] crypto: rc4 cleanup Ard Biesheuvel
2019-06-09 11:55 ` [PATCH v2 1/7] crypto: arc4 - refactor arc4 core code into separate library Ard Biesheuvel
2019-06-10 16:06   ` Eric Biggers
2019-06-10 16:10     ` Ard Biesheuvel
2019-06-10 16:32       ` Eric Biggers
2019-06-09 11:55 ` [PATCH v2 2/7] net/mac80211: move WEP handling to ARC4 library interface Ard Biesheuvel
2019-06-09 20:08   ` Johannes Berg
2019-06-10 10:58     ` Ard Biesheuvel
2019-06-09 11:55 ` [PATCH v2 3/7] net/lib80211: move WEP handling to ARC4 library code Ard Biesheuvel
2019-06-09 11:55 ` [PATCH v2 4/7] net/lib80211: move TKIP " Ard Biesheuvel
2019-06-09 11:55 ` [PATCH v2 5/7] crypto: arc4 - remove cipher implementation Ard Biesheuvel
2019-06-09 11:55 ` [PATCH v2 6/7] ppp: mppe: switch to RC4 library interface Ard Biesheuvel
2019-06-09 11:55   ` Ard Biesheuvel
2019-06-09 11:55 ` [PATCH v2 7/7] fs: cifs: " Ard Biesheuvel
2019-06-09 22:03   ` Steve French
2019-06-10 16:17     ` Eric Biggers [this message]
2019-06-10 17:54       ` Steve French
2019-06-10 18:02         ` Ard Biesheuvel
2019-06-10 18:59           ` Steve French
2019-06-09 12:03 ` [PATCH v2 0/7] crypto: rc4 cleanup Ard Biesheuvel

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=20190610161736.GB63833@gmail.com \
    --to=ebiggers@kernel.org \
    --cc=ard.biesheuvel@linaro.org \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=sfrench@samba.org \
    --cc=smfrench@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.