find-stretch.sage: Calculate stretch shifts for various block sizes.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 16 Jul 2017 13:55:28 +0000 (14:55 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 16 Jul 2017 14:58:18 +0000 (15:58 +0100)
This is an improved version which searches in the expected order.

For a block size w and shift c, define the domain length D(w, c) to be
the largest D such that

x, i |-> (x || x XOR (x << c))[i..i + w]

is strongly XOR-universal over {0, 1}^w, {0, 1, ... D - 1}.

The algorithm is to choose the shift c which maximizes

  * maximizes floor(log_2(D(w, c))),
  * minimizes c mod 8, and
  * maximizes c

in that priority order.


No differences found