MCPcopy Index your code
hub / github.com/equipter/mfkey32v2

github.com/equipter/mfkey32v2 @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
77 symbols 162 edges 10 files 13 documented · 17%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Mfkey32 Version 2

Mfkey32v2 is a tool used to calculate Mifare Classic Keys from encrypted nonces obtained from the reader.

Note: Nonce in computer terminology means "Number used once"

Acknowledgements

Disclaimer

No one involved in this project is responsible for how you use it. Always follow local laws and EULAs.

What is Mfkey32v2

Mfkey32v2 calculates Mifare Classic Sector keys from encrypted nonces collected by emulating the initial card and recording the interaction between the emulated card and the respective reader.

While performing authentication, the reader will send "nonces" to the card which can be decrypted into keys.

Mfkey32v2 is not magic it cannot create you a working credential without an initial card. The Keys generated are not keys to open the door, they are keys to unlock and read sectors from inside the card itself.

Collecting Nonces with the FlipperZero

  1. After scanning your mifare classic and verifying you do not have all sector keys, save the file.
  2. Navigate to NFC -> Saved -> [Your File] -> detect reader
  3. Approach reader with flipperzero and observe nonces being collected.
  4. Once collected you can move on to cracking, see below the different methods (NOTE: They all do the same thing just in different ways) image

Mfkey32v2 Implementations

MfKey32v2 has a few different implementations as time has progressed.

From the list below select the mfkey32v2 instructions best suited to you.

Datasheets

If you are interested in mfkey32v2 and/or mifare classic as a whole, below are links for mifare classic and other relevant datasheets. * Mifare Classic 1k ev1 * Mifare Classic 4k ev1 * Mifare Identification Procedure - AN10833

Support

For support in using Mfkey32v2 message Equip on discord or file a github issue.

Core symbols most depended-on inside this repo

lfsr_rollback_bit
called by 43
include/crypto01.c
crypto1_bit
called by 40
include/crypto1.c
filter
called by 18
include/crypto1.c
evenparity32
called by 18
include/parity.h
_connectToFlipperCli
called by 5
mfkey_extract.py
lfsr_rollback_word
called by 5
include/crypto01.c
crypto1_word
called by 3
include/crypto1.c
prng_successor
called by 3
include/crypto1.c

Shape

Function 34
Method 28
Class 15

Languages

Python47%
C39%
C++14%

Modules by API surface

mfkey_extract.py36 symbols
include/crypto01.c16 symbols
include/crypto1.c11 symbols
include/parity.h6 symbols
mfkey32v2.c2 symbols
include/crypto01.h2 symbols
include/bucketsort.h2 symbols
include/common.h1 symbols
include/bucketsort.c1 symbols

For agents

$ claude mcp add mfkey32v2 \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact