Cryptonite: Neural Network Inference on the ESP32 RSA Accelerator

Many microcontrollers include a big-integer multiplier for public-key cryptography, and it sits idle whenever the chip is not running public-key operations. We test whether it can run int8 keyword-spotting (KWS) networks on the ESP32, a low-power, affordable, and widely available microcontroller whose RSA accelerator multiplies integers up to 2048 bits. Kronecker packing fits many small multiplies into one 2048-bit multiply, a cost model planner chooses the packing for each layer, a direct register driver cuts about 20 to 37 µs of overhead off every multiply, and the CPU prepares the next job while the multiplier runs. On ten KWS networks from Speech Commands v0.02, these optimizations reduce total accelerator time from 171 s to 31 s (with 4-bit weights), but the accelerator is still slower than an optimized int8 CPU kernel (14.6 s). The reason is that a network layer uses only about 2% of the products each multiply computes. Long 1-D filters use all of them: with 128 taps and 4-bit data, the accelerator is 2.90× faster than the best CPU kernel on two cores, and measured on the board's supply it uses 2.8× less energy per clip. Retraining the ten networks with a 128-tap filter front end makes them 1.26× faster than two CPU cores with 1.27× less energy, at a cost of 2.1 to 7.3 accuracy points.

Authors

Institutions

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-12-02
DOI
https://doi.org/10.5281/zenodo.24737858
Primary Topic
Advanced Neural Network Applications
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

Cryptonite: Neural Network Inference on the ESP32 RSA Accelerator

Wyatt Beaulieu, James Strong, Ankush Achwani
Zenodo (CERN European Organization for Nuclear Research)
Advanced Neural Network Applications
preprint

Cryptonite: Neural Network Inference on the ESP32 RSA Accelerator

Wyatt Beaulieu, James Strong, Ankush Achwani
preprint en

Abstract

Many microcontrollers include a big-integer multiplier for public-key cryptography, and it sits idle whenever the chip is not running public-key operations. We test whether it can run int8 keyword-spotting (KWS) networks on the ESP32, a low-power, affordable, and widely available microcontroller whose RSA accelerator multiplies integers up to 2048 bits. Kronecker packing fits many small multiplies into one 2048-bit multiply, a cost model planner chooses the packing for each layer, a direct register driver cuts about 20 to 37 µs of overhead off every multiply, and the CPU prepares the next job while the multiplier runs. On ten KWS networks from Speech Commands v0.02, these optimizations reduce total accelerator time from 171 s to 31 s (with 4-bit weights), but the accelerator is still slower than an optimized int8 CPU kernel (14.6 s). The reason is that a network layer uses only about 2% of the products each multiply computes. Long 1-D filters use all of them: with 128 taps and 4-bit data, the accelerator is 2.90× faster than the best CPU kernel on two cores, and measured on the board's supply it uses 2.8× less energy per clip. Retraining the ten networks with a 128-tap filter front end makes them 1.26× faster than two CPU cores with 1.27× less energy, at a cost of 2.1 to 7.3 accuracy points.

Zenodo (CERN European Organization for Nuclear Research)
University of Massachusetts Amherst (US)
Advanced Neural Network Applications
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon