Esp32 Crypto Accelerator
A crypto accelerator block exists because running AES, SHA, or RSA/ECC operations in pure software on the CPU is both too slow for real-time use and, more importantly, leaks timing and power information an attacker can exploit — dedicated hardware engines solve both problems at once by doing the math in fixed-function silicon that runs in constant time regardless of the data it's processing. Flash encryption needs AES decryption fast enough to keep up with instruction fetches without stalling the CPU; secure boot needs a signature check (typically RSA or ECC) and a hash (SHA) on every boot; a software implementation of any of these running on the general-purpose CPU core would be an order of magnitude slower and would process different key or data values in data-dependent time, which is exactly the kind of leakage a dedicated, carefully-designed hardware engine is built to avoid.
The eFuse array's defining property is that it's genuinely one-way: bits can be burned from 0 to 1 at manufacturing or provisioning time, and once burned they can never be reset — which is the only way to guarantee a device's unique key material can't be rewritten or wiped by an attacker later. Storing keys in regular flash would leave them vulnerable to the same read/write access that makes flash useful for firmware updates in the first place; eFuse bits are instead physically one-time-programmable, and the read-protect configuration on security-critical fuses ensures the key material inside them is accessible only to the crypto engine's own internal logic — not to the CPU, not to JTAG debug, not to any software running on the chip at all, authorized or not.
Side-channel resistance is a design requirement independent of raw cryptographic correctness, because a mathematically correct AES implementation can still leak its key through power consumption or electromagnetic emission patterns that vary with the data being processed. An unprotected hardware AES engine can inadvertently draw measurably different current depending on the specific bits of the key or plaintext it's processing at a given instant, and an attacker with physical access and the right equipment can reconstruct key material purely from that power trace without ever breaking the cryptography itself — which is why security-grade crypto hardware adds deliberate countermeasures (power-consumption randomization, timing uniformity across all possible input values) specifically against this class of attack, a concern that has nothing to do with whether the underlying algorithm is implemented correctly.
The crypto accelerator and the secure-boot chain of trust depend on each other in a way that makes one useless without the other: fast hardware verification is pointless if the key it verifies against can be read out, and an unreadable key is pointless if checking a signature against it takes so long that secure boot becomes impractical to actually enable in production. A design that nails the eFuse isolation but implements RSA verification in slow software ends up with boot times long enough that products disable secure boot for user-experience reasons; a design with blazing-fast hardware crypto but no real key isolation protects nothing against the threat secure boot actually exists to stop — both halves have to be solved together for either one to matter.
Crypto accelerator design on a chip like this is really two separate engineering problems solved together: hardware engines fast enough that flash encryption and secure-boot verification don't cost meaningful boot time or runtime overhead, and an eFuse key-storage scheme isolated thoroughly enough that speed never comes at the cost of a key an attacker can actually extract.