Ralf Wildenhues <[EMAIL PROTECTED]> writes: > Hi Simon, > > Keep in mind, this is all just IMHO. No need to heed my advice. :)
Sure. :) > * Simon Josefsson wrote on Fri, Oct 14, 2005 at 04:14:09PM CEST: >> >> I thought about this more. There are only two defines that I believe >> should be present in arcfour.h: >> >> #define ARCFOUR_BLOCK_SIZE 8 > > ARCFOUR_BLOCK_SIZE isn't used for anything in your patch. > You could just elide it. Uhm, you are right. > I specifically use > #define ARCFOUR_SBOX_SIZE (1 << SOME_OTHER_DEFINE) > instead of >> #define ARCFOUR_SBOX_SIZE 256 > > because that way I am reminded that this buddy better be a power of two, > or code will break. And, to tell you the truth, I can't see what > ARCFOUR_BLOCK_SIZE is specifying a "size" of. That's why I suggested > LOGSIZE or BITS. I understand. I assumed the BLOCK_SIZE symbol was used somewhere, but I see that it isn't. However, I don't think this is a good idea, for the same reason Stepan described. The SBOX size can be 370 and things would work fine, assuming we know sbox values to fit in the initial array. So it doesn't have to be a power of two. So I think the hardcoded value should be 256, because that is the value that is inherant to the algorithm. Thanks. _______________________________________________ bug-gnulib mailing list bug-gnulib@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnulib