Specify encoding of secp256k1 public keys
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 1.8k
- Forks
- 320
- Avg merge
- 11d 15h
- Merged PRs (30d)
- 1
Description
The peer id / key spec currently says we use the "Standard bitcoin encoding" for secp256k1 keys, but there are a few different potentially valid encodings for public keys.
The one we actually use is the compressed form, which only stores the X coordinate and a flag for the sign and uses 33 bytes. There are apparently two different 65-byte encodings as well, looking at the btcd code.
Anyway, we should specify the encoding we're using. It's probably worth just spelling it out, rather than trying to link to an external spec.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the peer id / key specification and locate the statement about the "Standard bitcoin encoding" for secp256k1 public keys. Update it to explicitly describe the compressed 33-byte encoding, including the X coordinate and sign flag, and confirm the wording distinguishes it from the 65-byte alternatives mentioned in the btcd reference.
Written by the indexing model from the issue text.
Assessment
- Domain
- cryptography
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100