The previous attempt was very nice and taught me things, which I'll try to distill again, as I start coding it. Several insights affect this reboot:
- I wanted to avalanche way too much early on
- I should mix more at the first/outer layer
- avoid "cancellation" by detecting "loops" of XOR that break the avalanches
- alternate layer types so mixing is spreadier on the emitter.
- 4 or 5 layers should be OK to reach H9 on both sides
So we'll start with the "outer" layer:

(please excuse the flaw at the lower-left quadrant)
The Encoder layers stack becomes EDEDE, and decoder DEDED.
For DE:DE, we have this sandwich:

Avalanche for D-E: 1, 1, 1, 1, 2, 2, 2, 2, 6, 6, 6, 7, 8, 8, 9, 10, 13, 13
Avalanche E-D : 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 4, 4, 5, 5, 6, 6, 12, 12
Now what can we do ? Copy-paste of course ! With a little permutation that will associate the low avalanches with the high ones, and vice versa.

The Permutation P is reversed by S, which are both used 2×, and the intermediary Q is reversed by T. So overall the complexity is kept low through the duplications.
Encoder: DPE-Q-DPE
Decoder: DSE-T-DSE
Once you have the 9-bit tiles, they are duplicated and linked by permutations...
The result is still 64 XOR gates and a quite powerful avalanche, both forward and backward. However one of the input avalanches only to 2 bits on the transmission side...
Sender: 2, 5, 7, 7, 8, 8, 9, 9, 9, 10, 10, 11, 11, 12, 13, 13, 13, 13
Receiver: 6, 6, 6, 6, 6, 7, 7, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12
The sender has a bad bit with only 2 avalanches, which could be tied to the C/D bit. But that's a sub-optimal approach...
There are two ways to go forward:
- add another layer. This increases latency, cost, complexity...
- explore the design space with an exhaustive method: let a computer generate many permutations and find the best parameters. This looks like the way to go...
Yann Guidon / YGDES
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.