Commit bb97911
test(rig): verify identity/MITM security over the wire + safety-number consistency
Single-process loopback could never test the identity crypto: it self-pairs (safety
number over ONE identity, degenerate) and can't stage a MITM. The two-endpoint rig now
can, given DISTINCT identities per instance — added TRINET_KC_ACCOUNT (keychain account
suffix) and TRINET_PINS_KEY (pin-store suffix) so two local instances hold separate
identities + separate TOFU pins (dev-only, inert in a shipping run; mirrored on both
platforms to stay byte-identical).
smoke/two_endpoint_security.sh, verified live:
TEST 1 two honest peers (A,B) with distinct identities derive the SAME safety number
(24514929508 == 24514929508) with ZERO false MITM — the real Signal-style check
that single-process loopback could not do.
TEST 2 A pins B, then an impostor M with a DIFFERENT identity answers at B's address;
A flags "identity CHANGED — session refused" and decodes ZERO video from M — a
real over-the-wire MITM detection of the pinning feature (#36), not a harness.
Also: the MITM rejection now logs ONCE (on the false->true transition) instead of on every
impostor handshake retry (the rig saw 65196 lines; now 2). The latch + session refusal
are unchanged. Both platforms build.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 97980fa commit bb97911
3 files changed
Lines changed: 77 additions & 10 deletions
File tree
- phone
- TriNetVideo
- desktop/TriNetVideo
- smoke
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1642 | 1642 | | |
1643 | 1643 | | |
1644 | 1644 | | |
1645 | | - | |
| 1645 | + | |
| 1646 | + | |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
| 1650 | + | |
| 1651 | + | |
| 1652 | + | |
| 1653 | + | |
| 1654 | + | |
1646 | 1655 | | |
1647 | 1656 | | |
1648 | 1657 | | |
| |||
1675 | 1684 | | |
1676 | 1685 | | |
1677 | 1686 | | |
1678 | | - | |
| 1687 | + | |
1679 | 1688 | | |
1680 | 1689 | | |
1681 | 1690 | | |
1682 | | - | |
| 1691 | + | |
1683 | 1692 | | |
1684 | 1693 | | |
1685 | 1694 | | |
| |||
1741 | 1750 | | |
1742 | 1751 | | |
1743 | 1752 | | |
1744 | | - | |
1745 | | - | |
| 1753 | + | |
| 1754 | + | |
1746 | 1755 | | |
1747 | 1756 | | |
1748 | 1757 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
84 | 94 | | |
85 | 95 | | |
86 | 96 | | |
| |||
114 | 124 | | |
115 | 125 | | |
116 | 126 | | |
117 | | - | |
| 127 | + | |
118 | 128 | | |
119 | 129 | | |
120 | 130 | | |
121 | | - | |
| 131 | + | |
122 | 132 | | |
123 | 133 | | |
124 | 134 | | |
| |||
191 | 201 | | |
192 | 202 | | |
193 | 203 | | |
194 | | - | |
195 | | - | |
| 204 | + | |
| 205 | + | |
196 | 206 | | |
197 | 207 | | |
198 | 208 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
0 commit comments