---
title: "SequenceHash: multihashing for the rest of us"
description: "SequenceHash and SequenceMAC are hash-agnostic constructions for securely hashing multiple values together, an alternative to NIST's Keccak-only TupleHash that works with SHA-2, BLAKE, RIPEMD and other hashes."
url: "https://swe.quest/articles/sequencehash-multihashing-for-the-rest-of-us-1db642be699fecf4"
canonical: "https://blog.trailofbits.com/2026/10/02/sequencehash-multihashing-for-the-rest-of-us/"
source: "Trail of Bits"
published: "2026-10-02"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 13
tags: ["cryptography","open-source"]
---

# SequenceHash: multihashing for the rest of us

A post on [Trail of Bits](https://swe.quest/sources/trail-of-bits.md), published 2026-10-02, 13 min read, Announcement. Original: [https://blog.trailofbits.com/2026/10/02/sequencehash-multihashing-for-the-rest-of-us/](https://blog.trailofbits.com/2026/10/02/sequencehash-multihashing-for-the-rest-of-us/)

## Summary

SequenceHash and SequenceMAC are hash-agnostic constructions for securely hashing multiple values together, an alternative to NIST's Keccak-only TupleHash that works with SHA-2, BLAKE, RIPEMD and other hashes. Each input gets a fixed 128-bit byte-length suffix, which makes the encoding unambiguous and allows streaming. An HMAC-like double-hash structure blocks length-extension attacks, and optional customization strings apply only to the outer hash, so the inner hash can be reused across contexts. The keyed SequenceMAC puts key and customizer lengths in a header to avoid HMAC's key pseudocollisions. The C2SP specification ships with Rust, Go and Python implementations and test vectors.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Cryptography](https://swe.quest/tags/cryptography.md) (Security)
- [Open source](https://swe.quest/tags/open-source.md) (Engineering practices)

## Prerequisites

- cryptographic hash functions
- HMAC
- length extension attacks

## Keywords

SequenceHash, SequenceMAC, TupleHash, C2SP, HMAC, Fiat-Shamir, SHA-256, Keccak

## Related posts

- [Open sourcing Winterfell: A STARK prover and verifier](https://swe.quest/articles/open-sourcing-winterfell-a-stark-prover-and-verifier-ba01891a98a63a0e.md): Meta Engineering · 2021-08-04 · Easy · 6 min read · Cryptography, Rust, Open source, Privacy
  Winterfell is a general-purpose STARK prover and verifier written in Rust and published as v0.1 on crates.io, aimed at making computational-integrity and zero-knowledge proofs usable without deep cryptographic expertise.
- [ClickHouse Newsletter January 2023: Better Safe Than Sorry](https://swe.quest/articles/clickhouse-newsletter-january-2023-better-safe-than-sorry-86f3c43fcf5ac992.md): ClickHouse · 2023-01-19 · Medium · 6 min read · Analytics & OLAP, Databases, Cryptography, SQL
  ClickHouse's January 2023 newsletter lists upcoming webinars and recaps the 22.12 release.
- [Common annotated security keys](https://swe.quest/articles/common-annotated-security-keys-5586739c75da0c4f.md): Engineering@Microsoft · 2024-09-25 · Easy · 3 min read · Security, Supply chain security, Static analysis
  Microsoft's Common Annotated Security Standard (CASK) extends GitHub's identifiable-token approach of fixed signatures plus checksums, so leaked secrets can be detected with near-zero false positives.
- [Signal Protocol and Post-Quantum Ratchets](https://swe.quest/articles/signal-protocol-and-post-quantum-ratchets-12284f0594462a50.md): Signal · 2025-10-02 · Hard · 26 min read · Cryptography, Communications
  Signal adds the Sparse Post Quantum Ratchet (SPQR), a continuously advancing ML-KEM-based ratchet whose output is mixed with the existing Double Ratchet to form a "Triple Ratchet".
- [More Than 2x Faster Hashing in ClickHouse Using Rust](https://swe.quest/articles/more-than-2x-faster-hashing-in-clickhouse-using-rust-404bde5cc500d24b.md): ClickHouse · 2022-10-25 · Medium · 5 min read · Rust, C & C++, Build systems, Performance engineering, Cryptography
  ClickHouse added optional Rust library support to its C++/CMake build using Corrosion-rs, with BLAKE3 as the first library, exposed to C++ through a Rust shim function using C-compatible FFI types and a header file.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
