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

Merklization audit #157

Merged
merged 3 commits into from
Mar 8, 2024
Merged

Merklization audit #157

merged 3 commits into from
Mar 8, 2024

Conversation

dr-orlovsky
Copy link
Member

No description provided.

@dr-orlovsky dr-orlovsky added *security* Issues affecting safety/security (include undefined behaviours) *consensus* Issues affecting distributed concensus labels Feb 28, 2024
@dr-orlovsky dr-orlovsky added this to the v0.11.0 milestone Feb 28, 2024
@dr-orlovsky dr-orlovsky marked this pull request as draft February 28, 2024 10:15
@dr-orlovsky dr-orlovsky self-assigned this Feb 28, 2024
@dr-orlovsky dr-orlovsky marked this pull request as ready for review March 7, 2024 20:45
@dr-orlovsky dr-orlovsky requested a review from crisdut March 7, 2024 20:46
Copy link
Member

@crisdut crisdut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to be right, but see my comments, please.

_25=25 _26=26 _27=27 _28=28 _29=29 _30=30 _31=31
} -- U5
cofactor is U16
crossSection list len=1..MAX32
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just confirming:

I reread LNPBP-4 because of this change and in fact, we will always have at least one commiment in the MPC. This change reflects the statement above, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correct

} -- U5
entropy is U64
cofactor is U16
messages map len=0..MAX24
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to question above, we dont need at least one message in the merkle tree?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm.. On one side no: we may have a merkle tree made of entropy (and its cross-section still will not be an empty set). However this has low utility, so it could be we can prohibit that...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Giving a second thought: there might be a need to tress with no messages and just an entropy. While it's marginal, even if we require a non-empty message set, people can fake it and still produce trees containing no real messages. Thus, while it is mathematically impossible to have a tree cross-section which is empty, it is mathematically possible to have a tree with no messages, made only of entropy - thus, the difference in these types.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks for explanation.

@dr-orlovsky dr-orlovsky merged commit 7d01bbb into master Mar 8, 2024
18 of 22 checks passed
@dr-orlovsky dr-orlovsky deleted the merklization branch September 4, 2024 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
*consensus* Issues affecting distributed concensus *security* Issues affecting safety/security (include undefined behaviours)
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants