---
title: "My office as entropy"
section: posts
description: "Turning my office's environmental data into verifiable randomness."
tags: ["hardware", "blockchain", "randomness", "circom", "entropy", "ipfs"]
created: 2025-09-02T08:17:00Z
updated: 2026-07-16T14:59:44Z
cid: bafkreieiymtmfagv4rgotmt6dvfhit6pdfkugjqiiis4m4smxnlwery3pq
html: https://iammatthias.com/posts/1756826230035-my-office-as-entropy
---

# My office as entropy

![](https://blobs.farfield.systems/blobs/bafkreiau5mknxfg2oiacdnv5cgwb7k4i2yfc5fd56i6xjhjkeiib5rdngq)

I was in the shower around 5am on Labor Day, watching the soapy water swirl and run down the drain. It reminded me of sea foam, and my thoughts drifted from waves to Nazaré before settling on [Chaos in Lisbon](https://blog.cloudflare.com/chaos-in-cloudflare-lisbon-office-securing-the-internet-with-wave-motion/). Cloudflare uses 50 wave machines moving in unison to produce entropy for securing the web, an unusually literal collision of form and function.

On January 2nd, 2025 I started tracking the conditions of my home office using a Raspberry Pi 0 W 2 and a Waveshare Environment Sensor HAT (ESH).

| Sensor                            | Measurement Range / Specs                                                        |
| --------------------------------- | -------------------------------------------------------------------------------- |
| **TSL25911 Ambient Light**        | 0 ~ 88,000 Lux                                                                   |
| **BME280 Temp/Humidity/Pressure** | -40 ~ 85 °C (±1 °C); 0 ~ 100 %RH (±3 %RH); 300 ~ 1100 hPa (±1 hPa)               |
| **ICM20948 Motion (9-DOF)**       | Accel: ±2/4/8/16 g; Gyro: ±250/500/1000/2000 °/s; Mag: ±4900 µT                  |
| **LTR390-UV-1 UV**                | 280 ~ 430 nm wavelength                                                          |
| **SGP40 VOC**                     | 0 ~ 1,000 ppm ethanol eq.; <10 s response; <60 s startup; on-chip humidity comp. |

The readings also feed an ongoing visualization at [office.pure---internet.com](https://office.pure---internet.com/).

This was an opportunity to dig deeper into ZK. The documentation for tooling like [Circom](https://docs.circom.io/) and [Noir](https://noir-lang.org/) keeps improving and LLMs close the gap fast. I had a shower thought, Claude Code, and Cursor.

I picked Circom. Noir's backend-agnostic approach was tempting and the docs felt slightly more approachable, but the Barretenberg prover has issues on ARM.

## 329k rows → single seed

The master secret is the foundation of this system. The pipeline runs over 329,000+ sensor readings collected since January 2nd, with measurements from six environmental sensors (ambient light, temperature, humidity, pressure, UV, VOC).

The historical data gets chunked into windows of 100 readings. Each window collapses to a fingerprint built from mean, variance, and min/max across the sensors. Poseidon hash (ZK-friendly) turns each window into a deterministic value. Iterative hashing across all the window fingerprints produces a single 256-bit master secret.

The master secret is impractical to reproduce without the exact readings in the exact order, deterministic for the same input, and designed to reveal nothing about the underlying values.

The pipeline also pulls frequency patterns out of the motion data. Vibrations from passing trucks, footsteps, or the washing machine leave signatures that are nearly impossible to replicate.

Generation combines the master secret (hidden), a user-provided seed (public), and a timestamp, so every output is unique.

The result is a ZK proof that says "this randomness came from real sensor data, processed correctly," without exposing my office. Reusing the same seed produces different randomness, because my office is always changing.

## Building the proof

The proof makes four claims: I know the master secret without revealing it, I used the committed sensor data without exposing the readings, I processed it through the specified algorithm, and the result was not altered afterward. A digital wax seal.

The secret inputs (sensor readings, master secret, intermediate calculations) stay locked. The public inputs (seed, timestamp, final random number, sensor data fingerprint) are open for anyone to verify.

## Keeping receipts

These proofs are small, about 2KB each. I use IPFS through Pinata to store them, and when a proof is generated and uploaded the CID and random number are stored onchain.

The whole thing lives at `0xCf5Ea3Acb389b8a89935BD542273290F05f3054D` on Base Sepolia testnet.

## What's next

The pipeline is running and has processed hundreds of proofs. A request produces verifiable randomness from whatever is happening in my office at that moment, then carries the proof through IPFS and Base Sepolia.

I keep thinking about a network of sensor operators contributing entropy to a shared pool, with batched or recursive proofs compressing the output and bridges carrying the result elsewhere. That would require standards for what an environmental randomness beacon actually promises.

*LavaRand* and *Chainlink VRF* already provide randomness at scale. This version is one office, six sensors, and a proof small enough to pin to IPFS.

---

## Related

- [orbz dot com](https://iammatthias.com/posts/1736537615834-orbz-dot-com.md): orbz.fun reads Orbiter's onchain site registry and turns it into a StumbleUpon-style discovery tool.
- [Mint thyself](https://iammatthias.com/posts/1685948400001-mint-thyself.md): A Zora HTML edition that embeds its own mint interface and can be minted from itself.
- [Now Playing](https://iammatthias.com/posts/1784736733544-now-playing.md): Putting my Apple Music "Now Playing" on display with a Raspberry Pi and a 64x64 LED matrix.
- [Intern](https://iammatthias.com/posts/1781835006151-intern.md): The Autonomous Intern ships as a Raspberry Pi 5 in a desk-toy case running a stack I didn't pick. I flashed it to Debian Trixie, swapped the whole thing for the Hermes agent with its own built-in memory, and folded it all into one setup script.
- [Adventures in Machine Vision](https://iammatthias.com/posts/1780360240000-adventures-in-machine-vision.md): A Nat Friedman anecdote about an AI watching him drink water sent me digging for a spare Raspberry Pi. Now a camera and a sensor HAT watch my desk, a self-inflicted panopticon that logs who walks by and what the room is doing.
