BC
← All projectsBitcoin Core

libsecp256k1

High-assurance secp256k1 elliptic-curve library used throughout the Bitcoin ecosystem.

BitcoinCryptographic librariesNormal
Repository coverage

257 commits in the local evidence base

Every captured commit receives deterministic security triage and a separate communication-quality score. Security candidates and broader second-pass signals receive full-patch Ollama analysis.

85security candidates7second-pass queue215AI analyses
28commits · 30 days
53commits · 60 days
152commits · 180 days
206commits · 365 days
Backfill bands
Aug 5 → Feb 682 seen1 candidatesComplete
Feb 6 → Jun 625 seen2 candidatesComplete
Jun 6 → Jul 619 seen1 candidatesComplete
Jul 6 → Aug 548 seen1 candidatesComplete
Commit communication

Does the history explain itself?

Message quality measures whether a commit identifies its scope, purpose, rationale, testing, and supporting references. It does not change the security-severity score.

72/100 average clarity
100Strong · 80–100
89Adequate · 60–79
64Thin · 40–59
4Opaque · 0–39
Read the scoring rubric →
Developer activity

Who is changing the project?

Public Git author strings; identities are not independently verified.

DeveloperCommitsCandidatesAnalyzedHigh riskMessage avg.
merge-script482426193
Sebastian Falbesoner502145068
Hennadii Stepanov51746064
Tim Ruffing22622055
furszy13413087
josibake949066
Lőrinc13313077
kevkevinpal626064
Ferdinando Ametrano522074
John Moffett424069
copilot-swe-agent[bot]323074
Bruno Garcia322090
Analysis record

Published AI watches

Last scanned 55 minutes ago

Informational 21 AI analysisMessage 81 · Strong
BC Bitcoin Corelibsecp256k1 BitcoinCryptographic libraries

Merge bitcoin-core/secp256k1#1980: examples: randomize the context in musig, erase the keypair in schnorr

This change improves two example programs in the secp256k1 cryptographic library. It adds a recommended side-channel protection step to the multi-signature example (musig.c) and ensures the single-signature example (schnorr.c) also wipes a…

Context randomization added to protect against side-channel leakageSecret key material explicitly erased from keypair object after useChanges are confined to example code, not the core library
5959bed6by merge-script+14−12 files
No security note in commit
Low 36 AI analysisMessage 98 · Strong
BC Bitcoin Corelibsecp256k1 BitcoinCryptographic libraries

Merge bitcoin-core/secp256k1#1998: Avoid unsequenced accesses to volatile variables

This change fixes a subtle compiler-warning/undefined-behavior issue in the code that performs secret math inside Bitcoin's cryptographic library. The code uses 'volatile' variables to prevent the compiler from turning certain operations i…

Touches constant-time arithmetic paths (modular inversion normalization)Fixes undefined behavior involving volatile-qualified variablesCompiler warning (-Wunsequenced) treated as a correctness defect
a0e2e23aby merge-script+42−362 files
Vendor flagged security relevance
Low 32 AI analysisMessage 80 · Strong
BC Bitcoin Corelibsecp256k1 BitcoinCryptographic libraries

Avoid unsequenced accesses to volatile variables

This commit fixes a subtle C language rule violation in Bitcoin Core's libsecp256k1 cryptographic library. The code was reading a special 'volatile' variable multiple times within the same expression, which modern C standards treat as unde…

Undefined behavior in cryptographic constant-time codeCompiler warning (-Wunsequenced) in security-critical pathVolatile variable used as constant-time execution barrier
e7a34ba3by Hennadii Stepanov+20−142 files
No security note in commit
Informational 16 AI analysisMessage 100 · Strong
BC Bitcoin Corelibsecp256k1 BitcoinCryptographic libraries

Merge bitcoin-core/secp256k1#1898: tests: Silent Payments ctime test never reaches a match or label lookup

This commit fixes a flawed test in the libsecp256k1 cryptographic library. The test was supposed to exercise the Silent Payments constant-time scanning code, but due to a bug in how the test was written, it never actually verified that the…

Test-only change in ctime_tests.cFixes incorrect test key mutation that prevented matching outputAdds label callback to exercise label-candidate serialization/batching path
5d2ff536by merge-script+27−131 file
No security note in commit
Informational 15 AI analysisMessage 98 · Strong
BC Bitcoin Corelibsecp256k1 BitcoinCryptographic libraries

ci: Run the Wine jobs on ubuntu-24.04

This is a routine continuous-integration (CI) maintenance change. It pins a Windows cross-compilation test job to an older Ubuntu version because the newer GitHub-hosted runner image breaks Wine's networking syscalls. There is no change to…

ecfe7ab8by Ferdinando Ametrano+2−11 file
No security note in commit
Informational 23 AI analysisMessage 96 · Strong
BC Bitcoin Corelibsecp256k1 BitcoinCryptographic libraries

Merge bitcoin-core/secp256k1#1986: examples: exit with failure if signature verification fails

This change fixes two example programs so they return a failure code when a signature check fails. Previously, the examples always reported success even if verification failed, which meant automated tests would pass even when the underlyin…

Incorrect return status masked verification failures in example/test programsAutomated tests would pass despite cryptographic verification failingFix aligns ECDSA and Schnorr examples with existing MuSig example behavior
b97f7f5fby merge-script+2−22 files
No security note in commit
Informational 18 AI analysisMessage 88 · Strong
BC Bitcoin Corelibsecp256k1 BitcoinCryptographic libraries

examples: exit with failure if signature verification fails

This is a small hardening fix to two example programs. Previously, the example programs for ECDSA and Schnorr signatures would print whether a signature was valid but always report success to the operating system. Because the project's bui…

Test/example code silently succeeded on verification failureRegression-test gap for signature verification behaviorFix hardens CI/test signal without changing cryptographic logic
900613a7by Amartya Singh+2−22 files
No security note in commit
Low 35 AI analysisMessage 96 · Strong
BC Bitcoin Corelibsecp256k1 BitcoinCryptographic libraries

Merge bitcoin-core/secp256k1#1974: silentpayments: reject label tweaks that overflow the group order

This change fixes a silent handling problem in Bitcoin's silent payments feature. When a user-supplied label tweak value was larger than the cryptographic group order, the code previously reduced it silently, which could lead to incorrect …

silent modular reduction of attacker/caller-controlled scalarAPI misuse now rejected via ARG_CHECKsensitive scalar clearing before early return to avoid leaking transaction indistinguishability data
1c088b64by merge-script+13−22 files
Vendor flagged security relevance
High 76 AI analysisMessage 86 · Strong
BC Bitcoin Corelibsecp256k1 BitcoinCryptographic libraries

Merge bitcoin-core/secp256k1#1983: silentpayments: return 0 instead of `ARG_CHECK`ing for empty inputs/outputs

This update fixes a crash risk in Bitcoin's silent payments scanning code. Before the change, if a transaction had no suitable inputs or no taproot outputs, the library treated that as an illegal argument and could call abort(), killing th…

Denial-of-service vector: maliciously crafted transaction could trigger abort() in a scanning/indexing processAPI contract violation: documented return-0 behavior was not implemented for empty inputs/outputsARG_CHECK removal in two public silentpayments functions
a3a5cd45by merge-script+46−334 files
Vendor flagged security relevance
Low 30 AI analysisMessage 73 · Adequate
BC Bitcoin Corelibsecp256k1 BitcoinCryptographic libraries

silentpayments: allow NULL arrays in scan_outputs if n_tx_outputs is 0

This commit fixes a minor API usability issue in the experimental silent payments module. Previously, a function that scans transaction outputs for silent payments would crash if given empty arrays represented as NULL pointers, even though…

NULL pointer argument check relaxed for empty arraysSECP256K1_ARG_NONNULL attributes removed for two parametersNew API test verifying NULL-with-zero-length behavior
e7bb0112by Sebastian Falbesoner+18−113 files
No security note in commit
Moderate 60 AI analysisMessage 78 · Adequate
BC Bitcoin Corelibsecp256k1 BitcoinCryptographic libraries

silentpayments: return 0 instead of `ARG_CHECK`ing for empty inputs/outputs

This change fixes two functions in the Silent Payments module so they return a normal failure value (0) instead of triggering an internal abort when given a transaction with no eligible inputs or no taproot outputs. Previously, callers sca…

ARG_CHECK default behavior is abort(), turning an expected non-Silent-Payments transaction into a potential DoS crashAPI contract promised return 0 for non-Silent-Payments transactions, but implementation violated it for empty input/output edge casesCallers scanning blocks would need special-case handling before the fix to avoid crashes
d7821f4aby Sebastian Falbesoner+27−223 files
Vendor flagged security relevance
Low 31 AI analysisMessage 100 · Strong
BC Bitcoin Corelibsecp256k1 BitcoinCryptographic libraries

silentpayments: reject label tweaks that overflow the group order

This change tightens error handling in the silent payments scanning code. Previously, if a caller-supplied label tweak was as large as or larger than the elliptic curve group order, it was silently wrapped around (reduced modulo the order)…

silent reduction modulo group order replaced with explicit overflow rejectionsensitive scalars and shared secret explicitly cleared before aborting on invalid inputoutput assignment reordered to avoid partial state update on failure path
95552e16by Sebastian Falbesoner+13−22 files
No security note in commit
Informational 15 AI analysisMessage 35 · Opaque
BC Bitcoin Corelibsecp256k1 BitcoinCryptographic libraries

remove unused SECP256K1_GE_CONST_INFINITY

This commit simply deletes an unused macro named SECP256K1_GE_CONST_INFINITY from a header file. A macro is a shorthand definition for code, and this one was no longer referenced anywhere in the project. Removing dead code has no functiona…

7b59e1fcby fanquake+0−11 file
No security note in commit
Low 26 AI analysisMessage 100 · Strong
BC Bitcoin Corelibsecp256k1 BitcoinCryptographic libraries

Merge bitcoin-core/secp256k1#1929: silentpayments: perform tweak addition with actual scalars

This change simplifies how Silent Payments scanning adds a small tweak value to a secret-derived value. It replaces a function meant for secret-key tweaking with plain scalar (modular number) addition. The old code had a special case that …

Behavior change: zero-result tweak addition is no longer forced to zero; scalar addition allows zeroBehavior change: label tweaks >= group order N are no longer rejected by the secret-key APIRemoval of defensive comment explaining failure modes of secret-key tweak addition
04b91ce2by merge-script+7−161 file
No security note in commit
Informational 15 AI analysisMessage 86 · Strong
BC Bitcoin Corelibsecp256k1 BitcoinCryptographic libraries

Merge bitcoin-core/secp256k1#1963: doc: say the sha256 compression callback processes secrets

This commit only adds a documentation comment to a public header file. It reminds developers that a special callback function used for SHA256 hashing may receive secret data such as private keys, so any custom implementation must be consta…

31716e4bby merge-script+3−01 file
No security note in commit
Informational 18 AI analysisMessage 81 · Strong
BC Bitcoin Corelibsecp256k1 BitcoinCryptographic libraries

doc: say the sha256 compression callback processes secrets

This is a documentation-only change. It adds a warning to the public header file telling developers that the optional SHA256 compression callback may receive secret key material, and therefore any custom implementation must run in constant…

Documentation clarifies that a pluggable cryptographic callback receives secret materialDocumentation imposes constant-time and no-logging requirements on callback implementersReferences RFC 6979 nonce derivation as an example of secret-key processing
494d3053by Ferdinando Ametrano+3−01 file
Vendor flagged security relevance
Informational 15 AI analysisMessage 96 · Strong
BC Bitcoin Corelibsecp256k1 BitcoinCryptographic libraries

Merge bitcoin-core/secp256k1#1946: doc: clean up lingering ECMULT_WINDOW_SIZE comment

This is a documentation-only cleanup. It moves a comment about the ECMULT_WINDOW_SIZE setting to a better location and fixes an outdated formula in the comment. No code behavior changes.

6f065e9aby merge-script+10−112 files
No security note in commit
Low 37 AI analysisMessage 100 · Strong
BC Bitcoin Corelibsecp256k1 BitcoinCryptographic libraries

Merge bitcoin-core/secp256k1#1933: refactor: introduce `ecmult_const_ge` helper (preventing accidential gej leaks)

This commit is a defensive code cleanup in Bitcoin Core's secp256k1 cryptography library. It introduces a helper function that automatically clears temporary secret data after a constant-time elliptic curve multiplication, and switches exi…

Defensive refactoring to prevent accidental leakage of secret scalar information from Jacobian coordinatesNew helper enforces memory clearing of intermediate group element after constant-time scalar multiplicationAdoption in ECDH and silentpayments modules, which process secret keys
2365dc64by merge-script+35−427 files
Vendor flagged security relevance
Informational 15 AI analysisMessage 93 · Strong
BC Bitcoin Corelibsecp256k1 BitcoinCryptographic libraries

Merge bitcoin-core/secp256k1#1949: ecdsa: Clarify derivation of the r check in `_sig_verify`

This commit only rewrites comments in the source code to make the mathematical explanation clearer. It does not change any actual code instructions, function behavior, or security properties. There is no vulnerability or fix here.

4a264a93by merge-script+21−151 file
No security note in commit
Informational 12 AI analysisMessage 100 · Strong
BC Bitcoin Corelibsecp256k1 BitcoinCryptographic libraries

Merge bitcoin-core/secp256k1#1948: tests: add ECDSA verify case where r + n overflows p

This commit only adds a new test case to the project's test suite. It does not change any production cryptographic code. The new test verifies that the ECDSA signature verification function correctly rejects a crafted invalid signature in …

