Articles

Go, Rust, Linux, cryptography and UK privacy law. One properly researched article a day.

Working notes from a software engineer who spends the day in Go, Rust and Linux and the evening reading legislation. Each post takes one specific question and answers it properly: why a worker pool deadlocks, what fsync really promises, how to enrol a TPM into LUKS without locking yourself out, what a technical capability notice can actually compel. Step-by-step how-tos sit alongside the deep dives, everything is checked against source code or primary legislation, and nothing is padded to hit a word count.

Subscribe with the Atom feed to get each post as it lands.

  1. Does a UK Data Retention Notice Make Your ISP Keep the Pages You Read?

    A UK retention notice can cover which services you connected to, not page content. See where a web address stops being communications data, and why.

  2. Why Destroying a Key Is Harder Than Making One

    Zeroing a key is not destroying it. See leftover AES copies in Go memory, then track the rest through swap, core dumps, snapshots and backups.

  3. Can a Repair Shop Look Through Your Files While Fixing Your Laptop?

    Handing over your password is not a licence to browse. What UK law says about technicians reading your files, and how to limit what they can reach.

  4. How to Threat Model the Password Reset Your Support Desk Does by Hand

    Map what your help desk can override, decide which proof counts, and add delays and alerts so one convincing phone call cannot take over an account.

  5. How to Stop a Zip Upload Filling Your Disk When the Headers Lie

    Cap what a zip upload can write by counting real bytes, entries and path depth in Go, with a filesystem quota behind it in case your code is wrong.

  6. How to Accept Connections From systemd Without Dropping Any on Restart

    Let systemd own the listening socket, drain your Go server on SIGTERM, and restart without refused connections. Includes a load test and the traps.

  7. Two Valid JSON Files, One Signature: Why Canonicalisation Matters

    A signature covers bytes, not meaning. See how JSON re-serialisation lets different files verify, and how to check signatures safely in Go.

  8. Why a Go Query Logger Can Put Personal Data in Postgres Server Logs

    A Go slow-query logger that fills in $1 before running EXPLAIN can write emails into Postgres logs, even on default settings. See why, and the fix.

  9. Why Is a TLS Certificate Rejected Before Its Expiry Date?

    An in-date certificate can still fail TLS: wrong clock, expired intermediate, wrong key usage or client policy. Find out which with OpenSSL and Go.

  10. How to Require a FIDO2 Key for sudo Without Locking Yourself Out

    Set up pam_u2f so sudo needs your password and a FIDO2 key, with a spare key, a safe test service, a timed rollback and the gaps to check.

  11. Why Does asyncio Lose Your Background Task Halfway Through?

    asyncio tasks can vanish mid-run through garbage collection, loop shutdown or a hidden exception. Learn to tell which happened and how to fix each one.

  12. Can You Legally Dump Your Own Router's Firmware to Repair It?

    What UK copyright and computer misuse law say about reading your own router's flash for repair, plus how to take a dump you can trust.

  13. Why a Laptop With a New Motherboard Won't Boot or Activate

    A swapped laptop board often fails because the serial, UUID and licence live in firmware and the TPM. See what to read on Linux and what to ask the repairer.

  14. Check Whether Tor Traffic Leaks DNS Through systemd-resolved

    Tor Browser resolves names through Tor, but other apps and misconfigured setups may not. Learn to test for DNS leaks and lock down systemd-resolved.

  15. Why a Go Select With a Default Case Quietly Drops Your Messages

    A non-blocking send using select and default discards data whenever the receiver is busy. Here is why it happens and three ways to fix it.

  16. Why a Seized Phone's Deleted Texts Often Survive in SQLite

    Deleting a text in SQLite usually just marks its bytes as free space. See it happen with strings, then learn what secure_delete, VACUUM and the WAL change.

  17. Your Self-Hosted App Is Still Reachable After ufw Says Deny

    Docker published ports skip ufw's rules. See why, then close them with a loopback binding or a DOCKER-USER rule, and test the result from outside.

  18. Why Borrowing Two Fields Works Until You Hide One Behind a Method

    Rust lets you borrow two struct fields at once, until a getter hides one. See why signatures cause E0499, why MutexGuard does it too, and how to fix both.

  19. Does an Interception Warrant Let Evidence Be Used in Court? Mostly No

    A UK interception warrant makes tapping lawful, but section 56 of the IPA keeps the product out of court. See the exceptions and the EncroChat route.

  20. How to Give Each ESP32 Prototype Its Own Wi-Fi Setup Password

    Generate a random SoftAP password on each ESP32 at first boot, keep it across factory resets, and avoid the weak shortcut of deriving it from the MAC.

  21. How Much RAM Does a FreeRTOS Task Need? Measure It on ESP32

    Measure what an ESP32 FreeRTOS task really costs: stack high water mark, heap used per task, a sensible safety margin and the traps that skew results.

  22. How to Delete One Person's Data From an Append-Only Event Log

    Erase one person from an event log using per-subject keys in Go, see why Kafka compaction may not do it, and find the copies that survive.

  23. Can a UK Capability Notice Reach an Open-Source Maintainer?

    Writing code does not make you a telecoms operator under the Investigatory Powers Act, but running a server for it might. Here is where the line falls.

  24. Does a Matching Hash Prove a Disk Image Is the Original Evidence?

    A matching SHA-256 shows two sets of bytes agree. Learn what it cannot show about source, time or handling, and how to record and sign what fills the gap.

  25. How to Check an age File Really Came From Who You Think

    age encrypts files but does not say who sent them. Sign with ssh-keygen, bind the recipient, and verify before you trust what you decrypted.

  26. Why a Rust CLI Panics When You Pipe It into head

    Rust ignores SIGPIPE, so println! panics once head exits. See why it happens and two ways to fix it: handle the error or restore the signal.

  27. Can You Test Your Employer's App Because You Work There? Get It Signed

    A staff login is not permission to security test. What the Computer Misuse Act asks, who can authorise you, and a one-page sign-off to get first.

  28. Why a Relayed TLS Login Fails: the Signature Covers the Handshake

    How the TLS 1.3 CertificateVerify signature ties a client certificate login to one connection, with a Go replay test and the cases it misses.

  29. When an Open Standard Needs a Paid Document to Implement It

    What to do when an open spec points at a paywalled standard: where free copies hide, what drafts and profiles miss, and how to record what you built from.

  30. How to Threat Model a CI Runner That Builds Strangers' PRs

    A CI runner that builds fork pull requests runs strangers' code by design. Map what it can reach, then cut off the paths that matter.

  31. Your Tokio Broadcast Receiver Fell Behind. Where Did the Messages Go?

    What RecvError::Lagged means in Tokio: which messages are gone, why a capacity of 10 holds 16, and how to stop losing events without noticing.

  32. Your Threat Model Should Include the Admin Who Is You

    If you run your own servers, your tired, phished or careless self holds every key. Here is how to limit the damage, with append-only backups you can test.

  33. Why Your Progress Bar Turns to Junk When You Pipe It to a File

    A progress bar relies on a terminal to erase itself. See what really lands in the file, how to clean old logs, and how to print sensible output in Go.

  34. How to Make a Batch CLI Safe to Stop Halfway and Rerun

    Handle Ctrl-C and SIGTERM in a Go batch tool, never leave half-written output, and resume cleanly on the next run, even after kill -9.

  35. Can a Parish Council or Club Charge You for a Subject Access Request?

    Usually not. See when a UK parish council or club may charge for a subject access request, what the fee can cover, and how to answer a demand for one.

  36. Who Can Challenge a UK Notice to Weaken Encryption?

    The recipient has 28 days to seek review of a UK technical capability notice. Users and campaign groups have a different route, through a tribunal.

  37. Your API Request Timed Out. It May Still Have Worked

    A client timeout says nothing about what the server did. Learn to tell "not sent" from "unknown" in Go, and how to find out what actually happened.

  38. How to Prove an IDOR With Two Test Accounts and Nobody Else's Data

    Prove an IDOR safely: two accounts you own, a canary string, four requests, a clean report, then a Go fix with a test that stops it coming back.

  39. Does Local Storage Need Consent? PECR Covers More Than Cookies

    PECR applies to localStorage just as it does to cookies. Learn which uses need consent, which are exempt, and how to check what your site stores.

  40. How to Prove a Subdomain Takeover Without Taking Anything Over

    Gather DNS, HTTP and provider evidence that a dangling subdomain looks claimable, then report it convincingly without registering the resource yourself.

  41. Where Should the Key That Unlocks Your Other Keys Live?

    Compare files, TPMs, tokens, KMS and passphrases for your root key, and see why a TPM-bound systemd credential may not stop a thief.

  42. How to Serve a Small Website as a Tor Onion Service Beside HTTPS

    Add a .onion address to a small nginx site on Debian: Unix socket, AppArmor rule, Onion-Location header, key backups and leaks to check.

  43. How to Threat Model a Backup Server That Can Delete Its Own Copies

    Pruning gives your backup system a legitimate delete button. Map who can press it or steer it, and put a check between the retention policy and your data.

  44. How to Stop a Bad OTA Update Bricking Your ESP32 Prototype

    Set up ESP32 OTA rollback with ESP-IDF: two app slots, a self-test with a deadline, and a check that stops the same bad image being installed again.

  45. Why a 64 MiB Argon2 Setting Can Take Your Login Server Down

    Argon2 memory is charged per concurrent login. See measured peaks in Go, why GOMEMLIMIT won't save you, and how to cap hashing safely.

  46. Why Your Self-Hosted Mastodon Instance Dies When One Admin Burns Out

    A one-admin Mastodon server rarely crashes dramatically. It rots through expiry dates and skipped updates. Here is what fails, in order, and how to prepare.

  47. Why a Go TLS Client Connects Despite the Wrong ServerName

    A Go TLS client with a "wrong" ServerName often connects fine. Learn what ServerName really controls, and the three settings that make it meaningless.

  48. Why Your Rural Uplink Is Fine at Lunch and Useless at 8pm

    Your link tests fine at lunch and crawls at 8pm. Log latency and upload speed by the hour, tell shared-link contention from your own kit, and act on it.

  49. Why Your Go Worker Pool Still Races After a Mutex on the Results

    A mutex around append only guards the slice header. Three ways the race survives in a Go worker pool, and a lock-free layout that removes the problem.

  50. Why Your OAuth Redirect URI Check Must Compare Exact Strings

    Prefix checks, wildcards and 'smart' URL parsing on OAuth redirect URIs hand authorisation codes to attackers. Here is how they fail, and the Go fix.