Changes between Initial Version and Version 1 of TaggedHash


Ignore:
Timestamp:
2007-04-26T22:43:35Z (17 years ago)
Author:
warner
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TaggedHash

    v1 v1  
     1Each place a hash function is used within Tahoe, the data to be hashed is first prepended with a distinct "tag", one per purpose.
     2
     3These tags are encoded as a NetString, to insure that they cannot be confused with the data being hashed. For example, the VerifierId is computed as the SHA-256 hash of the following string:
     4{{{
     5    "23:allmydata_verifierid_v1," + DATA
     6}}}
     7
     8This technique is especially important to distinguish the leaf nodes from the internal nodes in a MerkleHashTree, because otherwise an attacker can trivially construct leaf data that results in the same root hash as a previously constructed tree.