Adds test coverage for ECDSA verification edge case involving r + n overflow against field order pReferences a surviving mutant where the early-rejection check in secp256k1_ecdsa_sig_verify is removedDoes not modify production code; purely a test-suite enhancement
e23e9201by merge-script+28−01 file
No security note in commit
Repository ledger

Explore captured commits

Expand any commit for its author, full message, clarity score, changed files, triage signals, analysis, and source link.

Lower-priorityec: check pubkey sort test resultsby Lőrinc · a2ad68cd · Jul 26, 2026 · 1 fileMessage 78 · AdequateInformational 16Details
Commit message · Lőrinc

ec: check pubkey sort test results

Two successful sort paths validated only the reordered arrays and discarded the API result.
Check success before inspecting the sorted output.

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
defensive validation
AI analysis · Informational 16/100

This commit fixes two test cases in the secp256k1 cryptographic library so they now verify that a public-key sorting function actually succeeds before checking its output. Previously the tests only inspected the sorted result and ignored whether the function returned an error. This is a test-hardening change, not a fix to the sorting function itself, and it does not create or fix a vulnerability in production code.

Lower-prioritysilentpayments: check test serializationby Lőrinc · 93280c22 · Jul 26, 2026 · 1 fileMessage 68 · AdequateInformational 17Details
Commit message · Lőrinc

silentpayments: check test serialization

The sender vector test compared serialized x-only public keys without requiring serialization to succeed.
Check success before comparing the output bytes.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context✓ Mentions testing or verification
AI analysis · Informational 17/100

This is a small fix inside a test file for the silent payments module. It makes sure a function that converts a public key into bytes actually succeeds before comparing those bytes against expected test values. Previously, the test could compare stale or uninitialized bytes if the conversion failed, which could hide test failures but does not affect real wallet or network code.

Security candidaterecovery: check exhaustive API resultsby Lőrinc · 1d3f72d3 · Jul 26, 2026 · 1 fileMessage 78 · AdequateInformational 17Details
Commit message · Lőrinc

recovery: check exhaustive API results

The exhaustive recovery tests decoded and verified signatures without requiring recoverable signing or conversion to succeed.
Check those documented success results before consuming the outputs, matching the ordinary exhaustive signing test.

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
signing boundary
AI analysis · Informational 17/100

This commit tightens a test suite for the secp256k1 cryptographic library. It adds checks to ensure that recoverable signing and signature conversion succeed before using their outputs. It does not change the library's actual signing or verification code, so it does not fix a live security bug in production software. It is a defensive improvement to testing.

AI review queuedmusig: check infinity test setupby Lőrinc · b8de1bc3 · Jul 26, 2026 · 1 fileMessage 78 · AdequateInformational 17Details
Commit message · Lőrinc

musig: check infinity test setup

`pubnonce_summing_to_inf` initializes both sums to infinity before loading the nonce objects.
A load failure could therefore satisfy the expected infinity checks without validating the constructed pair.
Require both nonce-loading operations to succeed before testing their outputs.

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
second-pass: broader security terminology
AI analysis · Informational 17/100

This change fixes a small but real flaw in the MuSig test code. Previously, two test helper functions called internal loading/summing routines and then checked whether the results were the special 'point at infinity' value. Because the input buffers were already initialized to infinity, a failed load or sum could still make the infinity checks pass, so the test would not actually detect a broken implementation. The patch adds explicit success checks so the test fails if those routines return an error. This only affects test code, not the cryptographic library used by real Bitcoin transactions, so it does not create a direct security vulnerability in production software.

Lower-priorityextrakeys: check test pubkey loadsby Lőrinc · 0618af81 · Jul 26, 2026 · 1 fileMessage 78 · AdequateInformational 17Details
Commit message · Lőrinc

extrakeys: check test pubkey loads

The x-only parity test compared fields from two loaded points without requiring either load to succeed.
Check both setup operations before reading their outputs.

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
AI analysis · Informational 17/100

This change is inside the library's test code, not the actual cryptographic code used by applications. It makes two test setup steps verify they succeeded before using their results. Previously the test could have continued with invalid data if a load failed, which would make the test less reliable but does not create a vulnerability in the library itself.

Security candidateellswift: check test operation resultsby Lőrinc · 564afb0b · Jul 26, 2026 · 2 filesMessage 83 · StrongInformational 17Details
Commit message · Lőrinc

ellswift: check test operation results

The EllSwift tests inspected outputs without requiring encoding, decoding, or public-key loading to succeed.
They also discarded the field parser result despite relying on its no-overflow precondition.
Check each deterministic success result before inspecting its output.

