Skip to content
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(deps): update dependency @noble/secp256k1 to v2 #53

Merged
merged 1 commit into from
Dec 16, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jul 30, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@noble/secp256k1 (source) ^1.7.1 -> ^2.0.0 age adoption passing confidence

Release Notes

paulmillr/noble-secp256k1 (@​noble/secp256k1)

v2.1.0

Compare Source

This release comes one year after v2.0.0, following rare update schedule for easy auditability.

  • Point.fromAffine: convert ZERO points properly
  • au8: improve Uint8Array check to work in extension context
  • Signature: add normalizeS method
  • Signature: addRecoveryBit should return more precise type, SignatureWithRecovery
  • randomPrivateKey: fetch 48 bytes from CSPRNG instead of 40, to reduce bias
New Contributors

Full Changelog: paulmillr/noble-secp256k1@2.0.0...2.1.0

v2.0.0

Compare Source

noble-secp256k1 v2 features improved security and smaller attack surface.
The goal of v2 is to provide minimum possible JS library which is safe and fast.

That means the library was reduced 4x, to just over 400 lines. Library size is now just 4KB gzipped.
In order to achieve the goal, some features were moved to noble-curves, which is
even safer and faster drop-in replacement library with same API.
Switch to curves if you intend to keep using these features:

  • DER encoding: toDERHex, toDERRawBytes, signing / verification of DER sigs
  • Schnorr signatures
  • Using utils.precompute() for non-base point
  • Support for environments which don't support bigint literals
  • Common.js support
  • Support for node.js 18 and older without shim

Other changes for upgrading from @​noble/secp256k1 1.7 to 2.0:

  • getPublicKey
    • now produce 33-byte compressed signatures by default
    • to use old behavior, which produced 65-byte uncompressed keys, set
      argument isCompressed to false: getPublicKey(priv, false)
  • sign
    • is now sync; use signAsync for async version
    • now returns Signature instance with { r, s, recovery } properties
    • canonical option was renamed to lowS
    • recovered option has been removed because recovery bit is always returned now
    • der option has been removed. There are 2 options:
      1. Use compact encoding: fromCompact, toCompactRawBytes, toCompactHex.
        Compact encoding is simply a concatenation of 32-byte r and 32-byte s.
      2. If you must use DER encoding, switch to noble-curves (see above).
  • verify
    • strict option was renamed to lowS
  • getSharedSecret
    • now produce 33-byte compressed signatures by default
    • to use old behavior, which produced 65-byte uncompressed keys, set
      argument isCompressed to false: getSharedSecret(a, b, false)
  • recoverPublicKey(msg, sig, rec) was changed to sig.recoverPublicKey(msg)
  • number type for private keys have been removed: use bigint instead
  • Point (2d xy) has been changed to ProjectivePoint (3d xyz)
  • utils were split into utils (same api as in noble-curves) and
    etc (hmacSha256Sync and others)

Pull request: https://github.com/paulmillr/noble-secp256k1/pull/92

Full Changelog: paulmillr/noble-secp256k1@1.7.1...2.0.0


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Copy link
Contributor

coderabbitai bot commented Jul 30, 2024

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

github-actions bot commented Jul 30, 2024

Deploy preview for hibit-id ready!

✅ Preview
https://hibit-i8qdr7vz1-delandlabs-projects.vercel.app

Built with commit 53a22c4.
This pull request is being automatically deployed with vercel-action

@renovate renovate bot changed the title fix(deps): update dependency @noble/secp256k1 to v2 Update dependency @noble/secp256k1 to v2 Aug 14, 2024
@renovate renovate bot changed the title Update dependency @noble/secp256k1 to v2 fix(deps): update dependency @noble/secp256k1 to v2 Aug 16, 2024
@renovate renovate bot changed the title fix(deps): update dependency @noble/secp256k1 to v2 Update dependency @noble/secp256k1 to v2 Oct 31, 2024
@renovate renovate bot changed the title Update dependency @noble/secp256k1 to v2 fix(deps): update dependency @noble/secp256k1 to v2 Nov 3, 2024
@renovate renovate bot force-pushed the renovate/noble-secp256k1-2.x branch from 5affaff to 53a22c4 Compare December 8, 2024 13:38
@renovate renovate bot force-pushed the renovate/noble-secp256k1-2.x branch from 53a22c4 to f9c732a Compare December 16, 2024 07:01
Copy link

vercel bot commented Dec 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hibit-id ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 16, 2024 7:01am

@witter-deland witter-deland merged commit 2e26ed2 into main Dec 16, 2024
2 checks passed
@witter-deland witter-deland deleted the renovate/noble-secp256k1-2.x branch December 16, 2024 11:06
rustin01 added a commit that referenced this pull request Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant