Skip to content

Commit 26dedf4

Browse files
committed
docs: substantive CRG C annotation (EXPLAINME.adoc)
1 parent f1f1f44 commit 26dedf4

1 file changed

Lines changed: 118 additions & 4 deletions

File tree

EXPLAINME.adoc

Lines changed: 118 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,136 @@
11
// SPDX-License-Identifier: PMPL-1.0-or-later
2+
// Copyright (c) 2026 Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
23
= [quantum (sic)] DNS Fluctuator — Show Me The Receipts
34
:toc:
45
:icons: font
6+
:author: Jonathan D.A. Jewell
57

6-
The README makes claims. This file backs them up.
8+
The README makes claims. This file backs them up, traces the critical paths,
9+
and tells a reviewer exactly where to look.
10+
11+
== Claim 1: Ada for Maximum Type Safety on DNS Infrastructure
12+
13+
[quote, README]
14+
____
15+
DNS record randomization tool for deprecated HINFO and LOC records. Built with
16+
Ada for maximum security and type safety.
17+
____
18+
19+
*How it works:*
20+
The production implementation is the Ada crate at
21+
`hinfo_loc_fluctuator_ada/`. The core type definitions are in
22+
`src/dns_records.ads` — Ada's package specification (`.ads`) is a pure
23+
interface, with the body in the corresponding `.adb` file.
24+
25+
The type safety claim is literal: Ada's range-checked fixed-point types are
26+
used for all geographic values. `Latitude_Degrees` is declared as
27+
`delta 0.000_001 range -90.0 .. 90.0` — any value outside this range raises
28+
`Constraint_Error` at runtime (and can be proven absent by SPARK). Similarly,
29+
`TTL_Seconds is range 1 .. 604_800` makes a zero-TTL or week-plus-TTL a
30+
compile-time type error. DNS string fields use `Ada.Strings.Bounded` to enforce
31+
the 255-character DNS field limit.
32+
33+
The randomisation engine is in `src/randomizer.ads/adb`. It loads three data
34+
pools from `data/`: `machines.txt` (68 CPU types), `operating_systems.txt`
35+
(77 OS names), and `locations.csv` (52 geographic coordinates). On each
36+
fluctuation cycle, it picks randomly from these pools to generate a new
37+
`HINFO_Record` or `LOC_Record`.
38+
39+
The `Scheduler` package (`src/scheduler.ads/adb`) uses Ada's native `task type`
40+
for periodic fluctuation — an Ada tasking construct that runs concurrently
41+
without external threads library.
42+
43+
*Honest caveat:*
44+
The CSV parser in `randomizer.adb` (`Load_Location_Pool`) reads the file name
45+
but does not yet parse CSV content — it is marked in `CLAUDE.md` as a known
46+
stub. The `dns_update.adb` (RFC 2136 dynamic DNS UPDATE) is framework-complete
47+
but actual DNS server communication is not yet implemented. SPARK formal
48+
verification is on the backlog (`PROOF-NEEDS.md`).
49+
50+
== Claim 2: Dual Purpose — Amusing and Serious Security Applications
751

852
[quote, README]
953
____
10-
DNS record randomization tool for deprecated HINFO and LOC records. Built with Ada for maximum security and type safety.
54+
Make your server appear to exist in quantum superposition - simultaneously as
55+
different hardware in multiple locations! Serious Uses: Honeypot obfuscation
56+
(make honeypots appear to move), attack response and deception, privacy
57+
enhancement for public DNS records, security research and education.
1158
____
1259

60+
*How it works:*
61+
HINFO (RFC 1035) and LOC (RFC 1876) records are deprecated per RFC 8482 —
62+
intentionally. Their deprecation means they appear in DNS responses but are
63+
ignored by most resolvers, making them ideal for decoy/obfuscation signals
64+
without affecting production resolution of A/AAAA/MX records.
65+
66+
The security model layers are:
67+
68+
- `src/secure_auth.ads/adb` — Permission system with five levels (`None`,
69+
`Read_Only`, `Modify_Local`, `Modify_Remote`, `Admin`). Uses constant-time
70+
password comparison to prevent timing-based credential inference. 30-minute
71+
session timeout. Nonce-based replay attack detection.
72+
- `src/firewall_manager.ads/adb` — Port rotation with a time-based algorithm;
73+
service scheduling so the attack surface changes on a schedule aligned with
74+
DNS fluctuation.
75+
- `src/sdp_controller.ads/adb` — Zero-trust Software-Defined Perimeter with
76+
Single Packet Authorization (SPA).
77+
- `src/logger.ads/adb` — Thread-safe audit logging via Ada protected objects.
78+
79+
The Elixir prototype under `hinfo_loc_fluctuator/` was the original
80+
implementation. It was superseded by the Ada implementation after identifying
81+
that DNS infrastructure modification warrants Ada's compile-time safety
82+
guarantees over Elixir's dynamic model.
83+
84+
*Honest caveat:*
85+
Demo credentials (`admin`/`user`/`operator`) are hardcoded in `secure_auth.adb`
86+
with placeholder hash values. These MUST be replaced before any real deployment.
87+
Real crypto (bcrypt/Argon2) is not yet integrated. Actual DNS server
88+
communication requires TSIG authentication (RFC 2845) which is specified but
89+
not cryptographically implemented.
90+
91+
== Dogfooded Across The Account
92+
93+
[cols="2,3,1"]
94+
|===
95+
| Repo / System | How the fluctuator is used | Status
96+
97+
| `hesiod-dns-map` (flatracoon) | Shares DNS record type knowledge; LOC record model is reference for Hesiod HS-class positioning | Design reference
98+
| `hypatia` security scanner | Planned: fluctuator's deception-tech patterns inform Hypatia honeypot-detection rules | Planned
99+
| Security research | Used to demonstrate "quantum server" for educational/conference material | Live (manual)
100+
| Personal DNS infrastructure | Intended for public-facing DNS obfuscation on hyperpolymath.org zones | Intended
101+
|===
102+
13103
== File Map
14104

15-
[cols="1,2"]
105+
[cols="1,3"]
16106
|===
17107
| Path | What's There
18108

19-
| `test(s)/` | Test suite
109+
| `hinfo_loc_fluctuator_ada/` | **Primary implementation** — the Ada codebase (RECOMMENDED)
110+
| `hinfo_loc_fluctuator_ada/src/dns_records.ads` | **Critical path.** Core type definitions: `HINFO_Record`, `LOC_Record`, range-checked coordinate/TTL types
111+
| `hinfo_loc_fluctuator_ada/src/randomizer.ads/adb` | Data pool loading and random record generation; reads `data/*.txt` and `data/*.csv`
112+
| `hinfo_loc_fluctuator_ada/src/secure_auth.ads/adb` | Authentication: five permission levels, constant-time compare, nonce-based replay detection
113+
| `hinfo_loc_fluctuator_ada/src/scheduler.ads/adb` | Ada `task type` for periodic fluctuation; configurable interval and zone file output
114+
| `hinfo_loc_fluctuator_ada/src/tui.ads/adb` | Text-based menu TUI for interactive operation
115+
| `hinfo_loc_fluctuator_ada/src/zone_writer.ads/adb` | BIND zone file generation (RFC 1035 format)
116+
| `hinfo_loc_fluctuator_ada/src/logger.ads/adb` | Thread-safe audit logger via Ada protected objects
117+
| `hinfo_loc_fluctuator_ada/src/dns_update.ads/adb` | RFC 2136 DNS UPDATE framework (TSIG stub)
118+
| `hinfo_loc_fluctuator_ada/src/firewall_manager.ads/adb` | Port rotation and service scheduling
119+
| `hinfo_loc_fluctuator_ada/src/sdp_controller.ads/adb` | Zero-trust SDP with Single Packet Authorization
120+
| `hinfo_loc_fluctuator_ada/src/main.adb` | Entry point; bootstraps TUI and scheduler
121+
| `hinfo_loc_fluctuator_ada/data/machines.txt` | 68 CPU type strings for HINFO randomisation
122+
| `hinfo_loc_fluctuator_ada/data/operating_systems.txt` | 77 OS name strings for HINFO randomisation
123+
| `hinfo_loc_fluctuator_ada/data/locations.csv` | 52 geographic locations for LOC randomisation
124+
| `hinfo_loc_fluctuator_ada/hinfo_loc_fluctuator.gpr` | GNAT project file (compiler flags, safety checks enabled in all modes)
125+
| `hinfo_loc_fluctuator_ada/Makefile` | Build targets: `make`, `make release`, `make prove`
126+
| `hinfo_loc_fluctuator_ada/docs/USE_CASES.md` | Detailed honeypot/deception/privacy use case scenarios
127+
| `hinfo_loc_fluctuator_ada/docs/ENTERPRISE_FEATURES.md` | Enterprise feature guide (SDP, protocol management)
128+
| `hinfo_loc_fluctuator/` | Original Elixir prototype — reference only, NOT recommended for production
129+
| `PROOF-NEEDS.md` | SPARK formal verification backlog
130+
| `Justfile` | Build recipes: `just build`, `just test`
131+
| `flake.nix` / `guix.scm` | Reproducible environment (includes GNAT compiler)
132+
| `contractiles/` | Contractile trust/dust/intend check files
133+
| `.machine_readable/6a2/` | A2ML state, meta, ecosystem, agentic, neurosym, playbook manifests
20134
|===
21135

22136
== Questions?

0 commit comments

Comments
 (0)