WringTwistree 1.1.0 whole-message cipher and keyed hash

This is a bugfix release, but I haven’t announced WringTwistree before, so here goes.

Wring is a whole-message cipher, which means that instead of enciphering eight or sixteen bytes at a time, it enciphers a whole message at once, which can be anywhere from a byte to a few gigabytes. Twistree is a keyed hash function of novel construction; it splits a message in blocks, combines them in a binary tree and a ternary tree, and combines the block produced by the binary tree with the block produced by the ternary tree to produce the hash.

The bug was that it threw an error when the key is a single byte. This bug was not in the Rust or Haskell implementation, but only in the Julia implementation, and resulted from an overflow in the key expansion function. After fixing the bug, I enciphered the same file with the single letter “a” as a key and made sure that all three implementations give the same result.

I also added a new method to setBreakEven so that you can set the break-even points to known values instantly, as well as running benchmarks to find the break-even points for serial vs. parallel enciphering and hashing.

As usual with new cryptographic algorithms, don’t use them to protect real data until you’ve tried to break them yourself or several cryptographers have tried.

2 Likes