]>
cvs.zerfleddert.de Git - proxmark3-svn/blob - client/nonce2key/nonce2key.h
1 //-----------------------------------------------------------------------------
6 // marshmellow42 - june 2016
7 // This code is licensed to you under the terms of the GNU GPL, version 2 or,
8 // at your option, any later version. See the LICENSE.txt file for the text of
10 //-----------------------------------------------------------------------------
11 // MIFARE Darkside hack
12 //-----------------------------------------------------------------------------
21 #include "mifare.h" // nonces_t struct
22 #include "ui.h" // PrintAndLog
23 #include "util.h" // FALSE / TRUE
24 #include "proxmark3.h"
25 #include "mifarehost.h"
27 extern int nonce2key(uint32_t uid
, uint32_t nt
, uint32_t nr
, uint64_t par_info
, uint64_t ks_info
, uint64_t * key
);
28 extern int nonce2key_ex(uint8_t blockno
, uint8_t keytype
, uint32_t uid
, uint32_t nt
, uint32_t nr
, uint64_t ks_info
, uint64_t * key
);
30 //iceman, added these to be able to crack key direct from "hf 14 sim" && "hf mf sim"
31 bool tryMfk32(nonces_t data
, uint64_t *outputkey
, bool verbose
);
32 bool tryMfk32_moebius(nonces_t data
, uint64_t *outputkey
, bool verbose
); // <<-- this one has best success
33 int tryMfk64_ex(uint8_t *data
, uint64_t *outputkey
);
34 int tryMfk64(uint32_t uid
, uint32_t nt
, uint32_t nr_enc
, uint32_t ar_enc
, uint32_t at_enc
, uint64_t *outputkey
);