-
Notifications
You must be signed in to change notification settings - Fork 313
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
Fix: typo in public_key_cryptography.md #4083
Conversation
📝 WalkthroughWalkthroughThe pull request modifies the documentation regarding Secp256k1 public keys in the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
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.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (1)
specs/src/public_key_cryptography.md (1)
17-17
: LGTM! The correction to 256-bits is accurate.The change improves technical accuracy as Secp256k1 public keys use a 256-bit field. When compressed, they are stored in 33 bytes total: 1 byte prefix for the y-coordinate parity and 32 bytes (256 bits) for the x-coordinate.
Consider adding a brief note about the compression format:
-Secp256k1 public keys can be compressed to 256-bits (or 33 bytes) per the format described [here](https://github.com/cosmos/cosmos-sdk/blob/v0.46.15/docs/basics/accounts.md#public-keys). +Secp256k1 public keys can be compressed to 256-bits (or 33 bytes, consisting of a 1-byte prefix and 32-byte x-coordinate) per the format described [here](https://github.com/cosmos/cosmos-sdk/blob/v0.46.15/docs/basics/accounts.md#public-keys).
@@ -14,7 +14,7 @@ A highly-optimized library is available in C (<https://github.com/bitcoin-core/s | |||
|
|||
### Public-keys | |||
|
|||
Secp256k1 public keys can be compressed to 257-bits (or 33 bytes) per the format described [here](https://github.com/cosmos/cosmos-sdk/blob/v0.46.15/docs/basics/accounts.md#public-keys). | |||
Secp256k1 public keys can be compressed to 256-bits (or 33 bytes) per the format described [here](https://github.com/cosmos/cosmos-sdk/blob/v0.46.15/docs/basics/accounts.md#public-keys). |
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.
A compressed Secp256k1 public key is 256 bits for the x coordinate and 1 bit to determine if the y coordinate is even or odd. 256 + 1 = 257 which is 33 bytes.
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.
Sorry
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.
no worries
This PR fixes a typo in the
public_key_cryptography.md
file. Specifically, the incorrect value "257-bits" has been corrected to "256-bits" for Secp256k1 public key compression size.