Re: C code of PEARL1, a block encryption algorithm emphasising simplicity

The values generated by the function genrandom are most probably
biased. The reason is that the function defined by

ULI mutualRotate(ULI i, ULI j) {
ULI mask = bitn-1;
ULI ii = i & mask;
ULI jj = j & mask;
ULI x = rotateLeft(i, jj); // rotate i by jj to the left
ULI y = rotateLeft(j, ii);
return x^y;

is biased. To find it out, use unsigned char, set bitn=8, and go
though all i and j.

Relevant Pages