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

bitcoin: add support for OP_RETURN outputs

Public commit record

What the developer wrote

Authored by Marko Bencun

80/100 · Strong
bitcoin: add support for OP_RETURN outputs

We enforce 0 value on them, so the confirmation screen is not a the
usual recipient component, but can be a full screen confirmation not
showing the amount. We use verify_message flow as it handles both
ascii/binary.

We also only support OP_RETURN outputs with one data push, though an
OP_RETURN output could contain multiple data pushes. This restriction
is for simplicity and because we don't know of a use case. In the
future, support for this can be added if needed.
✓ 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 adds the ability to include OP_RETURN outputs when signing Bitcoin transactions on a BitBox02 hardware wallet. OP_RETURN is a special Bitcoin output type used to embed small pieces of data (like text or hashes) on the blockchain. The device now shows the user the data being embedded and asks for confirmation before signing. The commit also enforces that OP_RETURN outputs must carry zero Bitcoin value, so no money can accidentally be burned into them.

Recommended action

Review the implementation to ensure the verify_message confirmation cannot be bypassed and that the OP_RETURN script is constructed exactly as specified. Consider whether the single-push restriction and 0-value enforcement are sufficient for all supported coins. No immediate patch appears necessary based on the diff alone, but a security review of the new signing path is warranted before release.

Security signals we found

01

New transaction output type introduced into signing path

02

Value-zero enforcement for OP_RETURN to prevent value destruction

03

User confirmation required via verify_message flow before signing

04

Payment requests disallowed for OP_RETURN outputs

05

Address derivation explicitly returns error for OP_RETURN

06

Only single data push supported, though protocol could allow multiple

Risk score

Why this scored 38/100

Our methodology →
Potential impact 8/30
Exploitability 7/25
Stealth signal 6/15
Affected reach 8/15
Confidence 6/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.