The existing mfulc_fingerprint() detects known counterfeit families
(Lab401 DW, Feiju FJ8010, USCUID-UL v1/v2, Giantec GT23SC4489,
Hospitality) by their deterministic command and CRC tells, returning
early on a match. This commit adds a generic weak-PRNG catch-all for
clones that evade those fixed profiles.
mfulc_prng_test() runs on the genuine-looking fallthrough, right before
the "likely MF0ICU2" verdict. It collects RndB nonces via repeated 1A00
auth starts and flags a duplicate:
- Genuine NXP draws RndB from a hardware TRNG (2^64 space), so it
never repeats across a realistic batch.
- Giantec/USCUID use a 16-bit LFSR whose wakeup-timing seed
concentrates the observed pool to roughly 2^6.5, so a duplicate
appears within 12 authentications.
A single collision is proof of a weak PRNG. This backstop catches
weak-RNG clones, including future variants the profile table does not
know. MFULC_PRNG_SAMPLES (40) and MFULC_PRNG_CLEAR (39) are tunable.
Tested on genuine NXP MF0ULC (UID 04 1C BE 92 E7 7A 80): 40 unique
nonces, no collision, verdict "consistent with a genuine TRNG".
Ref: "BREAKMEIFYOUCAN!", eprint.iacr.org/2026/100, Section 11.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012e7xUDfDUXJQU7SWV3ULS1