* Herbert Xu | 2010-04-07 08:31:09 [+0800]: >On Tue, Apr 06, 2010 at 10:30:02PM +0200, Sebastian Andrzej Siewior wrote: >> >> Good point. All arc4 users don't care about return value of setkey so I >> think that I just change void to int add the check for the valid key >> length. > >Actually, how about getting arc4_setup_iv to do all the legwork >and turn it into a real IV? Then we don't need any checks on the >data path. So arc4_setup_iv() should do what the internal arc4_ivsetup() does and we change void to int and check the keysize in there right? The problem here is that we are bounded to *this* implementation of the algorithm and are not able to replace it with a different implementation. Not that this is likely to happen for RC4 but it may be true for other stream ciphers. >> While we are here, the .setkey() callback could be removed, couldn't it? >> It returns 0 even it is doing nothing what looks kinda wrong. However it >> shouldn't be called at all since min/max key is 0. Any objections on >> that? > >I'm pretty sure testmgr will call setkey even for keylen == 0, no? Prior patch #3 it has no test case so it should not test it at all. Patch #3 adds a flag in order to distinguish it. You want to look at patch #3 now :) > >Thanks, Sebastian -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html