[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: arcfour
From: |
Stepan Kasal |
Subject: |
Re: arcfour |
Date: |
Fri, 14 Oct 2005 16:47:22 +0200 |
User-agent: |
Mutt/1.4.1i |
Hello,
On Fri, Oct 14, 2005 at 04:14:09PM +0200, Simon Josefsson wrote:
> Internally, in arcfour.c, [...]
> #define ARCFOUR_MOD_MASK (ARCFOUR_SBOX_SIZE - 1)
yes, this is a good idea, and it also applies to the proposal I have
just posted:
These two would be in .h:
#define ARCFOUR_LOGSZ 8 /* or ARCFOUR_BLOCK_BITS */
#define ARCFOUR_SIZE (1 << ARCFOUR_LOGSZ)
while this would be in .c
/* Some compilers may not be able to optimize n % ARCFOUR_SIZE properly. */
#define ARCFOUR_MODULO(n) ((n) & (ARCFOUR_SIZE - 1))
Regarding the ARCFOUR_SIZE alias ARCFOUR_SBOX_SIZE:
Perhaps we could call it ARCFOUR_BASE: all arithmetics is done modulo this
number. The fact that this is also the size of the domain of the
permutation (sbox) is just a consequence.
Have a nice day,
Stepan
- 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 <=
- 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