bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: arcfour


From: Simon Josefsson
Subject: Re: arcfour
Date: Fri, 14 Oct 2005 18:06:33 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

Ralf Wildenhues <address@hidden> 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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]