# PSUT IoT Engineering Studio — Version 16.1 experimental acceptance audit

Scope: all 66 published lab pages and packaged sources, based on Version 16.0 Instructor and Student editions. Checks ran on the build environment (Linux, not Windows WSL). Original reports remain historical. A host execution with mock sensors is not physical validation.

## Verification matrix

| Lab | Experiment | Build verification (not full acceptance) |
|---|---|---|
| R1 | Lab 1 · Hardware & first boot | Host Linux commands executed; WSL installation pending |
| R2 | Lab 2 · GPIO header & numbering | Actual RPi.GPIO mock BOARD output executed; gpiozero pinout utility pending |
| R3 | Lab 3 · Linux command line | Directory/file/permission operations executed on Linux |
| R4 | Lab 4 · Remote access & Python environments | Static procedure reviewed; actual SSH/WSL pending |
| R5 | Lab 5 · Python shell & arithmetic | Actual CPython REPL expressions executed |
| R6 | Lab 6 · First Python program | Actual hello.py creation and CPython execution checked |
| P29 | Lab 29 · GPIO output · LED | Legacy RPi.GPIO mock program executed; gpiozero exercises pending |
| P30 | Lab 30 · GPIO input · Button and events | Source and model reviewed; GPIO Zero runtime pending |
| P31 | Lab 31 · PWM brightness and alternate functions | Source and model reviewed; GPIO Zero runtime pending |
| P32 | Lab 32 · DHT22 temperature and humidity | Actual successful and forced-failure CPython runs passed |
| P33 | Lab 33 · DHT22 CSV logging | Actual three CSV appends and forced-failure no-file control passed |
| P34 | Lab 34 · DHT22 to ThingSpeak | Actual script tested with accepted/rejected response fixtures; real ThingSpeak pending |
| P35 | Lab 35 · Pi ↔ Arduino · USB serial LED control | Source/firmware reviewed; actual serial and Wokwi pending |
| P36 | Lab 36 · Arduino telemetry, CSV and ThingSpeak | Source/firmware reviewed; actual serial/cloud pending |
| P37 | Lab 37 · TCP echo server and client | Actual loopback TCP echo exchange passed |
| P38 | Lab 38 · UDP datagrams and broadcast | Actual loopback UDP two-datagram exchange passed |
| P39 | Lab 39 · Internet services · HTTP and NTP | Source reviewed; external NTP and ThingSpeak execution pending |
| P40 | Lab 40 · IoT gateway · JSON lines and fan commands | Actual gateway and sensor-node loopback exchange passed |
| P41 | Lab 41 · LED control class with a mock GPIO | Actual five OOP/mock GPIO programs executed |
| P42 | Lab 42 · IoT time-series data with InfluxDB | Source and configuration checked; actual InfluxDB pending |
| P43 | Lab 43 · MQTT → Telegraf → InfluxDB | Static MQTT profile and telemetry validation tests passed; live services pending |
| P44 | Lab 44 · Grafana dashboard for IoT data | Provisioning/configuration reviewed; actual Grafana pending |
| X1 | Lab 1 · Board architecture & setup | Actual board-check program executed; Wokwi firmware pending |
| X2 | Lab 2 · LED & buzzer timing | Source/model reviewed; GPIO Zero runtime pending |
| X3 | Lab 3 · Push-button relay & motor | Source/model reviewed; GPIO Zero runtime pending |
| X4 | Lab 4 · Digital input: button, IR & LDR | Source/model reviewed; GPIO Zero runtime pending |
| X5 | Lab 5 · DHT22 environmental data logger | Actual JSON/CSV/HDF5/tree creation executed |
| X6 | Lab 6 · DHT22 + SSD1306 OLED | Actual mock console and fake OLED rendering executed |
| X7 | Lab 7 · Bluetooth board & phone pairing | Source reviewed; Bluetooth controller/WSL pending |
| X8 | Lab 8 · Bluetooth telemetry & LED control | Actual sensor-only TCP server and READ/unsupported/STOP passed; combined GPIO mode pending |
| X9 | Lab 9 · ThingSpeak HTTPS upload | Actual REST helper tested on local HTTP fixture; ThingSpeak pending |
| X10 | Lab 10 · ThingSpeak HTTPS retrieval | Actual REST read helper tested on local HTTP fixture; ThingSpeak pending |
| X11 | Lab 11 · MySQL / MariaDB sensor database | SQL/source checked; actual MariaDB pending |
| X12 | Lab 12 · MQTT publisher | Static MQTT profiles and telemetry validation passed; broker pending |
| X13 | Lab 13 · MQTT subscriber | Static Node-RED flow and telemetry validation passed; live dashboard pending |
| X14 | Lab 14 · TCP humidity server & client | Actual loopback TCP mock humidity request/response passed |
| X15 | Lab 15 · UDP humidity server & client | Actual loopback UDP mock humidity request/response passed |
| K01 | K01 · Environment & scope | Installer shell syntax checked; actual Kali WSL/APT pending |
| K02 | K02 · Local broker & service inventory | Configuration and generated certificate tests passed; actual Mosquitto/Nmap pending |
| K03 | K03 · MQTT authentication & least privilege | MQTT acknowledgment evaluation logic tested with fixtures; live broker pending |
| K04 | K04 · TLS certificate trust & endpoint identity | Actual offline OpenSSL positive/negative hostname checks passed; live TLS broker pending |
| K05 | K05 · Plaintext vs TLS packet observation | Static capture procedure reviewed; live tcpdump/broker pending |
| K06 | K06 · Hashing & HMAC telemetry integrity | Actual SHA-256 and HMAC controls passed |
| K07 | K07 · Authenticated freshness & replay protection | Actual replay controls passed |
| K08 | K08 · Authenticated encryption & signatures | Actual AES-GCM, RSA-PSS, ECDSA, ECDH/HKDF controls passed |
| K09 | K09 · Privacy-preserving telemetry | Actual data minimization and pseudonymization controls passed |
| K10 | K10 · Credential & key protection | Actual positive/negative permission logic tested with disposable files; actual initialized toolkit pending |
| K11 | K11 · Threat modeling & integrated security review | Actual eight integrated schema/manifest controls passed |
| K12 | K12 · Mutual TLS and device identity | Actual local mutual TLS three controls passed |
| K13 | K13 · Authenticated encryption benchmarking | Actual AES-GCM benchmark 400 timing samples recorded |
| K14 | K14 · Defensive sensor anomaly detection | Actual synthetic anomaly confusion-matrix calculation passed |
| K15 | K15 · Ascon-AEAD128 · lightweight authenticated encryption | Actual Ascon 182 controls passed |
| K16 | K16 · Authenticated audit log verification | Actual authenticated audit-chain five controls passed |
| K17 | K17 · Credential lifecycle and key rotation | Actual key-rotation six controls passed |
| B01 | B01 · Hash functions and linked blocks | Actual SHA-256 and linked-chain model tested |
| B02 | B02 · Merkle trees and inclusion proofs | Actual SHA-256 Merkle proofs tested |
| B03 | B03 · Distributed agreement and finality | Actual quorum model tested |
| B04 | B04 · Solidity fundamentals with Remix | Counter model tested; actual Solidity compilation/EVM pending |
| B05 | B05 · IoT device registry and access control | Authorization model tested; actual Solidity compilation/EVM pending |
| B06 | B06 · Telemetry commitments and replay resistance | Commitment/replay model tested; actual Solidity compilation/EVM pending |
| B07 | B07 · IoT dApp workflow and event evidence | Model tested; actual local EVM runner pending dependency installation |
| B08 | B08 · Gas, scalability and experimental design | Byte-accounting model tested; actual receipt-gas experiments pending |
| B09 | B09 · Blockchain privacy and secure IoT design | Hash model tested; privacy design is a student analysis |
| K18 | K18 · Comparative AES-GCM and Ascon benchmarking | Actual AES/Ascon 800 combined timing samples recorded |
| K19 | K19 · Certificate revocation lifecycle | Actual OpenSSL CRL three controls passed |
| K20 | K20 · Authenticated IoT gateway and defensive monitoring | Actual gateway five controls passed |

## Lab-specific preflight, execution and acceptance

### R1 — Lab 1 · Hardware & first boot

PowerShell: run wsl --list --verbose first. If Ubuntu-24.04 is present, do not reinstall or unregister it. Enter wsl -d Ubuntu-24.04, create the Linux user if first launch, then check /etc/os-release. Host x86_64 is normal; WSL is not Raspberry Pi hardware. apt update requires internet. Install the toolkit through Setup before later labs.

### R2 — Lab 2 · GPIO header & numbering

Use the Ubuntu toolkit virtual environment, not a physical Pi. BOARD pin 11 corresponds to BCM17. The mock trace must show GPIO17 HIGH; cleanup ends the logical test. The pinout utility needs gpiozero. A printed trace is not voltage or current evidence.

### R3 — Lab 3 · Linux command line

Use the Linux home folder, not Windows System32. mkdir -p is repeatable; touch does not clear existing content. chmod u+x changes only the owner execute bit; ls -l must show it. tree must be installed by the toolkit. explorer.exe . is WSL-specific and not required on a Linux-only host.

### R4 — Lab 4 · Remote access & Python environments

Complete Setup first so openssh-server is installed. Inside Ubuntu start ssh and verify active. In PowerShell use the username printed by whoami and the Linux password (not the Windows PIN). If localhost forwarding fails, verify the distribution address and listener rather than reinstalling. Create the separate iot-env only after login. Exit the SSH session when finished.

### R5 — Lab 5 · Python shell & arithmetic

Start python3 in Ubuntu. Enter the five expressions at >>>, without copying the prompt. Expected in order: 3.5, 3, 1, 1024, 3.143. exit() returns to Bash; these are not shell arithmetic commands.

### R6 — Lab 6 · First Python program

From Ubuntu create ~/pi-labs and open code .; install Windows VS Code with WSL extension if missing. In VS Code create a file named exactly hello.py (not hello.py.txt), paste the print statement, save, and run python3 hello.py from ~/pi-labs. Expected one greeting line. The VS Code launcher itself requires Windows/WSL.

### P29 — Lab 29 · GPIO output · LED

All examples use BCM17, physical pin 11. Press Enter to end led.py; interrupt each continuous blinking script before starting the next. Expect repeated HIGH/LOW on the mock at approximately 0.5 s intervals, not physical LED light. Use a suitable series resistor for real hardware.

### P30 — Lab 30 · GPIO input · Button and events

Use a fresh activated terminal per example. FAKEPI_PRESS uses seconds relative to process startup. For the first example expect one Button was pressed message after the scheduled GPIO18 LOW. For events, expect three callbacks when the process remains running for 5 s. Interrupt only after observing them. If a scheduled event is missed, record it and repeat.

### P31 — Lab 31 · PWM brightness and alternate functions

BCM18 is physical pin 12. Run the finite PWM program to completion. Expected duty sequence 0,25,50,75,100%; a 100% duty is shown as HIGH, not necessarily PWM 100%. The device may switch off during cleanup. Duty-cycle traces do not measure physical PWM frequency.

### P32 — Lab 32 · DHT22 temperature and humidity

Use the updated toolkit. A failure probability of 0.6 can cause zero, some or five failures; it is not a required number of retries. FAKEPI_DHT_FAIL=1 guarantees exhaustion and exit status 1. With FAKEPI_DHT_FAIL=0 and fixed values 31.5/40, expect Temp=31.5 C and Humidity=40.0%. Do not record a failed run as a reading.

### P33 — Lab 33 · DHT22 CSV logging

The CSV has no header: timestamp, temperature, humidity. In an existing log record the previous row count (wc -l dht22_log.csv); if absent use zero. Run three successful acquisitions and compare the count increase by three, not total rows. An exhausted read exits nonzero and appends nothing. Do not delete earlier evidence; archive it separately.

### P34 — Lab 34 · DHT22 to ThingSpeak

Create a private ThingSpeak channel with Field 1 temperature and Field 2 humidity, save it, copy its Write API Key, and wait at least the configured update interval (20 s is a safe teaching setting for a 15 s minimum). Read the key silently in the same terminal. Expect Accepted entry: followed by a positive integer; a 0 or HTTP/network failure exits nonzero. Verify that ID and fields in the private channel. Unset THINGSPEAK_WRITE_KEY after use. Never upload private or real personal data.

### P35 — Lab 35 · Pi ↔ Arduino · USB serial LED control

