Skip to content

Go 1.26 support - #44

Open
tarakby wants to merge 12 commits into
mainfrom
tarak/go1.26-cgo-only
Open

Go 1.26 support#44
tarakby wants to merge 12 commits into
mainfrom
tarak/go1.26-cgo-only

Conversation

@tarakby

@tarakby tarakby commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

closes #40

  • ECDSA on P-256 is based on Go crypto standard lib implements (no changes)
  • ECDSA on SECp256k1 is based on go-etehereum/crypto/secp256k1
    • this requires cgo, CGO_ENABLED=1, in the past version SECp256k1 did not use cgo
    • signatures generation is now based on RFC6979. The signatures are therefore deterministic. Moreover they are always normalized with a lower S.
    • verification still accepts both low S and high S versions of the valid signature. Although the underlying go-ethereum verification enforces non-malleability (low S only), signatures in this package are still malleable (no change compared to prior versions).

This PR also removes the non-cgo build mode, which is used to build the library without cgo (CGO_ENABLED=0) while disabling BLS. Now that ECDSA secp256k1 also uses cgo, the non-cgo mode has very limited utility and is discontinued.

@tarakby
tarakby marked this pull request as ready for review August 6, 2026 19:42

@turbolent turbolent left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I reviewed the code from a Go-perspective, but I don't have the expertise to review the crypto changes

Comment thread ecdsa_test.go
Comment thread ecdsa_secp256k1.go Outdated
@turbolent

Copy link
Copy Markdown
Member

Could you please improve the PR title?

Comment thread ecdsa_p256.go Outdated
Comment thread ecdsa_secp256k1.go
Comment thread ecdsa.go Outdated
Comment thread ecdsa.go Outdated
Comment thread ecdsa_secp256k1.go
@tarakby tarakby changed the title Tarak/go1.26 cgo only Go 1.26 support Aug 7, 2026
@tarakby
tarakby requested a review from turbolent August 7, 2026 20:56
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.

update to go1.26

2 participants