Skip to content

Update bitcoin-core/secp256k1 to v0.8.0 - #12

Merged
yperbasis merged 1 commit into
mainfrom
update-libsecp256k1-v0.8.0
Aug 14, 2026
Merged

yperbasis merged 1 commit into
mainfrom
update-libsecp256k1-v0.8.0

Conversation

@yperbasis

Copy link
Copy Markdown
Member

Swaps the bundled libsecp256k1/ subtree from upstream v0.7.1 to v0.8.0 and records the next wrapper release mapping as v1.4.0.

The previous subtree was byte-identical to upstream v0.7.1. The replacement tree hash (ad8f91b605a0bc4ad4df97059c4131792abca5ed) exactly matches the upstream v0.8.0 tag; fork-local wrapper code remains unchanged.

Why it is safe for this wrapper

  • v0.8.0 removes the deprecated secp256k1_context_no_precomp pointer and secp256k1_schnorrsig_sign alias. The wrapper uses neither.
  • All internal symbols used by secp256k1_ext_scalar_mul remain available.
  • The upstream changelog states that the remaining ABI is backward-compatible with v0.7.0 and v0.7.1.
  • The wrapper compiles libsecp256k1 directly through cgo, and its build and tests pass against the new subtree.

Upstream highlights

  • Adds the Silent Payments module implementing BIP 352.
  • Adds a callback for overriding the internal SHA-256 compression function.
  • Rejects out-of-range EllSwift secret keys as documented.
  • Force-inlines 5x52 field multiplication and squaring in optimized builds.

See the upstream v0.8.0 changelog.

Verification

  • git diff --check
  • gofmt -l . (excluding the vendored subtree)
  • go vet ./...
  • go build ./...
  • go test -count=1 ./...
  • go test -race -count=1 ./...

Replace the vendored libsecp256k1 v0.7.1 subtree with the exact upstream v0.8.0 release and document the v1.4.0 wrapper mapping.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates the bundled libsecp256k1 from v0.7.1 to upstream v0.8.0 and records wrapper release v1.4.0.

Changes:

  • Imports upstream cryptographic, build, test, and Silent Payments updates.
  • Adds configurable SHA-256 compression support and removes deprecated APIs unused by the wrapper.
  • Updates wrapper-to-library version documentation.

Reviewed changes

Copilot reviewed 79 out of 82 changed files in this pull request and generated no comments.

