Hash domain separation
Hash domain separation encodes an input's role or context so distinct uses of a hash function do not share the same input representation.
RFC 9162 distinguishes Merkle leaves and internal nodes with different initial bytes. This prevents a leaf from reusing the exact input encoding of a parent node. [1]
Hesela's two-entry example demonstrates the untagged ambiguity without finding a SHA-256 collision. It also checks the independently trusted entry count; this is an educational construction, not a CT or storage-product exploit. [2]
A shared role label does not separate variable-length fields inside one input. In Hesela's HMAC example, two distinct numeric pairs have the same concatenated bytes; an ordered tuple preserves their boundaries. Role separation and field framing solve different ambiguities. [3]
Relations
- related
- Merkle tree, Cryptographic hash function, Hash collision, HMAC, Message authentication code (MAC), Oblivious pseudorandom function
Limitations
- Role separation does not authenticate the root or establish freshness; serialization and the rest of the verification protocol still matter. [1]