RB
← All projectsRust Bitcoin

rust-bitcoin

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

BitcoinCryptographic librariesNormal
Repository coverage

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

459security candidates448second-pass queue1053AI analyses
184commits · 30 days
403commits · 60 days
1283commits · 180 days
2061commits · 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.

64/100 average clarity
311Strong · 80–100
1054Adequate · 60–79
555Thin · 40–59
150Opaque · 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 Bagot640192370068
Tobin C. Harding40965160063
jrakibi944963068
Nick Johnson18920112059
Andrew Poelstra512035075
Jamil Lambert, PhD1141849061
Fmt Bot311423045
Trevor Arjeski111111069
Shing Him Ng31724056
Ismail Daif22612050
satsfy (Renato Britto)17612066
Martin Habovstiak27512069
Analysis record

Published AI watches

Last scanned 55 minutes ago

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

Merge rust-bitcoin/rust-bitcoin#6671: units: reword docs from height to count in relative locktime

This commit only changes documentation comments and variable names in the rust-bitcoin library. It rewords references to 'block height' as 'block count' for relative locktime, because a relative locktime measures elapsed blocks since a coi…

6ea4ff92by Andrew Poelstra+20−172 files
No security note in commit
Informational 15 AI analysisMessage 96 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6670: ci: fix labeller permissions

This is a routine GitHub Actions workflow fix. The change gives the automated PR labeler workflow permission to download artifacts and explicitly tells the GitHub CLI which repository to act on. It does not change the Bitcoin library code,…

CI workflow permission fixNo source code changesNo cryptographic or consensus changes
276e0a61by Andrew Poelstra+5−01 file
No security note in commit
Informational 15 AI analysisMessage 91 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6657: Release tracking PR: `base58ck 0.5.0`

This commit is a routine version bump for the base58ck crate from 0.4.0 to 0.5.0. It only updates version numbers in package manifests, lock files, and adds a changelog entry. There are no code changes and no security relevance.

9deb5de1by Andrew Poelstra+22−168 files
No security note in commit
Informational 21 AI analysisMessage 100 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6440: base58: Introduce `decode_check_to_array` for alloc-less decoding

This commit is a routine feature addition to the rust-bitcoin base58 crate. It adds a new no-allocator function to decode short base58-check strings into fixed-size byte arrays, and renames the existing error type while keeping a deprecate…

No security-relevant bug fix is described in the commit message or diff.New decoding path uses a fixed 128-byte scratch buffer (`ArrayVec`) and rejects oversized inputs.Checksum verification and invalid-character handling are preserved from the existing alloc implementation.
c5fd1832by Andrew Poelstra+330−775 files
No security note in commit
Informational 15 AI analysisMessage 93 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6646: hashes: add several methods to `Midstate` and release 1.2.0

This commit is a routine feature release for the bitcoin_hashes crate. It adds new public methods and a constant to the SHA-256 Midstate type so developers can compute SHA-256 midstates in const contexts. There is no indication of a securi…

0f68fcb3by Andrew Poelstra+157−4210 files
No security note in commit
Informational 15 AI analysisMessage 73 · Adequate
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

units: reword docs to block count in relative locktime

This commit only rewords documentation comments and variable names in the codebase. It changes references from 'block height' to 'block count' for relative lock times, which is a terminology correction with no functional code changes. Ther…

8867fe2eby satsfy (Renato Britto)+20−172 files
No security note in commit
Informational 15 AI analysisMessage 91 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6667: Make the `WitnessesEncoder` private

This commit makes a small internal helper type called WitnessesEncoder private. It was previously exported as public API but is only used inside the transaction encoder. The change removes it from the public API surface and moves the code …

07d91f7fby Andrew Poelstra+54−1324 files
No security note in commit
Informational 12 AI analysisMessage 75 · Adequate
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

ci: fix labeller permissions

This commit adjusts a GitHub Actions workflow that automatically labels pull requests based on CI results. It adds a built-in repository token, tells the artifact download step to merge single-file artifacts, and explicitly sets the reposi…

Workflow-only change with no library code modificationsUses the default GITHUB_TOKEN rather than a custom secretRuns in workflow_run context, which already has elevated repository access by design
715f2bd6by Nick Johnson+5−01 file
No security note in commit
Informational 19 AI analysisMessage 91 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6661: units: Remove `From<u16>` from `NumberOfBlocks`

This is a routine API cleanup, not a security fix. The developers removed a shortcut that let programmers create a 'number of blocks' value directly from any u16 number, replacing it with an existing named constructor called from_height. T…

ed5f1b68by Andrew Poelstra+18−358 files
No security note in commit
Informational 15 AI analysisMessage 91 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6668: Scrub the transaction encoding logic

This commit is a pure code reorganization (refactor) in the rust-bitcoin library. It moves transaction encoding and decoding definitions around within a single file so the code follows the project's preferred layout. No logic, behavior, or…

c5588ba5by Andrew Poelstra+57−571 file
No security note in commit
Informational 18 AI analysisMessage 96 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6662: build(deps): bump actions/checkout from 6.0.2 to 6.0.3

This commit is a routine update to the GitHub Actions checkout tool used by the project's automated workflows. It changes the pinned version from 6.0.2 to 6.0.3 across many workflow files. The newer version fixes minor bugs related to SHA-…

Dependency bump of actions/checkout to a patch releaseUpstream fixes for SHA-256 repository checkout and merge commit regexAll affected workflows already disable persisted credentials
f7d364cdby Andrew Poelstra+29−2915 files
No security note in commit
Informational 15 AI analysisMessage 96 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6663: build(deps): bump taiki-e/install-action from 2.79.12 to 2.81.4

This is a routine Dependabot update that bumps the version of a third-party GitHub Action used only in automated testing workflows. The change does not touch the project's actual Bitcoin library code, and there is no indication it fixes or…

5c92c0b0by Andrew Poelstra+2−22 files
No security note in commit
Informational 15 AI analysisMessage 45 · Thin
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Update the API text files

This commit only updates two generated API text files that list the public surface of the Rust crate. It removes entries for a `WitnessesEncoder` type, reflecting that the type is no longer part of the public API. There is no source code c…

9c391145by Tobin C. Harding+0−782 files
No security note in commit
Informational 15 AI analysisMessage 68 · Adequate
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Scrub the transaction encoding logic

This commit is a pure code reorganization: it moves existing transaction encoding and decoding definitions around within a single file so they follow the project's preferred layout. No logic was changed, no security bug was fixed, and no n…

80dcef15by Tobin C. Harding+57−571 file
No security note in commit
Informational 15 AI analysisMessage 58 · Thin
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Make the WitnessesEncoder private

This commit simply hides an internal helper type called WitnessesEncoder from public view. It is a routine API-cleanup change with no security relevance visible in the code or commit message.

b37accc3by Tobin C. Harding+54−542 files
No security note in commit
Informational 15 AI analysisMessage 45 · Thin
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

release bitcoin_hashes 1.2.0

This commit is a routine version bump for the bitcoin_hashes library from version 1.1.0 to 1.2.0. It only updates lock files, the package version number, and the changelog. There is no code change and no security relevance visible in the c…

8899dfd2by Andrew Poelstra+27−224 files
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.1.0 to 8.2.0

This is a routine automated update by Dependabot that changes the pinned version of a GitHub Action used to install the 'uv' Python tool in two workflow files. The new commit hash corresponds to the legitimate 8.2.0 release of astral-sh/se…

1c438632by dependabot[bot]+2−22 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 automated update by Dependabot that changes the pinned version of a GitHub-provided security scanning helper used in a workflow. It does not modify the project's actual Bitcoin library code, its cryptographic logic, or an…

5293bee4by 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 taiki-e/install-action from 2.79.12 to 2.81.4

This is a routine Dependabot update that bumps a GitHub Actions helper used in automated testing workflows from version 2.79.12 to 2.81.4. It only changes which version of the action is invoked during CI runs; it does not modify the Rust B…

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

build(deps): bump actions/checkout from 6.0.2 to 6.0.3

This is a routine automated update by Dependabot that bumps the GitHub Actions 'actions/checkout' dependency from version 6.0.2 to 6.0.3 across all project workflow files. It only changes pinned commit hashes and version comments for the a…

Routine patch-level dependency bumpNo changes to permissions, inputs, or workflow logicpersist-credentials: false already present on all checkout steps
ae935fadby dependabot[bot]+29−2915 files
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.

Security candidateRearrange impls and traits for typesby Mitchell Bagot · 3816b5ac · May 8, 2026 · 1 fileMessage 68 · AdequateInformational 15Details
Commit message · Mitchell Bagot

Rearrange impls and traits for types

At the moment, there are a handful of different orderings used for
traits + impl blocks on the types in crypto keys.

Unify trait + impl ordering to impl -> FromStr -> TryFrom -> From ->
LowerHex -> Display -> Debug.

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 15/100

This commit is a pure code cleanup: it reorders where certain trait implementations (like FromStr, From, Display, Debug) appear in the source file so all types follow the same consistent pattern. No code behavior is changed, no security bug is fixed, and no vulnerability is introduced.

Security candidateAdd From<Infallible> to all error typesby Mitchell Bagot · 09e0baf5 · May 8, 2026 · 1 fileMessage 68 · AdequateInformational 15Details
Commit message · Mitchell Bagot

Add From<Infallible> to all error types

As has been decided in bitcoin, all error types should have a
From<Infallible> impl to aid in possible usage with generics.

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 15/100

This commit adds standard Rust helper code that lets several error types be automatically converted from Rust's Infallible type. Infallible is a type that can never actually exist, so these conversions are safe, cannot be triggered by user input, and have no security impact. It is a routine API ergonomics improvement.

Lower-priorityBump old bitcoin version to 0.32.9 in fuzzby Mitchell Bagot · b1c71405 · May 7, 2026 · 4 filesMessage 55 · ThinInformational 15Details
Commit message · Mitchell Bagot

Bump old bitcoin version to 0.32.9 in fuzz

55/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Mentions testing or verification! No meaningful explanatory body
Why it was queued
fuzzing or regression evidence
AI analysis · Informational 15/100

This commit simply updates a dependency version number used only in fuzz testing infrastructure. It changes the pinned version of an older 'bitcoin' crate from 0.32.8 to 0.32.9 in lock files and fuzz configuration files. There is no indication this is a security fix for the main project, nor does the commit itself describe any security relevance.

Lower-priorityp2p: Error on invalid FeeRate in FeeFilter decodeby Mitchell Bagot · 6a2a98ce · May 7, 2026 · 1 fileMessage 68 · AdequateTriage 0Details
Commit message · Mitchell Bagot

p2p: Error on invalid FeeRate in FeeFilter decode

The FeeFilterDecoder currently saturates invalid fee rate values (those
outside 0..=u32::MAX) to FeeRate::MAX. This prevents the type from
round-tripping and causes problems with checksum calculations in the
V1NetworkMessage. Instead, invalid fee rates should fail to decode and
the range of valid fee rates should be changed to 0..Amount::MAX_MONEY,
as it is in Core.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-priorityp2p: Error on decode for addresses > 512 bytesby Mitchell Bagot · 56b5a24f · May 7, 2026 · 1 fileMessage 68 · AdequateTriage 0Details
Commit message · Mitchell Bagot

p2p: Error on decode for addresses > 512 bytes

The AddrV2Decoder decodes the address type and the byte blob using
an ArrayDecoder + ByteVecDecoder. In the old version, a byte blob with
more than 512 bytes would throw an error, whilst the new version
successfully decodes it to an unknown address type.

Add check for address_bytes blob length > 512 bytes and throw error to
match old behaviour.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-priorityAdjust encodable fuzz target for known differencesby Mitchell Bagot · 6296c3ef · May 7, 2026 · 1 fileMessage 95 · StrongInformational 15Details
Commit message · Mitchell Bagot

Adjust encodable fuzz target for known differences

The encodable fuzzing target should ignore known differences between the
old and new encoders/decoders. Due to various limitations with error
types and such, some known differences are not accounted for yet.

Add ignores for transaction decoder errors with known differences.
Adjust ignores for AddrV2Messages for service flags limit.

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
fuzzing or regression evidence
AI analysis · Informational 15/100

This commit only changes a fuzz testing target. It tells the fuzzer to ignore certain known, expected differences between old and new Bitcoin encoding/decoding code. It does not change the actual library code that handles transactions, addresses, or network messages, so it cannot directly affect real users or introduce a security vulnerability.

Lower-prioritytaproot-primitives: Remove hashes/arbitraryby Mitchell Bagot · a7872b1b · May 6, 2026 · 1 fileMessage 68 · AdequateTriage 0Details
Commit message · Mitchell Bagot

taproot-primitives: Remove hashes/arbitrary

The hashes crate does not have an arbitrary feature, and it the
unreleased feature is not used in this crate, so there's no reason to
attempt to enable it when the taproot-primitives crate arbitrary is
enabled.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Security candidatep2p: change example to use configurable magic paramby yancy · 7ca8724f · May 5, 2026 · 1 fileMessage 65 · AdequateInformational 15Details
Commit message · yancy

p2p: change example to use configurable magic param

The example does not currently work as documented outside of regtest.

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Why it was queued
authentication path
AI analysis · Informational 15/100

This is a one-line fix to a code example so it uses a configurable network parameter instead of always using the regtest network. It is not a security fix and does not change any library behavior.

Lower-priorityp2p: Wrap V1MessageHeaderDecoderError with V1NetworkMessage Header errby Mitchell Bagot · 4dc23d2d · May 5, 2026 · 1 fileMessage 73 · AdequateTriage 0Details
Commit message · Mitchell Bagot

p2p: Wrap V1MessageHeaderDecoderError with V1NetworkMessage Header err

The V1NetworkMessageDecoderErrorInner has a Header error variant with
no internal information. This makes it less useful to decode a
V1NetworkMessage with the V1NetworkMessageDecoder than a
V1MessageHeaderDecoder in the case of an error. In order that users can
still retrieve meaningful error information, the header's error should
be wrapped by the Header error variant.

Add internal V1MessageHeaderDecoderError for
V1NetworkMessageDecoderErrorInner::Header variant.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-priorityp2p: Use V1MessageHeaderDecoder in V1NetworkMessageDecoderby Mitchell Bagot · 15af74f4 · May 5, 2026 · 1 fileMessage 73 · AdequateTriage 0Details
Commit message · Mitchell Bagot

p2p: Use V1MessageHeaderDecoder in V1NetworkMessageDecoder

The V1NetworkMessageDecoder decodes the header fields at the start of
the decoding process using a manually defined Decoder4. Since the
header fields that it decodes are exactly equivalent to the existing
encoding of the V1MessageHeader, the decoder for the header should be
used. This also provides an opportunity to wrap the header decoder
error to provide more information to the user than the current error
does.

Replace manual Decoder4 header_decoder with V1MessageHeaderDecoder in
V1NetworkMessageDecoder.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-priorityp2p: Use parsed types in ReadingPayload stateby Mitchell Bagot · 065d991c · May 5, 2026 · 1 fileMessage 68 · AdequateTriage 0Details
Commit message · Mitchell Bagot

p2p: Use parsed types in ReadingPayload state

The ReadingPayload state in the V1NetworkMessageDecoder holds byte
arrays that are parsed later during the end() call. While this possibly
improves performance in an error case, it prevents efficient usage of
the V1MessageHeaderDecoder for parsing the header, complicating types.

Replace magic_bytes and payload_len_bytes with magic and length and use
Magic and u32 parsed types instead of [u8; 4] arrays.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-priorityAdjust encodable fuzz target for known differencesby Mitchell Bagot · e6034f67 · May 5, 2026 · 1 fileMessage 95 · StrongInformational 11Details
Commit message · Mitchell Bagot

Adjust encodable fuzz target for known differences

The encodable fuzzing target should ignore known differences between the
old and new encoders/decoders. Due to various limitations with error
types and such, some known differences are not accounted for yet.

Add ignores for decoder errors with known differences between 0.32 and
new decoders.

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
fuzzing or regression evidence
AI analysis · Informational 11/100

This commit only changes a fuzz testing target so it ignores additional known differences between old and new Bitcoin data decoders. It is a test-configuration update, not a fix to production code, and does not change how real transactions are validated.

Security candidateskip rustfmt for `software_sha256d_64`by jrakibi · 3e1f256b · May 5, 2026 · 1 fileMessage 35 · OpaqueInformational 15Details
Commit message · jrakibi

skip rustfmt for `software_sha256d_64`

35/100 · OpaqueMessage clarity
✓ Descriptive subject! No meaningful explanatory body! Opaque security-relevant change
Why it was queued
cryptography-sensitive path
AI analysis · Informational 15/100

This commit adds a single formatting directive (`#[rustfmt::skip]`) to tell Rust's automatic code formatter not to reformat a specific SHA-256 hashing function. It does not change any executable code, logic, or behavior. There is no security impact.

