RB
← All projectsRust Bitcoin

rust-bitcoin

Rust library for Bitcoin data structures, serialization, consensus encoding, and scripts.

BitcoinCryptographic librariesNormal
Repository coverage

2289 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.

524security candidates506second-pass queue2193AI analyses
147commits · 30 days
304commits · 60 days
1150commits · 180 days
2054commits · 365 days
Backfill bands
Aug 5 → Feb 6787 seen32 candidatesComplete
Feb 6 → Jun 6878 seen53 candidatesComplete
Jun 6 → Jul 6211 seen15 candidatesComplete
Jul 6 → Aug 5184 seen2 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.

66/100 average clarity
489Strong · 80–100
1083Adequate · 60–79
566Thin · 40–59
151Opaque · 0–39
20security candidates with opaque commit messaging
Read the scoring rubric →
Developer activity

Who is changing the project?

Public Git author strings; identities are not independently verified.

DeveloperCommitsCandidatesAnalyzedHigh riskMessage avg.
Mitchell Bagot649193645068
Andrew Poelstra21072145089
Tobin C. Harding41566410063
jrakibi944994068
Nick Johnson19121190060
Jamil Lambert, PhD11919116061
satsfy (Renato Britto)381527066
Fmt Bot331431045
Trevor Arjeski111111069
Shing Him Ng31731056
Ismail Daif22622050
Martin Habovstiak28527069
Analysis record

Published AI watches

Last scanned 15 minutes ago

Informational 15 AI analysisMessage 96 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6909: build(deps): bump actions/labeler from 6.2.0 to 7.0.0

This commit updates a GitHub Actions automation tool (actions/labeler) used to automatically tag pull requests with labels. It is a routine dependency version bump from 6.2.0 to 7.0.0, with no indication of a security fix or vulnerability.…

4ed7c068by Andrew Poelstra+1−11 file
No security note in commit
Informational 15 AI analysisMessage 96 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6910: build(deps): bump actions/checkout from 7.0.0 to 7.0.1

This commit is a routine update to the GitHub Actions checkout tool used by the project's automated workflows. It only changes version numbers in configuration files and does not alter the actual Bitcoin library code that users run. There …

328c4ae9by Andrew Poelstra+37−3717 files
No security note in commit
Informational 15 AI analysisMessage 100 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6911: build(deps): bump astral-sh/setup-uv from 8.3.2 to 9.0.0

This commit updates a GitHub Actions helper used to install a Python tool called uv, which runs the zizmor security scanner. The change only bumps the pinned version of the helper from 8.3.2 to 9.0.0. The new version's release notes mentio…

No security-relevant signals in commit or upstream release notesDependency bump in CI only, not in library codeNo CVE or advisory referenced
67600795by Andrew Poelstra+2−22 files
No security note in commit
Informational 15 AI analysisMessage 96 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6912: build(deps): bump github/codeql-action/upload-sarif from 4.37.0 to 4.37.3

This is a routine Dependabot update that changes the pinned version of GitHub's official CodeQL upload-sarif action from 4.37.0 to 4.37.3 in a single CI workflow. The action only uploads static analysis results to GitHub; it does not touch…

b51cec63by Andrew Poelstra+1−11 file
No security note in commit
Informational 15 AI analysisMessage 91 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6913: build(deps): bump dtolnay/rust-toolchain from 6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772 to 02cb101ec7c40f2c49e1d9714d64511d8e1b74de

This is a routine update to a GitHub Actions helper used to install Rust during automated testing. It only changes the pinned version of the dtolnay/rust-toolchain action in workflow files. There is no change to the actual rust-bitcoin lib…

90330d15by Andrew Poelstra+8−84 files
No security note in commit
Informational 20 AI analysisMessage 100 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6906: consensus_encoding, primitives: expose exact encoding size for block and transaction

This commit adds a way to ask, in advance, exactly how many bytes a Bitcoin block or transaction will take when serialized. It is a feature addition for the library's encoding system, not a fix for a vulnerability. There is no indication i…

No security-relevant signals in commit message or diffFeature addition: expose exact encoded sizeNo mention of vulnerability, CVE, bug bounty, or security report
1a365d53by Andrew Poelstra+129−1068 files
No security note in commit
Informational 15 AI analysisMessage 88 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

build(deps): bump dtolnay/rust-toolchain

This is a routine update by Dependabot that changes which version of a popular GitHub Action (dtolnay/rust-toolchain) is used to install Rust in automated CI workflows. The commit only updates pinned commit hashes in workflow files; it doe…

a31e0b0eby dependabot[bot]+8−84 files
No security note in commit
Informational 15 AI analysisMessage 93 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

build(deps): bump github/codeql-action/upload-sarif

This is a routine patch-version update of a GitHub-maintained action used only to upload static-analysis results (SARIF files) from a scheduled CI job. The change does not touch any project source code, cryptographic logic, or user-facing …

2cac6e38by dependabot[bot]+1−11 file
No security note in commit
Informational 15 AI analysisMessage 93 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

build(deps): bump astral-sh/setup-uv from 8.3.2 to 9.0.0

This is a routine automated update by Dependabot that changes the pinned version of a GitHub Action used to install a Python tool called 'uv' in two workflow files. The new version is a major release of the setup-uv action itself, but the …

7d7e7269by dependabot[bot]+2−22 files
No security note in commit
Informational 21 AI analysisMessage 100 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6894: Harden `Copy` policy and apply to all pre-1.0 crates

This commit removes the automatic `Copy` trait from several public error types in the rust-bitcoin library and updates the project's written policy to discourage `Copy` on error types. `Copy` is a Rust trait that lets values be duplicated …

API hardening: removes `Copy` from public error types to preserve future flexibilityPolicy update: docs/policy.md now explicitly discourages `Copy` on error typesNo vulnerability fix: change is defensive/preventive, not reactive to a disclosed issue
457cb9b5by Andrew Poelstra+14−146 files
No security note in commit
Informational 18 AI analysisMessage 96 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6787: Move `from_script` to `Address` and drop `AddressExt`

This change is a routine code cleanup, not a security fix. It moves a method that converts Bitcoin output scripts into human-readable addresses from a temporary 'extension trait' directly onto the main Address type. The actual conversion l…

ed42dabdby Andrew Poelstra+38−414 files
No security note in commit
Low 35 AI analysisMessage 91 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6061: Units improvements

This is a routine code-quality and API-expansion pull request for the rust-bitcoin library's 'units' crate. It widens some fee-rate constructors from 32-bit to 64-bit inputs, renames the old 32-bit versions, improves serde error messages, …

API surface change: new u64 fee-rate constructors return NumOpResult to prevent silent overflowRenaming of existing u32 constructors to *_u32 may break downstream callers at compile time (breaking API change)Removal of artificial restriction in from_per_vb allows larger valid inputs
f9460859by Andrew Poelstra+266−12211 files
No security note in commit
Low 49 AI analysisMessage 96 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6862: units: Preserve error in NumOpResult add and sub

This commit fixes a bug in how the library handles math errors. Previously, if you added or subtracted two values and one of them already had an error (for example, dividing by zero), the library would silently replace that original error …

Error-state information loss in arithmetic wrapper typeIncorrect error propagation could mask prior failures such as division by zeroDefensive correctness fix in numeric operation result handling
5324e59aby Andrew Poelstra+26−41 file
No security note in commit
Low 37 AI analysisMessage 91 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6896: Fix `cargo audit` findings

This is a routine dependency-maintenance merge that swaps out old, unmaintained helper libraries for newer, patched versions in the project's example embedded programs and benchmark harness. The changes are driven by automated security sca…

cargo audit advisory remediationdependency upgrade for known-vulnerable crate (rand 0.7 / jobserver)dependency upgrade for known-vulnerable crate (crossbeam-epoch)
5f5f666dby Andrew Poelstra+51−1849 files
Vendor flagged security relevance
Low 37 AI analysisMessage 91 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6897: consensus_encoding: fix overcounting bug in the composite encoders exact size len calculation

This commit fixes a counting bug in a Rust Bitcoin library. The library has combined encoders that bundle multiple pieces of data together. A method called len() is supposed to report how many bytes are left to encode, but it was incorrect…

Violation of documented API contract (ExactSizeEncoder::len)Potential incorrect buffer-size or progress decisions by downstream callersComposite encoder state not fully isolated in size reporting before fix
22bbc326by Andrew Poelstra+19−13 files
No security note in commit
Low 37 AI analysisMessage 73 · Adequate
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

consensus_encoding: fix bug in the composite encoder's exact size

This commit fixes a bookkeeping bug in a Rust Bitcoin library's composite encoder. The encoder is a tool that combines multiple pieces of data into a single byte stream, and it has a method that is supposed to report how many bytes are lef…

Incorrect implementation of a documented size/length contractPotential for callers to over-allocate buffers or miscompute transaction/witness sizesComposite encoder used in consensus-critical serialization paths
914365b4by Nick Johnson+19−13 files
No security note in commit
Informational 18 AI analysisMessage 91 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6809: addresses: Add `AddressParams` type and remove most uses of network types

This is a routine API refactoring in the rust-bitcoin library. It introduces a new AddressParams type and replaces most public uses of the older Network/NetworkKind types when creating or validating Bitcoin addresses. There is no security …

No memory-safety issues, cryptographic errors, or input-validation changes observedNo new unsafe blocks, no new dependencies, no new parsing of untrusted dataAPI surface change only: parameter types replaced with semantically equivalent AddressParams
81032b1aby Andrew Poelstra+208−16414 files
No security note in commit
Low 38 AI analysisMessage 100 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6886: units: preserve original err summing `NumOpResult`

This patch fixes a bug in how rust-bitcoin adds up a list of numeric operation results. Previously, if any item in the list already carried an error (for example, dividing by zero), the summing code would overwrite that error and falsely r…

Error-type confusion / misattribution in arithmetic result aggregationLoss of original failure context across iterator foldPotential for downstream logic to act on wrong `MathOp`/`MathErrorKind`
4af1ee1dby Andrew Poelstra+23−191 file
No security note in commit
Informational 15 AI analysisMessage 100 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6618: ci: disable fail-fast in weekly rustc update crons

This commit changes two GitHub Actions workflow files used for weekly automated Rust toolchain updates. It adds `fail-fast: false` so that if one branch's update job fails, the other branch jobs continue running instead of all being cancel…

c0a70548by Andrew Poelstra+2−02 files
No security note in commit
Moderate 62 AI analysisMessage 91 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6884: units: Fix div_by_fee_rate_floor precision

