What does Payment Routing, Chargebacks and Cash Reserves conclude, in numbers, about “Song Maritime Customs Levies, and the Secret Codes and Transfers of the Shanxi Remittance Banks”?

Answer: A forger who has never seen a genuine draft guesses all six characters with a chance of 1 in 3,600,000. But the table is fixed: after seeing 10 genuine drafts, the probability that he already knows every character needed to forge a random draft is 0.155; after 50, 0.806; after 200, 0.998. The security of the code lies not in the table but in changing it regularly and keeping each draft in few hands. A modern keyed hash (truncated to 32 bits) is different: however many genuine documents the attacker has seen, his chance of guessing remains 1 in 4,294,967,296, provided the key itself does not leak. The evidence log of Chapter 4 works this way.

Scope of the numbers: Chapter 3 writes friendly fraud as a game of deterrence: once the win probability reaches 0.75, false disputes vanish in the illustrative model; in an evidence package the "considered purchase" tick counts least. Marked boxes separate published evidence, runnable Python calculations (16 programs), classical sources and the author's hypotheses.

中文版

Data table

The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 0.155, 0.806, 0.998, 10, 200, 32

forger guessing blind1 in 3,600,000
after10 genuine drafts, all symbols known: 0.155
after50 genuine drafts, all symbols known: 0.806
after 200 genuine drafts, all symbols known0.998
HMAC truncated to 32 bits1 in 4,294,967,296
branches separate reserves pooled saving
12.33 2.33 0%
49.30 4.65 50%
920.93 6.98 67%
1637.22 9.30 75%
Show the full program
# Chapter 7. p13: Secret codes and pooled silver. (1) A draft carries a
# code: one symbol for the month (12), one for the day (30) and one per
# digit of the amount (10 symbols, 4 digits). A forger who has seen no
# genuine draft guesses all six symbols; one who has seen n genuine drafts
# may have learned the symbols he needs. Against that, a keyed hash
# (HMAC) truncated to 32 bits is guessed with 2^-32 whatever he has seen.
# (2) k branches each face independent cash calls with sd 1 (in units of
# a branch's typical call); each alone needs 2.326 sd for 99% cover, a
# pooled treasury needs 2.326 * sqrt(k).
import random
from math import sqrt

def learned(rng, n, trials=4000):
    """Share of target drafts whose six symbols all appeared in n drafts."""
    hit = 0
    for _ in range(trials):
        seen_m, seen_d, seen_x = set(), set(), set()
        for _ in range(n):
            seen_m.add(rng.randrange(12))
            seen_d.add(rng.randrange(30))
            seen_x.update(rng.randrange(10) for _ in range(4))
        m, d = rng.randrange(12), rng.randrange(30)
        xs = {rng.randrange(10) for _ in range(4)}
        hit += m in seen_m and d in seen_d and xs <= seen_x
    return hit / trials

if __name__ == "__main__":
    rng = random.Random(85)
    print("   forger guessing blind: 1 in {:,}".format(12 * 30 * 10 ** 4))
    for n in (10, 50, 200):
        print("   after {:3d} genuine drafts, all symbols known: {:.3f}"
              .format(n, learned(rng, n)))
    print("   HMAC truncated to 32 bits: 1 in {:,}".format(2 ** 32))
    print("   branches  separate reserves  pooled  saving")
    for k in (1, 4, 9, 16):
        sep, pool = 2.326 * k, 2.326 * sqrt(k)
        print("   {:8d}  {:17.2f}  {:6.2f}  {:6.0%}".format(
            k, sep, pool, 1 - pool / sep))

Single source and citation

Fan, Y. (2026). Cross-Border Payment Routing, Chargeback Defense Games and Treasury Ruin Bounds (Version 1.0.0), Chapter 7: Song Maritime Customs Levies, and the Secret Codes and Transfers of the Shanxi Remittance Banks. 5D Library. https://doi.org/10.5281/zenodo.24090225

DOI: 10.5281/zenodo.24090225 · Read the monograph · 5DL-B-085 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026085,
  author    = {Fan, Yafu},
  title     = {Cross-Border Payment Routing, Chargeback Defense Games and Treasury Ruin Bounds},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  doi       = {10.5281/zenodo.24090225},
  url       = {https://doi.org/10.5281/zenodo.24090225}
}

Other chapter answers in this book