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

Why not bech32m for nip19? #102

Closed
stl1988 opened this issue Dec 20, 2022 · 4 comments
Closed

Why not bech32m for nip19? #102

stl1988 opened this issue Dec 20, 2022 · 4 comments

Comments

@stl1988
Copy link
Contributor

stl1988 commented Dec 20, 2022

The old bech32 as specified in BIP-0173 has a serious checksum flaw, so I can't understand the decision to explicitly not use bech32m (BIP-0350).

@jb55
Copy link
Contributor

jb55 commented Dec 20, 2022

damus implemented bech32 originally and breaking everything didn't seem worth it. I don't think the "serious checksum flaw" is as serious as having two different npub formats for the same pubkey.

@stl1988
Copy link
Contributor Author

stl1988 commented Dec 20, 2022

I was wrong with the checksum error. It's a insertion/deletion weakness. sipa/bech32#51
If the last char in a bech32 string is a 'p', you can add multiple 'q's without making the checksum invalid. That was fixed with bech32m.

@fiatjaf
Copy link
Member

fiatjaf commented Dec 20, 2022

It isn't worth changing. Lightning is using bech32 for invoices and no one seems to care too.

@fiatjaf fiatjaf closed this as completed Dec 20, 2022
@melvincarvalho
Copy link

Why dont we just start ingoring the checksum. bech32 checksums are really hard to implement e.g. for IoT. hex pubkey is always canonical, anyway. is the checksum actually ever used anywhere? do people type in their npubs key by key, no. is it used in qr codes or something?

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