MetaMask / MetaMask/metamask-extension

[Sentry] Error: Invalid private key: The private key must greater than 0 and less than the curve order.

Open
#34,218 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area-sentry external-contributor INVALID-ISSUE-TEMPLATE regression-prod-12.18.3 regression-prod-12.22.0 regression-prod-12.22.1 Sev3-low team-wallet-platform type-bug
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

Sentry Issue: [METAMASK-XN57](https://metamask.sentry.io/issues/6733615200/?referrer=github_integration)

```
Error: Invalid private key: The private key must greater than 0 and less than the curve order.
at new AssertionError (node_modules/@metamask/utils/dist/assert.cjs:54:1)
at getError (node_modules/@metamask/utils/dist/assert.cjs:41:1)
at exports.assert (node_modules/@metamask/utils/dist/assert.cjs:78:1)
at createBip39KeyFromSeed (node_modules/@metamask/key-tree/dist/derivers/bip39.cjs:159:1)
at derivedNode (node_modules/@metamask/key-tree/dist/derivation.cjs:67:1)
...
(14 additional frame(s) were not displayed)
```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Sentry stack trace and inspect the derivation path around @metamask/key-tree's createBip39KeyFromSeed and derivedNode calls. Reproduce the reported invalid-private-key case if possible, then determine the affected extension entry point and add coverage for the observed failure; done means the Sentry error is understood and the regression is handled.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cryptography, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.