/*****************************************************************************/
/*									     */
/*  RIGHT-SHIFT 256 BITS						     */
/*  10/16/09 (dkc)							     */
/*									     */
/*****************************************************************************/
void shift256(unsigned int A[8], unsigned int B[8], unsigned int shift) {
unsigned int temp;

B[0]=A[0];
B[1]=A[1];
B[2]=A[2];
B[3]=A[3];
B[4]=A[4];
B[5]=A[5];
B[6]=A[6];
B[7]=A[7];
while (shift>31) {
   B[7]=B[6];
   B[6]=B[5];
   B[5]=B[4];
   B[4]=B[3];
   B[3]=B[2];
   B[2]=B[1];
   B[1]=B[0];
   B[0]=0;
   shift=shift-32;
   }
if (shift==0)
   return;
B[7]=B[7]>>shift;
temp=B[6]<<(32-shift);
B[7]=B[7]|temp;

B[6]=B[6]>>shift;
temp=B[5]<<(32-shift);
B[6]=B[6]|temp;

B[5]=B[5]>>shift;
temp=B[4]<<(32-shift);
B[5]=B[5]|temp;

B[4]=B[4]>>shift;
temp=B[3]<<(32-shift);
B[4]=B[4]|temp;

B[3]=B[3]>>shift;
temp=B[2]<<(32-shift);
B[3]=B[3]|temp;

B[2]=B[2]>>shift;
temp=B[1]<<(32-shift);
B[2]=B[2]|temp;

B[1]=B[1]>>shift;
temp=B[0]<<(32-shift);
B[1]=B[1]|temp;

B[0]=B[0]>>shift;
return;
}