AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 21 Bitcoin

base58: Add decode_check_to_array

Public commit record

What the developer wrote

Authored by Mitchell Bagot

70/100 · Adequate
base58: Add decode_check_to_array

At present, base58 has only encoding functionality in no-alloc builds.
In order to allow decoding of known size data from base58 without an
allocator, the base58 crate needs a decoder function like hex's
decode_to_array. Such a function has more failure modes than the alloc
decode_check function, so new error types are required also.

Introduce decode_check_to_array function for decoding short (<128 char)
base58 strings to byte arrays.
Introduce DecodeCheckArrayError.
Adjust error gating such that only errors in the public API appear in
the error module.
✓ Descriptive subject✓ Provides detailed explanatory context✓ Explains rationale or failure mode
The short version

What changed, and why it matters

This commit adds a new no-allocator base58 decoder for short fixed-size data in the rust-bitcoin base58 crate. It is a feature addition, not a fix for a known vulnerability. The change exposes a new public function and error type and restructures some internal error gating. There is no direct evidence in the commit that this resolves an active security issue, but any new decoder handling checksums and length checks carries ordinary implementation-risk.

Recommended action

Treat as a routine feature commit with normal code-review risk. Reviewers should verify that the 128-character bound and the leading-zero + scratch length arithmetic cannot underflow or produce an out-of-range subslice, and confirm that DecodeCheckArrayError's public API surface is intended for no-alloc consumers. No urgent security action is indicated by the diff alone.

Security signals we found

01

New checksum-verifying decoder added to no-alloc code path

02

Error type gating changed: several error types now compiled without alloc as pub(crate)

03

Input length capped at 128 characters to bound stack buffer

04

Final array conversion uses expect after explicit length equality check

05

No vendor statement of security relevance or CVE in commit message

Risk score

Why this scored 21/100

Our methodology →
Potential impact 2/30
Exploitability 3/25
Stealth signal 2/15
Affected reach 4/15
Confidence 7/10
Evidence quality 3/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.