Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameter width is inconsistent #9

Open
0xKarl98 opened this issue Feb 25, 2024 · 6 comments
Open

Parameter width is inconsistent #9

0xKarl98 opened this issue Feb 25, 2024 · 6 comments

Comments

@0xKarl98
Copy link
Collaborator

Inconsistency
summa uses broken merkle summation tree at arity of 2 .

image

According to poseidon paper, the relation between width and arity under merkle tree instance should be : width = arity + 1 .

Thus in this case , the width should be 2+1 = 3 .
image

Furthur more , inside the hackmd file , the width t being used is 5.

Mitigation
Consider to make the width parameter all be 3 .

@flyingnobita
Copy link
Collaborator

@0xKarl98
Copy link
Collaborator Author

Yeah in the actual implementation , the width is of 2 , but in this doc , saying the width is 5

and i think the width should be 3 , which is the arity + 1 , denoted by poseidon paper

@igorline
Copy link
Collaborator

@0xKarl98 why should it be 3?

@0xKarl98
Copy link
Collaborator Author

Because in summa's mst , the arity of it is 2 , meaning the number of children each node has is at most 2

according to poseidon paper , under poseidon-128 , when arity is 2 , the width = arity + 1 = 3

Also , if you check poseidon paper at sector 4.1 , it says :

We focus on two possible widths, namely t = 3 and t = 5, as they correspond to popular cases of 2-to-1 and 4-to-1 compression functions. In the Merkle tree case, this corresponds to trees of arity 2
and 4, respectively .

@igorline
Copy link
Collaborator

I am not sure arity of the tree is related to the algorithm of the hash function

@obatirou
Copy link
Collaborator

obatirou commented Mar 4, 2024

Here are my notes about the Poseidon parameters for Summa: https://hackmd.io/@obatirou/r1r0M7sha (you need to be signed-in to access it). From my understanding, I do not think this is an issue. They changed it following benchmark for better verification time and the rate should not influence the security of the hash. A few things need to be confirmed but adding explanation / justification to the documentation would be great from Summa. Let me know your thoughts on this.

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

No branches or pull requests

4 participants