linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Denis Kenzior <denkenz@gmail.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	Marcel Holtmann <marcel@holtmann.org>,
	"open list:HARDWARE RANDOM NUMBER GENERATOR CORE" 
	<linux-crypto@vger.kernel.org>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	Johannes Berg <johannes@sipsolutions.net>,
	"open list:NFC SUBSYSTEM" <linux-wireless@vger.kernel.org>,
	"David S. Miller" <davem@davemloft.net>
Subject: Re: [RFC PATCH 0/3] move WEP implementation to skcipher interface
Date: Fri, 7 Jun 2019 14:15:14 -0700	[thread overview]
Message-ID: <20190607211514.GD648@sol.localdomain> (raw)
In-Reply-To: <f40ad169-93b9-636f-9656-634ff331ee2b@gmail.com>

On Fri, Jun 07, 2019 at 03:45:45PM -0500, Denis Kenzior wrote:
> Hi Ard,
> 
> > 
> > Ah ok, good to know. That does imply that the driver is not entirely
> > broken, which is good news I suppose.
> > 
> 
> Not entirely, but we did have to resort to using multiple sockets, otherwise
> parallel encrypt/decrypt operations on the socket would result in invalid
> behavior.  Probably due to the issue Eric already pointed out.
> 
> No such issue with any other ciphers that we use.
> 
> Regards,
> -Denis

Okay, that sucks, so we do have to keep "ecb(arc4)" in the crypto API then.  And
we can't fix its name to be just "arc4".  It's odd that someone would choose to
use AF_ALG over writing a 20 line arc4_crypt() in userspace, but whatever.

Yes, "ecb(arc4)" isn't currently thread safe.  ARC4 uses a single key whereas
modern stream ciphers use a key + IV.  To comply with the crypto API it would
have to copy the key to a stack buffer for each encryption/decryption.  But it
doesn't; it just updates the key instead, making it non thread safe.  If users
are actually relying on that, we'll have to settle for adding a mutex instead.

In any case, we can still remove the 'cipher' algorithm version as Ard is
suggesting, as well as possibly convert the in-kernel users to use an
arc4_crypt() library function and remove the hardware driver support.

- Eric

  reply	other threads:[~2019-06-07 21:15 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-07 14:49 [RFC PATCH 0/3] move WEP implementation to skcipher interface Ard Biesheuvel
2019-06-07 14:49 ` [RFC PATCH 1/3] net/mac80211: switch to skcipher interface for arc4 Ard Biesheuvel
2019-06-07 14:49 ` [RFC PATCH 2/3] lib80211/tkip: " Ard Biesheuvel
2019-06-07 14:49 ` [RFC PATCH 3/3] lib80211/wep: " Ard Biesheuvel
2019-06-07 17:59 ` [RFC PATCH 0/3] move WEP implementation to skcipher interface Eric Biggers
2019-06-07 18:08   ` Ard Biesheuvel
2019-06-07 20:24   ` Marcel Holtmann
2019-06-07 20:27     ` Ard Biesheuvel
2019-06-07 20:45       ` Denis Kenzior
2019-06-07 21:15         ` Eric Biggers [this message]
2019-06-07 21:28           ` Denis Kenzior
2019-06-07 21:41             ` Eric Biggers
2019-06-07 21:54               ` Denis Kenzior
2019-06-07 22:40                 ` Eric Biggers
2019-06-07 22:47                   ` Denis Kenzior
2019-06-08 13:03                     ` Sandy Harris
2019-06-08 14:37                       ` Ard Biesheuvel
2019-06-08 15:51                         ` 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=20190607211514.GD648@sol.localdomain \
    --to=ebiggers@kernel.org \
    --cc=ard.biesheuvel@linaro.org \
    --cc=davem@davemloft.net \
    --cc=denkenz@gmail.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=johannes@sipsolutions.net \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=marcel@holtmann.org \
    /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;
as well as URLs for NNTP newsgroup(s).