Post B6JFh3XewvMtxTvLsm by ktims@nonexistent.ca
(DIR) More posts by ktims@nonexistent.ca
(DIR) Post #B6J8pgmgES0aIt7SIy by azonenberg@ioc.exchange
0 likes, 0 repeats
Fun engineering/privacy problem: design a device that plugs into an ESP32 based sensor node that has a microphone and reports ambient noise levels in dBa via MQTT or similar.That's the easy part.The hard part is to do so in a way that you can prove it's incapable of being used as a bug/listening device even in the worst case scenario (attacker running arbitrary code on any programmable component).My initial thought is to record audio from a MEMS mic into a tiny MCU with limited RAM capacity, then report results to the main system processor through some kind of R-C low pass filter that only lets like one bit per second pass through.Or maybe a bank of analog filters and peak hold blocks? I want proper weighted dBa.
(DIR) Post #B6J90K1LCsImtC2y9I by azonenberg@ioc.exchange
0 likes, 0 repeats
Ultimately i think whether analog or digital the goal is to have a bandwidth limited hardware choke point where you can prove no leakage of sufficient capacity to pass raw audio, and ideally not enough computing power to run any kind of speech recognition algorithm.
(DIR) Post #B6J9A6340fkqS1Vty4 by azonenberg@ioc.exchange
0 likes, 0 repeats
The goal is to ensure that as long as you can trust the device hasn't been physically altered by a malicious third party an OTA compromise cannot turn it into a bug
(DIR) Post #B6JBHl4O5k7pbzuiq8 by jackscottau@aus.social
0 likes, 0 repeats
@azonenberg Does the device have to be verifiable to the naked eye, or what tools are required? What level of skill does the verifier have to have?
(DIR) Post #B6JBOFbFUjGy2KNds8 by azonenberg@ioc.exchange
0 likes, 0 repeats
@jackscottau I guess the benchmark is "you are going to put one of these things in your house running firmware somebody else wrote".If you trust a random catgirl on the internet, great problem solved. Most people don't
(DIR) Post #B6JBhIQnBxdcJtZT2O by azonenberg@ioc.exchange
0 likes, 0 repeats
@jackscottau the kind of person who would put an alexa gizmo in their house without a second thought will also deploy one of these without a care.Someone whose reaction on seeing an alexa is to throw it into the core of a nuclear reactor is going to be a lot more skeptical of one of these.
(DIR) Post #B6JBtwGGvh3tKIg8UC by 0xC01DC0FFEE@bytearray.eu
0 likes, 0 repeats
@azonenberg Interesting. How about doing the audio processing on a little uC that sends the noise level over some bus, but just not connect it's programming lines to the OTA?
(DIR) Post #B6JBzln2m6mAaTmuBc by jpm@aus.social
0 likes, 0 repeats
@azonenberg it would also depend on if you want to measure peak or average SPL. A basic first place to start is the slowest ADC you can find, and clock it at like 1Hz or something.
(DIR) Post #B6JFh3XewvMtxTvLsm by ktims@nonexistent.ca
0 likes, 0 repeats
@azonenberg PDM mics are quite common these days. I think you could just put a hard low pass on the output at a below audible cutoff and take the DC value to get average amplitude and derive power from that. You'd have to prove the filter design and sampling hardware couldn't still pull anything out but it'd get you most of the way there I reckon.
(DIR) Post #B6JUWNTA1Az3tCBaAy by azonenberg@ioc.exchange
0 likes, 0 repeats
@asj @nottinghack yep that's a perfect use case for this sort of thing. You want rough noise levels and no more, in a way that people can trust
(DIR) Post #B6JbOpEpabhtNKpTdI by oseiler@mastodon.nz
0 likes, 0 repeats
@azonenberg I recently watched someone suggesting just that (isolated low capability yC doing the recording and passing abstracted measurements via i2c or similar back together the main controller) - will have a look
(DIR) Post #B6JuGMlFTtPBrqfjiC by AMS@infosec.exchange
0 likes, 0 repeats
@azonenberg If you want digital, a small OTP MCU in WLCSP (for IR inspection) that has only an output uart to the main network processor to take mic in and output dBA at low rate. Have it read out the whole firmware at boot so you can verify it on the network processor combined with IR verification that it's the right MCU so you know it doesn't have enough memory to both read out the right firmware and cheat.
(DIR) Post #B6JuQKUcljJPjFeBbE by jenesuispersonne@piaille.fr
0 likes, 0 repeats
@azonenberg Make it runs for months on 2xAA batteries.You don't need more to make your proofs.
(DIR) Post #B6K28uVGwYPhpm9g7E by oseiler@mastodon.nz
0 likes, 0 repeats
@azonenberg https://www.youtube.com/watch?v=WCnojaEpF2Iat 30:50 mark
(DIR) Post #B6K28uhKDk3SR9nIu0 by oseiler@mastodon.nz
0 likes, 0 repeats
@azonenberg https://pcbartists.com/product-documentation/i2c-decibel-meter-pro-lp-register-map/amp/
(DIR) Post #B6K28uunPepX6w63to by azonenberg@ioc.exchange
0 likes, 0 repeats
@oseiler that is exactly what i don't want: a full stm32 connected to a mems microphone that could easily be modified to stream full audio over the i2c interface.
(DIR) Post #B6K2ETiJSYq0U7uSq8 by azonenberg@ioc.exchange
0 likes, 0 repeats
@oseiler someone looking at that device has no easy way to verify it's not recording full audio, and unless they provide firmware and an easy way to reflash it, you can't trust what's on there
(DIR) Post #B6KVU0KFOBsEdwPPH6 by oseiler@mastodon.nz
0 likes, 0 repeats
@azonenberg I meant the basic principle, move the audio processing to a separate component, maybe pick something much less powerful than the stm, and interface in a way impossible to carry full audio.