↓ Skip to main content

NanoKVM Sipeed Rust

Sipeed NanoKVM Pro: My Own Firmware, Rust Services and Passkeys

How I replaced every layer of Sipeed's software on my NanoKVM Pro: the boot chain rebuilt from source, Linux 7.3, Rust services, and passkey sign-in.

Sipeed NanoKVM Pro: My Own Firmware, Rust Services and Passkeys

A KVM over IP is a small computer that sits next to a bigger one and puts its screen, keyboard and mouse in a browser tab. Mine is a Sipeed NanoKVM Pro. It has an Axera AX630C chip, an HDMI capture bridge, a small LCD with a knob, and Wi-Fi, and I reach it over Tailscale. Whoever controls it can do anything that computer’s own keyboard can, BIOS included. That’s a lot of trust to hand to software I can’t read.

The Sipeed NanoKVM Pro on a desk: a small black box with a colour LCD showing the time, a CPU gauge, the HDMI input at 1920×1080 60Hz and the stream state, a knurled knob with a red ring, and ‘KVM Pro’ printed on the front; the address and name on the screen are blurred
My NanoKVM Pro, running everything in this post. The screen is my Rust LCD app (address and name blurred).

So I replaced it. Every layer that runs on the device in normal use is now built from source by me: the boot chain, the Linux kernel, the operating system, and every service, rewritten in Rust. Sipeed’s software is still on the eMMC, but only as a fallback that boots if mine ever fails to load. The latest step, and how this post started, was signing in with passkeys and turning the password off.

This is the whole process, in the order I did it: what I found, what broke, and what I’d tell anyone thinking about doing the same to theirs.

What came in the box
#

Out of the box the NanoKVM Pro runs Ubuntu 22.04 on Axera’s Linux 4.19.125, a kernel that went end of life years ago. Sipeed’s software on top is a mix of open and closed parts:

  • Closed: the video library that grabs and encodes the HDMI picture, the app that drives the LCD, Axera’s media drivers (built for 4.19 only), a firmware blob for the chip’s crypto engine, and OP-TEE, a “trusted OS” running beside Linux.
  • Talking to the outside world: app and firmware updates come from Sipeed’s CDN, and the firmware I had shipped an AI “computer use” agent wired to Alibaba’s DashScope service.

None of that is unusual for a cheap embedded device. But I wanted two things: nothing on it I can’t build from source, and nothing leaving it that I didn’t ask for.

Rules before touching anything
#

A KVM you’ve bricked is a paperweight next to a computer you can no longer reach. So before changing anything I set some rules, and kept them the whole way:

  1. Slot B stays Sipeed’s. The NanoKVM Pro has two copies of everything after the first boot stage, slot A and slot B. The first-stage loader (the SPL) arms a watchdog while it loads a slot, and if loading fails the chip resets and tries the other slot. As long as slot B is untouched stock firmware, a broken slot A heals itself in about two minutes.
  2. Try in RAM first. Until the last few steps, every new kernel ran as a temporary session: started from the stock system with kexec, root filesystem in a RAM overlay, eMMC untouched, and any reset going back to stock.
  3. A full backup and a way back over USB. I copied all fifteen boot partitions off the device and checked them against on-device checksums. Then I proved the chip’s USB download mode works: hold the User button for ten seconds at power-on, and an open-source flasher (axdl-rs) can write it from a Mac. I tested that with nothing written, before I needed it.
  4. A new boot has to confirm itself. About 75 seconds after boot, once the web server and network are up, the system marks its slot as good. A boot that never gets there falls back to slot B on the next warm reset.

Day zero: lock the doors
#

Before any rebuilding, I stopped the device talking to anything I hadn’t approved. An outbound allowlist firewall lets through Tailscale, the local network, DNS and NTP, and drops everything else. A DNS blackhole makes Sipeed’s update hosts and DashScope resolve to addresses with unreachable routes, so the apps fail fast instead of hanging. I removed the computer-use agent and masked its service. That first version was a shell script. It’s now a subcommand of my Rust device tool, kvm-l3 egress, and still one of the first things that starts at boot.

A modern kernel: Linux 6.18, then 7.3
#

Neither Sipeed nor Axera has anything newer than 4.19 for this chip, and mainline Linux has no AX630C support. Two community projects do: open-nanokvm-pro, which runs this board on Linux 7.1, and OneKVM, whose 6.18 tree supports the HDMI bridge my unit has. I started from OneKVM’s tree.

OneKVM’s kernel is upstream 6.18.57 plus their AX630C changes: 136 files, about 30,500 added lines. I didn’t want my kernel to be “whatever was in someone’s branch”, so I replayed their changes onto Greg Kroah-Hartman’s signed stable tag, verified with gpgv against his published key. Moving to a new stable release is now a fetch, a signature check and a cherry-pick. Most of this post happened on 6.18.65. Since then I’ve ported the same changes up to Linux 7.3, where a few kernel interfaces under OneKVM’s drivers had moved (clocks, video buffers, Ethernet, I²C and Wi-Fi), and the device now runs 7.3.6. The 6.18 trees stay in the build, so going back is a checkout and a rebuild.

The kernel config is mine too:

  • Lockdown in integrity mode, and /dev/mem closed.
  • Module signing enforced, with a fresh key per build. Axera’s closed modules and anything unsigned are refused.
  • Wi-Fi from an open driver for the AIC8800 chip. Its firmware is the one closed piece left, along with the chip’s boot ROM.
  • HDMI audio, which turned out to be only a config change. The driver was already in OneKVM’s tree.

A few things only showed up on hardware. The stock boot arms two watchdogs and Linux 6.18 only knows about one, so the early init stops the second before it bites. OneKVM’s out-of-tree media drivers must be rebuilt after every config change, or a stale struct layout crashes the boot. And a kernel with a built-in initramfs has no /dev/console, so my Rust init died on its very first boot, before printing anything, for lack of somewhere to print.

A small Debian and a state store
#

The root filesystem is now Debian 12, built from scratch by a script: a minimal debootstrap plus 27 packages, packed as a 56 MB read-only squashfs. At boot it gets a RAM overlay, so the running system can write anywhere and nothing sticks. What makes a unit itself lives in a separate 32 MB state store that’s bind-mounted into place: Wi-Fi networks, Tailscale identity, SSH host keys and the web login. On a new unit, the first boot copies that identity across from the stock system, on the device, so no secret ever leaves it.

Tailscale is built from source too, trimmed to the features the KVM uses. It comes back later in this story.

Rewriting it in Rust, service by service
#

With my own kernel and OS underneath, the remaining Sipeed code was the services. The goal was to minimise Sipeed’s code, not to make anything faster, so I went in order of how much each step removed and checked every service on the device before starting the next.

  • Video library. I rewrote the closed library that captures HDMI and drives the hardware H.264/H.265 encoder as a Rust crate with the same C interface. It now rides out resolution changes: switching the source between 4K and 1080p used to kill the browser stream, and now costs nothing. Software MJPEG got about 30% faster on libjpeg-turbo 3.
  • LCD app. The front screen with its knob and touch panel was a closed app. The Rust one draws its own pages, uses 3.7% CPU instead of 12%, and 4.9 MB of memory instead of 20.5 MB.
  • Web server. Sipeed’s Go server had 141 API routes. The Rust one (axum and rustls) implements all of them natively.
    • Video to the browser goes out as MJPEG, as H.264/H.265 over a WebSocket into WebCodecs, or over WebRTC with webrtc-rs.
    • HDMI audio is encoded to Opus.
    • WebRTC tuning: a playout-delay header extension took the browser’s jitter buffer from 30 to 78 ms down to 2 to 5 ms. Google’s congestion control looked fine in tests, but on my real phone it pinned the bitrate at its floor, so I replaced it with simple loss-based control.
  • Device tool. kvm-l3 replaced a pile of shell and Python. It covers the USB gadget the host computer sees as a keyboard and mouse, the firewall, slot selection, the boot confirmation, and (as you’ll see below) certificates.
  • Init. The initramfs /init is a static Rust binary. It mounts the boot partition, sets up the root image and its overlay, copies the payload over it, mounts the state store and hands over to systemd. On its first real boot it handed over 7.3 seconds after the kernel started.
  • Browser UI. Sipeed’s React app was replaced by one written in Rust with Leptos and compiled to WebAssembly: a “Liquid Glass” look, a touch mode for phones, and an on-screen keyboard.

The boot chain: rebuilt from source
#

That left the code that runs before Linux. I’d assumed the boot chain was a closed blob and left it alone. Then I found that Sipeed publishes the whole SDK for this chip, maix_ax620e_sdk, with the source of the SPL, ARM Trusted Firmware 2.7, OP-TEE and U-Boot 2020.04.

What runs now. Sipeed's software only boots if slot A fails to load.

A compression format nobody documented
#

Every boot image on the device is a 1 KB header followed by a payload compressed in Axera’s own format, which I call axgzip. The header carries an RSA signature from Axera’s published test key; secure boot isn’t fused on this chip. The chip has a hardware engine that decompresses the payloads, and the tool that creates them ships only as a prebuilt binary. I don’t run vendor binaries in my builds, so the format had to be worked out.

The trick was to use the hardware itself as an oracle. From a 6.18 session I could hand the decompression engine a buffer and read back what it made of it; its registers are described in U-Boot’s source. Feeding it stock images and carefully varied streams showed the layout:

  • Blocks: a 16-byte stream header, then blocks of a 736-byte header (two Huffman tables, CRCs, a symbol-group count) and an MSB-first bit stream.
  • Symbols: DEFLATE-like literals and lengths, with a history window of 4,095 bytes.

The Rust decoder reproduces the stock kernel and device tree byte for byte, and the encoder’s output decompresses correctly on the hardware.

Building it exactly
#

The first goal was to build the SDK with the stock configuration and get the same bytes as the device. The device’s U-Boot matched to within 440 bytes, which was the compiler. The SPL was harder: Debian’s GCC 9.3 and 12 both produced slightly different code. The exact SPL on the device came out of the SDK at a commit from March 2026 built with ARM’s own GCC 9.2-2019.12 toolchain: byte for byte, all 47,248 bytes. Once the stock build reproduced, I knew any difference in my build was a change I’d made.

My build drops OP-TEE from the SPL and ATF, and leaves out the crypto engine’s closed firmware. It turns off U-Boot’s secure-boot and cipher commands, which had that same blob compiled in, and it draws my own boot logo on the LCD. It’s reproducible: two builds give identical files, equal to what’s on the device.

The bug only the first stage could see
#

The first test of my ATF and U-Boot in slot B failed. The device sat in USB download mode for a while, reset, and came back up on slot A by itself: exactly the self-healing I’d counted on. To see how far it got, I added breadcrumbs. My ATF and U-Boot wrote progress codes into a chip register that survives a warm reset. After the next failure the register was untouched, so my code had never run at all.

Two control tests split it. Stock images in slot B booted. Stock code compressed with my encoder failed. So the bug was in my compressor, and it turned out to be the end of the stream. Every stock stream ends with a deliberately impossible instruction: a copy from 4,096 bytes back, one more than the engine’s history holds. That’s how the engine knows to stop. Without it, my streams decoded on into the padding after the real data, and the engine set its “output larger than expected” status bit.

U-Boot ignores that bit, which is why my kernels had been booting fine for days through the same compressor. The SPL treats it as fatal. With the end marker added, slot B booted my ATF and U-Boot, then slot A did.

The SPL, the one stage with no fallback
#

The SPL has no slot B. It lives in one partition as two copies, and if both are bad the only way back is USB download mode with someone at the device. So it went last, in two steps:

  1. Mine as the primary copy, Sipeed’s left as the backup. I knew mine had run because the kernel log said so. With OP-TEE loaded, Linux prints that the trusted OS needs no migration. With my SPL nothing is handed to ATF, and it prints psci: MIGRATE_INFO_TYPE not supported. instead.
  2. Both copies mine.

With no OP-TEE anywhere, its 32 MB of reserved memory went back to Linux: 758 MB to 790 MB on a 1 GB device. The unused OP-TEE partitions are zeroed, and Axera’s “Create an Intelligent Future” splash screen is gone.

Three captures of the NanoKVM Pro’s front LCD: a blue monitor icon with ‘starting…’ while it boots; an amber icon with ‘Maintenance, hold USER 10 s at power-on for USB recovery’; and the running Home page with the time, a CPU gauge, the HDMI input 1920×1080 59Hz and the stream state, with the address and name blurred
The front screen: my boot logo, the maintenance screen shown while the User button is held, and my Rust LCD app once the system is up (address and name blurred).

Packaging it for the next unit
#

All of this is now one git repository with a Makefile. make all builds everything in Docker, and the provisioning steps take a new NanoKVM Pro from stock to this, in stages. Each stage checks the one before it, writes with read-back verification and reboots to prove itself. The firmware steps refuse to run if the new unit’s stock firmware differs from the version my builds were checked against, because a newer SPL might support different memory chips.

That left the part I touch every day: the web UI.

A more compact UI
#

The controls covered too much of the remote screen. The toolbar was a row of labelled tabs plus two round buttons, 539×60 pixels, right on top of the remote computer’s menu bar. It’s now one capsule of icon buttons, 309×42, and the menus are single-line. (The “before” here is my own earlier Rust UI; Sipeed’s was long gone by then.)

Before: the old toolbar with labelled tabs (MJPEG, Absolute, Paste, Keyboard, Power, Settings) plus round full-screen and log-out buttons, and a video menu with a two-line description under every mode
Before: 539×60 toolbar, two-line menu rows.

After: one capsule of icon buttons with a separator before full screen and log out, and a video menu with one line per mode
After: 309×42, one line per mode.

The settings went from iOS sizing to Mac sizing on a laptop: 36-pixel rows instead of 50, a 720×540 sheet instead of 840×640, and each slider’s label, track and value on one line.

Before: a large settings sheet with big rows and sliders whose value sits under the label
Before.
After: a smaller settings sheet with compact rows, sliders with label, track and value on one line, and small switches
After: the same page in about half the area.

On a phone the rows stay 44 pixels high, because fingers didn’t shrink, but each slider now puts its label and value on one line above the track.

Before, on an iPhone: video settings with tall slider rows
Before.
After, on an iPhone: video settings with label and value on one line over each slider
After.

One bug only showed on phones: the settings sheet could be taller than the screen. It was sized with 100vh, and on mobile browsers 100vh includes the area behind the address bar. The fix is the dynamic viewport unit, 100dvh, with a fallback, and every panel’s maximum height worked out from where it actually starts:

:root {
  --vh: 100vh;
  --panel-top: 56px; /* panels open just under the toolbar */
  --panel-max: calc(var(--vh) - var(--panel-top) - max(6px, env(safe-area-inset-bottom)));
}
@supports (height: 100dvh) { :root { --vh: 100dvh; } }
.panel.settings { height: min(540px, var(--panel-max)); }

A small test opens every panel at nine window sizes, from 1440×900 down to 320×480 and phone landscape, and checks its edges stay on screen. All 36 checks pass.

Passkeys, and why they don’t work on an IP address
#

The web UI’s sign-in was a username and password, served with a self-signed certificate I clicked past every time. I wanted passkeys, and then no password at all. The first thing I learned is that you can’t just add WebAuthn to a box you reach by IP address. Two rules get in the way:

  • The page needs a valid certificate. WebAuthn only exists in secure contexts, and since version 110 Chrome refuses it on any page with a certificate error. Chromium’s list of origins that support WebAuthn is short, and a certificate you click past isn’t on it.
  • A passkey belongs to a domain. It’s bound to a relying party ID, which has to be the page’s domain or a parent of it. An IP address isn’t a domain, so you can’t make a passkey for 100.x.y.z.

If you self-host anything, you’ve probably wanted this too. There’s a feature request on the Unraid forums asking for exactly this.

A real certificate from Tailscale
#

Tailscale already gives every machine a name: with MagicDNS on, the KVM is kvm-1234.tailXXXX.ts.net to every device in my tailnet. Tailscale’s HTTPS feature adds the certificate. You switch on “HTTPS Certificates” once in the admin console, and then tailscale cert gets a Let’s Encrypt certificate for the machine’s name. Let’s Encrypt checks ownership with a DNS-01 challenge that Tailscale’s control plane answers, so the KVM needs no open port and no public IP.

Decide one thing before you flip that switch. Every certificate Let’s Encrypt issues goes into the public Certificate Transparency logs, so the machine name and the tailnet name become public. Tailscale’s docs say so, and people have mined those logs for tailnet hostnames.

tailscale cert hit two snags on the KVM. My trimmed Tailscale build said unknown subcommand: cert. Adding the acme feature then failed to compile:

feature/acme/refresh.go:85:10: b.ServeConfig undefined

The certificate feature quietly depends on the serve feature. With both, the binary grew from 13.4 MB to 18.1 MB.

