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

crypto/secp256k1: fix undefined behavior in BitCurve.Add #22621

Merged
merged 7 commits into from
May 27, 2021

Commits on Apr 6, 2021

  1. crypto/secp256k1: fixed BitCurve.Add()

    This commit fixes the behavior of (BitCurve).Add() to be more inline
    with btcd. It changes two different bugs that occured.
    
    1) When adding a point at infinity to another point, the other point
    should be returned. While this is undefined behavior, it is better
    to be more inline with the go standard library.
    Thus (0,0) + (a, b) = (a,b)
    
    2) Adding the same point to itself produced the point at infinity.
    This is incorrect, now doubleJacobian is used to correctly calculate it.
    This is also similar to the go standard library.
    Thus (a,b) + (a,b) == 2* (a,b) and not (0,0) anymore.
    MariusVanDerWijden committed Apr 6, 2021
    Configuration menu
    Copy the full SHA
    2a0277a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f6ef3e3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2c95e9e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    faa5794 View commit details
    Browse the repository at this point in the history

Commits on Apr 9, 2021

  1. Configuration menu
    Copy the full SHA
    9670eae View commit details
    Browse the repository at this point in the history

Commits on Apr 13, 2021

  1. Configuration menu
    Copy the full SHA
    fd655f4 View commit details
    Browse the repository at this point in the history

Commits on May 27, 2021

  1. Configuration menu
    Copy the full SHA
    be8743d View commit details
    Browse the repository at this point in the history