{
  "_comment": "Golden vectors for the LXMF protocol specification. Generated by gen_vectors.py from the vendored reference. Do not edit by hand; re-run the harness.",
  "meta": {
    "lxmf_version": "0.9.6",
    "rns_version": "1.3.5",
    "lxmf_commit": "8499729024a4cddfceb47ca07188bb5b1d11d179",
    "reticulum_commit": "d5e62d4e15c5fe2e170f7bd9e120551671f21a27",
    "fixed_timestamp": 1700000000.0,
    "src_identity_prv_hex": "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f",
    "dst_identity_prv_hex": "404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f"
  },
  "constants": {
    "DESTINATION_LENGTH": 16,
    "SIGNATURE_LENGTH": 64,
    "TICKET_LENGTH": 16,
    "TIMESTAMP_SIZE": 8,
    "STRUCT_OVERHEAD": 8,
    "LXMF_OVERHEAD": 112,
    "ENCRYPTED_PACKET_MDU": 391,
    "ENCRYPTED_PACKET_MAX_CONTENT": 295,
    "LINK_PACKET_MDU": 431,
    "LINK_PACKET_MAX_CONTENT": 319,
    "PLAIN_PACKET_MDU": 464,
    "PLAIN_PACKET_MAX_CONTENT": 368,
    "PAPER_MDU": 2210,
    "COST_TICKET": 256,
    "TICKET_EXPIRY": 1814400,
    "TICKET_GRACE": 432000,
    "TICKET_RENEW": 1209600,
    "TICKET_INTERVAL": 86400
  },
  "stamper_constants": {
    "WORKBLOCK_EXPAND_ROUNDS": 3000,
    "WORKBLOCK_EXPAND_ROUNDS_PN": 1000,
    "WORKBLOCK_EXPAND_ROUNDS_PEERING": 25,
    "STAMP_SIZE": 32
  },
  "vectors": [
    {
      "id": "VEC-MSG-1",
      "title": "Minimal opportunistic message (no fields, no stamp)",
      "kind": "frozen",
      "citation": "LXMessage.py:359-384",
      "inputs": {
        "src_identity_prv_hex": "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f",
        "dst_identity_prv_hex": "404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f",
        "timestamp": 1700000000.0,
        "title": "Hi",
        "content": "Hello",
        "fields": {},
        "desired_method": "OPPORTUNISTIC"
      },
      "packed_hex": "cf0b2a4a8d2a0b6978b71290da7cc80efae321c442e3c9bdcd7a3e79d850e03cfb321978105a4c709c3b86930ff15a9d7b53b3485517ec19e2083b39f7661e6e531c78fb71d932f0baf13794c42234ab9320f1ab5b7688e93eaf5960810ece0094cb41d954fc40000000c4024869c40548656c6c6f80",
      "packed_len": 118,
      "parts": {
        "destination_hash": "cf0b2a4a8d2a0b6978b71290da7cc80e",
        "source_hash": "fae321c442e3c9bdcd7a3e79d850e03c",
        "signature": "fb321978105a4c709c3b86930ff15a9d7b53b3485517ec19e2083b39f7661e6e531c78fb71d932f0baf13794c42234ab9320f1ab5b7688e93eaf5960810ece00",
        "packed_payload": "94cb41d954fc40000000c4024869c40548656c6c6f80"
      },
      "payload_msgpack_hex": "94cb41d954fc40000000c4024869c40548656c6c6f80",
      "hashed_part_hex": "cf0b2a4a8d2a0b6978b71290da7cc80efae321c442e3c9bdcd7a3e79d850e03c94cb41d954fc40000000c4024869c40548656c6c6f80",
      "message_id_hex": "9aec506b63deab21d8fa4954d9f743cf20f5adeeb1abd1c7429bb3f832dc287b",
      "hash_hex": "9aec506b63deab21d8fa4954d9f743cf20f5adeeb1abd1c7429bb3f832dc287b",
      "signed_part_hex": "cf0b2a4a8d2a0b6978b71290da7cc80efae321c442e3c9bdcd7a3e79d850e03c94cb41d954fc40000000c4024869c40548656c6c6f809aec506b63deab21d8fa4954d9f743cf20f5adeeb1abd1c7429bb3f832dc287b",
      "signature_hex": "fb321978105a4c709c3b86930ff15a9d7b53b3485517ec19e2083b39f7661e6e531c78fb71d932f0baf13794c42234ab9320f1ab5b7688e93eaf5960810ece00",
      "signature_valid": true,
      "method": 1,
      "representation": 1
    },
    {
      "id": "VEC-MSG-2",
      "title": "Message with a fields dict (integer field key)",
      "kind": "frozen",
      "citation": "LXMessage.py:359, 212-216",
      "inputs": {
        "timestamp": 1700000000.0,
        "title": "",
        "content": "body text",
        "fields": {
          "0x0F": "0x02"
        },
        "desired_method": "DIRECT"
      },
      "packed_hex": "cf0b2a4a8d2a0b6978b71290da7cc80efae321c442e3c9bdcd7a3e79d850e03c20c2b63a486a2c37a8798204cbdbfd5bb8ada608af29565ab985b63012163a32851a411e0e2d272603bf7b55127a8e79871678625d8aa2a37ee0ef35772dea0794cb41d954fc40000000c400c409626f64792074657874810f02",
      "packed_len": 122,
      "parts": {
        "destination_hash": "cf0b2a4a8d2a0b6978b71290da7cc80e",
        "source_hash": "fae321c442e3c9bdcd7a3e79d850e03c",
        "signature": "20c2b63a486a2c37a8798204cbdbfd5bb8ada608af29565ab985b63012163a32851a411e0e2d272603bf7b55127a8e79871678625d8aa2a37ee0ef35772dea07",
        "packed_payload": "94cb41d954fc40000000c400c409626f64792074657874810f02"
      },
      "payload_msgpack_hex": "94cb41d954fc40000000c400c409626f64792074657874810f02",
      "message_id_hex": "a68ab24e39e6f573ce6c486964b3673c8a3f2ab680e4a12d3ad96cc428befd16",
      "method": 2,
      "representation": 1
    },
    {
      "id": "VEC-MSG-3",
      "title": "Unpack + signature verification round trip of VEC-MSG-1",
      "kind": "frozen",
      "citation": "LXMessage.py:735-807",
      "source_vector": "VEC-MSG-1",
      "recovered_message_id_hex": "9aec506b63deab21d8fa4954d9f743cf20f5adeeb1abd1c7429bb3f832dc287b",
      "recovered_title": "Hi",
      "recovered_content": "Hello",
      "signature_validated": true,
      "matches_source": true
    },
    {
      "id": "VEC-DLV-OPP",
      "title": "Opportunistic on-air payload (leading destination hash omitted)",
      "kind": "frozen",
      "citation": "LXMessage.py:623-635",
      "full_packed_hex": "cf0b2a4a8d2a0b6978b71290da7cc80efae321c442e3c9bdcd7a3e79d850e03cfb321978105a4c709c3b86930ff15a9d7b53b3485517ec19e2083b39f7661e6e531c78fb71d932f0baf13794c42234ab9320f1ab5b7688e93eaf5960810ece0094cb41d954fc40000000c4024869c40548656c6c6f80",
      "on_air_hex": "fae321c442e3c9bdcd7a3e79d850e03cfb321978105a4c709c3b86930ff15a9d7b53b3485517ec19e2083b39f7661e6e531c78fb71d932f0baf13794c42234ab9320f1ab5b7688e93eaf5960810ece0094cb41d954fc40000000c4024869c40548656c6c6f80",
      "note": "Destination is inferred from the RNS packet header."
    },
    {
      "id": "VEC-DLV-DIRECT",
      "title": "Direct delivery sends the full packed message",
      "kind": "frozen",
      "citation": "LXMessage.py:414-421, 633",
      "on_air_hex": "cf0b2a4a8d2a0b6978b71290da7cc80efae321c442e3c9bdcd7a3e79d850e03cfb321978105a4c709c3b86930ff15a9d7b53b3485517ec19e2083b39f7661e6e531c78fb71d932f0baf13794c42234ab9320f1ab5b7688e93eaf5960810ece0094cb41d954fc40000000c4024869c40548656c6c6f80",
      "note": "Sent as a single Packet over a Link when content fits LINK_PACKET_MAX_CONTENT, else as a Resource."
    },
    {
      "id": "VEC-PROP-ENVELOPE",
      "title": "Propagation transfer envelope (encrypted, round-trip proof)",
      "kind": "roundtrip",
      "citation": "LXMessage.py:423-433",
      "inner_packed_hex": "cf0b2a4a8d2a0b6978b71290da7cc80efae321c442e3c9bdcd7a3e79d850e03cfb321978105a4c709c3b86930ff15a9d7b53b3485517ec19e2083b39f7661e6e531c78fb71d932f0baf13794c42234ab9320f1ab5b7688e93eaf5960810ece0094cb41d954fc40000000c4024869c40548656c6c6f80",
      "dest_hash_prefix_hex": "cf0b2a4a8d2a0b6978b71290da7cc80e",
      "pn_encrypted_len": 192,
      "lxmf_data_structure": "destination_hash(16) || destination.encrypt(packed[16:])",
      "transient_id_hex": "cf991b83bdb3b072831aa4cb629e9d8400066158dfa5e96b66f5152fa7180aaa",
      "transient_id_note": "transient_id = full_hash(lxmf_data); depends on ephemeral ciphertext, not reproducible.",
      "envelope_structure": "msgpack([wall_clock_timestamp, [lxmf_data, ...]])",
      "decrypt_recovers_inner_tail": true
    },
    {
      "id": "VEC-PAPER-URI",
      "title": "Paper message lxm:// URI (encrypted, round-trip proof)",
      "kind": "roundtrip",
      "citation": "LXMessage.py:443-455, 687-702",
      "uri_scheme": "lxm",
      "uri_prefix": "lxm://zwsq",
      "structure": "lxm://base64url(destination_hash(16) || destination.encrypt(packed[16:])), '=' padding stripped",
      "note": "base64url body depends on ephemeral ciphertext; not reproducible."
    },
    {
      "id": "VEC-STAMP-1",
      "title": "Stamp workblock, validity, and value (cost=8, expand_rounds=4)",
      "kind": "frozen",
      "citation": "LXStamper.py:18-46",
      "material_hex": "1c91877ffb9797aa6f33064586b47a3c41f6dfa75e10aa17bc24bf0ac6833712",
      "expand_rounds": 4,
      "target_cost": 8,
      "workblock_len": 1024,
      "workblock_sha256_hex": "3ef04c48464deb9d32b1433fa3a3e442af5be363c2d9e0a3ee347d8c62eb1251",
      "stamp_search": "stamp = full_hash(material || counter_be8), counter++ until valid",
      "winning_counter": 377,
      "stamp_hex": "9b79689af899049accea13624a3c59221603117e81086a86a3249ce278acc35e",
      "digest_hex": "00ed462c86ba94b972b6b8046476def6133ff9afe181bd4cb034f2e075181af3",
      "target_hex": "0100000000000000000000000000000000000000000000000000000000000000",
      "valid": true,
      "stamp_value": 8
    },
    {
      "id": "VEC-ANN-DELIVERY",
      "title": "Delivery announce app_data",
      "kind": "frozen",
      "citation": "LXMRouter.py:990-1002; LXMF.py:117-152",
      "structure": "msgpack([display_name_utf8_or_None, stamp_cost_or_None])",
      "app_data_hex": "92c405416c69636508",
      "first_byte_hex": "92",
      "first_byte_note": "0x92 = msgpack fixarray(2); decoders sniff 0x90-0x9f or 0xdc.",
      "decoded_display_name": "Alice",
      "decoded_stamp_cost": 8
    },
    {
      "id": "VEC-ANN-PROPAGATION",
      "title": "Propagation node announce app_data (7-element list)",
      "kind": "frozen",
      "citation": "LXMRouter.py:307-319; LXMF.py:191-211",
      "structure": "msgpack([legacy, timebase, enabled, xfer_limit_kb, sync_limit_kb, [prop_cost, prop_flex, peering_cost], metadata])",
      "fixed_timebase": 1700000000,
      "timebase_note": "Field 1 is int(time.time()) in the real protocol.",
      "app_data_hex": "97c2ce6553f100c3cd0100cd2800931003128101c4054e6f646541",
      "valid": true,
      "decoded_pn_name": "NodeA",
      "decoded_pn_stamp_cost": 16
    }
  ]
}
