Open tcharding opened 10 months ago
So for segwit I believe we have it correct (assuming #142 merges) - 90 characters for the whole string as per BIP-173.
For lib.rs
we use 1023, I thought this was based on what can be error detected so should it not include everything that goes into the checksum algorithm? If so this actually means 1023 is not correct because each character of the HRP feeds in two field elements to the checksum algo (high then low bits), right?
If so this actually means 1023 is not correct because each character of the HRP feeds in two field elements to the checksum algo (high then low bits), right?
Yep, exactly.
My view is that the HRP should count for nothing, because if the HRP is wrong then you don't even know what checksum you're supposed to be using. But if we do count it, then we should be double-counting it.
Yep, exactly.
Do I get my white belt yellow tip in cryptography now?
ref: https://github.com/rust-bitcoin/rust-bech32/pull/142#issuecomment-1781113334