des_cblock (*key);
const des_cblock key;
int des_set_key(key, schedule)des_cblock (*key);des_key_schedule schedule;	{	static int shifts2[16]={0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0};	register DES_LONG c,d,t,s,t2;	register unsigned char *in;	register DES_LONG *k;	register int i;	if (des_check_key)		{		if (!check_parity(key))			return(-1);		if (des_is_weak_key(key))			return(-2);		}	k=(DES_LONG *)schedule;	in=(unsigned char *)key;	c2l(in,c);	c2l(in,d);	/* do PC1 in 60 simple operations */ /*	PERM_OP(d,c,t,4,0x0f0f0f0fL);	HPERM_OP(c,t,-2, 0xcccc0000L);	HPERM_OP(c,t,-1, 0xaaaa0000L);	HPERM_OP(c,t, 8, 0x00ff0000L);	HPERM_OP(c,t,-1, 0xaaaa0000L);	HPERM_OP(d,t,-8, 0xff000000L);	HPERM_OP(d,t, 8, 0x00ff0000L);	HPERM_OP(d,t, 2, 0x33330000L);	d=((d&0x00aa00aaL)<<7L)|((d&0x55005500L)>>7L)|(d&0xaa55aa55L);	d=(d>>8)|((c&0xf0000000L)>>4);	c&=0x0fffffffL; */	/* I now do it in 47 simple operations :-)	 * Thanks to John Fletcher (john_fletcher@lccmail.ocf.llnl.gov)	 * for the inspiration. :-) */	PERM_OP (d,c,t,4,0x0f0f0f0fL);	HPERM_OP(c,t,-2,0xcccc0000L);	HPERM_OP(d,t,-2,0xcccc0000L);	PERM_OP (d,c,t,1,0x55555555L);	PERM_OP (c,d,t,8,0x00ff00ffL);	PERM_OP (d,c,t,1,0x55555555L);	d=	(((d&0x000000ffL)<<16L)| (d&0x0000ff00L)     |		 ((d&0x00ff0000L)>>16L)|((c&0xf0000000L)>>4L));	c&=0x0fffffffL;	for (i=0; i<ITERATIONS; i++)		{		if (shifts2[i])			{ c=((c>>2L)|(c<<26L)); d=((d>>2L)|(d<<26L)); }		else			{ c=((c>>1L)|(c<<27L)); d=((d>>1L)|(d<<27L)); }		c&=0x0fffffffL;		d&=0x0fffffffL;		/* could be a few less shifts but I am to lazy at this		 * point in time to investigate */		s=	des_skb[0][ (c    )&0x3f                ]|			des_skb[1][((c>> 6)&0x03)|((c>> 7L)&0x3c)]|			des_skb[2][((c>>13)&0x0f)|((c>>14L)&0x30)]|			des_skb[3][((c>>20)&0x01)|((c>>21L)&0x06) |						  ((c>>22L)&0x38)];		t=	des_skb[4][ (d    )&0x3f                ]|			des_skb[5][((d>> 7L)&0x03)|((d>> 8L)&0x3c)]|			des_skb[6][ (d>>15L)&0x3f                ]|			des_skb[7][((d>>21L)&0x0f)|((d>>22L)&0x30)];		/* table contained 0213 4657 */		t2=((t<<16L)|(s&0x0000ffffL))&0xffffffffL;		*(k++)=ROTATE(t2,30)&0xffffffffL;		t2=((s>>16L)|(t&0xffff0000L));		*(k++)=ROTATE(t2,26)&0xffffffffL;		}	return(0);	}