chiark / gitweb /
ocb-tv
6 years agoMakefile, ocbgen: Support Ukrainian `Kalyna' block cipher.
Mark Wooding [Sun, 16 Jul 2017 14:08:00 +0000 (15:08 +0100)]
Makefile, ocbgen: Support Ukrainian `Kalyna' block cipher.

Interesting because it has 512-bit blocks.  Requires a Python
implementation of Kalyna, not included; see

https://git.distorted.org.uk/~mdw/kalyna-python/

for suitable bindings to the reference implementation.  Define
`HAVE_KALYNA' to enable the extra magic.

6 years agoMakefile, ocbgen: Handle 512-bit blocks.
Mark Wooding [Sun, 16 Jul 2017 14:06:45 +0000 (15:06 +0100)]
Makefile, ocbgen: Handle 512-bit blocks.

Introduce a completely crazy 512-bit double-Luby--Rackoff stunt block
cipher to demonstrate.

6 years agoMakefile: Deploy countermeasures for dc(1) line splitting.
Mark Wooding [Sun, 16 Jul 2017 14:05:49 +0000 (15:05 +0100)]
Makefile: Deploy countermeasures for dc(1) line splitting.

dc(1) splits long output lines, introducing backslash-newline pairs.
Remove them again.

6 years agoMakefile: Use `silent-rules'-style output by default.
Mark Wooding [Sun, 16 Jul 2017 14:04:36 +0000 (15:04 +0100)]
Makefile: Use `silent-rules'-style output by default.

To override, set V=1 in the usual way.

6 years agofind-stretch.sage: Calculate stretch shifts for various block sizes.
Mark Wooding [Sun, 16 Jul 2017 13:55:28 +0000 (14:55 +0100)]
find-stretch.sage: Calculate stretch shifts for various block sizes.

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.

6 years ago.gitignore: Ignore the output test-vector files.
Mark Wooding [Sun, 16 Jul 2017 13:54:57 +0000 (14:54 +0100)]
.gitignore: Ignore the output test-vector files.

6 years agoInitial version.
Mark Wooding [Thu, 29 Jun 2017 10:11:01 +0000 (11:11 +0100)]
Initial version.