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

Ungate FromStr and Display for Xpriv and Xpub

Public commit record

What the developer wrote

Authored by Mitchell Bagot

80/100 · Strong
Ungate FromStr and Display for Xpriv and Xpub

The Xpriv and Xpub types currently have FromStr and Display trait impls
gated on alloc, due to their use of unbounded base58 encoding/decoding.
By changing the error types, both traits can be trivially made no-alloc
for both of the types.

Adjust error types to DecodeCheckArrayError and ungate FromStr and
Display impls for Xpriv and Xpub.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
The short version

What changed, and why it matters

This commit removes a feature gate so that two Bitcoin key types (Xpriv and Xpub) can be converted to and from their standard text representation even when the library is built without memory allocation support. It also swaps the underlying base58 error type to one that works in no-alloc builds. The change is a portability/cleanup refactor, not a fix for an active security bug.

Recommended action

No security action required. Review as normal code-quality/portability change. If consuming this library, verify no breaking changes in error variant matching for downstream code that previously matched InvalidBase58PayloadLength directly.

Security signals we found

01

No security-relevant signal in commit message or diff

02

Refactor to support no-alloc builds

03

Error type changed from DecodeCheckError to DecodeCheckArrayError

04

Fixed 78-byte payload size used for bounded base58 encode/decode

05

No mention of CVE, advisory, researcher, or security bug

Risk score

Why this scored 19/100

Our methodology →
Potential impact 2/30
Exploitability 1/25
Stealth signal 1/15
Affected reach 3/15
Confidence 8/10
Evidence quality 4/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.