Choose exactly one route. Wokwi: open the provided uno-led-serial folder in Windows VS Code, build with PlatformIO, start Wokwi, confirm RFC2217 port 4000, then open the Python client. Type on/off at its prompt. Confirm LED state in Wokwi, not just the client prompt. Alternative: start arduino_link.sh, keep it running, start fake_arduino.py led in a separate activated terminal, then open the client with /tmp/psut-pi-serial. Stop all three only when done.

### P36 — Lab 36 · Arduino telemetry, CSV and ThingSpeak

Use uno-telemetry rather than uno-led-serial. Build and start Wokwi, or use the separate fake Arduino telemetry route. Only one Python client should read a serial stream at a time. Let at least three TEMP: lines arrive, stop with Ctrl+C, then inspect the last new CSV rows. For the ThingSpeak variant, start only after stopping the logger; positive entry IDs and channel read-back are required.

### P37 — Lab 37 · TCP echo server and client

Terminal A starts echo_server.py and stays open; B runs echo_client.py. Expected Server replied: ACK temp=24.5. For listener inspection use ss -ltn, not only ss -tn after the short connection closes. Stop A with Ctrl+C. This is loopback application framing, not LAN or physical transmission.

### P38 — Lab 38 · UDP datagrams and broadcast

Start receiver in A before sender in B. A should print both room-101,24.5 and room-102,26.1. Stop A, run B again: a successful send does not establish delivery. Restart A and repeat B as positive recovery. Record actual observations; do not infer packet loss from an inactive receiver.

### P39 — Lab 39 · Internet services · HTTP and NTP

NTP uses UDP 123 and needs DNS/network access. Expect a UTC time only after a valid response; timeout is inconclusive, not proof of NTP failure globally. HTTPS upload is a separate test; use a private channel and write key in the same terminal, wait between writes, require HTTP 200 and positive entry ID. Unset the key.

### P40 — Lab 40 · IoT gateway · JSON lines and fan commands

Start gateway_server.py in A, keep it listening on 6000. B runs sensor_node.py, then sensor_node_fan.py only after the first exits. Expected decisions for 24.5,31.2,28.0 are FAN_OFF,FAN_ON,FAN_OFF; exactly 30 is OFF. CSV is in the gateway working directory. The source is a loopback teaching gateway, not authenticated or production safe. Stop A after both clients.

### P41 — Lab 41 · LED control class with a mock GPIO

The mock classes print state changes. Run all five files separately. test_pattern.py intentionally reports Use only dot and dash; test_pins.py rejects GPIO30 under its accepted BCM2–27 range. Two GPIO17 creations may both be accepted; range checking is not an exclusive pin allocator. The traffic-light sample runs one short green/yellow/red cycle and cleans up.

### P42 — Lab 42 · IoT time-series data with InfluxDB

After setup --influx, check /health, initialize InfluxDB UI if needed, create org psut and bucket greenhouse, then obtain a scoped read/write token. Source influx.env before running the node and controller in that same terminal. Historical node writes 30 minute-spaced mock points; repeating within a five-minute time bin may overwrite identical series/timestamps. Query node pi-01/source mock, rather than counting all bucket records. The live variant writes continuously; stop it after observing new timestamps.

### P43 — Lab 43 · MQTT → Telegraf → InfluxDB

First finish P42 token setup. Select one profile, local (1884) or HiveMQ public demonstration (1883); source the matching file in every terminal. Start subscriber A; Telegraf B; publisher C with MESSAGES=5 PERIOD=2. Check subscriber payloads first, then wait for Telegraf flush and query stored history. Only then run Wokwi with matching broker/topic (public route uses assigned session ID). For local route Wokwi private gateway/forwarding is required; test port before firmware. No real private data on HiveMQ. Stop only the foreground processes you started.

### P44 — Lab 44 · Grafana dashboard for IoT data

Finish P42/P43 and verify stored records before Grafana. Install/start Grafana, check /api/health, obtain a read-only InfluxDB token scoped to greenhouse, provision from the lab directory. Open localhost:3000, select the configured datasource/dashboard, use a time range covering the recorded points and correct device/source. A reachable port alone does not prove dashboard data. Avoid exposing tokens in screenshots.

### X1 — Lab 1 · Board architecture & setup

Ubuntu board check normally reports Not detected as Raspberry Pi. That is expected in WSL. For actual Uno LED demo open uno-blink in Windows VS Code, build PlatformIO, start Wokwi and observe repeated built-in LED transitions. Do not interpret the board-check result as a failed setup.

### X2 — Lab 2 · LED & buzzer timing

Activate toolkit, cd to pi-practical. LED program --cycles 3 runs about 9 seconds (1 s ON,2 s OFF each). Buzzer runs 16 beeps over about 16 seconds. Both finish automatically. WSL reports GPIO/Beep logs; physical sound is not required.

### X3 — Lab 3 · Push-button relay & motor

Use scheduled active-low button on BCM25 and relay BCM22. Relay is active-low: Motor ON means physical LOW at the driver, Motor OFF means HIGH. Expect transitions around 1 and 3 seconds with 0.3 s presses; stop after 4 s. Real motors require an appropriate driver and power isolation, not direct GPIO.

### X4 — Lab 4 · Digital input: button, IR & LDR

Run each of the three continuous commands separately and stop it with Ctrl+C before the next. Button uses BCM25; IR/LDR digital signal uses BCM22. For scheduled HIGH from 1 to 2 s, active-low IR is inactive during HIGH, while active-high LDR is active. Record logical state, not a physical optical measurement.

### X5 — Lab 5 · DHT22 environmental data logger

Run from pi-practical. Choose distinct output directories for mock and fakepi. --mock --count 3 creates three deterministic rows; fakepi mode uses the simulated driver. Output files are replaced when reusing a directory, not appended. Verify JSON length, CSV header plus three rows and HDF5/tree file presence; archive before rerunning.

### X6 — Lab 6 · DHT22 + SSD1306 OLED

Run the finite --count 3 program. WSL prints OLED text and writes fakepi_oled.png in the current directory when Pillow is present; the last nonblank image is retained. It does not drive I2C hardware. For console-only use --mock --console; no PNG is promised in that mode.

### X7 — Lab 7 · Bluetooth board & phone pairing

Install BlueZ only if needed and run bluetoothctl list. WSL often has no controller or running BlueZ service; record no controller as an environment limitation, not a passed pairing test. Physical Raspberry Pi pairing is separate. Continue to X8 TCP substitute to study the application protocol.

### X8 — Lab 8 · Bluetooth telemetry & LED control

Activate toolkit and use updated bt_over_tcp.py. Terminal A starts the --mode both --mock server; it needs gpiozero. Without gpiozero, --mode sensor --mock is an explicit partial alternative: READ and STOP work; ON/OFF return unsupported command. B opens nc and types commands one per line. For both mode expected JSON led ON/OFF; STOP ends client session, not the listening server. Ctrl+C in A ends it.

### X9 — Lab 9 · ThingSpeak HTTPS upload

Create private channel with Field 1 temperature, Field 2 humidity and optional status field. Set only Write API Key in current terminal. --count 3 defaults to 20 s between samples. Each accepted entry must be positive; count the three accepted IDs, not just process exit. Any Upload failed line means incomplete experiment. Verify in channel and unset key.

### X10 — Lab 10 · ThingSpeak HTTPS retrieval

Finish X9 first. Use numeric channel ID and its Read API Key (not Write key). Run in pi-practical from activated terminal. Compare entry ID, timestamp, field1/field2 and provenance status with X9. An older entry is not evidence of a new upload. Unset Read key and channel variables.

### X11 — Lab 11 · MySQL / MariaDB sensor database

Start MariaDB and confirm service active. Run setup_db.sh once to create schema and generated password; source db.env without printing credentials. Record the largest reading_id before insertion. After three successful inserts verify three newer rows with source mock, then query UTC hours 0–23. Aggregates include existing records. Use existing user, not root, for application code.

### X12 — Lab 12 · MQTT publisher

Choose exactly one profile for both terminals. Start exp13 subscriber before exp12 publisher, wait for subscription readiness. Publisher sends five mock readings; check all five actual messages with correct topic/source. A publish print alone is insufficient. Stop subscriber after verification. Public HiveMQ uses generated session ID, fictional data only.

### X13 — Lab 13 · MQTT subscriber

Complete X12 first. Import only the matching local or HiveMQ flow from generated toolkit configuration and deploy; avoid duplicate dashboard paths. Start publisher again, verify MQTT input debug and the matching dashboard (local /psut-local/live, HiveMQ /psut-hive/live). Inspect actual timestamps and source, not stale charts. Stop publisher/subscriber when done.

### X14 — Lab 14 · TCP humidity server & client

Run server in A from pi-practical; B runs client. Expected JSON includes sensor_id, timestamp, temperature, humidity and source mock (default initial 23.0 C/63.0%). Stop continuous server A or use --once for one controlled exchange. Port 20001 is loopback.

### X15 — Lab 15 · UDP humidity server & client

Run server A before client B; port 25001 is loopback. Expected JSON as X14 with source mock. If client times out, check server and port; restart as recovery rather than accepting a missing reply. Use --once for a single controlled exchange or Ctrl+C to stop A.

### K01 — K01 · Environment & scope

In PowerShell check wsl --list --verbose and enter kali-linux; do not reinstall an existing distro. Copy extracted kali-labs into Linux home using explorer.exe .; run bash setup_kali.sh then bash verify_kali.sh in that folder as normal user. Require Python cryptography and Paho 2 support. Do not use sudo for lab.py init.

### K02 — K02 · Local broker & service inventory

Use Kali, not Ubuntu. Before initialization, ss -ltn | grep -E ":18884|:18885" should print nothing if both free (grep exit 1 is expected). If initialized previously, reuse valid files; init refuses nonempty private setup. Start plain and TLS brokers as normal user in two separate foreground terminals. Check listeners and local Nmap only; expected both open. Keep brokers running for K03–K05; stop only your own instances after K05 or K11.

### K03 — K03 · MQTT authentication & least privilege

K02 both broker terminals must remain running. In a third Kali terminal verify dependencies, run python3 lab.py mqtt. Require all checks pass, including authorized delivery before and after rejected operations, MQTT 5 reason codes and no unauthorized delivery. Timeout or TLS failure is not proof of authorization. Keep credentials private.

### K04 — K04 · TLS certificate trust & endpoint identity

K02 TLS broker on 18885 must remain listening and CA/server certificate dates valid. Run lab.py tls. A trusted localhost handshake must succeed and wrong.invalid must fail specifically for hostname mismatch. An expired cert or refused connection is an environment failure. Do not disable hostname verification.

### K05 — K05 · Plaintext vs TLS packet observation

Use two terminals plus both brokers. Start 15-second tcpdump on lo for port 18884, wait for listening message, immediately emit-plain from another terminal. Repeat independently for 18885 and emit-tls. Plain marker should appear in plaintext; TLS capture should show traffic but not plaintext marker. If no packets captured, result is inconclusive. Use fictional marker only and stop capture automatically.

### K06 — K06 · Hashing & HMAC telemetry integrity

Run lab.py integrity from ~/kali-labs; no broker required. Confirm each JSON check pass. Hash changes detect bytes; HMAC verifies with shared secret. Do not assume a fixed number of changed bits or expose the key.

### K07 — K07 · Authenticated freshness & replay protection

Run lab.py replay; uses fixed teaching clock and in-memory sequence state. Require all checks pass, including duplicate/stale/altered rejection. Restart resets teaching state; not durable production replay protection.

### K08 — K08 · Authenticated encryption & signatures

Run lab.py crypto after verify_kali.sh. Require all JSON checks pass including reference vector and altered-input rejection. Fresh ephemeral keys and nonce values change outputs; compare pass flags rather than ciphertext equality. No broker required.

### K09 — K09 · Privacy-preserving telemetry

Run lab.py privacy with fictional records. Verify allowlisted device and temperature only, temperature 25.5, no owner/room/token fields. HMAC pseudonym changes with key; it is not anonymity. Do not submit raw private data.

### K10 — K10 · Credential & key protection

Initialize K02 first. Normal user runs lab.py permissions and stat. Directory should be 700; private files should have no group/other bits (typically 600). Negative control uses disposable dummy file, not a real key. Never chmod a real private key to world-readable.

### K11 — K11 · Threat modeling & integrated security review

Run lab.py capstone and inspect K11-INTEGRATED.json. All eight controls must pass. Combine with separately captured K03–K05 evidence; this test is not actual secure boot, live gateway or firmware rollback enforcement. Document residual STRIDE/DREAD risks, then Ctrl+C only your own foreground brokers.

### K12 — K12 · Mutual TLS and device identity

Run advanced_security.py mtls from ~/kali-labs. The script creates temporary CA/client/server certificates and chooses a local ephemeral port; no broker needed. Confirm trusted exchange and specific rejection of missing client cert and wrong hostname. Temporary files removed automatically. This is TLS over TCP, not MQTT mTLS.

### K13 — K13 · Authenticated encryption benchmarking

Run in a fresh writable results directory (the script refuses to overwrite aes_trials.csv). Expect four sizes, 100 measured samples each, warm-ups excluded. Verify CSV has header plus 400 rows. Record host, Python, OpenSSL and units microseconds; these are combined encrypt/decrypt host times, not MCU or energy.

### K14 — K14 · Defensive sensor anomaly detection

Run advanced_security.py anomaly. The ten cases have predefined labels, threshold outside 0–35 C. Expected TP=3, TN=5, FP=1, FN=1; precision=recall=0.75. Report these as synthetic teaching cases, not measured intrusion detection performance.

### K15 — K15 · Ascon-AEAD128 · lightweight authenticated encryption

Run ascon_course.py and require overall pass true, 182 checks (6 known-answer, 36 round trip, 140 tamper controls). Save stdout JSON in a fresh file. Reference vectors compare independently published expected bytes; the Python implementation is not certified or side-channel hardened.

### K16 — K16 · Authenticated audit log verification

Run defensive_range.py audit. Require five pass flags and explain why independent anchor/count is necessary for truncation detection. Uses ephemeral key and fictional events, not live broker-log monitoring.

### K17 — K17 · Credential lifecycle and key rotation

Run defensive_range.py rotation; require six pass flags. Fresh key succeeds; retired key and replay rejected; sequence state preserved within one run. This is in-memory lifecycle logic, not certificate enrollment or hardware key storage.

### B01 — B01 · Hash functions and linked blocks

Use browser model, Build three blocks, verify all true. Modify first payload without rehash: index 0 false, indices 1 and 2 may still have locally consistent links. Rehash first only: index 0 true, index 1 false. A trusted checkpoint or consensus is needed; local hashes alone do not prove immutable history.

### B02 — B02 · Merkle trees and inclusion proofs

Build once, retain root. Leaf 0 sample-A must verify, sample-X must fail; select leaf 2 and type sample-C to verify against the unchanged root. Do not rebuild after changing candidate because that changes the reference. This is a domain-separated binary teaching tree, not an Ethereum trie.

### B03 — B03 · Distributed agreement and finality

Four voters, threshold three, one vote per voter. AAAA gives A; AABB gives no decision; BBBO gives B, BBOO gives no decision (O means offline). This is a fixed educational voting abstraction, not proof-of-stake or Byzantine consensus.

### B04 — B04 · Solidity fundamentals with Remix

Open Remix IDE with internet for initial compiler download. Create/upload Counter.sol; choose compiler 0.8.28, Shanghai EVM target and optimization off. Deploy & Run: choose Remix VM with compatible fork, account 0, VALUE 0 and Counter. Deploy then expand deployed instance. count=0; increment twice then count=2; reset then count=0. Inspect successful transaction receipts and CountChanged events. Read calls do not change state; no real funds/wallet.

### B05 — B05 · IoT device registry and access control

Compile DeviceRegistry.sol using B04 settings. Deploy from account 0, save account 1 address. Verify owner/account 0 and active(account 1)=false. From account 0 setDevice(account 1,true); read true and event. Switch account 2, attempt setDevice(account 1,false), require NotOwner revert and unchanged true. Return account 0, revoke and verify false. A network/compilation error is not a valid negative control.

### B06 — B06 · Telemetry commitments and replay resistance

Deploy TelemetryAnchor.sol from account 0, authorize account 1. Exact fictional UTF-8 text device-01:25.0 has SHA-256 0xd7aae1a6cca0a659dd989fab5f79b58c6832551afe8a11bac382b20a35d74e78. Use the whole 0x-prefixed 32-byte digest, no quotes or extra 0x, sequence 1; switch Remix caller to account 1. Require successful receipt, lastSequence=1, matching digest; duplicate must revert InvalidSequence. Owner revokes; account 1 seq 2 must revert Unauthorized. Reauthorize, seq 2 succeeds. VerifyLatest reads only latest commitment, not measurement truth.

### B07 — B07 · IoT dApp workflow and event evidence

