{
  "assertion": "The supplied compressed SEC public key is a valid secp256k1 point and derives the supplied Bitcoin mainnet P2PKH address for Bitcoin Puzzle #140.",
  "status": "verified",
  "expected": {
    "puzzle": "#140",
    "compressed_public_key_hex": "031f6a332d3c5c4f2de2378c012f429cd109ba07d69690c6c701b6bb87860d6640",
    "mainnet_p2pkh_address": "1QKBaU6WAeycb3DbKbLBkX7vJiaS8r42Xo"
  },
  "observed": {
    "derivation": {
      "status": "verified",
      "compressed_sec_valid": true,
      "secp256k1_curve_member": true,
      "compressed_public_key_hex": "031f6a332d3c5c4f2de2378c012f429cd109ba07d69690c6c701b6bb87860d6640",
      "sec_byte_count": 33,
      "sec_prefix_hex": "03",
      "field_prime_hex": "fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f",
      "x_hex": "1f6a332d3c5c4f2de2378c012f429cd109ba07d69690c6c701b6bb87860d6640",
      "y_hex": "f96923e4c4e959430c81a73a62a05609b2bbea22620cefc54a58182b9f2a2ae9",
      "y_is_odd": true,
      "x_cubed_plus_7_mod_p_hex": "0dd6860a5c8a78b74c3687e06fdcf64f90320a0c50fb347944b4d572074089f1",
      "y_squared_mod_p_hex": "0dd6860a5c8a78b74c3687e06fdcf64f90320a0c50fb347944b4d572074089f1",
      "sha256_of_compressed_sec_hex": "51f95ec3dd876b08b223b370a3ca3fa760fe4a8f50b445cb18768a7f278d9a6a",
      "hash160_hex": "ffbb35a7bb9bbe16c1aa2534f7ff11d59c8e3d1a",
      "mainnet_p2pkh_version_hex": "00",
      "base58check_payload_hex": "00ffbb35a7bb9bbe16c1aa2534f7ff11d59c8e3d1a",
      "base58check_checksum_hex": "72d9d7c6",
      "base58check_full_bytes_hex": "00ffbb35a7bb9bbe16c1aa2534f7ff11d59c8e3d1a72d9d7c6",
      "mainnet_p2pkh_address": "1QKBaU6WAeycb3DbKbLBkX7vJiaS8r42Xo",
      "scriptPubKey_hex": "76a914ffbb35a7bb9bbe16c1aa2534f7ff11d59c8e3d1a88ac",
      "scriptPubKey_asm": "OP_DUP OP_HASH160 OP_PUSHBYTES_20 ffbb35a7bb9bbe16c1aa2534f7ff11d59c8e3d1a OP_EQUALVERIFY OP_CHECKSIG"
    },
    "historical_provenance": {
      "status": "verified",
      "observation": "A confirmed Bitcoin mainnet transaction reveals the exact compressed SEC bytes in the second push of input 15’s scriptSig. This input spends output 16 of the funding transaction below.",
      "confirmed_address_history_transactions_returned_per_explorer": 9,
      "spending_input": {
        "txid": "17e4e323cfbc68d7f0071cad09364e8193eedf8fefbcbd8a21b4b65717a4b3d3",
        "vin_index_zero_based": 15,
        "scriptSig_hex": "483045022100e41046e4b1b7cff1a35f8d6b0eb3448a0403885b17dbf0a0d2ff634de6d03d680220213396378381f50c084aef327f2b14893b0250a917335bd1fe95431c9d2451a30121031f6a332d3c5c4f2de2378c012f429cd109ba07d69690c6c701b6bb87860d6640",
        "revealed_compressed_public_key_hex": "031f6a332d3c5c4f2de2378c012f429cd109ba07d69690c6c701b6bb87860d6640",
        "block": {
          "height": 578732,
          "hash": "00000000000000000000f9c70e549cc8aa7ff7564625d023f655ae585de731f3",
          "header_time_utc": "2019-06-01T02:07:26Z"
        }
      },
      "funding_output": {
        "txid": "7c432398c7631600af01695c9767eff109cbfae4f7ecccaff388043a474d4f1e",
        "vout_index_zero_based": 16,
        "outpoint": "7c432398c7631600af01695c9767eff109cbfae4f7ecccaff388043a474d4f1e:16",
        "value_satoshis": 1000,
        "scriptPubKey_hex": "76a914ffbb35a7bb9bbe16c1aa2534f7ff11d59c8e3d1a88ac",
        "mainnet_p2pkh_address": "1QKBaU6WAeycb3DbKbLBkX7vJiaS8r42Xo",
        "block": {
          "height": 576251,
          "hash": "00000000000000000023d8c6ed3c59ff65fd14d7d97e65b0c35a2b1713914968",
          "header_time_utc": "2019-05-16T04:25:45Z"
        }
      }
    }
  },
  "method": {
    "derivation": [
      "Hex-decode the supplied string into 33 bytes. Check that the prefix is 02 or 03 and interpret the following 32 bytes as an unsigned big-endian x less than p.",
      "For secp256k1 use p = 2^256 - 2^32 - 977 and r = (x^3 + 7) mod p. Since p mod 4 = 3, compute y0 = r^((p+1)/4) mod p. Choose y0 or p - y0 for the odd parity indicated by 03. Check y^2 mod p = r and reserialize the point to confirm the supplied SEC bytes.",
      "Compute SHA-256 over the original 33 bytes, then RIPEMD-160 over that binary digest. Prepend version byte 00 to HASH160 and append the first four bytes of double SHA-256 of that payload.",
      "Encode the checked bytes as an unsigned big-endian integer using the Bitcoin Base58 alphabet 123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz, preserving the leading zero byte as one leading 1. Compare the address exactly. Build scriptPubKey as 76a914 followed by HASH160 followed by 88ac."
    ],
    "historical_provenance": [
      "Scan the confirmed address histories from mempool.space and Blockstream for inputs spending the derived scriptPubKey. Cross-check the spending input and the referenced output against both explorers’ transaction JSON.",
      "Parse both raw legacy transactions from mempool.space and recompute their txids as reversed double SHA-256 digests. Check the input outpoint, the referenced output script and value, and the exact 33-byte second push in the input scriptSig."
    ]
  },
  "evidence_urls": {
    "puzzle_catalog_label": [
      "https://lotterypuzzle.org/puzzles/140/"
    ],
    "derivation_references": [
      "https://raw.githubusercontent.com/bitcoin/bitcoin/v29.0/src/secp256k1/src/field.h",
      "https://raw.githubusercontent.com/bitcoin/bitcoin/v29.0/src/secp256k1/src/group_impl.h",
      "https://raw.githubusercontent.com/bitcoin/bitcoin/v29.0/src/secp256k1/src/eckey_impl.h",
      "https://raw.githubusercontent.com/bitcoin/bitcoin/v29.0/src/key_io.cpp",
      "https://raw.githubusercontent.com/bitcoin/bitcoin/v29.0/src/base58.cpp",
      "https://raw.githubusercontent.com/bitcoin/bitcoin/v29.0/src/script/solver.cpp"
    ],
    "confirmed_address_history": [
      "https://mempool.space/api/address/1QKBaU6WAeycb3DbKbLBkX7vJiaS8r42Xo/txs/chain",
      "https://blockstream.info/api/address/1QKBaU6WAeycb3DbKbLBkX7vJiaS8r42Xo/txs/chain"
    ],
    "spending_transaction": [
      "https://mempool.space/api/tx/17e4e323cfbc68d7f0071cad09364e8193eedf8fefbcbd8a21b4b65717a4b3d3",
      "https://blockstream.info/api/tx/17e4e323cfbc68d7f0071cad09364e8193eedf8fefbcbd8a21b4b65717a4b3d3",
      "https://mempool.space/api/tx/17e4e323cfbc68d7f0071cad09364e8193eedf8fefbcbd8a21b4b65717a4b3d3/hex"
    ],
    "funding_transaction": [
      "https://mempool.space/api/tx/7c432398c7631600af01695c9767eff109cbfae4f7ecccaff388043a474d4f1e",
      "https://blockstream.info/api/tx/7c432398c7631600af01695c9767eff109cbfae4f7ecccaff388043a474d4f1e",
      "https://mempool.space/api/tx/7c432398c7631600af01695c9767eff109cbfae4f7ecccaff388043a474d4f1e/hex"
    ]
  },
  "limitations": [
    "Block inclusion and confirmation metadata rely on the two public explorers. The raw-byte check covers transaction IDs, the outpoint, and the relevant scripts and value.",
    "The key-to-address match and historical reveal provide no proof of the private scalar, its interval, the current spendable prize, or any prize payment."
  ]
}
