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

rangeproof: add unit test for malleating single-value proofs #295

Merged

Conversation

apoelstra
Copy link
Contributor

I was a bit confused reading secp256k1_rangeproof_getheader_impl because in the case of single-value proofs (has_nz_range == 0) some bits of the header are unconstrained. At first I thought this was a malleability vector. And I think I've had this same confusion in the past.

But in fact it is not a malleability vector because the whole header gets hashed into the proof.

Add a unit test to confirm this to reduce future confusion.

I was a bit confused reading `secp256k1_rangeproof_getheader_impl`
because in the case of single-value proofs (`has_nz_range == 0`) some
bits of the header are unconstrained. At first I thought this was a
malleability vector. And I think I've had this same confusion in the
past.

But in fact it is not a malleability vector because the whole header
gets hashed into the proof.

Add a unit test to confirm this to reduce future confusion.
Copy link
Collaborator

@real-or-random real-or-random left a comment

Choose a reason for hiding this comment

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

utACK 3a1c396

@apoelstra apoelstra merged commit 6152622 into BlockstreamResearch:master Jun 20, 2024
107 checks passed
@apoelstra apoelstra deleted the 2024-06--single-val-mall branch June 20, 2024 13:19
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

Successfully merging this pull request may close these issues.

2 participants