Hash functions

Cubehash82

Bernstein's SHA-3 candidate: an ARX permutation with tunable rounds and block size

unverified Root API only
Unverified tier.

Source found and wired, correctness not fully proven. Root API only. Reach it with NextSSL(root=True) in Python or the nextssl_root_* functions in C.

About Cubehash82

Cubehash82 is a cryptographic hash function from the CubeHash family. It produces a 64-byte (512-bit) output. NextSSL lists it in the unverified tier and exposes it through the root API only (NextSSL(root=True) in Python, nextssl_root_* in C).

Overview

CubeHash is a hash function by Daniel J. Bernstein submitted to the NIST SHA-3 competition. It is defined by two tunable parameters, rounds per block r and bytes per block b, written CubeHashr/b, and reached the second round.

CubeHash keeps a 1024-bit state of 32 32-bit words and absorbs b bytes of message at a time, applying r rounds of a fixed ARX permutation after each block, in a sponge-like fashion. Each round adds, rotates, swaps and XORs halves of the state. After the final block, a flag is set and the state is mixed through extra rounds before output. Smaller b and larger r give more security at the cost of speed.

The second-round proposal was CubeHash16/32. NextSSL includes the sphlib CubeHash16/32 implementation and a set of parameter variants wired from benchmarking sources: 8/1, 8/2, 8/4, 8/8, 8/16, 8/32, 16/1, 16/2, 16/4, 16/8 and 16/16. The variant ids encode r and b directly, for example cubehash832 is CubeHash8/32. Lower r values make the hash faster and weaker.

History

2007–2015
  1. NIST announces a public competition for a new hash standard, SHA-3

    NIST SHA-3 competition
  2. CubeHash published by Daniel J. Bernstein

  3. 64 designs submitted; 51 accepted into round 1

    NIST SHA-3 competition
  4. 14 designs advance to round 2

    NIST SHA-3 competition
  5. Five finalists named: BLAKE, Grøstl, JH, Keccak and Skein

    NIST SHA-3 competition
  6. Keccak selected as SHA-3

    NIST SHA-3 competition
  7. SHA-3 published as FIPS 202

    NIST SHA-3 competition

Security notes

No practical attacks on the proposed CubeHash16/32 parameters are known, but its preimage resistance was criticised as weaker than NIST's requirements for 512-bit outputs, and it was not chosen as a finalist. The parameter variants are unverified and some offer reduced security margins.

Typical uses

SHA-3 competition researchExploring speed versus security trade-offsTeaching sponge-like constructions

Sizes

FieldBytesMeaning
out64Output

Use it

from nextssl_demo import NextSSL

root = NextSSL(root=True)   # tier 'unverified' is reachable from the root API only
digest = root.call("hash_with", "cubehash82", None, b"abc")[0]

Calls follow the NextSSL C ABI and its language bindings. Buffer sizes are validated against the sizes above.

Frequently asked questions

What is Cubehash82?

Cubehash82 is a hash in the CubeHash family. CubeHash is a hash function by Daniel J. Bernstein submitted to the NIST SHA-3 competition.

What are the Cubehash82 sizes?

In NextSSL, Cubehash82 uses: output 64 bytes.

Who designed Cubehash82 and when?

Cubehash82 belongs to the CubeHash family, first published in 2008 by Daniel J. Bernstein. Its origin: NIST SHA-3 competition (round 2).

Is Cubehash82 safe to use?

Cubehash82 is in the unverified tier. Source found and wired, correctness not fully proven. Root API only. It is only reachable through the root API (NextSSL(root=True) in Python, nextssl_root_* in C).