Security candidatehashes: use the optimized scalar in sha256d_64 fallbackby jrakibi · 9ae38ac8 · May 5, 2026 · 1 fileMessage 65 · AdequateInformational 20Details
Commit message · jrakibi

hashes: use the optimized scalar in sha256d_64 fallback

we get up to ~7% speedup with the new optimized scalar

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Why it was queued
cryptography-sensitive path
AI analysis · Informational 20/100

This is a small performance improvement in the rust-bitcoin library's SHA256 double-hash code. It replaces a slower fallback code path with a faster, already-existing internal implementation when advanced CPU features are not available. There is no indication of a security bug or vulnerability.

Security candidatehashes: Add scalar SHA256d for 64-byte inputby jrakibi · f3bbb345 · May 5, 2026 · 1 fileMessage 68 · AdequateInformational 16Details
Commit message · jrakibi

hashes: Add scalar SHA256d for 64-byte input

add the three transforms for sha256(sha256(64_bytes)) without any
SIMD intrinsics, as a fallback for platforms without SHA-NI, AVX2,
or SSE4.1 support

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 16/100

This commit adds a new, highly optimized software-only implementation for computing a double SHA-256 hash on exactly 64 bytes of data. It is intended as a fallback for older CPUs that lack hardware-accelerated hashing instructions. There is no indication in the commit that this fixes a security bug; it appears to be a performance or portability improvement.

Security candidatefmt: Apply rustfmt across workspaceby yunusabdul38 · 26fd207d · May 4, 2026 · 8 filesMessage 45 · ThinInformational 15Details
Commit message · yunusabdul38

fmt: Apply rustfmt across workspace

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 purely a code-formatting cleanup. It runs rustfmt across several files, which only changes whitespace, line breaks, and the order of import statements. No program logic, security checks, or behavior were changed.

Security candidatecrypto: use constant-time equality for Poly1305 tagsby Alexey Gradoboev · 56d09067 · May 4, 2026 · 1 fileMessage 96 · StrongModerate 60Details
Commit message · Alexey Gradoboev

crypto: use constant-time equality for Poly1305 tags

Currently, the `decrypt` method uses the standard `==` operator for tag verification, which is vulnerable to timing attacks

### Changes
- Introduced a helper function `constant_time_eq` that iterates through the entire 16-byte tag regardless of where a mismatch occurs as constant-time alternative.

This change ensures that the decryption process is secure against side-channel timing leaks.

Fixes #6122

96/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference✓ Names security-relevant behavior explicitly
Why it was queued
explicit security languagedefensive validationconstant-time or timing behavior
AI analysis · Moderate 60/100

This commit fixes a timing attack weakness in the ChaCha20-Poly1305 decryption code. Previously, the code compared the authentication tag using Rust's normal `==` operator, which can stop early when it finds a mismatch. That early-stop behavior can leak information about how much of the tag is correct if an attacker can measure tiny timing differences. The patch replaces it with a constant-time comparison that always scans all 16 bytes, so no timing information about the tag's contents is revealed.

Security candidateAdd with_compressedness to LegacyPublicKeyby Mitchell Bagot · b396e514 · May 4, 2026 · 1 fileMessage 58 · ThinInformational 18Details
Commit message · Mitchell Bagot

Add with_compressedness to LegacyPublicKey

At present, to convert a compressed LegacyPublicKey to an uncompressed
copy, a user must either to use from_secp_uncompressed(key.to_inner())
or roundtrip serialize-deserialize. Neither of these are ideal. To
avoid users touching the secp types directly, we can copy the pattern
used for parity in XOnlyPublicKey's with_parity.

Introduce with_compressedness method on LegacyPublicKey to set
compressedness.

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

This commit adds a small convenience method called `with_compressedness` to a public-key type in the rust-bitcoin library. It lets callers flip whether a Bitcoin public key is stored in compressed or uncompressed form without having to reach into lower-level secp256k1 cryptography types. The change is purely an API usability improvement and does not fix any bug or vulnerability.

Security candidatecrypto: Remove with_serialized from LegacyPublicKeyby Mitchell Bagot · 52f80585 · May 4, 2026 · 1 fileMessage 73 · AdequateInformational 18Details
Commit message · Mitchell Bagot

crypto: Remove with_serialized from LegacyPublicKey

