Dennis Andersson (frosetti@hotmail.com)
Fri, 18 Sep 1998 02:11:33 PDT
Hi guys!
Please bear with my bad english and my newbie questions.
I'd like to know if the following key expansion routine
would strengthen or perhaps weaken rc4 if used instead
of the original routine.
void prepare_key(unsigned char *key_data_ptr, int key_data_len,
rc4_key *key)
{
int i;
unsigned char t;
unsigned char swapByte;
unsigned char index1;
unsigned char index2;
unsigned char* state;
short counter;
state = &key->state[0];
for(counter = 0; counter < 256; counter++)
state[counter] = counter;
key->x = 0;
key->y = 0;
index1 = 0;
index2 = 0;
for(counter = 0; counter < 256; counter++)
{
state[counter] ^= key_data_ptr[index1];
index1 = (index1 + 1) % key_data_len;
}
index1 = 0;
for(counter = 0; counter < 256; counter++)
{
index2 = (key_data_ptr[index1] + state[counter] + index2) % 256;
swap_byte(&state[counter], &state[index2]);
index1 = (index1 + 1) % key_data_len;
}
}
BTW you see my teacher just gave me an assignment. I'm supposed
to interview somebody. So would anyone like to help an future
cryptographer?!
TIA
Dennis
PS!
Please help me!
Please help me!
Please help me!
Please help me!
Please help me!
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
The following archive was created by hippie-mail 7.98617-22 on Sat Apr 10 1999 - 01:13:59