PIC32MZ2048ECM064 Extraction When Crypto Changes Nothing

Clients seeing “crypto engine” on a PIC32MZ2048ECM064 datasheet often assume the firmware inside must be encrypted. It almost never is. The engine on this die is a peripheral: AES, 3DES, SHA-1 and SHA-256, MD5 and HMAC, fed by a random number generator, invoked by software on data the software chooses. It accelerates TLS handshakes and authenticates firmware updates. It does not encrypt the program flash. A locked-down extraction on this part is gated by exactly one thing — the code-protection word — and the cipher block is a bystander.

What The M Letter Means

Within the EC family’s suffix system, M parts enable both the dual CAN controllers and the crypto engine on the same silicon the G and H variants use. Core-side nothing moves: microAptiv at 200 MHz and roughly 330 DMIPS, five-stage pipeline, 16 KB instruction cache, 4 KB data cache, DSP accumulators, microMIPS encoding, no floating point unit. The 2 MB program array spans 0x1D000000 to 0x1D1FFFFF with 512 KB of SRAM behind it, and two 80 KB boot panels carry startup code plus configuration tails. The family overview tabulates all letter meanings across EC and EF.

Where Keys Actually Live

If an application encrypts secrets, the key material sits in the flash array like any other constant, or in a key slot the firmware loads at boot. That has a practical consequence for recovery work: an image read from this part is self-consistent. Re-hosting it on another board reproduces the crypto behavior without further archaeology, because the algorithm and the constants both traveled with the binary. The interesting failure mode is the reverse — a client who recovered an image from an H variant and is surprised that TLS code is absent. The letter predicted that before any byte was read.

The Actual Gate

Code protection on the MZ generation is a dedicated active-low configuration word at the boot panel tail, programmed alongside DEVCFG0 through 3 and mirrored by an alternate copy for ECC-fault fallback. Cleared to zero, it closes reads over ICSP and the 4-wire JTAG port simultaneously — there is no path through the debug TAP — and the only release command is the full chip erase, which takes both flash panels and both configuration copies. Write protection is a different mechanism entirely: flash-controller registers set by boot code, effective at runtime, irrelevant against an attack on the silicon. The copy-protection overview compares this model against older Microchip families.

The TRNG, Briefly

The random number generator deserves its own line in the report for a reason clients rarely anticipate: it makes behavior non-reproducible by design. A bench test that compares two boots of the same image will see different session keys, different nonces, different challenge values, which is expected and worth saying in writing, because an integrator who sees the difference without the note will file it as a defect. Deterministic parts of the crypto path, like the AES key schedule from a fixed key, remain reproducible and are what the bench actually asserts against. The review separates the two so acceptance criteria match the silicon.

How The Job Runs

Extraction on this part follows the family playbook — read both panels, read both boot banks, verify page checksums, parse the CAN and crypto initialization regions for the report, bench-test on a reference board. The 64-pin package keeps the design compact; images at 2 MB are rarely padded, so used-versus-erased boundaries sit tight against real code and a sloppy read shows immediately in the checksum pass. Ownership evidence and authorization come first, arranged through the services desk; the destructive chip-erase path is never taken without it.

The EF-generation successor, which pairs the same feature set with a floating point unit and a faster core, is profiled on the 1024EFK064 page.