Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Test vectors

These are the golden vectors that prove the binary claims in this specification. They are the genuine output of the reference code, generated by vectors/gen_vectors.py and stored in machine-readable form in vectors/vectors.json.

Regenerate and verify (from the repository root):

PYTHONPATH=vendor/Reticulum:vendor/LXMF \
    python3 docs/src/appendix/lxmf/vectors/gen_vectors.py

Pinned to LXMF 8499729 (0.9.6) and Reticulum d5e62d4 (RNS 1.3.5). Fixed inputs: source identity private = 00010203…3f, destination identity private = 404142…7f, message timestamp = 1700000000.0.

Vector kinds

  • frozen — deterministic; the hex is the proof; reproduces byte for byte.
  • roundtrip — output depends on ephemeral encryption key material, so the ciphertext is not reproducible; proven by a decrypt round trip plus structural assertions.

VEC-MSG-1 (frozen) — minimal opportunistic message

title=b"Hi", content=b"Hello", fields={}. (LXMessage.py:359-384)

packed (118 B):
cf0b2a4a8d2a0b6978b71290da7cc80e   destination_hash(16)
fae321c442e3c9bdcd7a3e79d850e03c   source_hash(16)
fb321978105a4c709c3b86930ff15a9d
7b53b3485517ec19e2083b39f7661e6e
531c78fb71d932f0baf13794c42234ab
9320f1ab5b7688e93eaf5960810ece00   signature(64)
94cb41d954fc40000000c4024869c405
48656c6c6f80                       packed_payload (msgpack)

message_id = 9aec506b63deab21d8fa4954d9f743cf20f5adeeb1abd1c7429bb3f832dc287b
signature_valid = true

VEC-MSG-2 (frozen) — fields dict with integer key

title=b"", content=b"body text", fields={0x0F: 0x02}. (LXMessage.py:359)

packed_payload: 94cb41d954fc40000000c400c409626f64792074657874810f02
  94                      array(4)
  cb 41d954fc40000000     timestamp 1700000000.0
  c4 00                   title bin(0) = ""
  c4 09 626f6479...       content bin(9) = "body text"
  81 0f 02                fields {0x0F: 0x02}

VEC-MSG-3 (frozen) — unpack + verify of VEC-MSG-1

After making the source identity recallable, unpack_from_bytes of VEC-MSG-1 yields signature_validated = true, matches_source = true, recovered title="Hi", content="Hello". (LXMessage.py:735-807)

VEC-DLV-OPP (frozen) — opportunistic on-air payload

on_air = packed[16:] (destination hash omitted). (LXMessage.py:631)

VEC-DLV-DIRECT (frozen) — direct on-air payload

on_air = packed (full bytes over a link). (LXMessage.py:633)

VEC-PROP-ENVELOPE (roundtrip) — propagation envelope

Structure destination_hash(16) || destination.encrypt(packed[16:]); envelope msgpack([timestamp, [lxmf_data]]); transient_id = full_hash(lxmf_data); destination.decrypt(pn_encrypted) == packed[16:] holds. (LXMessage.py:423-433)

VEC-PAPER-URI (roundtrip) — paper URI

lxm://base64url(destination_hash(16) || destination.encrypt(packed[16:])) with = padding stripped; observed prefix lxm://. (LXMessage.py:687-702)

VEC-STAMP-1 (frozen) — stamp workblock, validity, value

material = full_hash(b"lxmf-spec-stamp-material") = 1c91877ffb9797aa6f33064586b47a3c41f6dfa75e10aa17bc24bf0ac6833712, expand_rounds=4, target_cost=8, workblock 1024 B. Deterministic search stamp = full_hash(material || counter_be8) finds counter=377:

stamp  = 9b79689af899049accea13624a3c59221603117e81086a86a3249ce278acc35e
target = 0100000000000000000000000000000000000000000000000000000000000000   (1 << 248)
valid  = true
value  = 8

(LXStamper.py:18-46)

VEC-ANN-DELIVERY (frozen) — delivery announce app_data

msgpack([b"Alice", 8]):

app_data: 92c405416c69636508
  92                array(2)
  c4 05 416c696365  display_name bin(5) = "Alice"
  08                stamp_cost = 8
first_byte = 0x92  (new-format sniff)
decoded: display_name="Alice", stamp_cost=8

(LXMRouter.py:990-1002; LXMF.py:117-152)

VEC-ANN-PROPAGATION (frozen) — propagation node announce app_data

7-element list, metadata={PN_META_NAME: b"NodeA"}, stamp_costs=[16,3,18], fixed timebase:

app_data: 97c2ce6553f100c3cd0100cd2800931003128101c4054e6f646541
valid = true; pn_name = "NodeA"; pn_stamp_cost = 16

(LXMRouter.py:307-319; LXMF.py:191-211)