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

use Rust hmac/sha256/sha512 over libwally's functions

Public commit record

What the developer wrote

Authored by Marko Bencun

65/100 · Adequate
use Rust hmac/sha256/sha512 over libwally's functions

Aiming to remove the libwally dependency.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
The short version

What changed, and why it matters

This commit swaps the cryptographic hashing and HMAC functions used throughout the BitBox02 firmware from the libwally library to equivalent Rust implementations. The goal is to remove the libwally dependency. The change touches sensitive code paths such as seed stretching, U2F key generation, and secure-chip authorization, but the commit itself does not claim to fix any security bug. The main risk is that any subtle difference in behavior between the old and new implementations could affect how keys are derived or how the device authenticates, though the diff shows no obvious vulnerability.

Recommended action

Treat this as a high-impact refactoring that requires careful review and regression testing. Verify that the new Rust HMAC/SHA implementations produce bit-identical outputs to libwally for all relevant input sizes and edge cases. Audit the unsafe FFI functions for pointer validity, length handling, and zeroization behavior. Run the existing cryptographic test vectors and add new ones covering the replaced call sites before relying on this in production firmware.

Security signals we found

01

Cryptographic primitive replacement across multiple security-critical subsystems

02

Removal of error-handling paths that previously aborted or returned errors on libwally failure

03

New unsafe C FFI functions with raw pointer contracts for key/data/out buffers

04

Dependency change from libwally to RustCrypto/bitcoin hash crates

05

No explicit security claim, CVE, or bug disclosure in commit message

Risk score

Why this scored 32/100

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