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

*From*: Maaartin <grajcar1@xxxxxxxxx>*Date*: Wed, 18 Aug 2010 19:37:05 -0700 (PDT)

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.

.

**Follow-Ups**:**Re: C code of PEARL1, a block encryption algorithm emphasising simplicity***From:*Mok-Kong Shen

**References**:**[long] C code of PEARL1, a block encryption algorithm emphasising simplicity***From:*Mok-Kong Shen

- Prev by Date:
**Wolfram's rule 30 as a hash function** - Next by Date:
**Re: Scalable Key Cryptography – Extended to Unicode.** - Previous by thread:
**[long] C code of PEARL1, a block encryption algorithm emphasising simplicity** - Next by thread:
**Re: C code of PEARL1, a block encryption algorithm emphasising simplicity** - Index(es):