BIP352: align reference address decoding with silent payment rules - #2288
Open
ginavalent wants to merge 1 commit into
Open
ginavalent wants to merge 1 commit into
ginavalent wants to merge 1 commit into
Conversation
Signed-off-by: ginavalent <ginavalent@outlook.com>
murchandamus
left a comment
Member
There was a problem hiding this comment.
Thanks. @theStack, this seems to fix a discrepancy between the specification and the reference implementation. Do you want it?
Contributor
|
Concept ACK |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BIP 352 specifies that silent payment addresses use Bech32m encoding and defines forward-compatible address decoding rules for versions 0 through 30.
The BIP352 reference implementation currently uses the generic SegWit decoder without checking the encoding type, which allows a Bech32 checksum for a silent payment address. It also rejects versions above 16 and passes the complete payload to the spend key parser instead of discarding extension data for future versions.
Update the BIP352-specific decoder to: