Enhancement to support configurable hashing algorithms - #53
Open
jimthematrix wants to merge 9 commits into
Open
Conversation
Signed-off-by: Jim Zhang <jim.zhang@kaleido.io>
Signed-off-by: Jim Zhang <jim.zhang@kaleido.io>
Signed-off-by: Jim Zhang <jim.zhang@kaleido.io>
Signed-off-by: Jim Zhang <jim.zhang@kaleido.io>
Signed-off-by: Jim Zhang <jim.zhang@kaleido.io>
Signed-off-by: Jim Zhang <jim.zhang@kaleido.io>
Use keccak256 as hashing algorithm
This was referenced Dec 8, 2025
Signed-off-by: Jim Zhang <jim.zhang@kaleido.io>
Remove the hash algo param from the MerkleTree constructor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is useful in situations when the SMT construct is used without needing ZKPs, for instance when used by the notary based privacy token implementation in LFDT's Paladin project.
The goal is first of all making the current Poseidon hash the default, such that existing clients using the npm module does not need to change the source code at all after the dependency upgrade.
To use an alternative hashing algo, pass in the optional parameter when constructing the merkle tree storage object:
or when verifying the proof:
As of this PR, only keccak256 is added as the new hashing algorithm.
The unit tests are cross-checked with unit tests in this PR: iden3/contracts#402