Skip to content

Derive seed for MurmurHash64A automatically#6

Merged
zao merged 1 commit into
masterfrom
pr/find-hash-seed
Jul 27, 2023
Merged

Derive seed for MurmurHash64A automatically#6
zao merged 1 commit into
masterfrom
pr/find-hash-seed

Conversation

@zao

@zao zao commented Jul 27, 2023

Copy link
Copy Markdown
Owner

Given the hash of the empty string for the root directory entry we can deterministically derive the seed used for MurmurHash64A.

Mathematically, this is possible due to how all three steps (xor, mul, xor) of hashing an empty string with this algorithm are invertible.

As we don't know what algorithm could be used in the future the code has a safeguard in that it validates the computed seed against the hash of the next non-empty directory path rep.

Given the hash of the empty string for the root directory entry we can
deterministically derive the seed used for MurmurHash64A.

Mathematically, this is possible due to how all three steps (xor, mul,
xor) of hashing an empty string with this algorithm are invertible.

As we don't know what algorithm could be used in the future the code
has a safeguard in that it validates the computed seed against the hash
of the next non-empty directory path rep.
@zao zao merged commit 6307b38 into master Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant