ssz.zig icon indicating copy to clipboard operation
ssz.zig copied to clipboard

add tweakable merkle tree and path

Open bhaskar1001101 opened this issue 7 months ago • 3 comments

hash size is not fixed to 32 and depends on the tweakable hash.

merkleizeWithTweak needs to return the entire merkle tree for the secret key. it allocates memory but might go against the design of the library? (mentioned in #17)

it is also generic over TweakHash instead of hasher as the zig-poseidon api is very different.

tests will have to be added in the hash-sigz lib as tweakable hash function is not available here directly.

bhaskar1001101 avatar Apr 30 '25 15:04 bhaskar1001101

add test cases

g11tech avatar Apr 30 '25 16:04 g11tech

adding test cases here will lead to a circular dependency as the tests will need a ShaTweakHash from the hash-sigz lib. should be better to keep the test at https://github.com/blockblaz/hash-sigz/blob/sha-winternitz/src/tweak/tree.zig?

bhaskar1001101 avatar Apr 30 '25 21:04 bhaskar1001101

added test cases and abstracted away the tweakhash to https://github.com/bhaskar1001101/tweak-hash @g11tech

bhaskar1001101 avatar May 06 '25 09:05 bhaskar1001101