static void k5_arcfour_crypt(ArcfourContext *ctx, unsigned char *dest,
const unsigned char *src, unsigned int len);
-static const unsigned char arcfour_weakkey1[] = {0x00, 0x00, 0xfd};
-static const unsigned char arcfour_weakkey2[] = {0x03, 0xfd, 0xfc};
-static const struct {
- size_t length;
- const unsigned char *data;
-} arcfour_weakkeys[] = {
- { sizeof (arcfour_weakkey1), arcfour_weakkey1},
- { sizeof (arcfour_weakkey2), arcfour_weakkey2},
-};
-
static inline unsigned int k5_arcfour_byte(ArcfourContext * ctx)
{
unsigned int x;
if (key_len != 16)
return KRB5_BAD_MSIZE; /*this is probably not the correct error code
to return */
- for (counter=0;
- counter < sizeof(arcfour_weakkeys)/sizeof(arcfour_weakkeys[0]);
- counter++)
- if (!memcmp(key, arcfour_weakkeys[counter].data,
- arcfour_weakkeys[counter].length))
- return KRB5DES_WEAK_KEY; /* most certainly not the correct error */
-
state = &ctx->state[0];
ctx->x = 0;
ctx->y = 0;