nfc-tools / mfoc-hardnested

A fork of mfoc integrating hardnested code from the proxmark
GNU General Public License v2.0
201 stars 32 forks source link

Key-reuse check algorithm re-checks already known keys for each new sector key found #5

Open aczid opened 3 years ago

aczid commented 3 years ago

Excerpt of the problem:

Sector 38 - Unknown Key A               Unknown Key B
Sector 39 - Found   Key A: 000000000000 Found   Key B: 000000000000

...

     266 | 22A |    1907 | Brute force phase completed. Key found: 72de9a8d5256    |               0 |    0s          
Checking for key reuse...
[Key: 000000000000] -> [xxxxxxxxxxxxxxxxxxxxxx/................x]
[Key: 72de9a8d5256] -> [xxxxxxxxxxxxxxxxxxxxxx/..........

This is not the smart way to do it, and also it appears the code hangs there. :-(

I would expect the key-reuse check to only test the newly found key, and keep its earlier sector key results.

vk496 commented 3 years ago

The main algorithm should be redone. Is not the first time issues related to a bad workflow...

Probably this is related: https://github.com/vk496/mfoc/issues/15