Adding Security to Microcontroller Ruby
summary
Adds TLS/HTTP to pRuby on an RP2040 (Raspberry Pi Pico W) using mbedTLS and lwIP, implements AES (CBC/GCM), SHA-256, base16/base64 and a ring-oscillator RNG, and exposes DNS/TCP/TLS/HTTP Ruby bindings in R2P2. Demonstration initially fails then succeeds; heap had to be cut from 194 KB to 96 KB to avoid OOM. Asymmetric ops are impractically slow (RSA‑2048 verify ~6.4s), so symmetric or gateway TLS is recommended.
AI-written summary · about
chapters (15)
- 0:00Introduction and setup
- 1:10Background and motivation
- 3:19Project ASMR overview
- 4:43Security warnings and limitations
- 5:26Cryptography in P Ruby
- 8:16Implementing MRBC extensions
- 10:44Random number generation
- 13:56Networking stack goals
- 16:25DNS and Wi-Fi integration
- 17:49Debugging connection issues
- 18:33TCP client implementation
- 20:20Adding TLS support
- 21:47Memory management challenges
- 22:50Future work and improvements
- 24:15Conclusion and Q&A
related talks
27mExtreme MQTT on PicoRuby
31mA Beginner's Complete Guide to Microcontroller Programming w..
36mUsing Ruby In Security Critical Applications
29mIntegration of PRK Firmware and R2P2
30mPicoRuby as a Multi-VM Operating System
34mMicroPython on the RP2040
45mIs Security on Your Nerves?
39mA Slice of Zephyr Pi!
