I'm implementing the Keccak-f ι step using javascript, the formula is as follow:
# ι step
A[0,0] = A[0,0] xor RC
RC is an array of round constants in Hex and A[0,0] is a single bit in Binary
The problem occurs on the following line
A[0,0] = 0, RC = 0x0000000000008082
when I convert RC to Binary using the code:
let temp = (parseInt(RC, 16).toString(2)).padStart(8, '0');//110010100010011000
A[0][0] = A[0][0] ^ temp; //16975297
the result is not a single bit, rather is a large number 16975297, but I need a single bit.
I tried to convert the large number 16975297 to binary but it is not a single bit as well. I need some help, thank you!