hf 14b view: decode MyKey / COGES keys on SRIX4K
The SRIX4K block scrambler in cmdhf14b.c was a three entry lookup table with its callers commented out, so `hf 14b valid` printed hard coded values and nothing ever decoded. The scrambler is a 4x4 transpose of the block read as sixteen crumbs. A transpose is its own inverse and it reproduces all three entries of the old table, so the stub is replaced by a working parser. client/src/parsers/parsemykey.c reads the application off a dump: key id, production date, operations counter, vendor code, lock id, current and previous credit, and the eight slot transaction ring. Every block carries a checksum in its top byte and the parser reports how many hold up, which catches a wrong UID or a torn write. The credit blocks are XORed with a session key derived from the UID, the vendor code and the count down counter in block 6, so the file name has to carry the UID. `hf 14b valid` is removed. Checking that the maths holds is now `hf 14b view --selftest`, following `hf mf view --selftest`, and it runs against traces/hf-14b-D0021F673CB26556-dump.json, a dump of a real reset key. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
199c3f107c
commit
e648438306
9 files changed
+630
-151
No files matched your search
@@ -439,6 +439,7 @@ set (TARGET_SOURCES
|
||||
${PM3_ROOT}/client/src/parsers/parsehid.c
|
||||
${PM3_ROOT}/client/src/parsers/parsevigik.c
|
||||
${PM3_ROOT}/client/src/parsers/parsehexact.c
|
||||
${PM3_ROOT}/client/src/parsers/parsemykey.c
|
||||
${PM3_ROOT}/client/src/parsers/parseproac.c
|
||||
${PM3_ROOT}/client/src/parsers/hrtparser/hrtparser.c
|
||||
${PM3_ROOT}/client/src/pla.c
|
||||
|
||||
Reference in new issue
Block a user