83/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Names security-relevant behavior explicitly
Why it was queued
memory safety
AI analysis · Informational 17/100

This commit fixes test code for the EllSwift module so that it actually checks whether encoding, decoding, and public-key loading operations succeed before using their outputs. Previously the tests silently ignored failure return values, which could hide bugs during testing but does not change the production library behavior or introduce a direct vulnerability in running software.

Lower-prioritytests: check exhaustive ecmult successby Lőrinc · 658c7edc · Jul 26, 2026 · 1 fileMessage 78 · AdequateInformational 15Details
Commit message · Lőrinc

tests: check exhaustive ecmult success

The exhaustive matrix compared the Jacobian output without requiring `secp256k1_ecmult_multi_var` to succeed.
Require success before consuming the result so a failure cannot satisfy an infinity case accidentally.

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
AI analysis · Informational 15/100

This is a one-line change to a test file in the secp256k1 cryptographic library. It makes an existing exhaustive test stricter by requiring a function to report success before checking its output. It does not change any production code and is not a security fix for a vulnerability.

Lower-priorityAdd changelog entry for silentpayments moduleby Sebastian Falbesoner · d9ac2ee5 · Jul 23, 2026 · 1 fileMessage 45 · ThinInformational 15Details
Commit message · Sebastian Falbesoner

Add changelog entry for silentpayments module

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
documentation-only discount
AI analysis · Informational 15/100

This commit only adds a changelog entry describing a new 'silentpayments' feature that was already added to the project. It changes no code, no build files, and no configuration. There is no security issue in this commit itself.

Security candidatesilentpayments: API docs and internal comment followupsby Sebastian Falbesoner · 0fa38f3d · Jul 23, 2026 · 3 filesMessage 86 · StrongInformational 15Details
Commit message · Sebastian Falbesoner

silentpayments: API docs and internal comment followups

Addresses follow-up comments and Claude nits from #1765, see
- https://github.com/bitcoin-core/secp256k1/pull/1765#discussion_r3629070333
- https://github.com/bitcoin-core/secp256k1/pull/1765#discussion_r3628888249
- https://github.com/bitcoin-core/secp256k1/pull/1765#discussion_r3629066762
- https://github.com/bitcoin-core/secp256k1/pull/1765#pullrequestreview-4754517850

Note that the "hash output is not a valid scalar" error mentioning in
the API docs for sending is dropped intentionally to reflect the
scanning API docs, where we don't mention this negligible case either.

Co-authored-by: Tim Ruffing <me@real-or-random.org>

86/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference✓ Names security-relevant behavior explicitly
Why it was queued
cryptography-sensitive path
AI analysis · Informational 15/100

This commit only updates documentation comments and an example error message in the silent payments module. It does not change any executable code, cryptographic calculations, or security behavior. The changes clarify when the output-creation function can fail and add internal explanatory notes for future maintainers.

Security candidatenonce: terminate RFC6979 loop at UINT_MAXby Lőrinc · b1bc6f3e · Jul 20, 2026 · 1 fileMessage 73 · AdequateLow 37Details
Commit message · Lőrinc

nonce: terminate RFC6979 loop at UINT_MAX

The public nonce callback accepts `UINT_MAX`, but `nonce_function_rfc6979_impl` never returns for that attempt.
Its `i <= counter` loop wraps after the final candidate and starts again.

Generate the candidate before checking whether it is the requested attempt.
This preserves the result for every `unsigned int` attempt, including `UINT_MAX`, and exits before the index can wrap.

Co-authored-by: Tim Ruffing <me@real-or-random.org>

73/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Names security-relevant behavior explicitly
Why it was queued
cryptography-sensitive path
AI analysis · Low 37/100

This commit fixes an infinite-loop bug in the RFC6979 nonce generation code used for creating cryptographic signatures. If a caller asked for attempt number UINT_MAX (the maximum value of an unsigned integer), the old loop would generate that nonce but then keep going forever because the loop counter would wrap around to zero and never exceed the target. The fix generates the nonce first, then checks whether the requested attempt has been reached and exits. This is a reliability/correctness bug in a critical cryptographic path, though it requires a caller to deliberately request UINT_MAX to trigger.

Lower-priorityextrakeys: check invariant that x-only pubkeys have even Yby Sebastian Falbesoner · 89a54b5a · Jul 20, 2026 · 1 fileMessage 50 · ThinLow 26Details
Commit message · Sebastian Falbesoner

extrakeys: check invariant that x-only pubkeys have even Y

50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
AI analysis · Low 26/100

