SPB Git

Repository Public

README.md 1.4 KB 23 lines markdown

1# security/vectors/bchn — Bitcoin Cash Node signature-hash vectors (third-party material)23Not SP Boucher code: MIT licence of Bitcoin Cash Node (`COPYING`, stored next to the vectors), no SP Boucher header.4`../MANIFEST.json` pins the SHA-256 of each file.56| File | Source | Pinned revision |7|---|---|---|8| `sighash.json.gz` | https://gitlab.com/bitcoin-cash-node/bitcoin-cash-node `src/test/data/sighash.json` | `07576013c91ff4a3a74acd85f189c69121cdad1b` (tag v29.2.0) |9| `COPYING` | same repository | same |1011`sighash.json` is stored gzip-compressed with a zero timestamp (reproducible bytes). Format: a header row, then 100012rows `[raw transaction, script, input index, hash type, digest (regular), digest (no fork flag)]`:1314- the hash type is a random signed 32-bit integer (all 32 bits are serialized in the preimage);15- "digest (regular)" is `SignatureHash` with `SCRIPT_ENABLE_SIGHASH_FORKID`: the BIP-143-style algorithm of Bitcoin16  Cash when bit 0x40 of the hash type is set, the original algorithm otherwise — computed with **amount 0**: the17  file carries no amounts;18- "digest (no fork flag)" is the original algorithm for every row (which never uses an amount);19- digests are written in the byte order of `uint256::GetHex` (reversed).2021Replayed by `security/tests/Tests/ConformanceAuditTests/UTXOCoinsVectors.swift`, which states how many rows the22public interface of the engine can express and how many only its internal preimage function can.23
Files main
Menu

Theme