The with_serialized method on LegacyPublicKey has been used for
serialising the legacy public key in an optionally compressed form
without allocating a vec. With the introduction of the
SerialisedLegacyPublicKey type, the to_bytes() method can now trivially
replace this method with a simpler interface.

Replace all uses of with_serialized with to_bytes and remove method
from LegacyPublicKey.

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 18/100

This commit is a routine internal cleanup in the rust-bitcoin crypto library. It removes an older helper method named with_serialized from LegacyPublicKey and replaces its uses with a newer, simpler method called to_bytes. There is no indication of a bug fix or security patch in the change itself or the commit message.

Security candidatecrypto: Move taproot errors into submoduleby Mitchell Bagot · 952c9dc6 · May 4, 2026 · 1 fileMessage 68 · AdequateInformational 15Details
Commit message · Mitchell Bagot

crypto: Move taproot errors into submodule

Now that the taproot module in crypto is publicly visible, it should
be update to follow the patterns of other crates in the workspace
regarding the use of error submodules.

Move error types to error submodule and re-export.

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 15/100

This commit is a routine code reorganization. It moves two existing error types (SigFromSliceError and ParseSignatureError) into a new 'error' submodule within the taproot module and re-exports them publicly. There is no change to how signatures are validated, parsed, or what errors are returned. It is purely a structural cleanup to match the project's coding patterns.

Security candidatecrypto: Fix lint errors in crypto::taprootby Mitchell Bagot · d1c8e8de · May 4, 2026 · 1 fileMessage 68 · AdequateInformational 15Details
Commit message · Mitchell Bagot

crypto: Fix lint errors in crypto::taproot

Following the move to crypto, the stricter lint requirements now
trigger various problems with the module that should be fixed.

Fix all lint errors in the crypto::taproot module.

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 15/100

This commit only fixes code style and documentation lint warnings in the crypto::taproot module. It adds missing documentation comments and formats an existing doc comment. There are no changes to program logic, security behavior, or cryptographic operations.

Security candidateMove taproot signatures to cryptoby Mitchell Bagot · 59dcc935 · May 4, 2026 · 3 filesMessage 68 · AdequateInformational 15Details
Commit message · Mitchell Bagot

Move taproot signatures to crypto

As part of the move of types to crypto, the taproot signatures should
also be moved to the crypto crate.

Move taproot module to crypto and re-export signatures and errors in
bitcoin.

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

This commit is a routine code reorganization: it moves the Taproot signature types from the main `bitcoin` crate into a separate `crypto` crate and re-exports them so existing users keep working. There is no security fix or behavior change visible in the diff.

Security candidateRemove io dependency from crypto taprootby Mitchell Bagot · b94272e1 · May 4, 2026 · 1 fileMessage 85 · StrongInformational 19Details
Commit message · Mitchell Bagot

Remove io dependency from crypto taproot

The taproot module in bitcoin's crypto holds only the Signature and
SerializedSignature types. In order to retain the lack of io dep in
crypto, the io based methods on these types should be removed, as they
were on the corresponding ecdsa signature types.

Remove Signature::serialize_to_writer and SerializedSignature::write_to
methods.

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

This commit removes two helper methods that wrote Taproot signatures to an output stream. It is a routine internal API cleanup to eliminate an unnecessary dependency on the `io` crate inside the crypto taproot module. There is no security vulnerability here; the change simply mirrors a prior cleanup done for ECDSA signature types.

AI review queuedUpdate API filesby Nick Johnson · a517bf1f · May 3, 2026 · 7 filesMessage 28 · OpaqueInformational 15Details
Commit message · Nick Johnson

Update API files

28/100 · OpaqueMessage clarity
✓ Subject identifies a change! No meaningful explanatory body
Why it was queued
documentation-only discountsecond-pass: opaque commit message
AI analysis · Informational 15/100

This commit only updates generated API snapshot files that record what public functions and traits the library exposes. The actual code changes happened in an earlier commit; this one just refreshes the snapshots. There is no security-relevant change here.

Lower-priorityIgnore mutants for the decoder helper method which wraps defaultby Nick Johnson · 4fbaefb7 · May 3, 2026 · 1 fileMessage 65 · AdequateTriage 0Details
Commit message · Nick Johnson

Ignore mutants for the decoder helper method which wraps default

Also updates existing rules from trait renames.

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body