rust-bitcoin-unsafe-fast/bitcoin
ndungudedan 00cd247bc4
Validate compressed WIF keys
For private WIF keys corresponding to a compressed address,
the last byte of the key needs to be 0x01, but the API
doesn't enforce this when using PrivateKey::from_wif(). So,
invalid keys can be accepted.

Thus we check if the last byte is equivalent to 0x01
if the key's length is 34 (which indicates it's
compressed).
2025-02-13 11:45:25 +03:00
..
contrib Remove the SliceIndex implementation from hash types 2024-10-02 10:18:45 +10:00
embedded Move opcodes to primitives 2024-07-09 15:26:33 +10:00
examples Use from_sat_unchecked for hardcoded ints 2025-01-24 09:05:00 +11:00
src Validate compressed WIF keys 2025-02-13 11:45:25 +03:00
tests Use MAX_MONEY in serde regression test 2025-01-24 12:15:13 +11:00
CHANGELOG.md Add unreleased changelog entry 2025-01-25 06:52:26 +11:00
Cargo.toml Invert dependency between io and hashes 2025-02-11 09:17:21 +11:00