-
Notifications
You must be signed in to change notification settings - Fork 318
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
CIP5 - Common Bech32 Prefixes #6
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I understand it, bech32 has a quite low limit on its maximum size (90 bytes encoded right?), so it will be unsuitable for any of the larger things, such as most of the certificates. Indeed wouldn't it be unsuitable for extended keys too?
CIP5/README.md
Outdated
| `ed25519_pub` | An Ed25519 public key | | ||
| `ed25519_prv` | An Ed25519 private key | | ||
| `ed25519_xpub` | An Ed25519 extended public key | | ||
| `ed25519_xprv` | An Ed25519 extended private key | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These ones do not need to be short, since they are not addresses. I think it is very useful for these keys to include a key "role", or key "type", which is not about the cryptography, but about the purpose of the key. This is to detect and prevent accidentally using a key made for one thing for another. For example to avoid using a stake key as a payment key, or a pool key as a payment key etc etc. We do this in the cardano-cli
now and it has saved us from operator error many many times already.
I'll add a full list here later.
You may want to mention https://github.com/satoshilabs/slips/blob/master/slip-0173.md |
@dcoutts this is partially correct. Bech32 embedded error-detection works very well for chain smaller than 90 characters, but it is said to work reasonably well up to 1024 characters. Above 89 characters, the probability of detecting errors becomes a bit smaller, yet remains okay. |
I would prefer smaller HRPs like in the SLIP-173 @SebastienGllmt mentioned also, the "addr" common prefix is too general for the users especially when there would be native multi-asset tokens available for Cardano very soon. Other reason is having less complex QR codes for the native currency and tokens. Also, we need to distinguish between the wallet- and the chain addresses (serialised keys, hash scripts etc on chain as an example). The wallet addresses are just for humans i.e. wallet users etc. for giving some meaning to or just wrap these chain-addresses. Anyway, see detailed QR examples for different character sets used with bech32 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine to move into draft status. More comments can still be incorporated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good to go as Draft
Minimum changes to generalize description and explains how to use it in any voting system (not just catalyst). Small fixes, typos.
draft proposal for CIP-5