I am only learning c and I am trying to implement a for loop from an algorithm. I am so so confused in how to implement it, please see my attempt below. Any help or thoughts would be greatly appreciated, it implies a loop within a loop which has a dependency to hex value. It has come from an Differential Cryptanalysis algorithm.
the loop as stated in algorithm is :
ciphertext C0 = (L0,R0) ciphertext C1 = (L1,R1)
Where
long long c0 = 0x78661EB54FE76763;
long long c1 = 0x98D9EC2327F1BF03;
My attempt so far
long long c0 = 0x78661EB54FE76763;
long long c1 = 0x98D9EC2327F1BF03;
for (int c0 = 0; c0 <= 0xff; c0++)
{
for (int c1 = 0; c1 <= 0xff; c1++)
{
}
}
But I dont know how to handle the depenacy to hex values. Its is latter ordering: (0, 0), (0, 1), (1, 2), ..., (0, 255), (1, 0), …
So it means all possible combinations - the ordering does not matter so long as you go through them all.