This commit adds a debug-only safety check inside a Bitcoin cryptography library. It verifies that when an x-only public key (a compressed public key format that omits the Y coordinate) is saved, the internal representation has an even Y value, as the protocol definition requires. The check only runs in VERIFY builds and does not change production behavior. It is a defensive invariant, not a fix for a known exploitable bug.

Security candidatesilentpayments: drop "shuffle outputs" recommendation from API docsby Sebastian Falbesoner · cea6d114 · Jul 20, 2026 · 1 fileMessage 50 · ThinInformational 15Details
Commit message · Sebastian Falbesoner

silentpayments: drop "shuffle outputs" recommendation from API docs

50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
cryptography-sensitive path
AI analysis · Informational 15/100

This commit only changes documentation comments in a header file. It removes a recommendation that callers shuffle transaction outputs before scanning, and instead clarifies that outputs should be passed in their original transaction order. There is no code change, no security fix, and no vulnerability being addressed.

Lower-prioritysilentpayments: flush labels before direct matchby Lőrinc · 1ae90bde · Jul 19, 2026 · 2 filesMessage 78 · AdequateLow 42Details
Commit message · Lőrinc

silentpayments: flush labels before direct match

A direct x-only match stops scanning before a partial batch of earlier label candidates is checked.
The batch-inversion optimization can therefore return a later unlabeled output and discard label metadata for the earlier output.

Check the pending batch before accepting the direct match.
This restores the scan order from before batching, where the first matching output wins.

The regression puts a labeled `k = 0` output before its unlabeled counterpart and requires scanning to return it with the label.

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
AI analysis · Low 42/100

This commit fixes a bug in Bitcoin's silent payments scanning code. When a wallet scans a transaction for outputs it can spend, a performance shortcut could accidentally skip over a labeled output and report a plain (unlabeled) version instead. The fix makes the scanner check pending labeled candidates before accepting a direct unlabeled match, restoring the intended 'first match wins' behavior and preserving label metadata.

Lower-prioritysilentpayments: extract label batch checkerby Lőrinc · 84a02fa9 · Jul 19, 2026 · 1 fileMessage 68 · AdequateInformational 14Details
Commit message · Lőrinc

silentpayments: extract label batch checker

Move the existing label-batch conversion and lookup into a helper.
The helper preserves the lookup order and keeps each scan exit on the same batch path.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Informational 14/100

This commit is a simple code cleanup: it moves an existing block of label-scanning logic into a separate helper function without changing what the code actually does. There is no security fix or behavior change visible in the diff.

Security candidatetests: add constant time testsby josibake · 936907b0 · Jul 14, 2026 · 1 fileMessage 78 · AdequateInformational 12Details
Commit message · josibake

tests: add constant time tests

Co-authored-by: Jonas Nick <2582071+jonasnick@users.noreply.github.com>
Co-authored-by: Sebastian Falbesoner <91535+thestack@users.noreply.github.com>

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
constant-time or timing behavior
AI analysis · Informational 12/100

This commit only adds new test code. It extends the project's constant-time test suite to also exercise the silent payments module, ensuring that secret key material is not accidentally leaked through timing side channels during those operations. There is no change to the actual cryptographic library code that users rely on.

Lower-priorityci: enable silentpayments moduleby Sebastian Falbesoner · f27a2968 · Jul 14, 2026 · 2 filesMessage 47 · ThinInformational 15Details
Commit message · Sebastian Falbesoner

ci: enable silentpayments module

47/100 · ThinMessage clarity
✓ Descriptive subject✓ Uses a recognizable type or scope! No meaningful explanatory body
AI analysis · Informational 15/100

This commit only changes the project's continuous integration (CI) configuration. It adds the new 'silentpayments' module to the list of optional modules that are built and tested automatically. There are no changes to the actual cryptographic code, so this commit does not introduce or fix any security vulnerability by itself.

Lower-prioritysilentpayments: skip slow benchmarks for low iters count (<= 2)by Sebastian Falbesoner · 4aa16704 · Jul 14, 2026 · 1 fileMessage 73 · AdequateInformational 15Details
Commit message · Sebastian Falbesoner

silentpayments: skip slow benchmarks for low iters count (<= 2)

The worst-case scanning benchmarks and the common-case scanning
benchmarks with N>10 are relatively slow, leading to signifcantly
long run times of CI jobs. Avoid this by skipping these if the
iters count is <= 2 (CI jobs run with SECP256K1_BENCH_ITERS=2).
This is the same approach used in the ecmult benchmarks (bench_ecmult).

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Informational 15/100

This change only adjusts benchmark tests for a new Bitcoin privacy feature (silent payments). It skips some slow benchmark cases when tests are run with very low iteration counts, such as in automated CI runs. It does not change any production cryptography, wallet logic, or network code, and has no security impact on users.

