Hash functions

Sarmal256

A HAIFA-based hash submitted to the first round of the SHA-3 competition

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 Sarmal256

Sarmal256 is a cryptographic hash function from the Sarmal family. It produces a 32-byte (256-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

Sarmal is a hash function submitted to the first round of the NIST SHA-3 competition by a team from Turkey. It uses the HAIFA iteration mode with a salt and counter and did not advance beyond the first round.

Like BLAKE and SHAvite-3, Sarmal follows the HAIFA iteration mode, in which every call to the compression function receives a salt and a counter of message bits hashed so far alongside the chaining value and message block. This defeats several generic attacks on plain Merkle–Damgård chains, such as fixed-point-based second preimages, and allows randomised hashing through the salt.

NextSSL includes Sarmal-256 and Sarmal-512 entries wired from benchmarking sources. Sarmal was one of several first-round candidates eliminated after early cryptanalysis showed weaknesses in its compression function. Its outputs are provided for completeness of the SHA-3 archive. Because the tier is unverified, outputs should be checked against independent reference values before they are relied on for anything beyond experimentation.

History

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

    NIST SHA-3 competition
  2. Sarmal published by Kerem Varıcı, Onur Özen, Çelebi Kocair

  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

Collision attacks on Sarmal were reported during the first round. These entries are unverified and must not be used for security.

Typical uses

SHA-3 competition researchBenchmark reproduction

Sizes

FieldBytesMeaning
out32Output

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", "sarmal256", 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 Sarmal256?

Sarmal256 is a hash in the Sarmal family. Sarmal is a hash function submitted to the first round of the NIST SHA-3 competition by a team from Turkey.

What are the Sarmal256 sizes?

In NextSSL, Sarmal256 uses: output 32 bytes.

Who designed Sarmal256 and when?

Sarmal256 belongs to the Sarmal family, first published in 2008 by Kerem Varıcı, Onur Özen, Çelebi Kocair. Its origin: NIST SHA-3 competition (round 1).

Is Sarmal256 safe to use?

Sarmal256 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).