[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: arcfour
From: |
Ralf Wildenhues |
Subject: |
Re: arcfour |
Date: |
Fri, 14 Oct 2005 16:28:19 +0200 |
User-agent: |
Mutt/1.5.11 |
Hi Simon,
Keep in mind, this is all just IMHO. No need to heed my advice. :)
* 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.
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.
> Internally, in arcfour.c, because we are using "X AND 255" instead of
> "X AND ARCFOUR_SBOX_SIZE" we can use:
>
> #define ARCFOUR_MOD_MASK (ARCFOUR_SBOX_SIZE - 1)
>
> And then use that symbol in the code.
>
> The ARCFOUR_MOD_MASK symbol doesn't represent an external property of
> the cipher, so I don't think it should be in arcfour.h.
Fine with me.
Cheers,
Ralf
- arcfour, Simon Josefsson, 2005/10/13
- Re: arcfour, Ralf Wildenhues, 2005/10/14
- Re: arcfour, Simon Josefsson, 2005/10/14
- Re: arcfour, Simon Josefsson, 2005/10/14
- Re: arcfour, Stepan Kasal, 2005/10/14
- Re: arcfour, Simon Josefsson, 2005/10/14
- Re: arcfour, Paul Eggert, 2005/10/14
- Re: arcfour, Bruno Haible, 2005/10/14
- Re: arcfour, Simon Josefsson, 2005/10/14
- Re: arcfour, Paul Eggert, 2005/10/14
- Re: arcfour, Simon Josefsson, 2005/10/15
- Re: arcfour, Stepan Kasal, 2005/10/14
Re: [bug-gnulib] arcfour, Bruno Haible, 2005/10/14