Lower-prioritytests: add sha256 tag testby josibake · 4f7a578d · Jul 14, 2026 · 1 fileMessage 70 · AdequateInformational 15Details
Commit message · josibake

tests: add sha256 tag test

Test midstate tags used in silent payments.

70/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Mentions testing or verification
AI analysis · Informational 15/100

This commit only adds a new test that checks whether certain SHA-256 'tagged' hash initialization functions used in silent payments produce the correct internal hash state. It does not change any production code, cryptographic logic, or behavior visible to users. There is no security vulnerability here.

Lower-prioritydocs: update READMEby josibake · 7e4b313c · Jul 14, 2026 · 1 fileMessage 40 · ThinInformational 15Details
Commit message · josibake

docs: update README

40/100 · ThinMessage clarity
✓ Subject identifies a change✓ Uses a recognizable type or scope! No meaningful explanatory body
Why it was queued
documentation-only discount
AI analysis · Informational 15/100

This commit only updates the README documentation to mention a new optional feature (Silent Payments, BIP-352) and point to an example file. No code, build scripts, or cryptographic logic was changed. There is no security issue here.

Lower-prioritytests: add BIP-352 test vectorsby josibake · b608a9d9 · Jul 14, 2026 · 6 filesMessage 83 · StrongInformational 15Details
Commit message · josibake

tests: add BIP-352 test vectors

Add the BIP-352 test vectors. The vectors are generated with a Python script
that converts the .json file from the BIP to C code:

$ ./tools/tests_silentpayments_generate.py test_vectors.json > ./src/modules/silentpayments/vectors.h

Co-authored-by: Ron <4712150+macgyver13@users.noreply.github.com>
Co-authored-by: Sebastian Falbesoner <91535+thestack@users.noreply.github.com>
Co-authored-by: Tim Ruffing <1071625+real-or-random@users.noreply.github.com>

83/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Names security-relevant behavior explicitly
Why it was queued
fuzzing or regression evidence
AI analysis · Informational 15/100

This commit only adds test data and test infrastructure for the BIP-352 silent payments feature. It does not change any production cryptographic code, so it cannot introduce a runtime security vulnerability on its own.

Lower-prioritysilentpayments: optimize scanning by using batch inversionby Sebastian Falbesoner · ca0136dc · Jul 14, 2026 · 1 fileMessage 73 · AdequateInformational 15Details
Commit message · Sebastian Falbesoner

silentpayments: optimize scanning by using batch inversion

This improves the worst-case scanning scenario performance by ~2.5x
and also helps notably in the common case ("no match") scenario,
especially if the number of outputs is high.

Benchmark results on parent commit (without optimization):

Benchmark , Min(us) , Avg(us) , Max(us)

silentpayments_scan_nomatch_N=2 , 40.1 , 40.1 , 40.2
silentpayments_scan_nomatch_N=5 , 43.7 , 43.8 , 43.8
silentpayments_scan_nomatch_N=10 , 50.1 , 50.1 , 50.1
silentpayments_scan_nomatch_N=100 , 166.0 , 168.0 , 173.0
silentpayments_scan_nomatch_N=1000 , 1363.0 , 1368.0 , 1376.0
silentpayments_scan_nomatch_N=2323 , 3107.0 , 3113.0 , 3122.0
silentpayments_scan_nomatch_N=23250 , 30719.0 , 30764.0 , 30813.0
silentpayments_scan_worstcase_K=10 , 336371.0 , 336429.0 , 336492.0
silentpayments_scan_worstcase_K=100 , 3081573.0 , 3082413.0 , 3082899.0
silentpayments_scan_worstcase_K=1000 , 29909353.0 , 29931334.0 , 29951917.0
silentpayments_scan_worstcase_K=2323 , 67392236.0 , 67410087.0 , 67440159.0

Benchmark results on this commit (with optimization):

Benchmark , Min(us) , Avg(us) , Max(us)

silentpayments_scan_nomatch_N=2 , 39.3 , 39.3 , 39.4
silentpayments_scan_nomatch_N=5 , 40.5 , 40.5 , 40.6
silentpayments_scan_nomatch_N=10 , 43.5 , 43.5 , 43.5
silentpayments_scan_nomatch_N=100 , 90.0 , 92.7 , 100.0
silentpayments_scan_nomatch_N=1000 , 578.0 , 579.0 , 584.0
silentpayments_scan_nomatch_N=2323 , 1296.0 , 1300.0 , 1310.0
silentpayments_scan_nomatch_N=23250 , 12629.0 , 12649.0 , 12664.0
silentpayments_scan_worstcase_K=10 , 137746.0 , 137781.0 , 137813.0
silentpayments_scan_worstcase_K=100 , 1261417.0 , 1261614.0 , 1261774.0
silentpayments_scan_worstcase_K=1000 , 12245097.0 , 12249587.0 , 12258039.0
silentpayments_scan_worstcase_K=2323 , 27591765.0 , 27594324.0 , 27597324.0

