这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@Lazar955
Copy link
Member

@Lazar955 Lazar955 commented Oct 13, 2025

V4-CORE-004

Copilot AI review requested due to automatic review settings October 13, 2025 08:22
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds validation checks for private key bytes before converting them to secp256k1 private keys. The validation ensures that private key bytes are within the valid curve order and are not zero.

  • Adds overflow validation to check that private key bytes don't exceed secp256k1 curve order
  • Adds zero validation to prevent private keys with zero value
  • Includes descriptive comments explaining the validation purpose

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
keyring/keyringcontroller.go Adds private key validation in CreateChainKey method before btcec.PrivKeyFromBytes call
eotsmanager/localmanager.go Adds identical private key validation in getKeyFromKeyring method before btcec.PrivKeyFromBytes call

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Lazar955 Lazar955 merged commit 43239a9 into main Oct 15, 2025
18 checks passed
@Lazar955 Lazar955 deleted the lazar/check-priv-key-from-bytes branch October 15, 2025 09:29
mergify bot pushed a commit that referenced this pull request Oct 15, 2025
_V4-CORE-004_

(cherry picked from commit 43239a9)
Lazar955 added a commit that referenced this pull request Oct 15, 2025
_V4-CORE-004_<hr>This is an automatic backport of pull request #725 done
by [Mergify](https://mergify.com).

Co-authored-by: Lazar <12626340+Lazar955@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants