Skip to content

v1.1.0 — RC522-HCE, protocol on the public API

Choose a tag to compare

@Nexusdeveloper902 Nexusdeveloper902 released this 11 Oct 00:07
· 17 commits to main since this release

Rename

Repo renamed esp32-rc522-hce → rc522-hce. The name no longer claims ESP32: the driver, docs, wiring tables and library metadata are board-neutral (ESP32, ESP8266, AVR UNO/Nano/Mega, STM32, RP2040, nRF52, Teensy — anything with an Arduino core and SPI). Old URLs redirect automatically.

The HCE protocol is now exposed on the API

Everything a phone app, reader firmware, or backend needs is reachable from the single public header, instead of being spread across docs and driver internals:

  • HceReader::verifyProof(proof, credId, credKey) — backend verification of a relayed tap, constant-time. This is where the per-credential key is used; the reader never holds it.
  • HceReader::aid() / aidLen() — the AID a phone's HCE app must serve.
  • HceReader::nonceLen() / macLen() / keyLen() / maxCredentialLen() — protocol lengths (8 / 32 / 32 / 32).
  • HceReader::statusWordName(sw1, sw2) — decodes 9000, 6A82, 6A88, 6985, 6700, 6D00, 6E00 for operator-facing messages.
  • HceReader::toHex() / fromHex() — wire transcripts and wrapped keys are hex.
  • HceReader::selfCheckVector() and TestVector::* — the pinned interop vector as named constants: credId, key, nonce, MAC, reader secret, wrapped key.
  • README gained "API at a glance" and "Where the HCE key lives": phone holds K_cred, reader holds only the enrollment wrap secret, server verifies and unwraps.

Tests

86 host-side tests (was 78). The new public-API suite includes only HceReader.h, so if the facade ever stops re-exporting something the docs promise, the build fails instead of the docs quietly lying.

Verified builds

  • pio test -e native — 86/86 passing, no board needed
  • ESP32 (esp32dev) — builds, 23% flash
  • Arduino Mega — builds, 31% RAM (UNO compiles but overflows its 2 KB RAM; documented)

Note: v1.0.0 predates the rename, so its source carries the old repo name. Prefer this release.