Then the firewall from day zero dropped the request. Tailscale’s own control traffic gets through because tailscaled marks its sockets, but its certificate client is a plain HTTP client. I didn’t want to open HTTPS to the whole internet for one daily job, so the renewal command opens a hole exactly as wide as it needs, for exactly as long:

/// Temporary allowlist entries for Let's Encrypt's API, removed when dropped (also on errors).
struct Hole(Vec<(&'static str, String)>);

impl Hole {
    fn open() -> Hole {
        let mut rules = Vec::new();
        for ip in resolve("acme-v02.api.letsencrypt.org") {
            let ipt = if ip.is_ipv4() { "iptables-legacy" } else { "ip6tables-legacy" };
            let ip = ip.to_string();
            if run(ipt, &["-w", "-I", "kvm-egress", "1", "-d", &ip, "-p", "tcp", "--dport", "443", "-j", "RETURN"]) {
                rules.push((ipt, ip));
            }
        }
        Hole(rules)
    }
}

impl Drop for Hole {
    fn drop(&mut self) {
        for (ipt, ip) in &self.0 {
            run(ipt, &["-w", "-D", "kvm-egress", "-d", ip, "-p", "tcp", "--dport", "443", "-j", "RETURN"]);
        }
    }
}

The Hole lives only while tailscale cert runs, and Drop closes it whatever happens. The first certificate took 36 seconds, and afterwards the firewall had no port-443 rules left. A daily timer runs it, and Tailscale only renews when the 90-day certificate is due.

The certificate comes from Let's Encrypt through Tailscale. The KVM never needs an open port.

I didn’t want to lose access by IP address either, for the day Tailscale’s DNS isn’t there or I’m at the desk with a USB cable. So the server keeps both certificates and picks one per connection by the name the browser asked for (SNI):

impl ResolvesServerCert for Certs {
    fn resolve(&self, hello: ClientHello<'_>) -> Option<Arc<CertifiedKey>> {
        if let Some(sni) = hello.server_name() {
            if let Some(t) = self.ts.read().unwrap().as_ref() {
                if sni.eq_ignore_ascii_case(&t.name) {
                    return Some(t.key.clone()); // the ts.net name: Let's Encrypt
                }
            }
        }
        Some(self.device.clone()) // anything else: the device's own certificate
    }
}

The renewal writes the key and the chain into one file and swaps it in with a rename. The server checks it once a minute, and with one file it can never pair a new certificate with an old key.

WebAuthn in Rust without OpenSSL
#

The usual Rust library, webauthn-rs, does its cryptography with OpenSSL 3. My server already had ring through rustls, and ring checks every signature passkeys use:

  • ECDSA P-256: Apple, Google and 1Password passkeys.
  • Ed25519: some security keys.
  • RSA: Windows Hello.

So the verifier is about 590 lines of Rust plus tests, with no new crypto dependency. Signing in checks three things:

  • the client data: the ceremony type, our challenge and our exact origin;
  • the authenticator data: the hash of our relying party ID, and the “user present” and “user verified” flags;
  • the signature:
let msg = [auth_data, Sha256::digest(client_data_json).as_slice()].concat();
let ok = match key {
    Key::Es256(pt) => UnparsedPublicKey::new(&ECDSA_P256_SHA256_ASN1, pt).verify(&msg, sig).is_ok(),
    Key::Ed25519(pt) => UnparsedPublicKey::new(&ED25519, pt).verify(&msg, sig).is_ok(),
    Key::Rs256 { n, e } => RsaPublicKeyComponents { n, e }.verify(&RSA_PKCS1_2048_8192_SHA256, &msg, sig).is_ok(),
};

Registration reads CBOR, so there’s a small, strict CBOR reader. It accepts definite lengths only, has a depth limit, and refuses any array or map that claims more entries than there are bytes left. Three choices are worth stating:

  • User verification is required, both when adding a passkey and at every sign-in. A machine with a keyboard into my computer gets Face ID, Touch ID or a PIN every time, not just a tap.
  • No attestation. The trust decision is who was signed in when the passkey was added, not which brand of authenticator made it.
  • Adding a passkey needs a recent sign-in: a session under five minutes old, or the password. A stolen cookie alone can’t plant a passkey. On a device that already has one, the page just asks for Face ID again.

The unit tests sign real responses with keys ring generates on the fly, then change one thing at a time: origin, relying party, a flipped signature bit, a missing verification flag, a counter going backwards, malformed CBOR. One failed on the first run, and the bug was in the test. It passed the attacker’s origin as the expected origin, so the verifier correctly accepted it.

Turning the password off: sign-in links instead of email#

A new phone has no passkey yet, and I didn’t want to lock myself out the day I lose my laptop. Most sites send a magic link by email. For a KVM that’s a bad trade: the device would need a mail account’s credentials and a hole in its firewall, and anyone who reads that mailbox could control my computer. So the links come from places that already prove it’s me:

  • A signed-in browser. Settings, Account, “Sign in another device” makes a one-time link and a QR code. I scan it with the new phone, and the phone signs in and adds its own passkey right there.
  • SSH. kvm-l3 login-link on the KVM prints a link. That’s the way back in if everything else is gone.
The KVM's Settings, Account page: a Password sign-in switch, a Sign in another device button with a QR code and a one-time link below it, and a Passkeys list with MacBook Pro and iPhone, each with the date added and a Remove button
Settings, Account. The account, passkeys and link here are made-up examples, not my real ones.

A link works once, for ten minutes. The server keeps only its hash, in memory, so a restart or a logout ends them all. The token travels in the URL fragment (#link=…), which browsers never send to a server or put in a Referer header, and the page wipes it from the address bar as soon as it reads it.

The password switch has two guards so I can’t lock myself out from the UI. It only turns off while a passkey exists, and the last passkey can’t be removed while it’s off. With it off, the login page is one button:

The NanoKVM sign-in page with a single Sign in with a passkey button and a note: no passkey on this device, open a sign-in link made on a signed-in device or run kvm-l3 login-link on the KVM
Password sign-in off. On the IP address the same page shows a link to the ts.net name instead.

Testing passkeys with a virtual authenticator
#

Unit tests prove the verifier agrees with my reading of the spec, not that it agrees with a browser. Chrome has a virtual authenticator in the DevTools Protocol, a fake security key that answers WebAuthn the way a real one would, and Playwright exposes it:

cdp = context.new_cdp_session(page)
cdp.send("WebAuthn.enable")
cdp.send("WebAuthn.addVirtualAuthenticator", {"options": {
    "protocol": "ctap2", "transport": "internal",
    "hasResidentKey": True, "hasUserVerification": True,
    "isUserVerified": True, "automaticPresenceSimulation": True}})

The test runs against the real KVM, on its real name, with the real certificate and without ignore_https_errors. If the certificate weren’t trusted, Chrome would refuse WebAuthn and the test would fail on its first step. It:

  • adds a passkey and signs in with it;
  • checks the IP address only offers a link to the name;
  • checks an old session can’t add a passkey;
  • signs a second browser in with a one-time link, and tries the link again;
  • turns password sign-in off and on;
  • cleans up.
{"added": true, "signed_in_with_passkey": true, "last_used_recorded": true,
 "ip_has_passkey_button": false, "old_session_needs_password": true,
 "link_signs_in": true, "link_gone_from_address_bar": true, "link_reuse_refused": true,
 "password_refused_when_off": true, "login_without_password_fields": true,
 "password_signin_restored": true, "left_behind": [], "page_errors": []}

It never calls logout, because logout rotates the signing secret and would end every session, mine included. It puts the password switch back the way it found it and deletes only its own passkey. And the remote “desktop” in every screenshot in this post is a drawing the test serves in place of the video stream, so no screenshot shows what’s really on my screen.

How this was built
#

I did this over a weekend, in Claude Code, set up the way I run it every day. I made the calls that were mine to make:

  • keep Sipeed’s slot B as the fallback for good;
  • reverse-engineer the compression format rather than run Axera’s tools;
  • write the SPL only with me at the device and the USB recovery image ready;
  • use Tailscale for the certificate;
  • send sign-in links from a signed-in device and SSH, not email.

Claude Code did the building, the testing and the debugging, and asked before anything that couldn’t be undone. That included every write to the boot chain and the one switch only I could flip, in my Tailscale admin console.

If you want to do the same to your own device, the order matters more than any single piece of code:

  1. Get a way back before you need it: backups, a fallback slot you never touch, and USB recovery tested with nothing written.
  2. Make every new piece prove itself in RAM or in the spare slot first.
  3. Rebuild the vendor’s own code exactly before changing it, so that any difference is one you made.
  4. For passkeys, get a real name and a trusted certificate first. After that, WebAuthn is a few hundred lines.