Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

tendermint/btcd
master @ 80daada
4
Fixes
5
CVEs
CRITICAL
Peak severity
Highlights
Auth Bypass: 1 prior fix. Scrutinize any change in this area.
btcec: most-fixed (1 issue). Treat as high-risk during review.
3 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Cryptography: Incorrect ECDSA signature generation fails to properly reduce the R value modulo N when they are equal, leading to non-compliant signatures that can disrupt consensus validation or transaction execution.
Auth Bypass: A lack of canonicalization and secret size enforcement in atomic swap scripts allows malicious actors to freeze or lock counterparties out of their funds by redeeming swaps with oversized secrets.
Weak Cryptography: Using weak 20-byte RIPEMD160 hashes instead of 32-byte SHA256 hashes for atomic swap secrets exposes the swap mechanisms to collision and preimage attacks.