I am trying to implement a cipher that uses a 128 bit key. Part of the key schedule is to rotate the key 29 bits to the right, but I am unsure how to do that since there is no single data type in Java that can hold the whole key. I have it stored in two longs, one for the upper half and one for the lower half. Here is the bit math that I have that I thought should work but isn't doing the trick:
keyLower >>>= 29;
keyLower |= keyUpper << 35;
keyUpper >>>= 29;
keyUpper |= keyLowerCopy << 29;
Can anyone help me out?