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

catch a panic in merkle proof verification #246

Closed
themighty1 opened this issue May 19, 2023 · 2 comments
Closed

catch a panic in merkle proof verification #246

themighty1 opened this issue May 19, 2023 · 2 comments

Comments

@themighty1
Copy link
Member

Currently, there is a panic in winterfell's crypto crate when verifying a Merkle proof, see facebook/winterfell#200
The lib assumes that the prover honestly informs the verifier about the total amount of leaves in the tree as well as the leaf indices being proved.

The same type of assumption and panics are present in other merkle libs:
antouhou/rs-merkle#20
https://github.com/rozbb/ct-merkle/blob/e29d123e1b45b0e652e5ee5e4c288ff3792652e5/src/batch_inclusion.rs#L404

Until this issue is fixed upstream, we should wrap the verification in panic::catch_unwind.

@antouhou
Copy link

Hi! I'm the author of the rs_merkle library used by this project. The issue has been fixed in the rs_merkle 1.4.1. Please update it in your dependencies! Thank you!

heeckhau added a commit to heeckhau/tlsn that referenced this issue May 26, 2023
@sinui0
Copy link
Member

sinui0 commented May 26, 2023

Thank you @antouhou !

heeckhau added a commit to heeckhau/tlsn that referenced this issue May 26, 2023
@heeckhau heeckhau closed this as completed Jun 7, 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

No branches or pull requests

4 participants