(Benchmark machine: arm64 notebook, Snapdragon X Elite X1E-78-100)

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Informational 15/100

This commit is a pure performance optimization for the silent payments scanning feature. It replaces many individual expensive math operations (modular inversions) with a batched version, making scanning roughly 2.5 times faster in the worst case. There is no security bug being fixed here.

Security candidatesilentpayments: sendingby josibake · b30ea3eb · Jul 14, 2026 · 4 filesMessage 41 · ThinInformational 15Details
Commit message · josibake

silentpayments: sending

Add a routine for the entire sending flow which takes a set of private keys,
the smallest outpoint, and list of recipients and returns a list of
x-only public keys by performing the following steps:

1. Sum up the private keys
2. Calculate the input_hash
3. For each recipient group:
3a. Calculate a shared secret
3b. Create the requested number of outputs

This function assumes a single sender context in that it requires the
sender to have access to all of the private keys. In the future, this
API may be expanded to allow for a multiple senders or for a single
sender who does not have access to all private keys at any given time,
but for now these modes are considered out of scope / unsafe.

Internal to the library, add:

1. A function for creating shared secrets (i.e., a*B or b*A)
2. A function for generating the "SharedSecret" tagged hash
3. A function for creating a single output public key

Co-authored-by: w0xlt <94266259+w0xlt@users.noreply.github.com>

41/100 · ThinMessage clarity
✓ Subject identifies a change✓ Provides detailed explanatory context! Too few words to establish purpose
Why it was queued
secret or key materialcryptography-sensitive path
AI analysis · Informational 15/100

This commit adds a new feature to the secp256k1 cryptographic library: the sender-side logic for Bitcoin Silent Payments (BIP352). It lets a wallet create special one-time payment addresses for recipients without revealing which recipient is being paid on the blockchain. The change is a normal, well-documented feature addition with no indication of a security bug or vulnerability fix.

Security candidatebuild: add skeleton for new silentpayments (BIP352) moduleby Sebastian Falbesoner · a93e696a · Jul 14, 2026 · 8 filesMessage 62 · AdequateInformational 15Details
Commit message · Sebastian Falbesoner

build: add skeleton for new silentpayments (BIP352) module

62/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope! No meaningful explanatory body
Why it was queued
cryptography-sensitive path
AI analysis · Informational 15/100

This commit is purely a build-system and header-file skeleton for a new Silent Payments (BIP352) module. It adds configuration options, dependency checks, and empty placeholder files, but contains no actual cryptographic code or implementation. There is nothing here that could introduce a security vulnerability.

Lower-prioritysilentpayments: add examples/silentpayments.cby josibake · f0fdd99d · Jul 14, 2026 · 4 filesMessage 60 · AdequateInformational 15Details
Commit message · josibake

silentpayments: add examples/silentpayments.c

Demonstrate sending and scanning on full nodes.

60/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Informational 15/100

This commit adds a new example file (examples/silentpayments.c) showing how to use the Silent Payments feature in libsecp256k1. It is purely documentation and demonstration code, not a change to the cryptographic library itself. There is no indication of a security bug or vulnerability fix.

Security candidatesilentpayments: recipient label supportby Sebastian Falbesoner · c83b6783 · Jul 14, 2026 · 3 filesMessage 68 · AdequateInformational 15Details
Commit message · Sebastian Falbesoner

silentpayments: recipient label support

Add function for creating a label tweak. This requires a tagged hash
function for labels. This function is used by the receiver for creating
labels to be used for a) creating labeled addresses and b) to populate
a labels cache when scanning.

Add function for creating a labeled spend pubkey. This involves taking
a label tweak, turning it into a public key and adding it to the spend
public key. This function is used by the receiver to create a labeled
silent payment address.

Add tests for the label API.

Co-authored-by: w0xlt <94266259+w0xlt@users.noreply.github.com>

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
cryptography-sensitive path
AI analysis · Informational 15/100

This commit adds new public API functions to the silentpayments module of libsecp256k1 to support recipient-side labels for BIP352 silent payments. It is a feature addition, not a security fix or vulnerability patch. There is no evidence in the commit or supplied references of any security defect, exploit, or incident.