Re: [RFC PATCH 4/5] crypto: Adds user space interface for ALG_SET_KEY_TYPE

2019-06-09 Thread Herbert Xu
On Mon, Jun 10, 2019 at 05:20:58AM +, Kalyani Akula wrote: > Ping!! We already have existing drivers supporting hardware keys. Please check out how they're handling this. You can grep for paes under drivers/crypto. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herber

RE: [RFC PATCH 4/5] crypto: Adds user space interface for ALG_SET_KEY_TYPE

2019-06-09 Thread Kalyani Akula
Ping!! > -Original Message- > From: Stephan Mueller > Sent: Friday, May 24, 2019 12:50 PM > To: Kalyani Akula ; keyri...@vger.kernel.org > Cc: herb...@gondor.apana.org.au; da...@davemloft.net; linux- > cry...@vger.kernel.org; linux-ker...@vger.kernel.org; Sarat Chand Savitala > > Subject

Re: [PATCH v2 7/7] fs: cifs: switch to RC4 library interface

2019-06-09 Thread Steve French
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

Re: [PATCH v2 2/7] net/mac80211: move WEP handling to ARC4 library interface

2019-06-09 Thread Johannes Berg
Hi Ard, In general, I have no objections to this. However, with this > - select CRYPTO_ARC4 > + select CRYPTO_LIB_ARC4 and this > case WLAN_CIPHER_SUITE_WEP40: > case WLAN_CIPHER_SUITE_TKIP: > case WLAN_CIPHER_SUITE_WEP104: > - if (IS_ERR(local->wep_tx_tfm

Re: [PATCH v2 0/7] crypto: rc4 cleanup

2019-06-09 Thread Ard Biesheuvel
(adding Johannes back to the cover letter cc) On Sun, 9 Jun 2019 at 13:55, Ard Biesheuvel wrote: > > This is a follow-up to, and supersedes [0], which moved some WEP code from > the cipher to the skcipher interface, in order to reduce the use of the bare > cipher interface in non-crypto subsystem

[PATCH v2 5/7] crypto: arc4 - remove cipher implementation

2019-06-09 Thread Ard Biesheuvel
There are no remaining users of the cipher implementation, and there are no meaningful ways in which the arc4 cipher can be combined with templates other than ECB (and the way we do provide that combination is highly dubious to begin with). So let's drop the arc4 cipher altogether, and only keep t

[PATCH v2 7/7] fs: cifs: switch to RC4 library interface

2019-06-09 Thread Ard Biesheuvel
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. Cc: lin

[PATCH v2 4/7] net/lib80211: move TKIP handling to ARC4 library code

2019-06-09 Thread Ard Biesheuvel
The crypto API abstraction is not very useful for invoking ciphers directly, especially in the case of arc4, which only has a generic implementation in C. So let's invoke the library code directly. Cc: linux-wirel...@vger.kernel.org Cc: Johannes Berg Signed-off-by: Ard Biesheuvel --- net/wirele

[PATCH v2 2/7] net/mac80211: move WEP handling to ARC4 library interface

2019-06-09 Thread Ard Biesheuvel
The WEP code in the mac80211 subsystem currently uses the crypto API to access the arc4 (RC4) cipher, which is overly complicated, and doesn't really have an upside in this particular case, since ciphers are always synchronous and therefore always implemented in software. Given that we have no acce

[PATCH v2 6/7] ppp: mppe: switch to RC4 library interface

2019-06-09 Thread Ard Biesheuvel
The MPPE code uses the sync skcipher 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. Note that t

[PATCH v2 1/7] crypto: arc4 - refactor arc4 core code into separate library

2019-06-09 Thread Ard Biesheuvel
Refactor the core rc4 handling so we can move most users to a library interface, permitting us to drop the cipher interface entirely in a future patch. This is part of an effort to simplify the crypto API and improve its robustness against incorrect use. Signed-off-by: Ard Biesheuvel --- MAINTAI

[PATCH v2 3/7] net/lib80211: move WEP handling to ARC4 library code

2019-06-09 Thread Ard Biesheuvel
The crypto API abstraction is not very useful for invoking ciphers directly, especially in the case of arc4, which only has a generic implementation in C. So let's invoke the library code directly. Cc: linux-wirel...@vger.kernel.org Cc: Johannes Berg Signed-off-by: Ard Biesheuvel --- net/wirele

[PATCH v2 0/7] crypto: rc4 cleanup

2019-06-09 Thread Ard Biesheuvel
This is a follow-up to, and supersedes [0], which moved some WEP code from the cipher to the skcipher interface, in order to reduce the use of the bare cipher interface in non-crypto subsystem code. Since using the skcipher interface to invoke the generic C implementation of an algorithm that is k