This commit fixes a precision bug in a Rust Bitcoin library function that calculates how much transaction weight a given amount of money can afford at a given fee rate. The old code rounded the fee rate up to a coarser unit (satoshis per k…

Incorrect fee-rate-to-weight conversion leading to understated affordable weightInteger rounding direction (ceil) used as divisor in floor division causing off-by-one or larger precision lossAddition of overflow handling for Weight::MAX
9caad2c1by Andrew Poelstra+23−52 files
Vendor flagged security relevance
Repository ledger

Explore captured commits

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

Security candidatehashes: Add optimized ARM SHA256d for 64-byte inputby jrakibi · c37ab856 · Mar 23, 2026 · 1 fileMessage 73 · AdequateInformational 16Details
Commit message · jrakibi

hashes: Add optimized ARM SHA256d for 64-byte input

Add the three transforms for sha256(sha256(64_bytes))

Transforms 1 & 2 compute the inner `sha256(64_bytes)`:

- Transform 1: 64 bytes already fill the first block (no
padding needed), so we apply 64 rounds of compression
normally.
After T1: state = state + initial_state

- Transform 2: the message schedule at this step is constant
and known in advance (64 bytes of padding), so
we precompute W[i]+K[i] into MIDS and apply 64 rounds (no
schedule expansion needed).
After T2: state = state + saved_T1_state
(state now contains sha256(64_bytes))

- Transform 3 computes sha256(output_of_T1_and_T2). The output
is 32 bytes, so the block contains 32 bytes and the rest is
known padding. we precompute the message
schedule for the known words (w8-w15) into FINS.
After T3: state = state + initial_state
(state now contains the sha256d result)

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
cryptography-sensitive path
AI analysis · Informational 16/100

This commit adds a new, highly optimized way to compute a double SHA-256 hash on 64-byte inputs for 64-bit ARM processors (aarch64) using special CPU instructions. It is a pure performance improvement and does not change any public APIs or fix any known bug. There is no indication in the commit that it addresses a security vulnerability.

Security candidatekey: Rename PrivateKey::public_key to to_public_keyby Mitchell Bagot · d97484c4 · Mar 23, 2026 · 3 filesMessage 73 · AdequateInformational 20Details
Commit message · Mitchell Bagot

key: Rename PrivateKey::public_key to to_public_key

The public_key function on PrivateKey converts the key into a matching
PublicKey. Since this function is not a getter but a conversion
function, it should use the {to_,as_,into_} naming scheme. In this
case, to_public_key matches the naming used for the equivalent function
on the Keypair type.

Rename PrivateKey::public_key function to to_public_key, deprecating
the old function name.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
cryptography-sensitive pathsigning or wallet path
AI analysis · Informational 20/100

This commit is a routine API cleanup: it renames a method on the PrivateKey type from public_key to to_public_key and keeps the old name as a deprecated alias. It does not change what the code does, only how callers spell the function name. There is no security bug being fixed.

Security candidatehashes: use Rust-like syntax in hash type macrosby Jamil Lambert, PhD · 8b91b42f · Mar 23, 2026 · 11 filesMessage 45 · ThinInformational 15Details
Commit message · Jamil Lambert, PhD

hashes: use Rust-like syntax in hash type macros

45/100 · ThinMessage clarity
✓ 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 is a purely cosmetic refactor of how hash types are declared in the rust-bitcoin library. It changes the internal macro syntax from a custom list of numbers and flags to something that looks more like ordinary Rust code. There is no change to the actual hashing behavior, output, or public API.

Security candidate2026-03-22 automated rustfmt nightlyby Fmt Bot · 508986dc · Mar 22, 2026 · 76 filesMessage 45 · ThinInformational 15Details
Commit message · Fmt Bot

2026-03-22 automated rustfmt nightly

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
cryptography-sensitive pathsigning or wallet pathparser or protocol path
AI analysis · Informational 15/100

This is a routine automated code-formatting commit. It only changes whitespace, import order, line wrapping, and other stylistic details produced by the rustfmt tool. There are no functional changes, bug fixes, or security-related modifications.

Security candidateIntroduce WifKey for private keys with networkby Mitchell Bagot · 2f7b79b6 · Mar 19, 2026 · 8 filesMessage 68 · AdequateInformational 17Details
Commit message · Mitchell Bagot

Introduce WifKey for private keys with network

In bitcoin, the PrivateKey type holds a secp SecretKey, a
compressedness flag and a NetworkKind. The NetworkKind field is only
ever used when converting to/from a WIF key string. Since a PrivateKey
can (or will) be usable for functions beyond just WIF import/export, it
is necessary to remove the dependence on network for the key type.

Introduce WifKey which holds a PrivateKey and a NetworkKind.
Remove network field from PrivateKey.
Replace uses of PrivateKey involving WIF logic with WifKey.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
secret or key materialcryptography-sensitive pathsigning or wallet path
AI analysis · Informational 17/100

This commit is a routine API refactor in the rust-bitcoin library. It splits the old PrivateKey type into two parts: a simpler PrivateKey that only stores the secret key and compression flag, and a new WifKey type that pairs a PrivateKey with a Bitcoin network for WIF import/export. The change removes the network field from PrivateKey and moves WIF-specific parsing, serialization, and formatting onto WifKey. There is no security fix here; it is a design cleanup to make the key types more general-purpose.

Security candidateRemove private key from create-p2wpkh-address exampleby Mitchell Bagot · d6b18416 · Mar 19, 2026 · 1 fileMessage 78 · AdequateInformational 15Details
Commit message · Mitchell Bagot

Remove private key from create-p2wpkh-address example

The create-p2wpkh-address example demonstrates how to construct a
P2WPKH address from a secp PublicKey, going through the
CompressedPublicKey type. Currently, it also logs out the private key
required to spend from that address. Since the example is to
demonstrate address construction, the private key is not needed.

Remove the private key logging from the create-p2wpk-address example.

78/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Names security-relevant behavior explicitly
Why it was queued
secret or key material
AI analysis · Informational 15/100

This commit removes a line from a code example that printed a randomly-generated private key. The example now only prints the Bitcoin address. It is a documentation/example cleanup, not a fix for a software vulnerability in the library itself.

Security candidateImplement `Arbitrary` for psbt typesby Shing Him Ng · 37c9fce2 · Mar 18, 2026 · 17 filesMessage 45 · ThinInformational 19Details
Commit message · Shing Him Ng

Implement `Arbitrary` for psbt types

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
signing boundarycryptography-sensitive pathsigning or wallet path
AI analysis · Informational 19/100

This commit adds optional support for the `arbitrary` crate, a Rust fuzz-testing helper, across several data types in the rust-bitcoin library. It does not change normal runtime behavior; the new code is only compiled when the optional `arbitrary` feature is enabled. There is no direct security vulnerability in the diff, but it slightly expands the library's dependency tree and public API surface for users who opt into the feature.

Security candidatepsbt: Add unit test case for key byte size handlingby Mitchell Bagot · 3c05450d · Mar 18, 2026 · 1 fileMessage 95 · StrongLow 35Details
Commit message · Mitchell Bagot

psbt: Add unit test case for key byte size handling

Recently, a change ws introduced in psbt to fix key parsing when the
key has a total byte size value that is so small as to fail to cover
the type compact size. In this case, a panic/underflow could occur.
This has been fixed, but a test case should be included to prevent
regressions.

Introduce unit test to verify that small key bytes throw errors instead
of panicing due to underflow.

95/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification
Why it was queued
signing boundarysigning or wallet path
AI analysis · Low 35/100

This commit only adds a new unit test; it does not change production code. The test checks that parsing a malformed PSBT key with an impossibly small byte-size field returns a proper error instead of crashing. The underlying panic/underflow bug was already fixed in an earlier change, so this patch is a regression test rather than a fix.

Security candidateci: move stable-version to repo root (required for cargo-rbmt)by Nick Johnson · 750ed320 · Mar 17, 2026 · 3 filesMessage 62 · AdequateInformational 15Details
Commit message · Nick Johnson

ci: move stable-version to repo root (required for cargo-rbmt)

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
boot or update path
AI analysis · Informational 15/100

This commit simply moves a file called 'stable-version' from one folder to another within the project's CI configuration. The file contains a Rust compiler version number used by automated checks. There is no change to the project's actual Bitcoin code, no security fix, and no vulnerability introduced.

Security candidateci: pin zizmor version to avoid random breaksby Nick Johnson · e67e4b92 · Mar 17, 2026 · 1 fileMessage 74 · AdequateInformational 15Details
Commit message · Nick Johnson

ci: pin zizmor version to avoid random breaks

74/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Explains rationale or failure mode✓ Names security-relevant behavior explicitly! No meaningful explanatory body
Why it was queued
access controldocumentation-only discount
AI analysis · Informational 15/100

This commit changes a GitHub Actions workflow so that a security linting tool called zizmor is installed at a fixed version (1.22.0) instead of the latest release. It is a routine CI maintenance change to prevent unexpected breakages when zizmor releases new versions. There is no indication it fixes or introduces a security vulnerability.

Security candidateClean up comments and usages of to_x_only_public_keyby Mitchell Bagot · 33ce68c8 · Mar 17, 2026 · 2 filesMessage 73 · AdequateInformational 15Details
Commit message · Mitchell Bagot

Clean up comments and usages of to_x_only_public_key

Following the removal of parity from from_keypair, uses of
to_x_only_public_key were similarly changed. In those changed, doc
comments and function usage sites weren't cleaned up to suit the new
functionality.

Adjust comments for from_keypair. Remove unused variable definition in
from_keypair.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
cryptography-sensitive pathsigning or wallet path
AI analysis · Informational 15/100

This is a minor code cleanup commit. It removes an unnecessary intermediate variable, updates a doc comment to match a previous API change, and removes an outdated comment in a test. There is no functional change and no security impact.

Security candidateAdd signing functions to Keypairby Mitchell Bagot · b74c4c32 · Mar 17, 2026 · 5 filesMessage 80 · StrongInformational 19Details
Commit message · Mitchell Bagot

Add signing functions to Keypair

In order to reduce the need to unwrap and reach into the Keypair type
for the secp keypair, signing should be possible directly with the
wrapper type.

Introduce raw_bip340_sign and raw_bip340_sign_with_aux_randomness to
schnorr sign bytes with the keypair.

80/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
Why it was queued
signing boundarycryptography-sensitive pathsigning or wallet path
AI analysis · Informational 19/100

This commit adds convenience methods so that a Bitcoin keypair can sign messages directly, without callers having to reach into the underlying secp256k1 library. It is a code-cleanup and API-ergonomics change, not a fix for a known bug or vulnerability. The new methods wrap the same underlying signing functions that were already being used, so the cryptographic behavior is unchanged.

Security candidateReplace to_inner with as_inner on Keypairby Mitchell Bagot · bdb0bb74 · Mar 17, 2026 · 5 filesMessage 68 · AdequateLow 28Details
Commit message · Mitchell Bagot

Replace to_inner with as_inner on Keypair

When used on Copy types, to_inner produces a copy of the type. This is
undesirable for secret key types. For Keypair, access to the inner
type is necessary, so to_inner should be replaced by as_inner.

Replace to_inner (owned -> owned) with as_inner (ref -> ref) on
Keypair.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
secret or key materialcryptography-sensitive pathsigning or wallet path
AI analysis · Low 28/100

This commit changes how the library exposes a Bitcoin secret key pair internally. Previously, calling `to_inner()` made a full copy of the secret key data. The new `as_inner()` returns a reference instead, so the secret bytes are not duplicated in memory as often. This is a defensive hardening change: it reduces the number of copies of sensitive key material floating around in memory, which slightly lowers the chance that a secret key could leak through memory dumps, swap, or debugging. It is not a fix for an active bug or a directly exploitable vulnerability.

Security candidateMove script hex parsing to primitivesby Tobin C. Harding · cd735bf2 · Mar 16, 2026 · 10 filesMessage 68 · AdequateInformational 18Details
Commit message · Tobin C. Harding

Move script hex parsing to primitives

Now that we use stable error types we can move the hex parsing
functions from `bitcoin` to `primitives`.

Leave the deprecated method behind in `bitcoin`.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
cryptography-sensitive pathsigning or wallet path
AI analysis · Informational 18/100

This commit is a routine code reorganization: it moves functions that parse Bitcoin script hex strings from the main `bitcoin` crate into the lower-level `primitives` crate. The old functions in `bitcoin` are kept as deprecated aliases so existing code keeps working. There is no security fix or vulnerability here.

Security candidatebitcoin: Stop using FromHexby Tobin C. Harding · 12782954 · Mar 16, 2026 · 1 fileMessage 75 · AdequateInformational 18Details
Commit message · Tobin C. Harding

bitcoin: Stop using FromHex

In the upcoming `hex v1.1.0` we remove the `FromHex` trait. In order
to use that release we need to remove its usage here. The single usage
was left in so as not to change the function signature on a deprecated
signature, just go ahead and do that now. It is still better to keep
the different signature because downstream will get the deprecation
notice and _hopefully_ not too many folk are matching on the return type.

75/100 · AdequateMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Names security-relevant behavior explicitly
Why it was queued
signing boundary
AI analysis · Informational 18/100

This is a routine code-maintenance change. The developers replaced one way of reading hexadecimal strings with another, because the old helper tool (the `FromHex` trait) is being removed in an upcoming version of a dependency. The function being changed is already marked as deprecated, so it is not the preferred way to do things. There is no indication this fixes a security bug or introduces a vulnerability.

Security candidateRemove outdated doc from `XOnlyPublicKey::from_secp`by Shing Him Ng · 277e0dce · Mar 16, 2026 · 1 fileMessage 50 · ThinInformational 15Details
Commit message · Shing Him Ng

Remove outdated doc from `XOnlyPublicKey::from_secp`

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 simply removes two outdated lines from a code comment. The removed text incorrectly claimed that the function always sets an even parity, but the function actually accepts a parity argument supplied by the caller. There is no code change and no security issue.

Security candidateDrop the hex_lit dep in favor of built in hexby Nick Johnson · 470795a1 · Mar 16, 2026 · 26 filesMessage 45 · ThinInformational 15Details
Commit message · Nick Johnson

Drop the hex_lit dep in favor of built in hex

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
cryptography-sensitive pathsigning or wallet path
AI analysis · Informational 15/100

This commit is a routine dependency cleanup. It removes the external hex_lit crate and switches test/example code to use built-in hex macros from the project's own hex-conservative crate. There is no user-facing behavior change and no security fix or vulnerability introduced.

Security candidateAdd _secret_ to functions that take and return secret bytesby Mitchell Bagot · e3d39953 · Mar 16, 2026 · 1 fileMessage 85 · StrongInformational 20Details
Commit message · Mitchell Bagot

Add _secret_ to functions that take and return secret bytes

In order to make it immediately clear to users when they are working
with or needing secret bytes, all functions that take and return
secret bytes should include the word secret in the function name.

Add _secret_ to all functions in Keypair and PrivateKey that take and
return secret bytes.
Rename from_byte_array to from_secret_bytes.

85/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
Why it was queued
cryptography-sensitive path
AI analysis · Informational 20/100

This commit is a routine API rename with no security bug. It renames functions in the Rust Bitcoin library that handle private key bytes so their names include the word 'secret' (for example, 'to_vec' becomes 'to_secret_vec' and 'from_byte_array' becomes 'from_secret_bytes'). The goal is to make it more obvious to developers when they are working with sensitive secret material. The actual behavior of the code is unchanged.

Security candidateRemove all crate-level alloc feature gatesby Mitchell Bagot · 99b7c289 · Mar 16, 2026 · 4 filesMessage 68 · AdequateInformational 17Details
Commit message · Mitchell Bagot

Remove all crate-level alloc feature gates

In addresses, base58, crypto and key_expression, all functionality in
the crate is gated on the alloc feature through a crate-level alloc
feature gate. In some cases, the ordering of the #![no_std] and alloc
gate cause problems with linking against std for no-alloc builds. In
order to completely avoid the potential of that problem, and unify the
crates with the others, all crate-level feature gates should be removed
and replaced with alloc gates on all types and functionality.

Remove crate-level alloc feature gate from addresses, base58, crypto
and key_expression, replacing them with individual feature gates where
necessary.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
cryptography-sensitive path
AI analysis · Informational 17/100

This commit is a build-system cleanup, not a security fix. It removes crate-wide switches that made entire Rust sub-crates disappear when the 'alloc' feature was off, and instead marks individual functions and types as requiring 'alloc'. The stated reason is to fix linking problems in no-alloc builds, not to patch a vulnerability. There is no evidence in the commit of an exploitable bug.

Security candidatepsbt: Handle underflow on small key byte lengthby Mitchell Bagot · ef822345 · Mar 16, 2026 · 1 fileMessage 80 · StrongModerate 65Details
Commit message · Mitchell Bagot

psbt: Handle underflow on small key byte length

In PSBT keys, a change was recently introduced to allow for multi-byte
key type values. In this change, the key data length was changed to
calculate based on the total key length, subtracting the byte count of
the key type compact size value. For malformed PSBT inputs where the
total key length is insufficient to cover the type value compact size,
this causes an underflow in the subtraction, panicing on debug and
potentially causing incorrect behaviour for release.

Instead, this calculation should use a checked_sub, erroring gracefully
when this underflow would otherwise occur.

Change key data length calculation to use checked_sub and return an
InvalidKey error when the total key length value is invalid to parse
the key type correctly.

80/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
Why it was queued
signing boundarysigning or wallet path
AI analysis · Moderate 65/100

This commit fixes a bug in how the library reads PSBT (Partially Signed Bitcoin Transaction) keys. A recent change accidentally made it possible for a malformed input to cause an arithmetic underflow when calculating how many bytes of key data remain. In debug builds that would panic (crash); in release builds it could wrap around and behave incorrectly. The fix uses a safe checked subtraction and returns a proper parsing error instead.

Security candidateMigrate from Honggfuzz to libfuzzerby Shing Him Ng · 35c0b9d3 · Mar 14, 2026 · 44 filesMessage 78 · AdequateInformational 15Details
Commit message · Shing Him Ng

Migrate from Honggfuzz to libfuzzer

This commit has a few main parts:

- Update CI to install required dependencies for libfuzzer
The default Cross s390x image uses an older version of GCC (Ubuntu
20.04), which lacks std::clamp needed by libfuzzer-sys. The s390x
Dockerfile provides Cross with a container with GCC 13, native build
tools, and QEMU for running s390x tests. Cross.toml configures Cross to
use this custom image instead of the default.

- Update the lock files
- Update the fuzz targets to use libfuzzer
- Update the fuzz helper scripts and documentation
- Update the duplicate dependency whitelist to include libc
- Move `fuzz` into a nested workspace

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
fuzzing or regression evidencecryptography-sensitive pathsigning or wallet pathparser or protocol path
AI analysis · Informational 15/100

This commit is a maintenance change that switches the project's fuzz testing framework from Honggfuzz to libfuzzer (cargo-fuzz). It updates build files, CI configuration, documentation, and fuzz target source files to use the new framework. There is no change to the actual Bitcoin library code that end users or applications depend on, and no security vulnerability is introduced or fixed.

Security candidateRemove Display from PrivateKeyby Mitchell Bagot · c04f2dd2 · Mar 13, 2026 · 3 filesMessage 58 · ThinLow 38Details
Commit message · Mitchell Bagot

Remove Display from PrivateKey

As part of the work in hiding secret data in keys, we want to remove
the Display impl for PrivateKey. Users may still display the secret
data using to_wif, or by calling display_secret on the inner key.

Remove Display from PrivateKey.

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context
Why it was queued
cryptography-sensitive path
AI analysis · Low 38/100

This change removes the ability to accidentally print a Bitcoin private key using Rust's standard '{}' formatting. Before, code like println!("{}", private_key) would expose the secret key. Now developers must explicitly call .to_wif() or similar methods, making secret leakage less likely through casual logging or error messages. It is a defensive hardening improvement, not a fix for an active exploit.

Security candidateRemove Index<RangeFull> from PrivateKeyby Mitchell Bagot · e4d46398 · Mar 13, 2026 · 1 fileMessage 68 · AdequateLow 29Details
Commit message · Mitchell Bagot

Remove Index<RangeFull> from PrivateKey

The Index trait allows for indexing on the PrivateKey type. Since we're
working towards hiding secret data in the PrivateKey, this trait should
not be included on the PrivateKey type.

Remove Index<RangeFull> impl on PrivateKey.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
cryptography-sensitive path
AI analysis · Low 29/100

This commit removes the ability to use square-bracket slicing (like `private_key[..]`) on a Bitcoin private key. The change is part of a longer-term effort to prevent secret key material from being accidentally exposed through Rust's indexing features. It is a hardening cleanup rather than a fix for an active security flaw.

Security candidateAdd hex Display formatting for taproot::Signatureby Mitchell Bagot · bf3d769c · Mar 13, 2026 · 1 fileMessage 83 · StrongInformational 19Details
Commit message · Mitchell Bagot

Add hex Display formatting for taproot::Signature

The ecdsa signature has display formatting which roundtrips with the
corresponding FromStr impl. The taproot signature has no such display
capabilities.

Introduce Display impl on taproot::Signature.
Add test for hex roundtrip with Display + FromStr and FromStr error.

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
signing boundarycryptography-sensitive path
AI analysis · Informational 19/100

This commit adds a human-readable hex display format for Taproot signatures in the rust-bitcoin library, matching a similar feature already available for ECDSA signatures. It is a straightforward feature addition with tests and does not fix any security bug.

Security candidateAdd hex string parsing for taproot::Signatureby Mitchell Bagot · e31b80ee · Mar 13, 2026 · 1 fileMessage 73 · AdequateInformational 19Details
Commit message · Mitchell Bagot

Add hex string parsing for taproot::Signature

The ecdsa::Signature can roundtrip to hex, but taproot::Signature
cannot.

Add FromStr for taproot::Signature and ParseSignatureError as an error
type.

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
signing boundarycryptography-sensitive path
AI analysis · Informational 19/100

This commit adds a new feature: the ability to parse a Taproot cryptographic signature from a hexadecimal text string. Previously only ECDSA signatures could be parsed this way. The change is purely additive and does not fix any known bug or vulnerability. It simply exposes a new parsing function to users of the library.