Extract blockchain-toolkit.zip; open a terminal in its blockchain folder (verify package.json, contracts/ and evm-test.cjs exist). Node.js 20+ and npm required, internet for first install. Run node --version, npm --version, npm install, npm ls --depth=0, then npm test. Require exit 0, evm-evidence.json and gas-trials.csv. Archive both before rerunning. If DNS, compiler, contract or transaction error occurs, stop and record it; no real accounts or funds. The optional runner is a local programmatic dApp client, not a browser dApp or public blockchain.

### B08 — B08 · Gas, scalability and experimental design

Use B07 runner or Remix. Control compiler 0.8.28, optimizer off, Shanghai fork. Use separate freshly deployed GasStudy instances for raw and digest conditions; same account, VALUE 0, nonzero payload sizes 32/128/512/1024 bytes, three pairs per size. Use matching SHA-256 digest of exact bytes. Record actual receipt gasUsed (not gas limit/estimate) and verify stored values. Exclude deployment gas. Compare 12 pairs and report mean/range; no fabricated gas numbers. Browser byte comparison is not gas.

### B09 — B09 · Blockchain privacy and secure IoT design

Commit exactly 25.0, compare candidate 24.0 then 25.0, expect false then true. Hashing low-entropy values does not conceal them; use fictional data only. Document encrypted off-chain storage, access controls, random secret salt where appropriate, retention and transaction metadata limitations. Submit STRIDE/attack-tree/DREAD reasoning; not a security certification.

### K18 — K18 · Comparative AES-GCM and Ascon benchmarking

Copy updated security_extensions.py and ascon_course.py into ~/kali-labs. Run in a fresh mktemp results directory; output is benchmark.json and aead-comparison.csv with 800 data rows (two implementations × four sizes × 100). Compare combined encrypt+decrypt microseconds; Python Ascon versus native-library AES is implementation-level, not a fair isolated algorithm/MCU speed claim. No memory or energy measured.

### K19 — K19 · Certificate revocation lifecycle

Run security_extensions.py revocation. Require valid sensor before revocation, certificate revoked for sensor after revocation, valid viewer. Temporary CA/CRL files are deleted. This is explicit offline CRL verification, not automatic broker session termination.

### K20 — K20 · Authenticated IoT gateway and defensive monitoring

Run security_extensions.py gateway. Require two accepted records and three rejected decisions with alert true. Input size, HMAC, schema and sequence are checked. This is bounded local policy logic; no live MQTT gateway or IDS deployment.

## Changes to executable sources

- P32, P33, P34: explicit nonzero exit on exhausted reads; validate temperature/humidity range; preserve cleanup. P34 rejects zero/non-numeric entry ID and handles request failures without printing credentials.
- X8: resolve pi-practical module path from script location, not the current directory.
- B07/B08: stricter expected-revert checks and two separate fresh instances for gas pairs; source updated, but actual EVM runner remains unverified.
- Command panels, source copies, course catalog, mentor source text and downloadable Ubuntu/Blockchain toolkits updated.

## Remaining target acceptance

- Actual Windows WSL install, Ubuntu/Kali APT, GPIO Zero runtime (missing here), PlatformIO/Wokwi, actual physical hardware, serial, broker, databases, public cloud and real Ollama.
- npm registry DNS failure and uncached packages prevent compiling/deploying Solidity. The browser models and Node syntax checks are not Solidity execution.
- K03/K05 live MQTT and tcpdump unavailable; K04 offline hostname checks are not a live broker TLS test. No claims of production security certification.
- External ThingSpeak checks use controlled local response/HTTP fixtures only. No actual channel credentials were used.

## Evidence

Raw rerun logs and security JSON/CSV output: `validation-evidence/audit16-1/`. The evidence is from the build host; students must collect their own observations. Official Remix documentation: https://remix-ide.readthedocs.io/en/latest/run.html.

## Final post-correction checks

All thirteen JavaScript regression suites passed again after the source/catalog updates. P40 loopback boundary controls: 29.9 → FAN_OFF, 30.0 → FAN_OFF, 30.1 → FAN_ON. B09 exact-byte hash comparison passed. Representative Chromium inline-asset smoke checks passed on P32, K18 and B07 for visible acceptance checklists and single contextual banners. Browser storage was a test fixture; this is not an end-to-end WSL or Solidity test. All catalog source hashes and local links were verified.