Show a summary per file
File Description
README.md Records v1.4.0 mapping.
libsecp256k1/tools/tests_silentpayments_generate.py Generates Silent Payments vectors.
libsecp256k1/src/util.h Updates compiler utilities.
libsecp256k1/src/unit_test.h Uses shared array sizing.
libsecp256k1/src/unit_test.c Improves warning diagnostics.
libsecp256k1/src/testutil.h Adds SHA-256 test probe.
libsecp256k1/src/tests_exhaustive.c Extends exhaustive tests.
libsecp256k1/src/testrand.h Removes obsolete finalizer.
libsecp256k1/src/testrand_impl.h Uses hash contexts.
libsecp256k1/src/selftest.h Tests compression callbacks.
libsecp256k1/src/secp256k1.c Integrates hash contexts and module.
libsecp256k1/src/scalar.h Corrects scalar contracts.
libsecp256k1/src/scalar_low_impl.h Strengthens bounds checks.
libsecp256k1/src/scalar_8x32_impl.h Strengthens bounds checks.
libsecp256k1/src/scalar_4x64_impl.h Corrects bit extraction.
libsecp256k1/src/precompute_ecmult.c Uses size-safe indexing.
libsecp256k1/src/precompute_ecmult_gen.c Uses array-size helper.
libsecp256k1/src/modules/silentpayments/Makefile.am.include Registers module headers.
libsecp256k1/src/modules/silentpayments/bench_impl.h Adds scanning benchmarks.
libsecp256k1/src/modules/schnorrsig/tests_impl.h Tests hash overrides.
libsecp256k1/src/modules/schnorrsig/tests_exhaustive_impl.h Updates hash-context calls.
libsecp256k1/src/modules/schnorrsig/main_impl.h Integrates context-aware hashing.
libsecp256k1/src/modules/schnorrsig/bench_impl.h Cleans allocations.
libsecp256k1/src/modules/musig/tests_impl.h Updates MuSig tests.
libsecp256k1/src/modules/musig/session_impl.h Integrates context-aware hashing.
libsecp256k1/src/modules/musig/keyagg.h Extends internal hash interface.
libsecp256k1/src/modules/musig/keyagg_impl.h Updates key aggregation hashing.
libsecp256k1/src/modules/extrakeys/main_impl.h Adds x-only verification.
libsecp256k1/src/modules/ellswift/tests_impl.h Adds scalar and hash tests.
libsecp256k1/src/modules/ellswift/main_impl.h Rejects invalid secret keys.
libsecp256k1/src/modules/ecdh/tests_impl.h Tests context hashing.
libsecp256k1/src/modules/ecdh/tests_exhaustive_impl.h Adds exhaustive ECDH tests.
libsecp256k1/src/modules/ecdh/Makefile.am.include Registers exhaustive tests.
libsecp256k1/src/modules/ecdh/main_impl.h Integrates context hashing.
libsecp256k1/src/hash.h Defines hash context interfaces.
libsecp256k1/src/field.h Corrects field contract.
libsecp256k1/src/field_impl.h Aligns magnitude checks.
libsecp256k1/src/field_5x52_int128_impl.h Force-inlines field operations.
libsecp256k1/src/field_5x52_impl.h Optimizes field serialization.
libsecp256k1/src/field_10x26_impl.h Optimizes field serialization.
libsecp256k1/src/ecmult.h Improves size and API contracts.
libsecp256k1/src/ecmult_impl.h Uses size-safe indexing.
libsecp256k1/src/ecmult_gen.h Splits multiplication interfaces.
libsecp256k1/src/ecmult_gen_impl.h Updates blinding and cleanup.
libsecp256k1/src/ecmult_compute_table_impl.h Uses size-safe indexing.
libsecp256k1/src/eckey_impl.h Optimizes scalar-zero handling.
libsecp256k1/src/ecdsa_impl.h Updates generator multiplication.
libsecp256k1/src/ctime_tests.c Covers Silent Payments timing.
libsecp256k1/src/CMakeLists.txt Updates modules and test discovery.
libsecp256k1/src/checkmem.h Handles newer GCC warnings.
libsecp256k1/src/bench.h Widens benchmark output.
libsecp256k1/src/bench.c Adds Silent Payments benchmarks.
libsecp256k1/src/bench_internal.c Updates hash benchmarks.
libsecp256k1/src/bench_ecmult.c Updates multiplication benchmarks.
libsecp256k1/SECURITY.md Updates security contacts.
libsecp256k1/README.md Documents v0.8.0 features.
libsecp256k1/Makefile.am Integrates new module assets.
libsecp256k1/include/secp256k1.h Adds SHA-256 callback API.
libsecp256k1/include/secp256k1_schnorrsig.h Removes deprecated alias.
libsecp256k1/include/secp256k1_recovery.h Corrects API documentation.
libsecp256k1/examples/CMakeLists.txt Registers Silent Payments example.
libsecp256k1/doc/release-process.md Revises release procedures.
libsecp256k1/configure.ac Updates version and module configuration.
libsecp256k1/CMakeLists.txt Updates version and build options.
libsecp256k1/cmake/SetLibtoolAbiVersion.cmake Adds ABI-version handling.
libsecp256k1/cmake/DiscoverTests.cmake Adds CMake test discovery.
libsecp256k1/ci/linux-debian.Dockerfile Updates GCC snapshot.
libsecp256k1/ci/ci.sh Configures Silent Payments CI.
libsecp256k1/CHANGELOG.md Adds v0.8.0 notes.
libsecp256k1/autotools-aux/m4/bitcoin_secp.m4 Relocates Autotools macros.
libsecp256k1/.gitignore Updates generated-file exclusions.
libsecp256k1/.github/workflows/ci.yml Expands and updates CI.
libsecp256k1/.github/actions/run-in-docker-action/action.yml Updates Docker action behavior.
libsecp256k1/.github/actions/install-homebrew-valgrind/action.yml Updates Valgrind installation.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@yperbasis
yperbasis marked this pull request as ready for review August 14, 2026 11:48
@yperbasis
yperbasis merged commit 6bbe6f9 into main Aug 14, 2026
4 checks passed
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.

3 participants