Hash Pointers and Data Structures
Hash Pointers and Data Structures
An attacker wants to tamper with one block of the chain, let’s say, block 1.
The attacker changed the content of block 1, because of “collision free”
property of the hash function, he is not able to find another data which has
the same hash with the old one. So now the hash of this modified block is
also changed.
To avoid others noticing the inconsistency, he also needs to change the
hash pointer of that block in the next block, which is block 2.
Now the content of block 2 is changed, so to make this story consistent,
the hash pointer in block3 must be changed.
Finally, the attacker goes to the hash pointer to the last block of the
blockchain, which is a roadblock for him, because we keep and remember
that hash pointer.
Conclusion on Tamper evident log
• If the adversary wants to tamper with data anywhere
in this entire chain, in order to keep the story
consistent he's going to have to tamper with hash
pointers all the way back to the beginning. And he's
ultimately going to run into a road block, because he
wont be able to tamper with the head of the list.
• So we can build a block chain like this containing as
many blocks as we want, going back to some special
block at the beginning of the list which we might call
the genesis block. And that's a tamper evidence log
built out of the block chamber.
Merkle tree
• Another useful hash pointer data structure is the Markle tree.
• A Markle tree is a data structure used for efficiently verifying the
integrity of large sets of data.
• Binary tree with hash pointers!
H( ) H( )
H( ) H( ) H( ) H( )
H( ) H( ) H( ) H( ) H( ) H( ) H( ) H( )