On Sun, Mar 14, 2010 at 09:24:32AM +0100, Sebastian Andrzej Siewior wrote:
> 
> Okay. So so are we talking about something like that below then? This is

Pretty much.

> untested and I break other users bexcept lib80211_crypt_tkip. 

For the sake of compatibility please do this as a 3-step dance.
First add a new arc4 blkcipher, then convert the users, and
finally delete the old arc4.

>  static int arc4_set_key(struct crypto_tfm *tfm, const u8 *in_key,
>                       unsigned int key_len)
>  {
> -     struct arc4_ctx *ctx = crypto_tfm_ctx(tfm);
> +     /*
> +      * ARC4 is special: The user should supply an IV as struct arc4_iv and
> +      * fill either the key or the iv.
> +      */
> +     return -EOPNOTSUPP;
> +}

You should return 0 here.  You should also set the min/max key
size to zero.  The new arc4 no longer has a key as far as the
API is concerned.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herb...@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to