Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Upper case bech32 not recognized #1266

Closed
FelixWeis opened this issue Jan 6, 2019 · 2 comments · Fixed by #1275
Closed

Upper case bech32 not recognized #1266

FelixWeis opened this issue Jan 6, 2019 · 2 comments · Fixed by #1275
Assignees
Labels
scope: wallet issues with the wallet interface type: bug 🐛 Something isn't working
Milestone

Comments

@FelixWeis
Copy link

According to the bech32 spec, there is no distinction between upper/lower case. some QR codes use a special mode where they only use UPPER case to encode the data more efficiently.

@mrfelton
Copy link
Member

mrfelton commented Jan 7, 2019

@FelixWeis could you give an example of one of these QR codes?

@mrfelton mrfelton added type: bug 🐛 Something isn't working scope: wallet issues with the wallet interface labels Jan 7, 2019
@mrfelton mrfelton added this to the v0.3.3-beta milestone Jan 7, 2019
@mrfelton
Copy link
Member

mrfelton commented Jan 7, 2019

Here is the relevant part of the spec:

https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki#specification

The lowercase form is used when determining a character's value for checksum purposes.

Encoders MUST always output an all lowercase Bech32 string. If an uppercase version of the encoding result is desired, (e.g.- for presentation purposes, or QR code use), then an uppercasing procedure can be performed external to the encoding process.

Decoders MUST NOT accept strings where some characters are uppercase and some are lowercase (such strings are referred to as mixed case strings).

For presentation, lowercase is usually preferable, but inside QR codes uppercase SHOULD be used, as those permit the use of alphanumeric mode, which is 45% more compact than the normal byte mode.

@mrfelton mrfelton self-assigned this Jan 7, 2019
mrfelton added a commit to mrfelton/zap-desktop that referenced this issue Jan 7, 2019
korhaliv pushed a commit to korhaliv/zap-desktop that referenced this issue Jan 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
scope: wallet issues with the wallet interface type: bug 🐛 Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants