Close

Application as a scrambler

A project log for PEAC Pisano with End-Around Carry algorithm

Add X to Y and Y to X, says the song. And carry on.

yann-guidon-ygdesYann Guidon / YGDES 09/28/2021 at 07:470 Comments

As already noted, there is this duality between the "generator" configuration (which generates a stream of numbers) and the chechsum (wich inputs a stream of numbers to disturb the sequence of the generator).

In one case, we have a stream input, in the other there is an output stream. And what if there was both ?

This third configuration is called "scrambler" and it is another common application of LFSR, in particular in Ethernet links and other low-level PHY to spread the bits.

LFSRs have a drawback though : they are sensitive to the all-zero state combined with zero input. An extra circuit is usually required to detect long strings of 0s and kick the LFSR back.

The PEAC checksum has been proved to be immune from this. Moreover, it can operate several bits in parallel, contrary to the LFSR that can't generate easily more than 1 bit per cycle.

One example as a byte stream scrambler would have the scrambler upstream and the serialiser downstream, contrary to the LFSR method that works bit per bit. The PEAC w8 is weak so w10 is used, providing 3 bits for safety (Carry and the 2 MSB). Thus the maximum distance between blank periods is guaranteed. Moreover, the output could be tied to the MSB of the PEAC registers, instead of the 8 lower bits, to provide additional protection against chosen-text attacks and eventually provide extra checksum bits at the end of the stream. In this case, PEAC works both as a scrambler AND checksum.

Once you start to play with scramblers, you touch the domain of cryptography. Obviously, PEAC can't be used alone in this context. But even as a simple scrambler, the PEAC generator has several benefits over LFSR.

Discussions