TupleHash128 is a tuple hashing function defined in NIST SP 800-185 that encodes sequences of strings with domain separation, ensuring hash([a,b]) != hash([ab]) to prevent attacks on structured data.
Specifications
Output SizeVariable
StandardNIST SP 800-185
Standard Year2016
Origin Keccak submission to NIST SHA-3 competition
Origin Year 2008
Use Cases
—Structured data integrity verification
—Certificate chain hashing
—Database record authentication
—Serialization format integrity
—Protocol message authentication
Frequently Asked Questions
TupleHash encodes sequences (tuples) of strings ensuring hash([a,b]) != hash([ab]). This prevents ambiguity attacks where concatenating different inputs could produce the same hash. It's essential for structured data authentication.
Use TupleHash when hashing structured data where field boundaries matter—like database records, certificate fields, or protocol messages. Regular hashing of concatenated strings can be ambiguous; TupleHash preserves structure.
TupleHash uses domain separation between tuple elements, encoding the length of each element. This ensures that [a,b] and [ab] produce completely different outputs, preventing attackers from manipulating structured data by merging fields.